AliPHOSGeometry is removed from AliPHOSGetter and AliPHOSLoader
[u/mrichter/AliRoot.git] / PHOS / AliPHOSGetterLight.h
CommitLineData
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 ---
16class TClonesArray ;
17class TObjArray ;
18
19// --- Standard library ---
20
21// --- AliRoot header files ---
22#include "AliPHOSGetter.h"
f2bde07c 23class AliPHOSClusterizer ;
24class AliPHOSTrackSegmentMaker ;
25class AliPHOSPID ;
26
27class AliPHOSGetterLight : public AliPHOSGetter {
28
29public:
30 AliPHOSGetterLight() ; // ctor
3663622c 31 AliPHOSGetterLight(const AliPHOSGetterLight & obj);
3b844b86 32
33 AliPHOSGetterLight & operator = (const AliPHOSGetterLight & ) {
34 // assignement operator requested by coding convention, but not needed
35 Fatal("operator =", "not implemented") ;
36 return *this ;
37 }
f2bde07c 38
39 virtual ~AliPHOSGetterLight() ; // dtor
40
3b844b86 41 //method normally used for creation of this class
f2bde07c 42 static AliPHOSGetterLight * Instance(const char* /*headerFile*/,
43 const char* version = AliConfig::GetDefaultEventFolderName(),
44 Option_t * openingOption = "READ" ) ;
45 static AliPHOSGetterLight * Instance() ;
46
47 //=========== General information about run ==============
f2bde07c 48
49 virtual Int_t MaxEvent() const {return 1 ;} //always "read" event 1
50 virtual Int_t EventNumber() const {return 0; } //always the same event
51 virtual Bool_t VersionExists(TString & /*opt*/) const {return kFALSE;}
3b844b86 52 virtual UShort_t EventPattern(void) const {return 0;} //not needed in on-flight reconstruction
53 virtual Float_t BeamEnergy(void) const {return 10.;} //not needed in on-flight reconstruction
f2bde07c 54
6c8cd883 55 //========== PHOS =============
3b844b86 56 //Dummy function not necessary for on-flight reconstruction, but has to be overloaded
f2bde07c 57
58 //========== Methods to read something from file ==========
59 virtual void Event(Int_t /*event*/, const char * /*opt = "HSDRTP"*/){} //Use data already in memory
f2bde07c 60
61
62 //-----------------now getter's data--------------------------------------
f2bde07c 63
64 //========== Digits ================
a0c6611f 65 virtual TClonesArray * Digits() const {return fDigits ; }
fd31ff92 66 virtual AliPHOSDigit * Digit(Int_t index) const { return static_cast<AliPHOSDigit *>(fDigits->At(index)) ;}
3b844b86 67 // virtual AliPHOSDigitizer * Digitizer(){Error("Digitizer","Method not defined") ; return 0;}
f2bde07c 68
69 //========== RecPoints =============
a0c6611f 70 virtual TObjArray * EmcRecPoints() const {return fEmcRecPoints ;}
fd31ff92 71 virtual AliPHOSEmcRecPoint * EmcRecPoint(Int_t index) const { return static_cast<AliPHOSEmcRecPoint *>(fEmcRecPoints->At(index)) ;}
a0c6611f 72 virtual TObjArray * CpvRecPoints() const {return fCpvRecPoints ;}
fd31ff92 73 virtual AliPHOSCpvRecPoint * CpvRecPoint(Int_t index) const { return static_cast<AliPHOSCpvRecPoint *>(fCpvRecPoints->At(index)) ;}
f2bde07c 74 virtual AliPHOSClusterizer * Clusterizer() { return fClusterizer;}
f2bde07c 75
76 //========== TrackSegments TClonesArray * TrackSegments(const char * name = 0) {
a0c6611f 77 virtual TClonesArray * TrackSegments() const {return fTS ;} ;
fd31ff92 78 virtual AliPHOSTrackSegment * TrackSegment(Int_t index) const { return static_cast<AliPHOSTrackSegment *>(fTS->At(index)) ;}
f2bde07c 79 virtual AliPHOSTrackSegmentMaker * TrackSegmentMaker(){ return fTSM ;}
f2bde07c 80
81 //========== RecParticles ===========
a0c6611f 82 virtual TClonesArray * RecParticles() const { return fRP;}
fd31ff92 83 virtual AliPHOSRecParticle * RecParticle(Int_t index) const { return static_cast<AliPHOSRecParticle *>(fRP->At(index)) ;}
f2bde07c 84 virtual AliPHOSPID * PID(){return fPID ;}
f2bde07c 85
86 //========== Raw ===========
87 // virtual Int_t ReadRaw(Int_t event) ;
88
f2bde07c 89 virtual void PostClusterizer(AliPHOSClusterizer * clu)const{((AliPHOSGetterLight*)fgObjGetter)->fClusterizer = clu;}
90 virtual void PostPID(AliPHOSPID * pid)const{((AliPHOSGetterLight*)fgObjGetter)->fPID = pid ;}
91 virtual void PostTrackSegmentMaker(AliPHOSTrackSegmentMaker * tr)const{((AliPHOSGetterLight*)fgObjGetter)->fTSM = tr ;}
f2bde07c 92 virtual TString Version() const { return "OnFlight" ; }
f2bde07c 93 virtual void Reset(){}
94
95 virtual AliESD * ESD() const { return 0 ; }
96
97private:
98
99 AliPHOSGetterLight(const char* headerFile,
100 const char* version = AliConfig::GetDefaultEventFolderName(),
101 Option_t * openingOption = "READ") ;
102
103private :
104
3b844b86 105 TClonesArray * fDigits ; //Digits container for current event
106 TObjArray * fEmcRecPoints ; //EmcRecPoints container for current event
107 TObjArray * fCpvRecPoints ; //CPV RecPoints container for current event
108 TClonesArray * fTS ; //TrackSegments container for currect event
109 TClonesArray * fRP ; //Rec Particles conatiner for currect event
f2bde07c 110
3b844b86 111 // AliPHOSCalibrationDB * fcdb ; //Pointer to calibration database
f2bde07c 112
3b844b86 113 AliPHOSClusterizer * fClusterizer ; //Pointer to clusterizer
114 AliPHOSTrackSegmentMaker * fTSM ; //Pointer to TrackSegmentMaker
115 AliPHOSPID * fPID ; //Pointer to PIDMaker
f2bde07c 116
3b844b86 117 // Bool_t fRawDigits ; //Do we reconstruct raw digits
f2bde07c 118
119 ClassDef(AliPHOSGetterLight,1) // Getter for \"on flyght\" reconstruction
120
121};
122
123#endif // AliPHOSGETTERLIGHT_H