]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PHOS/AliPHOSGetterLight.h
Alignment object with symbolic volume names are introduced
[u/mrichter/AliRoot.git] / PHOS / AliPHOSGetterLight.h
... / ...
CommitLineData
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//_________________________________________________________________________
9// Class to substitute AliPHOSGetter in "on flight" reconstruction (i.e. without
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
32 AliPHOSGetterLight(const AliPHOSGetterLight & obj);
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 }
39
40 virtual ~AliPHOSGetterLight() ; // dtor
41
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() ;
47
48 //=========== General information about run ==============
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;}
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
55
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
59
60 //========== Methods to read something from file ==========
61 virtual void Event(Int_t /*event*/, const char * /*opt = "HSDRTP"*/){} //Use data already in memory
62
63
64 //-----------------now getter's data--------------------------------------
65
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;}
70
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;}
77
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 ;}
82
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 ;}
87
88 //========== Raw ===========
89 // virtual Int_t ReadRaw(Int_t event) ;
90
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(){}
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
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
112
113 // AliPHOSCalibrationDB * fcdb ; //Pointer to calibration database
114
115 AliPHOSClusterizer * fClusterizer ; //Pointer to clusterizer
116 AliPHOSTrackSegmentMaker * fTSM ; //Pointer to TrackSegmentMaker
117 AliPHOSPID * fPID ; //Pointer to PIDMaker
118
119 // Bool_t fRawDigits ; //Do we reconstruct raw digits
120
121 ClassDef(AliPHOSGetterLight,1) // Getter for \"on flyght\" reconstruction
122
123};
124
125#endif // AliPHOSGETTERLIGHT_H