]>
Commit | Line | Data |
---|---|---|
3b9df642 | 1 | #ifndef ALIITSDETTYPEREC_H |
2 | #define ALIITSDETTYPEREC_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* | |
7 | $Id$ | |
8 | */ | |
9 | ||
7d62fb64 | 10 | //////////////////////////////////////////////////////////////////////// |
11 | // This class contains all of the "external" information needed to do // | |
12 | // detector specific reconstruction for the ITS. // | |
13 | //////////////////////////////////////////////////////////////////////// | |
3b9df642 | 14 | #include <TObject.h> |
15 | #include <TObjArray.h> | |
16 | #include <TClonesArray.h> | |
ff44c37c | 17 | #include <TBits.h> |
979b5a5f | 18 | #include "AliITSDDLModuleMapSDD.h" |
b457135f | 19 | #include "AliITSFastOrCalibrationSPD.h" |
253e68a0 | 20 | #include "AliITSresponseSDD.h" |
979b5a5f | 21 | #include "AliITSgeom.h" |
6cae184e | 22 | class TTree; |
23 | class TBranch; | |
24 | ||
25 | //#include "AliITSLoader.h" | |
26 | //#include "AliRunLoader.h" | |
3b9df642 | 27 | |
3b9df642 | 28 | class AliITSsegmentation; |
fcf95fc7 | 29 | class AliITSCalibration; |
ced4d9bc | 30 | class AliITSCalibrationSSD; |
253e68a0 | 31 | class AliITSresponseSDD; |
7d62fb64 | 32 | class AliITSClusterFinder; |
7d62fb64 | 33 | class AliITSRecPoint; |
7d62fb64 | 34 | class AliRawReader; |
88128115 | 35 | class AliITSGainSSDv2; |
36 | class AliITSBadChannelsSSDv2; | |
37 | class AliITSNoiseSSDv2; | |
8ba39da9 | 38 | |
3b9df642 | 39 | class AliITSDetTypeRec : public TObject { |
40 | public: | |
41 | AliITSDetTypeRec(); // Default constructor | |
e56160b8 | 42 | |
3b9df642 | 43 | virtual ~AliITSDetTypeRec(); // Proper Destructor |
7d62fb64 | 44 | |
6cae184e | 45 | virtual AliITSgeom* GetITSgeom() const { return fITSgeom; } |
46 | virtual void SetITSgeom(AliITSgeom *geom) { fITSgeom = geom; } | |
7d62fb64 | 47 | virtual void SetDefaults(); |
3a7c3e6d | 48 | virtual void SetDefaultClusterFindersV2(Bool_t rawdata=kFALSE); |
6cae184e | 49 | virtual void MakeBranch(TTree *tree,Option_t *opt); |
7d62fb64 | 50 | virtual void SetTreeAddressD(TTree* treeD); |
51 | ||
52 | virtual void SetSegmentationModel(Int_t dettype, AliITSsegmentation *seg); | |
fcf95fc7 | 53 | virtual void SetCalibrationModel(Int_t iMod, AliITSCalibration *cal); |
23197852 | 54 | virtual void SetSPDDeadModel(Int_t iMod, AliITSCalibration *cal); |
7d62fb64 | 55 | virtual void SetReconstructionModel(Int_t dettype, AliITSClusterFinder *rec); |
8ba39da9 | 56 | virtual Bool_t GetCalibration(); |
75065a60 | 57 | virtual Bool_t GetCalibrationSPD(Bool_t cacheStatus); |
58 | virtual Bool_t GetCalibrationSDD(Bool_t cacheStatus); | |
59 | virtual Bool_t GetCalibrationSSD(Bool_t cacheStatus); | |
b457135f | 60 | virtual AliITSFastOrCalibrationSPD* GetFastOrCalibrationSPD() const { return fSPDFastOr;} |
7d62fb64 | 61 | virtual AliITSsegmentation* GetSegmentationModel(Int_t dettype); |
fcf95fc7 | 62 | virtual AliITSCalibration* GetCalibrationModel(Int_t iMod); |
23197852 | 63 | virtual AliITSCalibration* GetSPDDeadModel(Int_t iMod); |
7d62fb64 | 64 | virtual AliITSClusterFinder* GetReconstructionModel(Int_t dettype); |
979b5a5f | 65 | virtual AliITSDDLModuleMapSDD* GetDDLModuleMapSDD() const { return fDDLMapSDD;} |
253e68a0 | 66 | virtual AliITSresponseSDD* GetResponseSDD() const { return fRespSDD;} |
2f8ed7ab | 67 | virtual Bool_t IsHLTmodeC() const {return fIsHLTmodeC;} |
f3a3f329 | 68 | virtual void SetHLTmodeC(Bool_t ishltc){fIsHLTmodeC=ishltc;} |
75065a60 | 69 | virtual Float_t GetAverageGainSDD() const { |
70 | if(fAveGainSDD>0.) return fAveGainSDD; | |
71 | else return 1.; | |
72 | } | |
7d62fb64 | 73 | |
a6e0ebfe | 74 | virtual void SetDigitClassName(Int_t i,const Char_t *digit) |
7d62fb64 | 75 | {fDigClassName[i]=digit;} |
7d62fb64 | 76 | |
62b93da7 | 77 | virtual void SetLoadOnlySPDCalib(Bool_t opt=kFALSE) |
78 | {fLoadOnlySPDCalib=opt;} | |
79 | ||
a6e0ebfe | 80 | const Char_t* GetDigitClassName(Int_t i) const {return fDigClassName[i];} |
7d62fb64 | 81 | |
82 | TObjArray* GetDigits() const {return fDigits;} | |
83 | Int_t *Ndtype() {return fNdtype;} | |
84 | TClonesArray *DigitsAddress(Int_t id) const {return ((TClonesArray*)(*fDigits)[id]);} | |
85 | virtual void SelectVertexer(TString sel=" "){fSelectedVertexer = sel;} | |
86 | // | |
7d62fb64 | 87 | virtual void ResetClusters(); |
88 | virtual void ResetClusters(Int_t branch); | |
6cae184e | 89 | TBranch* MakeBranchInTree(TTree *tree, const char* name, const char *classname, void* address,Int_t size, Int_t splitlevel); |
7d62fb64 | 90 | |
91 | TObjArray *Ctype() {return fCtype;} | |
92 | Int_t *Nctype() {return fNctype;} | |
93 | TClonesArray *ClustersAddress(Int_t id) const {return ((TClonesArray*)(*fCtype)[id]);} | |
94 | virtual void ResetDigits(); | |
95 | virtual void ResetDigits(Int_t branch); | |
96 | ||
6cae184e | 97 | void MakeBranchR(TTree *treeR,Option_t *opt=" "); |
7d62fb64 | 98 | void SetTreeAddressR(TTree *treeR); |
99 | void AddRecPoint(const AliITSRecPoint &p); | |
100 | void ResetRecPoints(){if(fRecPoints) fRecPoints->Clear();fNRecPoints = 0;}; | |
101 | // Return pointer to rec points | |
102 | TClonesArray *RecPoints() {return fRecPoints;} | |
6cae184e | 103 | void MakeBranchRF(TTree *treeR){MakeBranchR(treeR,"Fast");} |
5d2c2f86 | 104 | void DigitsToRecPoints(TTree *treeD,TTree *treeR,Int_t lastEntry,Option_t *det, Int_t optCluFind=0); |
8484b32d | 105 | void DigitsToRecPoints(AliRawReader* rawReader,TTree *treeR,Option_t *det="All"); |
8ba39da9 | 106 | |
b457135f | 107 | void SetFastOrFiredMap(UInt_t chipKey){fFastOrFiredMap.SetBitNumber(chipKey);} |
ff44c37c | 108 | TBits GetFastOrFiredMap() const {return fFastOrFiredMap;} |
109 | void ResetFastOrFiredMap(){fFastOrFiredMap.ResetAllBits();} | |
110 | ||
3b9df642 | 111 | private: |
8e50d897 | 112 | // private methods |
e56160b8 | 113 | AliITSDetTypeRec(const AliITSDetTypeRec& rec); |
114 | AliITSDetTypeRec& operator=(const AliITSDetTypeRec &source); | |
115 | ||
88128115 | 116 | //conversion of the old SSD calibration objects tothe new ones |
117 | void ReadOldSSDNoise(TObjArray *array, | |
118 | AliITSNoiseSSDv2 *noiseSSD); | |
119 | void ReadOldSSDBadChannels(TObjArray *array, | |
120 | AliITSBadChannelsSSDv2 *badChannelsSSD); | |
121 | void ReadOldSSDGain(TObjArray *array, | |
122 | AliITSGainSSDv2 *gainSSD); | |
123 | ||
6cae184e | 124 | // virtual void SetLoader(AliITSLoader* loader) {fLoader=loader;} |
8ba39da9 | 125 | static const Int_t fgkNdettypes; // number of det. types |
126 | static const Int_t fgkDefaultNModulesSPD; // Total numbers of SPD modules by default | |
127 | static const Int_t fgkDefaultNModulesSDD; // Total numbers of SDD modules by default | |
128 | static const Int_t fgkDefaultNModulesSSD; // Total numbers of SSD modules by default | |
8e50d897 | 129 | Int_t *fNMod; // numbers of modules from different types |
8ba39da9 | 130 | |
6cae184e | 131 | AliITSgeom *fITSgeom; //! ITS geometry |
132 | ||
7d62fb64 | 133 | TObjArray *fReconstruction;//! [NDet] |
134 | TObjArray *fSegmentation; //! [NDet] | |
135 | TObjArray *fCalibration; //! [NMod] | |
ced4d9bc | 136 | AliITSCalibrationSSD* fSSDCalibration; //! SSD calibration object |
23197852 | 137 | TObjArray *fSPDDead; //! [fgkDefaultNModulesSPD] |
b457135f | 138 | AliITSFastOrCalibrationSPD *fSPDFastOr; // Map of FastOr configured chips |
7d62fb64 | 139 | TObjArray *fPreProcess; //! [] e.g. Find Calibration values |
140 | TObjArray *fPostProcess; //! [] e.g. find primary vertex | |
141 | TObjArray *fDigits; //! [NMod][NDigits] | |
979b5a5f | 142 | AliITSDDLModuleMapSDD *fDDLMapSDD; //! mapping DDL/module -> SDD module number |
253e68a0 | 143 | AliITSresponseSDD *fRespSDD; //! SDD response parameters |
75065a60 | 144 | Float_t fAveGainSDD; //! Average gain of SDD good anodes |
2f8ed7ab | 145 | Bool_t fIsHLTmodeC; //! flag for HLT mode C status (used by SDD) |
7d62fb64 | 146 | Int_t *fNdtype; //! detector types |
a6e0ebfe | 147 | const Char_t* fDigClassName[3]; //! String with digit class name. |
7d62fb64 | 148 | |
149 | TObjArray *fCtype; //! List of clusters | |
150 | Int_t *fNctype; //[fNDetTypes] Num. of clust. per type of det. | |
151 | ||
152 | TClonesArray *fRecPoints; //! List of reconstructed points | |
153 | Int_t fNRecPoints; // Number of rec points | |
154 | ||
7d62fb64 | 155 | TString fSelectedVertexer; // Vertexer selected in CreateVertexer |
b17dae48 | 156 | Bool_t fFirstcall; //! flag |
62b93da7 | 157 | Bool_t fLoadOnlySPDCalib; //! flag for loading calibrations only fr SPD |
3b9df642 | 158 | |
ff44c37c | 159 | TBits fFastOrFiredMap; // Map of FastOr fired chips |
160 | ||
b457135f | 161 | ClassDef(AliITSDetTypeRec,16) // ITS Reconstruction structure |
7d62fb64 | 162 | }; |
163 | ||
3b9df642 | 164 | #endif |