]>
Commit | Line | Data |
---|---|---|
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 | ||
10 | //////////////////////////////////////////////////////////////////////// | |
11 | // This class contains all of the "external" information needed to do // | |
12 | // detector specific reconstruction for the ITS. // | |
13 | //////////////////////////////////////////////////////////////////////// | |
14 | #include <TObject.h> | |
15 | #include <TClonesArray.h> | |
16 | #include <TBits.h> | |
17 | ||
18 | class TObjArray; | |
19 | class TTree; | |
20 | class TBranch; | |
21 | class AliITSgeom; | |
22 | class AliITSsegmentation; | |
23 | class AliITSCalibration; | |
24 | class AliITSCalibrationSSD; | |
25 | class AliITSresponseSDD; | |
26 | class AliITSClusterFinder; | |
27 | class AliITSRecPoint; | |
28 | class AliRawReader; | |
29 | class AliITSGainSSDv2; | |
30 | class AliITSBadChannelsSSDv2; | |
31 | class AliITSDDLModuleMapSDD; | |
32 | class AliITSNoiseSSDv2; | |
33 | class AliITSTriggerConditions; | |
34 | class AliITSFOSignalsSPD; | |
35 | class AliITSRecPointContainer; | |
36 | ||
37 | class AliITSDetTypeRec : public TObject { | |
38 | public: | |
39 | AliITSDetTypeRec(); // Default constructor | |
40 | ||
41 | virtual ~AliITSDetTypeRec(); // Proper Destructor | |
42 | ||
43 | virtual AliITSgeom* GetITSgeom() const { return fITSgeom; } | |
44 | virtual void SetITSgeom(AliITSgeom* const geom) { fITSgeom = geom; } | |
45 | virtual void SetDefaults(); | |
46 | virtual void SetDefaultClusterFindersV2(Bool_t rawdata=kFALSE); | |
47 | virtual void MakeBranch(TTree *tree,Option_t *opt); | |
48 | virtual void SetTreeAddressD(TTree* const treeD); | |
49 | ||
50 | virtual void SetSegmentationModel(Int_t dettype, AliITSsegmentation *seg); | |
51 | virtual void SetCalibrationModel(Int_t iMod, AliITSCalibration *cal); | |
52 | virtual void SetSPDDeadModel(Int_t iMod, AliITSCalibration *cal); | |
53 | virtual void SetSPDSparseDeadModel(Int_t iMod, AliITSCalibration *cal); | |
54 | virtual void SetReconstructionModel(Int_t dettype, AliITSClusterFinder *rec); | |
55 | virtual Bool_t GetCalibration(); | |
56 | virtual AliITSsegmentation* GetSegmentationModel(Int_t dettype) const; | |
57 | virtual AliITSCalibration* GetCalibrationModel(Int_t iMod) const; | |
58 | virtual AliITSCalibration* GetSPDDeadModel(Int_t iMod) const; | |
59 | virtual AliITSCalibration* GetSPDSparseDeadModel(Int_t iMod) const; | |
60 | virtual AliITSTriggerConditions* GetTriggerConditions() const; | |
61 | virtual AliITSClusterFinder* GetReconstructionModel(Int_t dettype) const; | |
62 | virtual AliITSDDLModuleMapSDD* GetDDLModuleMapSDD() const { return fDDLMapSDD;} | |
63 | virtual AliITSresponseSDD* GetResponseSDD() const { return fRespSDD;} | |
64 | virtual Float_t GetAverageGainSDD() const { | |
65 | if(fAveGainSDD>0.) return fAveGainSDD; | |
66 | else return 1.; | |
67 | } | |
68 | ||
69 | virtual void SetDigitClassName(Int_t i,const Char_t *digit) | |
70 | {fkDigClassName[i]=digit;} | |
71 | ||
72 | virtual void SetLoadOnlySPDCalib(Bool_t opt=kFALSE) | |
73 | {fLoadOnlySPDCalib=opt;} | |
74 | ||
75 | const Char_t* GetDigitClassName(Int_t i) const {return fkDigClassName[i];} | |
76 | ||
77 | TObjArray* GetDigits() const {return fDigits;} | |
78 | TClonesArray *DigitsAddress(Int_t id) const {return ((TClonesArray*)(*fDigits)[id]);} | |
79 | ||
80 | AliITSFOSignalsSPD* GetFOSignals() const {return fFOSignals;} | |
81 | ||
82 | TBranch* MakeBranchInTree(TTree* const tree, const char* name, const char *classname, void* address,Int_t size, Int_t splitlevel); | |
83 | ||
84 | virtual void ResetDigits(); | |
85 | virtual void ResetDigits(Int_t branch); | |
86 | ||
87 | void MakeBranchR(TTree *treeR,Option_t *opt=" "); | |
88 | void SetTreeAddressR(TTree* const treeR); | |
89 | void AddRecPoint(const AliITSRecPoint &p); | |
90 | void ResetRecPoints(){if(fRecPoints) fRecPoints->Clear();fNRecPoints = 0;}; | |
91 | // Return pointer to rec points | |
92 | TClonesArray *RecPoints() const {return fRecPoints;} | |
93 | void MakeBranchRF(TTree *treeR){MakeBranchR(treeR,"Fast");} | |
94 | void DigitsToRecPoints(TTree *treeD,TTree *treeR,Int_t lastEntry,Option_t *det, Int_t optCluFind=0); | |
95 | void DigitsToRecPoints(AliRawReader* rawReader,TTree *treeR,Option_t *det="All"); | |
96 | void DigitsToRecPoints(AliRawReader* rawReader,Option_t *opt); | |
97 | ||
98 | void SetFastOrFiredMapOnline(UInt_t eq, UInt_t hs, UInt_t chip); | |
99 | void SetFastOrFiredMap(UInt_t chipKey){fFastOrFiredMap.SetBitNumber(chipKey);} | |
100 | TBits GetFastOrFiredMap() const {return fFastOrFiredMap;} | |
101 | TBits GetFiredChipMap() const; // (using SPD RecPoints) | |
102 | TBits GetFiredChipMap(TTree *treeR) const; // (using SPD RecPoints) | |
103 | void ResetFastOrFiredMap(){fFastOrFiredMap.ResetAllBits();} | |
104 | void RemoveFastOrFiredInActive(); // (using Trigger Conditions) | |
105 | void RemoveFastOrFiredFromDead(TBits firedchipmap); // (using SPD RecPoints) | |
106 | ||
107 | ||
108 | private: | |
109 | // private methods | |
110 | AliITSDetTypeRec(const AliITSDetTypeRec& rec); | |
111 | AliITSDetTypeRec& operator=(const AliITSDetTypeRec &source); | |
112 | ||
113 | //conversion of the old SSD calibration objects tothe new ones | |
114 | void ReadOldSSDNoise(const TObjArray *array, | |
115 | AliITSNoiseSSDv2 *noiseSSD); | |
116 | void ReadOldSSDBadChannels(const TObjArray *array, | |
117 | AliITSBadChannelsSSDv2 *badChannelsSSD); | |
118 | void ReadOldSSDGain(const TObjArray *array, | |
119 | AliITSGainSSDv2 *gainSSD); | |
120 | virtual Bool_t GetCalibrationSPD(Bool_t cacheStatus); | |
121 | virtual Bool_t GetCalibrationSDD(Bool_t cacheStatus); | |
122 | virtual Bool_t GetCalibrationSSD(Bool_t cacheStatus); | |
123 | ||
124 | // virtual void SetLoader(AliITSLoader* loader) {fLoader=loader;} | |
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 | |
129 | Int_t *fNMod; // numbers of modules from different types | |
130 | ||
131 | AliITSgeom *fITSgeom; //! ITS geometry | |
132 | ||
133 | TObjArray *fReconstruction;//! [NDet] | |
134 | TObjArray *fSegmentation; //! [NDet] | |
135 | TObjArray *fCalibration; //! [NMod] | |
136 | AliITSCalibrationSSD* fSSDCalibration; //! SSD calibration object | |
137 | TObjArray *fSPDDead; //! [fgkDefaultNModulesSPD] | |
138 | TObjArray *fSPDSparseDead; //! [fgkDefaultNModulesSPD] | |
139 | AliITSTriggerConditions *fTriggerConditions; //! PIT conditions object | |
140 | TObjArray *fDigits; //! [NMod][NDigits] | |
141 | AliITSFOSignalsSPD *fFOSignals; //! Fast-Or signals (used when reconstructing from digits) | |
142 | AliITSDDLModuleMapSDD *fDDLMapSDD; //! mapping DDL/module -> SDD module number | |
143 | AliITSresponseSDD *fRespSDD; //! SDD response parameters | |
144 | Float_t fAveGainSDD; //! Average gain of SDD good anodes | |
145 | const Char_t* fkDigClassName[3]; //! String with digit class name. | |
146 | ||
147 | ||
148 | TClonesArray *fRecPoints; //! List of reconstructed points | |
149 | Int_t fNRecPoints; // Number of rec points | |
150 | ||
151 | Bool_t fFirstcall; //! flag | |
152 | Bool_t fLoadOnlySPDCalib; //! flag for loading calibrations only fr SPD | |
153 | ||
154 | TBits fFastOrFiredMap; //! Map of FastOr fired chips (after processing of raw signals) | |
155 | ||
156 | ClassDef(AliITSDetTypeRec,20) // ITS Reconstruction structure | |
157 | }; | |
158 | ||
159 | #endif | |
160 |