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