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