Line data Source code
1 : /**************************************************************************
2 : * Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
3 : * *
4 : * Author: The ALICE Off-line Project. *
5 : * Contributors are mentioned in the code where appropriate. *
6 : * *
7 : * Permission to use, copy, modify and distribute this software and its *
8 : * documentation strictly for non-commercial purposes is hereby granted *
9 : * without fee, provided that the above copyright notice appears in all *
10 : * copies and that both the copyright notice and this permission notice *
11 : * appear in the supporting documentation. The authors make no claims *
12 : * about the suitability of this software for any purpose. It is *
13 : * provided "as is" without express or implied warranty. *
14 : **************************************************************************/
15 : #include <Riostream.h>
16 : #include "AliESDVertex.h"
17 : #include "AliLog.h"
18 : #include <TString.h>
19 : #include "AliITSVertexerFixed.h"
20 :
21 : /////////////////////////////////////////////////////////////////////////
22 : // //
23 : // Fixed vertexer - creates a vertex in a defined postion (x,y,z) //
24 : // the standard contructor takes a sting to specify the case //
25 : // Useful for reconstruction of injection tests with beam on TDI //
26 : // //
27 : /////////////////////////////////////////////////////////////////////////
28 :
29 : using std::endl;
30 : using std::cout;
31 118 : ClassImp(AliITSVertexerFixed)
32 :
33 : /* $Id$ */
34 :
35 : //______________________________________________________________________
36 0 : AliITSVertexerFixed::AliITSVertexerFixed():AliITSVertexer()
37 0 : {
38 : // Default Constructor
39 0 : AliWarning("This contructor sets the vertex in (0,0,0)");
40 0 : for(Int_t k=0; k<3;k++){
41 0 : fVtxPos[k]=0.;
42 0 : fVtxErr[k]=0.5;
43 : }
44 0 : }
45 :
46 : //______________________________________________________________________
47 0 : AliITSVertexerFixed::AliITSVertexerFixed(TString option):AliITSVertexer()
48 0 : {
49 : // Standard constructor
50 0 : if(option.Contains("TDI")){
51 0 : fVtxPos[0]=0.;
52 0 : fVtxPos[1]=0.;
53 0 : fVtxPos[2]=8000.; // TDI at z=80 m
54 0 : fVtxErr[0]=1.;
55 0 : fVtxErr[1]=1.;
56 0 : fVtxErr[2]=100.;
57 0 : }
58 0 : else if(option.Contains("TED")){
59 0 : fVtxPos[0]=0.;
60 0 : fVtxPos[1]=0.;
61 0 : fVtxPos[2]=34000.; // TED at z=+340 m
62 0 : fVtxErr[0]=1.;
63 0 : fVtxErr[1]=1.;
64 0 : fVtxErr[2]=100.;
65 0 : }else{
66 0 : AliError(Form("%s is invalid, sets the vertex in (0,0,0)",option.Data()));
67 0 : for(Int_t k=0; k<3;k++){
68 0 : fVtxPos[k]=0.;
69 0 : fVtxErr[k]=0.5;
70 : }
71 : }
72 0 : }
73 :
74 :
75 : //______________________________________________________________________
76 : AliESDVertex* AliITSVertexerFixed::FindVertexForCurrentEvent(TTree * /*itsClusterTree */){
77 : // Defines the AliITSVertex for the current event
78 :
79 0 : fCurrentVertex = new AliESDVertex(fVtxPos,fVtxErr,"Fixed Vertex");
80 0 : return fCurrentVertex;
81 :
82 0 : }
83 :
84 : //________________________________________________________
85 : void AliITSVertexerFixed::PrintStatus() const {
86 : // Print current status
87 0 : cout <<"=======================================================\n";
88 :
89 0 : cout<<"Fixed positions: ";
90 0 : for(Int_t k=0;k<3;k++)cout<<" "<<fVtxPos[k]<<"+-"<<fVtxErr[k];
91 0 : cout<<endl;
92 0 : }
93 :
|