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