]>
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> | |
17 | ||
7d62fb64 | 18 | #include "AliITSLoader.h" |
19 | #include "AliRunLoader.h" | |
3b9df642 | 20 | |
3b9df642 | 21 | class AliITSsegmentation; |
fcf95fc7 | 22 | class AliITSCalibration; |
7d62fb64 | 23 | class AliITSClusterFinder; |
24 | class AliITSRawCluster; | |
25 | class AliITSRecPoint; | |
26 | class AliITSclusterV2; | |
27 | class AliRawReader; | |
28 | class AliITSgeom; | |
3b9df642 | 29 | |
8ba39da9 | 30 | |
3b9df642 | 31 | class AliITSDetTypeRec : public TObject { |
32 | public: | |
33 | AliITSDetTypeRec(); // Default constructor | |
7d62fb64 | 34 | AliITSDetTypeRec(const AliITSDetTypeRec& rec); |
35 | AliITSDetTypeRec& operator=(const AliITSDetTypeRec &source); | |
36 | ||
3b9df642 | 37 | virtual ~AliITSDetTypeRec(); // Proper Destructor |
7d62fb64 | 38 | AliITSgeom* GetITSgeom()const{return fGeom;} |
39 | void SetITSgeom(AliITSgeom *geom) {fGeom=geom;} | |
40 | ||
41 | virtual void SetLoader(AliITSLoader* loader) {fLoader=loader;} | |
42 | AliITSLoader* GetLoader() const {return fLoader;} | |
43 | virtual void SetDefaults(); | |
44 | virtual void SetDefaultClusterFinders(); | |
3a7c3e6d | 45 | virtual void SetDefaultClusterFindersV2(Bool_t rawdata=kFALSE); |
7d62fb64 | 46 | virtual void MakeBranch(Option_t *opt); |
47 | virtual void SetTreeAddress(); | |
48 | virtual void SetTreeAddressD(TTree* treeD); | |
49 | ||
50 | virtual void SetSegmentationModel(Int_t dettype, AliITSsegmentation *seg); | |
fcf95fc7 | 51 | virtual void SetCalibrationModel(Int_t iMod, AliITSCalibration *cal); |
7d62fb64 | 52 | virtual void SetReconstructionModel(Int_t dettype, AliITSClusterFinder *rec); |
8ba39da9 | 53 | virtual Bool_t GetCalibration(); |
7d62fb64 | 54 | virtual AliITSsegmentation* GetSegmentationModel(Int_t dettype); |
fcf95fc7 | 55 | virtual AliITSCalibration* GetCalibrationModel(Int_t iMod); |
7d62fb64 | 56 | virtual AliITSClusterFinder* GetReconstructionModel(Int_t dettype); |
57 | ||
58 | virtual void SetDigitClassName(Int_t i,Char_t *digit) | |
59 | {fDigClassName[i]=digit;} | |
60 | virtual void SetClusterClassName(Int_t i,Char_t *cluster) | |
61 | {fClusterClassName[i]=cluster;} | |
62 | virtual void SetRecPointClassName(Int_t i,Char_t *recpoint) | |
63 | {fRecPointClassName[i]=recpoint;} | |
64 | ||
65 | Char_t* GetDigitClassName(Int_t i) const {return fDigClassName[i];} | |
66 | Char_t* GetClusterClassName(Int_t i) const {return fClusterClassName[i];} | |
67 | Char_t* GetRecPointClassName(Int_t i) const {return fRecPointClassName[i];} | |
68 | ||
69 | TObjArray* GetDigits() const {return fDigits;} | |
70 | Int_t *Ndtype() {return fNdtype;} | |
71 | TClonesArray *DigitsAddress(Int_t id) const {return ((TClonesArray*)(*fDigits)[id]);} | |
72 | virtual void SelectVertexer(TString sel=" "){fSelectedVertexer = sel;} | |
73 | // | |
74 | virtual void MakeTreeC(); | |
75 | virtual void GetTreeC(Int_t event); | |
76 | virtual void AddCluster(Int_t branch, AliITSRawCluster *c); | |
77 | virtual void ResetClusters(); | |
78 | virtual void ResetClusters(Int_t branch); | |
79 | virtual void MakeBranchC(); | |
80 | TBranch* MakeBranchInTree(TTree *tree, const char* name, const char *classname, void* address,Int_t size, Int_t splitlevel, const char */*file*/); | |
81 | ||
82 | TObjArray *Ctype() {return fCtype;} | |
83 | Int_t *Nctype() {return fNctype;} | |
84 | TClonesArray *ClustersAddress(Int_t id) const {return ((TClonesArray*)(*fCtype)[id]);} | |
85 | virtual void ResetDigits(); | |
86 | virtual void ResetDigits(Int_t branch); | |
87 | ||
88 | void MakeBranchR(const char *file, Option_t *opt=" "); | |
89 | void SetTreeAddressR(TTree *treeR); | |
90 | void AddRecPoint(const AliITSRecPoint &p); | |
91 | void ResetRecPoints(){if(fRecPoints) fRecPoints->Clear();fNRecPoints = 0;}; | |
92 | // Return pointer to rec points | |
93 | TClonesArray *RecPoints() {return fRecPoints;} | |
94 | void AddClusterV2(const AliITSclusterV2 &cl); | |
95 | void ResetClustersV2(){if(fClustersV2) fClustersV2->Clear();fNClustersV2=0;} | |
96 | Int_t GetNClustersV2()const {return fNClustersV2;} | |
97 | ||
98 | TClonesArray *ClustersV2() {return fClustersV2;} | |
99 | ||
100 | void MakeBranchRF(const char *file){MakeBranchR(file,"Fast");} | |
101 | // void HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t size, | |
102 | // Option_t *add, Option_t *det, const char *filename); | |
103 | void Digits2Reco(){ | |
104 | DigitsToRecPoints(fLoader->GetRunLoader()->GetEventNumber(),0,"All");} | |
105 | void DigitsToRecPoints(Int_t evNumber,Int_t lastEntry,Option_t *det,Bool_t v2=kFALSE); | |
106 | void DigitsToRecPoints(AliRawReader* rawReader); | |
3b9df642 | 107 | |
8ba39da9 | 108 | virtual void SetRunNumber(Int_t rn=0){fRunNumber = rn;} |
109 | virtual Int_t GetRunNumber() const {return fRunNumber;} | |
110 | ||
3b9df642 | 111 | private: |
7d62fb64 | 112 | |
8ba39da9 | 113 | static const Int_t fgkNdettypes; // number of det. types |
114 | static const Int_t fgkDefaultNModulesSPD; // Total numbers of SPD modules by default | |
115 | static const Int_t fgkDefaultNModulesSDD; // Total numbers of SDD modules by default | |
116 | static const Int_t fgkDefaultNModulesSSD; // Total numbers of SSD modules by default | |
117 | Int_t fNMod[3]; // numbers of modules from different types | |
118 | ||
7d62fb64 | 119 | AliITSgeom *fGeom; // ITS geometry |
120 | TObjArray *fReconstruction;//! [NDet] | |
121 | TObjArray *fSegmentation; //! [NDet] | |
122 | TObjArray *fCalibration; //! [NMod] | |
123 | TObjArray *fPreProcess; //! [] e.g. Find Calibration values | |
124 | TObjArray *fPostProcess; //! [] e.g. find primary vertex | |
125 | TObjArray *fDigits; //! [NMod][NDigits] | |
126 | Int_t *fNdtype; //! detector types | |
127 | Char_t* fClusterClassName[3]; //! String with Cluster class name | |
128 | Char_t* fDigClassName[3]; //! String with digit class name. | |
129 | Char_t* fRecPointClassName[3];//! String with RecPoint class name | |
130 | ||
131 | TObjArray *fCtype; //! List of clusters | |
132 | Int_t *fNctype; //[fNDetTypes] Num. of clust. per type of det. | |
133 | ||
134 | TClonesArray *fRecPoints; //! List of reconstructed points | |
135 | Int_t fNRecPoints; // Number of rec points | |
136 | ||
137 | TClonesArray *fClustersV2; //!List of reconstructed clusters v2 | |
138 | Int_t fNClustersV2; //Number of clusters v2 | |
139 | TString fSelectedVertexer; // Vertexer selected in CreateVertexer | |
140 | AliITSLoader* fLoader; // ITS loader | |
8ba39da9 | 141 | Int_t fRunNumber; //! run number (to access DB) |
3b9df642 | 142 | |
8ba39da9 | 143 | ClassDef(AliITSDetTypeRec,3) // ITS Reconstruction structure |
7d62fb64 | 144 | }; |
145 | ||
3b9df642 | 146 | #endif |