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);
34 AliPHOSGetterLight & operator = (const AliPHOSGetterLight & ) {
35 // assignement operator requested by coding convention, but not needed
36 Fatal("operator =", "not implemented") ;
40 virtual ~AliPHOSGetterLight() ; // dtor
42 //method normally used for creation of this class
43 static AliPHOSGetterLight * Instance(const char* /*headerFile*/,
44 const char* version = AliConfig::GetDefaultEventFolderName(),
45 Option_t * openingOption = "READ" ) ;
46 static AliPHOSGetterLight * Instance() ;
48 //=========== General information about run ==============
50 virtual Int_t MaxEvent() const {return 1 ;} //always "read" event 1
51 virtual Int_t EventNumber() const {return 0; } //always the same event
52 virtual Bool_t VersionExists(TString & /*opt*/) const {return kFALSE;}
53 virtual UShort_t EventPattern(void) const {return 0;} //not needed in on-flight reconstruction
54 virtual Float_t BeamEnergy(void) const {return 10.;} //not needed in on-flight reconstruction
56 //========== PHOSGeometry and PHOS =============
57 //Dummy function not necessary for on-flight reconstruction, but has to be overloaded
58 virtual AliPHOSGeometry * PHOSGeometry() const {return AliPHOSGeometry::GetInstance("IHEP","IHEP") ; } //Create if necessary geom
60 //========== Methods to read something from file ==========
61 virtual void Event(Int_t /*event*/, const char * /*opt = "HSDRTP"*/){} //Use data already in memory
64 //-----------------now getter's data--------------------------------------
66 //========== Digits ================
67 virtual TClonesArray * Digits() const {return fDigits ; }
68 virtual AliPHOSDigit * Digit(Int_t index) const { return static_cast<AliPHOSDigit *>(fDigits->At(index)) ;}
69 // virtual AliPHOSDigitizer * Digitizer(){Error("Digitizer","Method not defined") ; return 0;}
71 //========== RecPoints =============
72 virtual TObjArray * EmcRecPoints() const {return fEmcRecPoints ;}
73 virtual AliPHOSEmcRecPoint * EmcRecPoint(Int_t index) const { return static_cast<AliPHOSEmcRecPoint *>(fEmcRecPoints->At(index)) ;}
74 virtual TObjArray * CpvRecPoints() const {return fCpvRecPoints ;}
75 virtual AliPHOSCpvRecPoint * CpvRecPoint(Int_t index) const { return static_cast<AliPHOSCpvRecPoint *>(fCpvRecPoints->At(index)) ;}
76 virtual AliPHOSClusterizer * Clusterizer() { return fClusterizer;}
78 //========== TrackSegments TClonesArray * TrackSegments(const char * name = 0) {
79 virtual TClonesArray * TrackSegments() const {return fTS ;} ;
80 virtual AliPHOSTrackSegment * TrackSegment(Int_t index) const { return static_cast<AliPHOSTrackSegment *>(fTS->At(index)) ;}
81 virtual AliPHOSTrackSegmentMaker * TrackSegmentMaker(){ return fTSM ;}
83 //========== RecParticles ===========
84 virtual TClonesArray * RecParticles() const { return fRP;}
85 virtual AliPHOSRecParticle * RecParticle(Int_t index) const { return static_cast<AliPHOSRecParticle *>(fRP->At(index)) ;}
86 virtual AliPHOSPID * PID(){return fPID ;}
88 //========== Raw ===========
89 // virtual Int_t ReadRaw(Int_t event) ;
91 virtual void PostClusterizer(AliPHOSClusterizer * clu)const{((AliPHOSGetterLight*)fgObjGetter)->fClusterizer = clu;}
92 virtual void PostPID(AliPHOSPID * pid)const{((AliPHOSGetterLight*)fgObjGetter)->fPID = pid ;}
93 virtual void PostTrackSegmentMaker(AliPHOSTrackSegmentMaker * tr)const{((AliPHOSGetterLight*)fgObjGetter)->fTSM = tr ;}
94 virtual TString Version() const { return "OnFlight" ; }
95 virtual void Reset(){}
97 virtual AliESD * ESD() const { return 0 ; }
101 AliPHOSGetterLight(const char* headerFile,
102 const char* version = AliConfig::GetDefaultEventFolderName(),
103 Option_t * openingOption = "READ") ;
107 TClonesArray * fDigits ; //Digits container for current event
108 TObjArray * fEmcRecPoints ; //EmcRecPoints container for current event
109 TObjArray * fCpvRecPoints ; //CPV RecPoints container for current event
110 TClonesArray * fTS ; //TrackSegments container for currect event
111 TClonesArray * fRP ; //Rec Particles conatiner for currect event
113 // AliPHOSCalibrationDB * fcdb ; //Pointer to calibration database
115 AliPHOSClusterizer * fClusterizer ; //Pointer to clusterizer
116 AliPHOSTrackSegmentMaker * fTSM ; //Pointer to TrackSegmentMaker
117 AliPHOSPID * fPID ; //Pointer to PIDMaker
119 // Bool_t fRawDigits ; //Do we reconstruct raw digits
121 ClassDef(AliPHOSGetterLight,1) // Getter for \"on flyght\" reconstruction
125 #endif // AliPHOSGETTERLIGHT_H