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 */
10 ////////////////////////////////////////////////////////////////////////
11 // This class contains all of the "external" information needed to do //
12 // detector specific reconstruction for the ITS. //
13 ////////////////////////////////////////////////////////////////////////
15 #include <TObjArray.h>
16 #include <TClonesArray.h>
17 #include "AliITSDDLModuleMapSDD.h"
18 #include "AliITSresponseSDD.h"
19 #include "AliITSgeom.h"
24 //#include "AliITSLoader.h"
25 //#include "AliRunLoader.h"
27 class AliITSsegmentation;
28 class AliITSCalibration;
29 class AliITSresponseSDD;
30 class AliITSClusterFinder;
31 class AliITSRawCluster;
36 class AliITSDetTypeRec : public TObject {
38 AliITSDetTypeRec(); // Default constructor
40 virtual ~AliITSDetTypeRec(); // Proper Destructor
42 virtual AliITSgeom* GetITSgeom() const { return fITSgeom; }
43 virtual void SetITSgeom(AliITSgeom *geom) { fITSgeom = geom; }
44 virtual void SetDefaults();
45 virtual void SetDefaultClusterFinders();
46 virtual void SetDefaultClusterFindersV2(Bool_t rawdata=kFALSE);
47 virtual void MakeBranch(TTree *tree,Option_t *opt);
48 virtual void SetTreeAddressD(TTree* treeD);
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 SetReconstructionModel(Int_t dettype, AliITSClusterFinder *rec);
54 virtual Bool_t GetCalibration();
55 virtual AliITSsegmentation* GetSegmentationModel(Int_t dettype);
56 virtual AliITSCalibration* GetCalibrationModel(Int_t iMod);
57 virtual AliITSCalibration* GetSPDDeadModel(Int_t iMod);
58 virtual AliITSClusterFinder* GetReconstructionModel(Int_t dettype);
59 virtual AliITSDDLModuleMapSDD* GetDDLModuleMapSDD() const { return fDDLMapSDD;}
60 virtual AliITSresponseSDD* GetResponseSDD() const { return fRespSDD;}
62 virtual void SetDigitClassName(Int_t i,Char_t *digit)
63 {fDigClassName[i]=digit;}
64 virtual void SetClusterClassName(Int_t i,Char_t *cluster)
65 {fClusterClassName[i]=cluster;}
66 virtual void SetRecPointClassName(Int_t i,Char_t *recpoint)
67 {fRecPointClassName[i]=recpoint;}
69 Char_t* GetDigitClassName(Int_t i) const {return fDigClassName[i];}
70 Char_t* GetClusterClassName(Int_t i) const {return fClusterClassName[i];}
71 Char_t* GetRecPointClassName(Int_t i) const {return fRecPointClassName[i];}
73 TObjArray* GetDigits() const {return fDigits;}
74 Int_t *Ndtype() {return fNdtype;}
75 TClonesArray *DigitsAddress(Int_t id) const {return ((TClonesArray*)(*fDigits)[id]);}
76 virtual void SelectVertexer(TString sel=" "){fSelectedVertexer = sel;}
78 virtual void AddCluster(Int_t branch, AliITSRawCluster *c);
79 virtual void ResetClusters();
80 virtual void ResetClusters(Int_t branch);
81 TBranch* MakeBranchInTree(TTree *tree, const char* name, const char *classname, void* address,Int_t size, Int_t splitlevel);
83 TObjArray *Ctype() {return fCtype;}
84 Int_t *Nctype() {return fNctype;}
85 TClonesArray *ClustersAddress(Int_t id) const {return ((TClonesArray*)(*fCtype)[id]);}
86 virtual void ResetDigits();
87 virtual void ResetDigits(Int_t branch);
89 void MakeBranchR(TTree *treeR,Option_t *opt=" ");
90 void SetTreeAddressR(TTree *treeR);
91 void AddRecPoint(const AliITSRecPoint &p);
92 void ResetRecPoints(){if(fRecPoints) fRecPoints->Clear();fNRecPoints = 0;};
93 // Return pointer to rec points
94 TClonesArray *RecPoints() {return fRecPoints;}
95 void MakeBranchRF(TTree *treeR){MakeBranchR(treeR,"Fast");}
96 void DigitsToRecPoints(TTree *treeD,TTree *treeR,Int_t lastEntry,Option_t *det,Bool_t v2=kFALSE);
97 void DigitsToRecPoints(AliRawReader* rawReader,TTree *treeR,Option_t *det="All");
101 AliITSDetTypeRec(const AliITSDetTypeRec& rec);
102 AliITSDetTypeRec& operator=(const AliITSDetTypeRec &source);
104 // virtual void SetLoader(AliITSLoader* loader) {fLoader=loader;}
105 static const Int_t fgkNdettypes; // number of det. types
106 static const Int_t fgkDefaultNModulesSPD; // Total numbers of SPD modules by default
107 static const Int_t fgkDefaultNModulesSDD; // Total numbers of SDD modules by default
108 static const Int_t fgkDefaultNModulesSSD; // Total numbers of SSD modules by default
109 Int_t *fNMod; // numbers of modules from different types
111 AliITSgeom *fITSgeom; //! ITS geometry
113 TObjArray *fReconstruction;//! [NDet]
114 TObjArray *fSegmentation; //! [NDet]
115 TObjArray *fCalibration; //! [NMod]
116 TObjArray *fSPDDead; //! [fgkDefaultNModulesSPD]
117 TObjArray *fPreProcess; //! [] e.g. Find Calibration values
118 TObjArray *fPostProcess; //! [] e.g. find primary vertex
119 TObjArray *fDigits; //! [NMod][NDigits]
120 AliITSDDLModuleMapSDD *fDDLMapSDD; //! mapping DDL/module -> SDD module number
121 AliITSresponseSDD *fRespSDD; //! SDD response parameters
122 Int_t *fNdtype; //! detector types
123 Char_t* fClusterClassName[3]; //! String with Cluster class name
124 Char_t* fDigClassName[3]; //! String with digit class name.
125 Char_t* fRecPointClassName[3];//! String with RecPoint class name
127 TObjArray *fCtype; //! List of clusters
128 Int_t *fNctype; //[fNDetTypes] Num. of clust. per type of det.
130 TClonesArray *fRecPoints; //! List of reconstructed points
131 Int_t fNRecPoints; // Number of rec points
133 TString fSelectedVertexer; // Vertexer selected in CreateVertexer
134 Bool_t fFirstcall; //! flag
136 ClassDef(AliITSDetTypeRec,10) // ITS Reconstruction structure