Added two missing includes to allow macro compilation (thanks to Laurent for remarkin...
[u/mrichter/AliRoot.git] / ITS / AliITSDetTypeRec.h
CommitLineData
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
18class TObjArray;
6cae184e 19class TTree;
20class TBranch;
ef665f5e 21class AliITSgeom;
3b9df642 22class AliITSsegmentation;
fcf95fc7 23class AliITSCalibration;
ced4d9bc 24class AliITSCalibrationSSD;
253e68a0 25class AliITSresponseSDD;
7d62fb64 26class AliITSClusterFinder;
7d62fb64 27class AliITSRecPoint;
7d62fb64 28class AliRawReader;
88128115 29class AliITSGainSSDv2;
30class AliITSBadChannelsSSDv2;
ef665f5e 31class AliITSDDLModuleMapSDD;
88128115 32class AliITSNoiseSSDv2;
ad7f2bfa 33class AliITSTriggerConditions;
34class AliITSFOSignalsSPD;
8ba39da9 35
3b9df642 36class AliITSDetTypeRec : public TObject {
37 public:
38 AliITSDetTypeRec(); // Default constructor
e56160b8 39
3b9df642 40 virtual ~AliITSDetTypeRec(); // Proper Destructor
7d62fb64 41
6cae184e 42 virtual AliITSgeom* GetITSgeom() const { return fITSgeom; }
dc5c67dc 43 virtual void SetITSgeom(AliITSgeom* const geom) { fITSgeom = geom; }
7d62fb64 44 virtual void SetDefaults();
3a7c3e6d 45 virtual void SetDefaultClusterFindersV2(Bool_t rawdata=kFALSE);
6cae184e 46 virtual void MakeBranch(TTree *tree,Option_t *opt);
dc5c67dc 47 virtual void SetTreeAddressD(TTree* const treeD);
7d62fb64 48
49 virtual void SetSegmentationModel(Int_t dettype, AliITSsegmentation *seg);
fcf95fc7 50 virtual void SetCalibrationModel(Int_t iMod, AliITSCalibration *cal);
23197852 51 virtual void SetSPDDeadModel(Int_t iMod, AliITSCalibration *cal);
7d62fb64 52 virtual void SetReconstructionModel(Int_t dettype, AliITSClusterFinder *rec);
8ba39da9 53 virtual Bool_t GetCalibration();
75065a60 54 virtual Bool_t GetCalibrationSPD(Bool_t cacheStatus);
55 virtual Bool_t GetCalibrationSDD(Bool_t cacheStatus);
56 virtual Bool_t GetCalibrationSSD(Bool_t cacheStatus);
04c81913 57 virtual AliITSsegmentation* GetSegmentationModel(Int_t dettype) const;
58 virtual AliITSCalibration* GetCalibrationModel(Int_t iMod) const;
59 virtual AliITSCalibration* GetSPDDeadModel(Int_t iMod) const;
ad7f2bfa 60 virtual AliITSTriggerConditions* GetTriggerConditions() const;
04c81913 61 virtual AliITSClusterFinder* GetReconstructionModel(Int_t dettype) const;
979b5a5f 62 virtual AliITSDDLModuleMapSDD* GetDDLModuleMapSDD() const { return fDDLMapSDD;}
253e68a0 63 virtual AliITSresponseSDD* GetResponseSDD() const { return fRespSDD;}
75065a60 64 virtual Float_t GetAverageGainSDD() const {
65 if(fAveGainSDD>0.) return fAveGainSDD;
66 else return 1.;
67 }
7d62fb64 68
a6e0ebfe 69 virtual void SetDigitClassName(Int_t i,const Char_t *digit)
ef665f5e 70 {fkDigClassName[i]=digit;}
7d62fb64 71
62b93da7 72 virtual void SetLoadOnlySPDCalib(Bool_t opt=kFALSE)
73 {fLoadOnlySPDCalib=opt;}
74
ef665f5e 75 const Char_t* GetDigitClassName(Int_t i) const {return fkDigClassName[i];}
7d62fb64 76
77 TObjArray* GetDigits() const {return fDigits;}
7d62fb64 78 TClonesArray *DigitsAddress(Int_t id) const {return ((TClonesArray*)(*fDigits)[id]);}
06a7cbee 79
ad7f2bfa 80 AliITSFOSignalsSPD* GetFOSignals() const {return fFOSignals;}
81
dc5c67dc 82 TBranch* MakeBranchInTree(TTree* const tree, const char* name, const char *classname, void* address,Int_t size, Int_t splitlevel);
7d62fb64 83
7d62fb64 84 virtual void ResetDigits();
85 virtual void ResetDigits(Int_t branch);
86
6cae184e 87 void MakeBranchR(TTree *treeR,Option_t *opt=" ");
dc5c67dc 88 void SetTreeAddressR(TTree* const treeR);
7d62fb64 89 void AddRecPoint(const AliITSRecPoint &p);
90 void ResetRecPoints(){if(fRecPoints) fRecPoints->Clear();fNRecPoints = 0;};
91 // Return pointer to rec points
ef665f5e 92 TClonesArray *RecPoints() const {return fRecPoints;}
6cae184e 93 void MakeBranchRF(TTree *treeR){MakeBranchR(treeR,"Fast");}
5d2c2f86 94 void DigitsToRecPoints(TTree *treeD,TTree *treeR,Int_t lastEntry,Option_t *det, Int_t optCluFind=0);
8484b32d 95 void DigitsToRecPoints(AliRawReader* rawReader,TTree *treeR,Option_t *det="All");
d97fc3e0 96 void DigitsToRecPoints(AliRawReader* rawReader,TClonesArray** clusters,Option_t *opt);
8ba39da9 97
ad7f2bfa 98 void SetFastOrFiredMapOnline(UInt_t eq, UInt_t hs, UInt_t chip);
b457135f 99 void SetFastOrFiredMap(UInt_t chipKey){fFastOrFiredMap.SetBitNumber(chipKey);}
ff44c37c 100 TBits GetFastOrFiredMap() const {return fFastOrFiredMap;}
101 void ResetFastOrFiredMap(){fFastOrFiredMap.ResetAllBits();}
ad7f2bfa 102 void RemoveFastOrFiredInActive(); // (using Trigger Conditions)
103
3b9df642 104 private:
8e50d897 105 // private methods
e56160b8 106 AliITSDetTypeRec(const AliITSDetTypeRec& rec);
107 AliITSDetTypeRec& operator=(const AliITSDetTypeRec &source);
108
88128115 109 //conversion of the old SSD calibration objects tothe new ones
ef665f5e 110 void ReadOldSSDNoise(const TObjArray *array,
88128115 111 AliITSNoiseSSDv2 *noiseSSD);
ef665f5e 112 void ReadOldSSDBadChannels(const TObjArray *array,
88128115 113 AliITSBadChannelsSSDv2 *badChannelsSSD);
ef665f5e 114 void ReadOldSSDGain(const TObjArray *array,
88128115 115 AliITSGainSSDv2 *gainSSD);
116
6cae184e 117 // virtual void SetLoader(AliITSLoader* loader) {fLoader=loader;}
8ba39da9 118 static const Int_t fgkNdettypes; // number of det. types
119 static const Int_t fgkDefaultNModulesSPD; // Total numbers of SPD modules by default
120 static const Int_t fgkDefaultNModulesSDD; // Total numbers of SDD modules by default
121 static const Int_t fgkDefaultNModulesSSD; // Total numbers of SSD modules by default
8e50d897 122 Int_t *fNMod; // numbers of modules from different types
8ba39da9 123
6cae184e 124 AliITSgeom *fITSgeom; //! ITS geometry
125
7d62fb64 126 TObjArray *fReconstruction;//! [NDet]
127 TObjArray *fSegmentation; //! [NDet]
128 TObjArray *fCalibration; //! [NMod]
ced4d9bc 129 AliITSCalibrationSSD* fSSDCalibration; //! SSD calibration object
23197852 130 TObjArray *fSPDDead; //! [fgkDefaultNModulesSPD]
ad7f2bfa 131 AliITSTriggerConditions *fTriggerConditions; //! PIT conditions object
7d62fb64 132 TObjArray *fDigits; //! [NMod][NDigits]
ad7f2bfa 133 AliITSFOSignalsSPD *fFOSignals; //! Fast-Or signals (used when reconstructing from digits)
979b5a5f 134 AliITSDDLModuleMapSDD *fDDLMapSDD; //! mapping DDL/module -> SDD module number
253e68a0 135 AliITSresponseSDD *fRespSDD; //! SDD response parameters
75065a60 136 Float_t fAveGainSDD; //! Average gain of SDD good anodes
ef665f5e 137 const Char_t* fkDigClassName[3]; //! String with digit class name.
7d62fb64 138
7d62fb64 139
140 TClonesArray *fRecPoints; //! List of reconstructed points
141 Int_t fNRecPoints; // Number of rec points
142
b17dae48 143 Bool_t fFirstcall; //! flag
62b93da7 144 Bool_t fLoadOnlySPDCalib; //! flag for loading calibrations only fr SPD
3b9df642 145
ad7f2bfa 146 TBits fFastOrFiredMap; //! Map of FastOr fired chips (after processing of raw signals)
ff44c37c 147
e5b2f7f2 148 ClassDef(AliITSDetTypeRec,19) // ITS Reconstruction structure
7d62fb64 149};
150
3b9df642 151#endif