Adding statistical function (Marian)
[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"
23#include "AliPHOSGeometry.h"
24class AliPHOSClusterizer ;
25class AliPHOSTrackSegmentMaker ;
26class AliPHOSPID ;
27
28class AliPHOSGetterLight : public AliPHOSGetter {
29
30public:
31 AliPHOSGetterLight() ; // ctor
3663622c 32 AliPHOSGetterLight(const AliPHOSGetterLight & obj);
3b844b86 33
34 AliPHOSGetterLight & operator = (const AliPHOSGetterLight & ) {
35 // assignement operator requested by coding convention, but not needed
36 Fatal("operator =", "not implemented") ;
37 return *this ;
38 }
f2bde07c 39
40 virtual ~AliPHOSGetterLight() ; // dtor
41
3b844b86 42 //method normally used for creation of this class
f2bde07c 43 static AliPHOSGetterLight * Instance(const char* /*headerFile*/,
44 const char* version = AliConfig::GetDefaultEventFolderName(),
45 Option_t * openingOption = "READ" ) ;
46 static AliPHOSGetterLight * Instance() ;
47
48 //=========== General information about run ==============
f2bde07c 49
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;}
3b844b86 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
f2bde07c 55
56 //========== PHOSGeometry and PHOS =============
3b844b86 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
f2bde07c 59
60 //========== Methods to read something from file ==========
61 virtual void Event(Int_t /*event*/, const char * /*opt = "HSDRTP"*/){} //Use data already in memory
f2bde07c 62
63
64 //-----------------now getter's data--------------------------------------
f2bde07c 65
66 //========== Digits ================
a0c6611f 67 virtual TClonesArray * Digits() const {return fDigits ; }
fd31ff92 68 virtual AliPHOSDigit * Digit(Int_t index) const { return static_cast<AliPHOSDigit *>(fDigits->At(index)) ;}
3b844b86 69 // virtual AliPHOSDigitizer * Digitizer(){Error("Digitizer","Method not defined") ; return 0;}
f2bde07c 70
71 //========== RecPoints =============
a0c6611f 72 virtual TObjArray * EmcRecPoints() const {return fEmcRecPoints ;}
fd31ff92 73 virtual AliPHOSEmcRecPoint * EmcRecPoint(Int_t index) const { return static_cast<AliPHOSEmcRecPoint *>(fEmcRecPoints->At(index)) ;}
a0c6611f 74 virtual TObjArray * CpvRecPoints() const {return fCpvRecPoints ;}
fd31ff92 75 virtual AliPHOSCpvRecPoint * CpvRecPoint(Int_t index) const { return static_cast<AliPHOSCpvRecPoint *>(fCpvRecPoints->At(index)) ;}
f2bde07c 76 virtual AliPHOSClusterizer * Clusterizer() { return fClusterizer;}
f2bde07c 77
78 //========== TrackSegments TClonesArray * TrackSegments(const char * name = 0) {
a0c6611f 79 virtual TClonesArray * TrackSegments() const {return fTS ;} ;
fd31ff92 80 virtual AliPHOSTrackSegment * TrackSegment(Int_t index) const { return static_cast<AliPHOSTrackSegment *>(fTS->At(index)) ;}
f2bde07c 81 virtual AliPHOSTrackSegmentMaker * TrackSegmentMaker(){ return fTSM ;}
f2bde07c 82
83 //========== RecParticles ===========
a0c6611f 84 virtual TClonesArray * RecParticles() const { return fRP;}
fd31ff92 85 virtual AliPHOSRecParticle * RecParticle(Int_t index) const { return static_cast<AliPHOSRecParticle *>(fRP->At(index)) ;}
f2bde07c 86 virtual AliPHOSPID * PID(){return fPID ;}
f2bde07c 87
88 //========== Raw ===========
89 // virtual Int_t ReadRaw(Int_t event) ;
90
f2bde07c 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 ;}
f2bde07c 94 virtual TString Version() const { return "OnFlight" ; }
f2bde07c 95 virtual void Reset(){}
96
97 virtual AliESD * ESD() const { return 0 ; }
98
99private:
100
101 AliPHOSGetterLight(const char* headerFile,
102 const char* version = AliConfig::GetDefaultEventFolderName(),
103 Option_t * openingOption = "READ") ;
104
105private :
106
3b844b86 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
f2bde07c 112
3b844b86 113 // AliPHOSCalibrationDB * fcdb ; //Pointer to calibration database
f2bde07c 114
3b844b86 115 AliPHOSClusterizer * fClusterizer ; //Pointer to clusterizer
116 AliPHOSTrackSegmentMaker * fTSM ; //Pointer to TrackSegmentMaker
117 AliPHOSPID * fPID ; //Pointer to PIDMaker
f2bde07c 118
3b844b86 119 // Bool_t fRawDigits ; //Do we reconstruct raw digits
f2bde07c 120
121 ClassDef(AliPHOSGetterLight,1) // Getter for \"on flyght\" reconstruction
122
123};
124
125#endif // AliPHOSGETTERLIGHT_H