]>
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> |
3b9df642 | 15 | #include <TClonesArray.h> |
ff44c37c | 16 | #include <TBits.h> |
ef665f5e | 17 | |
18 | class TObjArray; | |
6cae184e | 19 | class TTree; |
20 | class TBranch; | |
ef665f5e | 21 | class AliITSgeom; |
3b9df642 | 22 | class AliITSsegmentation; |
fcf95fc7 | 23 | class AliITSCalibration; |
ced4d9bc | 24 | class AliITSCalibrationSSD; |
253e68a0 | 25 | class AliITSresponseSDD; |
7d62fb64 | 26 | class AliITSClusterFinder; |
7d62fb64 | 27 | class AliITSRecPoint; |
7d62fb64 | 28 | class AliRawReader; |
88128115 | 29 | class AliITSGainSSDv2; |
30 | class AliITSBadChannelsSSDv2; | |
ef665f5e | 31 | class AliITSDDLModuleMapSDD; |
88128115 | 32 | class AliITSNoiseSSDv2; |
ad7f2bfa | 33 | class AliITSTriggerConditions; |
34 | class AliITSFOSignalsSPD; | |
e5c65a6d | 35 | class AliITSRecPointContainer; |
8ba39da9 | 36 | |
3b9df642 | 37 | class AliITSDetTypeRec : public TObject { |
38 | public: | |
39 | AliITSDetTypeRec(); // Default constructor | |
e56160b8 | 40 | |
3b9df642 | 41 | virtual ~AliITSDetTypeRec(); // Proper Destructor |
7d62fb64 | 42 | |
6cae184e | 43 | virtual AliITSgeom* GetITSgeom() const { return fITSgeom; } |
dc5c67dc | 44 | virtual void SetITSgeom(AliITSgeom* const geom) { fITSgeom = geom; } |
7d62fb64 | 45 | virtual void SetDefaults(); |
3a7c3e6d | 46 | virtual void SetDefaultClusterFindersV2(Bool_t rawdata=kFALSE); |
6cae184e | 47 | virtual void MakeBranch(TTree *tree,Option_t *opt); |
dc5c67dc | 48 | virtual void SetTreeAddressD(TTree* const treeD); |
7d62fb64 | 49 | |
50 | virtual void SetSegmentationModel(Int_t dettype, AliITSsegmentation *seg); | |
fcf95fc7 | 51 | virtual void SetCalibrationModel(Int_t iMod, AliITSCalibration *cal); |
23197852 | 52 | virtual void SetSPDDeadModel(Int_t iMod, AliITSCalibration *cal); |
7d62fb64 | 53 | virtual void SetReconstructionModel(Int_t dettype, AliITSClusterFinder *rec); |
8ba39da9 | 54 | virtual Bool_t GetCalibration(); |
75065a60 | 55 | virtual Bool_t GetCalibrationSPD(Bool_t cacheStatus); |
56 | virtual Bool_t GetCalibrationSDD(Bool_t cacheStatus); | |
57 | virtual Bool_t GetCalibrationSSD(Bool_t cacheStatus); | |
04c81913 | 58 | virtual AliITSsegmentation* GetSegmentationModel(Int_t dettype) const; |
59 | virtual AliITSCalibration* GetCalibrationModel(Int_t iMod) const; | |
60 | virtual AliITSCalibration* GetSPDDeadModel(Int_t iMod) const; | |
ad7f2bfa | 61 | virtual AliITSTriggerConditions* GetTriggerConditions() const; |
04c81913 | 62 | virtual AliITSClusterFinder* GetReconstructionModel(Int_t dettype) const; |
979b5a5f | 63 | virtual AliITSDDLModuleMapSDD* GetDDLModuleMapSDD() const { return fDDLMapSDD;} |
253e68a0 | 64 | virtual AliITSresponseSDD* GetResponseSDD() const { return fRespSDD;} |
75065a60 | 65 | virtual Float_t GetAverageGainSDD() const { |
66 | if(fAveGainSDD>0.) return fAveGainSDD; | |
67 | else return 1.; | |
68 | } | |
7d62fb64 | 69 | |
a6e0ebfe | 70 | virtual void SetDigitClassName(Int_t i,const Char_t *digit) |
ef665f5e | 71 | {fkDigClassName[i]=digit;} |
7d62fb64 | 72 | |
62b93da7 | 73 | virtual void SetLoadOnlySPDCalib(Bool_t opt=kFALSE) |
74 | {fLoadOnlySPDCalib=opt;} | |
75 | ||
ef665f5e | 76 | const Char_t* GetDigitClassName(Int_t i) const {return fkDigClassName[i];} |
7d62fb64 | 77 | |
78 | TObjArray* GetDigits() const {return fDigits;} | |
7d62fb64 | 79 | TClonesArray *DigitsAddress(Int_t id) const {return ((TClonesArray*)(*fDigits)[id]);} |
06a7cbee | 80 | |
ad7f2bfa | 81 | AliITSFOSignalsSPD* GetFOSignals() const {return fFOSignals;} |
82 | ||
dc5c67dc | 83 | TBranch* MakeBranchInTree(TTree* const tree, const char* name, const char *classname, void* address,Int_t size, Int_t splitlevel); |
7d62fb64 | 84 | |
7d62fb64 | 85 | virtual void ResetDigits(); |
86 | virtual void ResetDigits(Int_t branch); | |
87 | ||
6cae184e | 88 | void MakeBranchR(TTree *treeR,Option_t *opt=" "); |
dc5c67dc | 89 | void SetTreeAddressR(TTree* const treeR); |
7d62fb64 | 90 | void AddRecPoint(const AliITSRecPoint &p); |
91 | void ResetRecPoints(){if(fRecPoints) fRecPoints->Clear();fNRecPoints = 0;}; | |
92 | // Return pointer to rec points | |
ef665f5e | 93 | TClonesArray *RecPoints() const {return fRecPoints;} |
6cae184e | 94 | void MakeBranchRF(TTree *treeR){MakeBranchR(treeR,"Fast");} |
5d2c2f86 | 95 | void DigitsToRecPoints(TTree *treeD,TTree *treeR,Int_t lastEntry,Option_t *det, Int_t optCluFind=0); |
8484b32d | 96 | void DigitsToRecPoints(AliRawReader* rawReader,TTree *treeR,Option_t *det="All"); |
d97fc3e0 | 97 | void DigitsToRecPoints(AliRawReader* rawReader,TClonesArray** clusters,Option_t *opt); |
8ba39da9 | 98 | |
ad7f2bfa | 99 | void SetFastOrFiredMapOnline(UInt_t eq, UInt_t hs, UInt_t chip); |
b457135f | 100 | void SetFastOrFiredMap(UInt_t chipKey){fFastOrFiredMap.SetBitNumber(chipKey);} |
ff44c37c | 101 | TBits GetFastOrFiredMap() const {return fFastOrFiredMap;} |
e5c65a6d | 102 | TBits GetFiredChipMap(TClonesArray **clusters) const; // (using SPD RecPoints) |
103 | TBits GetFiredChipMap(TTree *treeR) const; // (using SPD RecPoints) | |
ff44c37c | 104 | void ResetFastOrFiredMap(){fFastOrFiredMap.ResetAllBits();} |
ad7f2bfa | 105 | void RemoveFastOrFiredInActive(); // (using Trigger Conditions) |
e5c65a6d | 106 | void RemoveFastOrFiredFromDead(TBits firedchipmap); // (using SPD RecPoints) |
ad7f2bfa | 107 | |
e5c65a6d | 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 |
ef665f5e | 115 | void ReadOldSSDNoise(const TObjArray *array, |
88128115 | 116 | AliITSNoiseSSDv2 *noiseSSD); |
ef665f5e | 117 | void ReadOldSSDBadChannels(const TObjArray *array, |
88128115 | 118 | AliITSBadChannelsSSDv2 *badChannelsSSD); |
ef665f5e | 119 | void ReadOldSSDGain(const TObjArray *array, |
88128115 | 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] |
ad7f2bfa | 136 | AliITSTriggerConditions *fTriggerConditions; //! PIT conditions object |
7d62fb64 | 137 | TObjArray *fDigits; //! [NMod][NDigits] |
ad7f2bfa | 138 | AliITSFOSignalsSPD *fFOSignals; //! Fast-Or signals (used when reconstructing from digits) |
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 |
ef665f5e | 142 | const Char_t* fkDigClassName[3]; //! String with digit class name. |
7d62fb64 | 143 | |
7d62fb64 | 144 | |
145 | TClonesArray *fRecPoints; //! List of reconstructed points | |
146 | Int_t fNRecPoints; // Number of rec points | |
147 | ||
b17dae48 | 148 | Bool_t fFirstcall; //! flag |
62b93da7 | 149 | Bool_t fLoadOnlySPDCalib; //! flag for loading calibrations only fr SPD |
3b9df642 | 150 | |
ad7f2bfa | 151 | TBits fFastOrFiredMap; //! Map of FastOr fired chips (after processing of raw signals) |
ff44c37c | 152 | |
e5b2f7f2 | 153 | ClassDef(AliITSDetTypeRec,19) // ITS Reconstruction structure |
7d62fb64 | 154 | }; |
155 | ||
3b9df642 | 156 | #endif |
e5c65a6d | 157 |