merging RecPoints and ClustersV2. All ClusterFinders produce AliITSRecPoints objects...
[u/mrichter/AliRoot.git] / ITS / AliITS.h
CommitLineData
3bd79107 1#ifndef ALIITS_H
2#define ALIITS_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
58005f18 8////////////////////////////////////////////////////////////////////////
3bd79107 9// Manager class for set: ITS //
58005f18 10////////////////////////////////////////////////////////////////////////
fe4da5cc 11
7e932df0 12
143d1056 13#include <TObjArray.h> // used in inline function GetModule.
fe4da5cc 14#include "AliDetector.h"
e628c711 15#include "AliITSTrigger.h"
7e932df0 16#include "AliITSDetTypeSim.h"
7d62fb64 17
de82972f 18
d5da1ecf 19class TString;
20class TTree;
7d62fb64 21class AliITSpListItem;
3bd79107 22class AliITSsimulation;
de82972f 23class AliITSsegmentation;
fcf95fc7 24class AliITSCalibration;
de82972f 25class AliITShit;
26class AliITSgeom;
27class AliITSdigit;
de82972f 28class AliITSmodule;
aacedc3e 29class AliDigitizer;
30class AliRunDigitizer;
27a043b1 31
de82972f 32
3bd79107 33class AliITS : public AliDetector {
58005f18 34
2aea926d 35 public:
36 //================= Standard Classes ===============================
37 AliITS(); // Default creator.
38 AliITS(const char *name, const char *title); // standard Creator
39 virtual ~AliITS(); // destructor
ac74f489 40 AliITS(const AliITS &source); // copy constructor. Not to be used!
7d62fb64 41 AliITS& operator=(const AliITS &source); // = operator. Not to be used!
2aea926d 42 virtual Int_t IsVersion() const {return 1;}
d2f55a22 43 virtual Int_t DistancetoPrimitive(Int_t , Int_t ) {return 999;}
2aea926d 44
45 //===================== Simulation Geometry ========================
e8189707 46 // get geometry version - detailed (major) or coarse (minor)
93f82b23 47 virtual Int_t GetMajorVersion() const {return -1;}
48 virtual Int_t GetMinorVersion() const {return -1;}
7d62fb64 49 virtual void GetGeometryVersion(Int_t &a,Int_t &b) const
2aea926d 50 {a = GetMajorVersion();b=GetMinorVersion();return;}
41b19549 51 virtual void SetEUCLID(Bool_t euclid=kTRUE) {fEuclidOut = euclid;}
a8e8915c 52 virtual Bool_t GetEUCLID()const {return fEuclidOut;}
2aea926d 53 //-------------------- Geometry Transformations --------------------
7d62fb64 54
7e932df0 55 // ITS geometry functions From Simulation
7d62fb64 56 AliITSgeom* GetITSgeom() const {return fDetTypeSim->GetITSgeom();}
57 void SetITSgeom(AliITSgeom *geom) {fDetTypeSim->SetITSgeom(geom);}
58 virtual void WriteGeometry();
7e932df0 59 // return pointer to the array of modules
7d62fb64 60 TObjArray *GetModules(){return fITSmodules;}
3bd79107 61
7d62fb64 62 AliITSmodule *GetModule(Int_t index){
63 return (AliITSmodule*)(fITSmodules->At(index));}
64
65 virtual void SetDetTypeSim(AliITSDetTypeSim* dts) {fDetTypeSim=dts;}
66 AliITSDetTypeSim* GetDetTypeSim() const {return fDetTypeSim;}
88cb7938 67 //================ Necessary general Classes =======================
2aea926d 68 virtual void Init();
88cb7938 69 virtual AliLoader* MakeLoader(const char* topfoldername);
2aea926d 70 virtual void SetDefaults();
71 virtual void SetDefaultSimulation();
88cb7938 72 virtual void MakeBranch(Option_t *opt=" ");
7d62fb64 73 virtual void MakeBranchS(const char* fl);
74 virtual void MakeBranchD(const char* file);
75 virtual void MakeBranchInTreeD(TTree* treeD, const char* file=0);
2aea926d 76 virtual void SetTreeAddress();
7d62fb64 77 //---------- Configuration Methods (per detector type) -------------
7d8046e8 78 // Determines which ITS subdetectors will be processed. Effects
79 // digitization, and Reconstruction only.
80 void SetDetectors(Option_t *opt="All"){fOpt = opt;}
81 // Returns the list of ITS subdetectors that will be processed.
82 Option_t* GetDetectors(){return fOpt;}
7d62fb64 83
fcf95fc7 84 // Set calibration
85 virtual void SetCalibrationModel(Int_t dettype, AliITSCalibration *cal){
86 fDetTypeSim->SetCalibrationModel(dettype,cal);}
7e932df0 87 // Set segmentation for Simulation
7e932df0 88 virtual void SetSegmentationModel(Int_t id, AliITSsegmentation *seg){
7d62fb64 89 fDetTypeSim->SetSegmentationModel(id,seg);}
7e932df0 90 // Set simulation
91 virtual void SetSimulationModel(Int_t id, AliITSsimulation *sim){
7d62fb64 92 fDetTypeSim->SetSimulationModel(id,sim);}
7e932df0 93 // Set simulation
94 virtual AliITSsimulation* GetSimulationModel(Int_t id){
7d62fb64 95 return fDetTypeSim->GetSimulationModel(id);}
2aea926d 96 //=================== Hits =========================================
97 virtual void StepManager() {} // See Step Manager for specific geometry.
2aea926d 98 //------------ sort hits by module for Digitisation ----------------
7d62fb64 99 virtual void FillModules(Int_t evnt,Int_t bgrev,Int_t nmodules, Option_t *opt, const char *filename);
100
7e932df0 101 virtual void InitModules(Int_t size,Int_t &nmodules);
102 virtual void FillModules(TTree *treeH, Int_t mask = 0);
7d62fb64 103 virtual void ClearModules(){if(fITSmodules) fITSmodules->Delete();}
104 virtual void AddHit(Int_t track, Int_t *vol, Float_t *hits);
fcf95fc7 105 // Trigger
e628c711 106 virtual AliTriggerDetector* CreateTriggerDetector() const
107 { return new AliITSTrigger(); }
fcf95fc7 108
7d62fb64 109 TClonesArray* GetSDigits() const { return fDetTypeSim->GetSDigits();}
2aea926d 110
c92eb8ad 111 AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
7d62fb64 112 virtual void SDigitsToDigits(Option_t *opt="All");
113 virtual void SDigits2Digits(){SDigitsToDigits("All");}
114 virtual void Hits2Digits();
115 virtual void Hits2SDigits();
116 virtual void Hits2PreDigits();
117 virtual void HitsToDigits(Int_t evNumber,Int_t bgrev,Int_t size,
118 Option_t *option,Option_t *opt,
119 const char *filename);
120 virtual void HitsToPreDigits(Int_t evNumber,Int_t bgrev,Int_t size,
121 Option_t *option,Option_t *opt,
122 const char *filename);
2aea926d 123 void HitsToSDigits(Int_t evNumber,Int_t bgrev,Int_t size,
aacedc3e 124 Option_t *add, Option_t *det, const char *filename)
e68a8906 125 {HitsToPreDigits(evNumber,bgrev,size,add,det,filename);}
7d62fb64 126
127 virtual void ResetDigits();
128 virtual void ResetDigits(Int_t branch);
129 virtual void AddSumDigit(AliITSpListItem &sdig);
130 virtual void AddRealDigit(Int_t branch, Int_t *digits);
131
132 virtual void AddSimDigit(Int_t branch, AliITSdigit *d);
133 virtual void AddSimDigit(Int_t branch,Float_t phys,Int_t* digits,
2aea926d 134 Int_t* tracks,Int_t *hits,Float_t* trkcharges);
7d62fb64 135 TObjArray* GetDigits() const {return fDetTypeSim->GetDigits();}
136 Int_t* GetNDigitArray() const {return fDetTypeSim->GetNDigitArray();}
137 TClonesArray *DigitsAddress(Int_t id) { return fDetTypeSim->DigitsAddress(id);}
138 //Fast simulation
139 virtual void HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t size,
140 Option_t *add, Option_t *det, const char *filename);
141 virtual Int_t Hits2Clusters(TTree *in, TTree *out);
7d62fb64 142 virtual void CheckLabels(Int_t lab[3]) const;
7e932df0 143
144 //===================== Raw Data IO ================================
145 // Write digits into raw data format
e68a8906 146 virtual void Digits2Raw();
7e932df0 147
2aea926d 148 protected:
7d62fb64 149 static const Int_t fgkNTYPES=3; //number of detector types
2aea926d 150 //================== Data Members ==================================
7d62fb64 151 AliITSDetTypeSim *fDetTypeSim; //detector type for simulation
e0fc0305 152 Bool_t fEuclidOut; // Flag to write geometry in euclid format
7d8046e8 153 Option_t *fOpt; //! Detector option ="All" unless changed.
e0fc0305 154 Int_t fIdN; // the number of layers
2aea926d 155 Int_t *fIdSens; //[fIdN] layer identifier
156 TString *fIdName; //[fIdN] layer identifier
7d62fb64 157 TObjArray *fITSmodules; //! Pointer to ITS modules
cc87dfb6 158 ClassDef(AliITS,6) // Base class for ITS
7d62fb64 159
fe4da5cc 160};
3bd79107 161
fe4da5cc 162#endif