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>
18 #include "AliITSLoader.h"
19 #include "AliRunLoader.h"
21 class AliITSsegmentation;
23 class AliITSClusterFinder;
24 class AliITSRawCluster;
26 class AliITSclusterV2;
30 class AliITSDetTypeRec : public TObject {
32 AliITSDetTypeRec(); // Default constructor
33 AliITSDetTypeRec(const AliITSDetTypeRec& rec);
34 AliITSDetTypeRec& operator=(const AliITSDetTypeRec &source);
36 virtual ~AliITSDetTypeRec(); // Proper Destructor
37 AliITSgeom* GetITSgeom()const{return fGeom;}
38 void SetITSgeom(AliITSgeom *geom) {fGeom=geom;}
40 virtual void SetLoader(AliITSLoader* loader) {fLoader=loader;}
41 AliITSLoader* GetLoader() const {return fLoader;}
42 virtual void SetDefaults();
43 virtual void SetDefaultClusterFinders();
44 virtual void SetDefaultClusterFindersV2(Bool_t rawdata=kFALSE);
45 virtual void MakeBranch(Option_t *opt);
46 virtual void SetTreeAddress();
47 virtual void SetTreeAddressD(TTree* treeD);
49 virtual void SetSegmentationModel(Int_t dettype, AliITSsegmentation *seg);
50 virtual void SetCalibrationModel(Int_t dettype, AliITSresponse *cal);
51 virtual void SetReconstructionModel(Int_t dettype, AliITSClusterFinder *rec);
52 virtual AliITSsegmentation* GetSegmentationModel(Int_t dettype);
53 virtual AliITSresponse* GetCalibrationModel(Int_t dettype);
54 virtual AliITSClusterFinder* GetReconstructionModel(Int_t dettype);
56 virtual void SetDigitClassName(Int_t i,Char_t *digit)
57 {fDigClassName[i]=digit;}
58 virtual void SetClusterClassName(Int_t i,Char_t *cluster)
59 {fClusterClassName[i]=cluster;}
60 virtual void SetRecPointClassName(Int_t i,Char_t *recpoint)
61 {fRecPointClassName[i]=recpoint;}
63 Char_t* GetDigitClassName(Int_t i) const {return fDigClassName[i];}
64 Char_t* GetClusterClassName(Int_t i) const {return fClusterClassName[i];}
65 Char_t* GetRecPointClassName(Int_t i) const {return fRecPointClassName[i];}
67 TObjArray* GetDigits() const {return fDigits;}
68 Int_t *Ndtype() {return fNdtype;}
69 TClonesArray *DigitsAddress(Int_t id) const {return ((TClonesArray*)(*fDigits)[id]);}
70 virtual void SelectVertexer(TString sel=" "){fSelectedVertexer = sel;}
72 virtual void MakeTreeC();
73 virtual void GetTreeC(Int_t event);
74 virtual void AddCluster(Int_t branch, AliITSRawCluster *c);
75 virtual void ResetClusters();
76 virtual void ResetClusters(Int_t branch);
77 virtual void MakeBranchC();
78 TBranch* MakeBranchInTree(TTree *tree, const char* name, const char *classname, void* address,Int_t size, Int_t splitlevel, const char */*file*/);
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(const char *file, 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 AddClusterV2(const AliITSclusterV2 &cl);
93 void ResetClustersV2(){if(fClustersV2) fClustersV2->Clear();fNClustersV2=0;}
94 Int_t GetNClustersV2()const {return fNClustersV2;}
96 TClonesArray *ClustersV2() {return fClustersV2;}
98 void MakeBranchRF(const char *file){MakeBranchR(file,"Fast");}
99 // void HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t size,
100 // Option_t *add, Option_t *det, const char *filename);
102 DigitsToRecPoints(fLoader->GetRunLoader()->GetEventNumber(),0,"All");}
103 void DigitsToRecPoints(Int_t evNumber,Int_t lastEntry,Option_t *det,Bool_t v2=kFALSE);
104 void DigitsToRecPoints(AliRawReader* rawReader);
108 static const Int_t fgkNdettypes; // number of det. types
109 AliITSgeom *fGeom; // ITS geometry
110 TObjArray *fReconstruction;//! [NDet]
111 TObjArray *fSegmentation; //! [NDet]
112 TObjArray *fCalibration; //! [NMod]
113 TObjArray *fPreProcess; //! [] e.g. Find Calibration values
114 TObjArray *fPostProcess; //! [] e.g. find primary vertex
115 TObjArray *fDigits; //! [NMod][NDigits]
116 Int_t *fNdtype; //! detector types
117 Char_t* fClusterClassName[3]; //! String with Cluster class name
118 Char_t* fDigClassName[3]; //! String with digit class name.
119 Char_t* fRecPointClassName[3];//! String with RecPoint class name
121 TObjArray *fCtype; //! List of clusters
122 Int_t *fNctype; //[fNDetTypes] Num. of clust. per type of det.
124 TClonesArray *fRecPoints; //! List of reconstructed points
125 Int_t fNRecPoints; // Number of rec points
127 TClonesArray *fClustersV2; //!List of reconstructed clusters v2
128 Int_t fNClustersV2; //Number of clusters v2
129 TString fSelectedVertexer; // Vertexer selected in CreateVertexer
130 AliITSLoader* fLoader; // ITS loader
132 ClassDef(AliITSDetTypeRec,1) // ITS Reconstruction structure