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