]>
Commit | Line | Data |
---|---|---|
f2bde07c | 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 */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //_________________________________________________________________________ | |
3b844b86 | 9 | // Class to substitute AliPHOSGetter in "on flight" reconstruction (i.e. without |
f2bde07c | 10 | // writing to file and creation full ALICE data structure) |
11 | // | |
12 | //*-- Author: D.Peressounko (RRC KI) | |
13 | ||
14 | ||
15 | // --- ROOT system --- | |
16 | class TClonesArray ; | |
17 | class TObjArray ; | |
18 | ||
19 | // --- Standard library --- | |
20 | ||
21 | // --- AliRoot header files --- | |
22 | #include "AliPHOSGetter.h" | |
23 | #include "AliPHOSGeometry.h" | |
24 | class AliPHOSClusterizer ; | |
25 | class AliPHOSTrackSegmentMaker ; | |
26 | class AliPHOSPID ; | |
27 | ||
28 | class AliPHOSGetterLight : public AliPHOSGetter { | |
29 | ||
30 | public: | |
31 | AliPHOSGetterLight() ; // ctor | |
3b844b86 | 32 | AliPHOSGetterLight(const AliPHOSGetterLight & obj) : AliPHOSGetter(obj) { |
33 | // cpy ctor requested by Coding Convention | |
34 | Fatal("cpy ctor", "not implemented") ; | |
35 | } | |
36 | ||
37 | AliPHOSGetterLight & operator = (const AliPHOSGetterLight & ) { | |
38 | // assignement operator requested by coding convention, but not needed | |
39 | Fatal("operator =", "not implemented") ; | |
40 | return *this ; | |
41 | } | |
f2bde07c | 42 | |
43 | virtual ~AliPHOSGetterLight() ; // dtor | |
44 | ||
3b844b86 | 45 | //method normally used for creation of this class |
f2bde07c | 46 | static AliPHOSGetterLight * Instance(const char* /*headerFile*/, |
47 | const char* version = AliConfig::GetDefaultEventFolderName(), | |
48 | Option_t * openingOption = "READ" ) ; | |
49 | static AliPHOSGetterLight * Instance() ; | |
50 | ||
51 | //=========== General information about run ============== | |
f2bde07c | 52 | |
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;} | |
3b844b86 | 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 | |
f2bde07c | 58 | |
59 | //========== PHOSGeometry and PHOS ============= | |
3b844b86 | 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 | |
f2bde07c | 62 | |
63 | //========== Methods to read something from file ========== | |
64 | virtual void Event(Int_t /*event*/, const char * /*opt = "HSDRTP"*/){} //Use data already in memory | |
f2bde07c | 65 | |
66 | ||
67 | //-----------------now getter's data-------------------------------------- | |
f2bde07c | 68 | |
69 | //========== Digits ================ | |
70 | virtual TClonesArray * Digits(){return fDigits ; } | |
71 | virtual AliPHOSDigit * Digit(Int_t index) { return static_cast<AliPHOSDigit *>(fDigits->At(index)) ;} | |
3b844b86 | 72 | // virtual AliPHOSDigitizer * Digitizer(){Error("Digitizer","Method not defined") ; return 0;} |
f2bde07c | 73 | |
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)) ;} | |
f2bde07c | 79 | virtual AliPHOSClusterizer * Clusterizer() { return fClusterizer;} |
f2bde07c | 80 | |
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)) ;} | |
f2bde07c | 84 | virtual AliPHOSTrackSegmentMaker * TrackSegmentMaker(){ return fTSM ;} |
f2bde07c | 85 | |
86 | //========== RecParticles =========== | |
87 | virtual TClonesArray * RecParticles(){ return fRP;} | |
88 | virtual AliPHOSRecParticle * RecParticle(Int_t index) { return static_cast<AliPHOSRecParticle *>(fRP->At(index)) ;} | |
f2bde07c | 89 | virtual AliPHOSPID * PID(){return fPID ;} |
f2bde07c | 90 | |
91 | //========== Raw =========== | |
92 | // virtual Int_t ReadRaw(Int_t event) ; | |
93 | ||
f2bde07c | 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 ;} | |
f2bde07c | 97 | virtual TString Version() const { return "OnFlight" ; } |
f2bde07c | 98 | virtual void Reset(){} |
99 | ||
100 | virtual AliESD * ESD() const { return 0 ; } | |
101 | ||
102 | private: | |
103 | ||
104 | AliPHOSGetterLight(const char* headerFile, | |
105 | const char* version = AliConfig::GetDefaultEventFolderName(), | |
106 | Option_t * openingOption = "READ") ; | |
107 | ||
108 | private : | |
109 | ||
3b844b86 | 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 | |
f2bde07c | 115 | |
3b844b86 | 116 | // AliPHOSCalibrationDB * fcdb ; //Pointer to calibration database |
f2bde07c | 117 | |
3b844b86 | 118 | AliPHOSClusterizer * fClusterizer ; //Pointer to clusterizer |
119 | AliPHOSTrackSegmentMaker * fTSM ; //Pointer to TrackSegmentMaker | |
120 | AliPHOSPID * fPID ; //Pointer to PIDMaker | |
f2bde07c | 121 | |
3b844b86 | 122 | // Bool_t fRawDigits ; //Do we reconstruct raw digits |
f2bde07c | 123 | |
124 | ClassDef(AliPHOSGetterLight,1) // Getter for \"on flyght\" reconstruction | |
125 | ||
126 | }; | |
127 | ||
128 | #endif // AliPHOSGETTERLIGHT_H |