1 #ifndef ALIPHOSGETTERLIGHT_H
2 #define ALIPHOSGETTERLIGHT_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 //_________________________________________________________________________
9 // Class to substitute AliPHOSGetter in "on flight" reconstruction (i.e. without
10 // writing to file and creation full ALICE data structure)
12 //*-- Author: D.Peressounko (RRC KI)
15 // --- ROOT system ---
19 // --- Standard library ---
21 // --- AliRoot header files ---
22 #include "AliPHOSGetter.h"
23 #include "AliPHOSGeometry.h"
24 class AliPHOSClusterizer ;
25 class AliPHOSTrackSegmentMaker ;
28 class AliPHOSGetterLight : public AliPHOSGetter {
31 AliPHOSGetterLight() ; // ctor
32 AliPHOSGetterLight(const AliPHOSGetterLight & obj) : AliPHOSGetter(obj) {
33 // cpy ctor requested by Coding Convention
34 Fatal("cpy ctor", "not implemented") ;
37 AliPHOSGetterLight & operator = (const AliPHOSGetterLight & ) {
38 // assignement operator requested by coding convention, but not needed
39 Fatal("operator =", "not implemented") ;
43 virtual ~AliPHOSGetterLight() ; // dtor
45 //method normally used for creation of this class
46 static AliPHOSGetterLight * Instance(const char* /*headerFile*/,
47 const char* version = AliConfig::GetDefaultEventFolderName(),
48 Option_t * openingOption = "READ" ) ;
49 static AliPHOSGetterLight * Instance() ;
51 //=========== General information about run ==============
53 virtual Int_t MaxEvent() const {return 1 ;} //always "read" event 1
54 virtual Int_t EventNumber() const {return 0; } //always the same event
55 virtual Bool_t VersionExists(TString & /*opt*/) const {return kFALSE;}
56 virtual UShort_t EventPattern(void) const {return 0;} //not needed in on-flight reconstruction
57 virtual Float_t BeamEnergy(void) const {return 10.;} //not needed in on-flight reconstruction
59 //========== PHOSGeometry and PHOS =============
60 //Dummy function not necessary for on-flight reconstruction, but has to be overloaded
61 virtual AliPHOSGeometry * PHOSGeometry() const {return AliPHOSGeometry::GetInstance("IHEP","IHEP") ; } //Create if necessary geom
63 //========== Methods to read something from file ==========
64 virtual void Event(Int_t /*event*/, const char * /*opt = "HSDRTP"*/){} //Use data already in memory
67 //-----------------now getter's data--------------------------------------
69 //========== Digits ================
70 virtual TClonesArray * Digits(){return fDigits ; }
71 virtual AliPHOSDigit * Digit(Int_t index) { return static_cast<AliPHOSDigit *>(fDigits->At(index)) ;}
72 // virtual AliPHOSDigitizer * Digitizer(){Error("Digitizer","Method not defined") ; return 0;}
74 //========== RecPoints =============
75 virtual TObjArray * EmcRecPoints(){return fEmcRecPoints ;}
76 virtual AliPHOSEmcRecPoint * EmcRecPoint(Int_t index) { return static_cast<AliPHOSEmcRecPoint *>(fEmcRecPoints->At(index)) ;}
77 virtual TObjArray * CpvRecPoints(){return fCpvRecPoints ;}
78 virtual AliPHOSCpvRecPoint * CpvRecPoint(Int_t index) { return static_cast<AliPHOSCpvRecPoint *>(fCpvRecPoints->At(index)) ;}
79 virtual AliPHOSClusterizer * Clusterizer() { return fClusterizer;}
81 //========== TrackSegments TClonesArray * TrackSegments(const char * name = 0) {
82 virtual TClonesArray * TrackSegments(){return fTS ;} ;
83 virtual AliPHOSTrackSegment * TrackSegment(Int_t index) { return static_cast<AliPHOSTrackSegment *>(fTS->At(index)) ;}
84 virtual AliPHOSTrackSegmentMaker * TrackSegmentMaker(){ return fTSM ;}
86 //========== RecParticles ===========
87 virtual TClonesArray * RecParticles(){ return fRP;}
88 virtual AliPHOSRecParticle * RecParticle(Int_t index) { return static_cast<AliPHOSRecParticle *>(fRP->At(index)) ;}
89 virtual AliPHOSPID * PID(){return fPID ;}
91 //========== Raw ===========
92 // virtual Int_t ReadRaw(Int_t event) ;
94 virtual void PostClusterizer(AliPHOSClusterizer * clu)const{((AliPHOSGetterLight*)fgObjGetter)->fClusterizer = clu;}
95 virtual void PostPID(AliPHOSPID * pid)const{((AliPHOSGetterLight*)fgObjGetter)->fPID = pid ;}
96 virtual void PostTrackSegmentMaker(AliPHOSTrackSegmentMaker * tr)const{((AliPHOSGetterLight*)fgObjGetter)->fTSM = tr ;}
97 virtual TString Version() const { return "OnFlight" ; }
98 virtual void Reset(){}
100 virtual AliESD * ESD() const { return 0 ; }
104 AliPHOSGetterLight(const char* headerFile,
105 const char* version = AliConfig::GetDefaultEventFolderName(),
106 Option_t * openingOption = "READ") ;
110 TClonesArray * fDigits ; //Digits container for current event
111 TObjArray * fEmcRecPoints ; //EmcRecPoints container for current event
112 TObjArray * fCpvRecPoints ; //CPV RecPoints container for current event
113 TClonesArray * fTS ; //TrackSegments container for currect event
114 TClonesArray * fRP ; //Rec Particles conatiner for currect event
116 // AliPHOSCalibrationDB * fcdb ; //Pointer to calibration database
118 AliPHOSClusterizer * fClusterizer ; //Pointer to clusterizer
119 AliPHOSTrackSegmentMaker * fTSM ; //Pointer to TrackSegmentMaker
120 AliPHOSPID * fPID ; //Pointer to PIDMaker
122 // Bool_t fRawDigits ; //Do we reconstruct raw digits
124 ClassDef(AliPHOSGetterLight,1) // Getter for \"on flyght\" reconstruction
128 #endif // AliPHOSGETTERLIGHT_H