]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICH.h
Major upgrade of AliRoot code
[u/mrichter/AliRoot.git] / RICH / AliRICH.h
1 #ifndef ALIRICH_H
2 #define ALIRICH_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9
10 ////////////////////////////////////////////////
11 //  Manager and hits classes for set:RICH     //
12 ////////////////////////////////////////////////
13 #include "AliDetector.h"
14 #include "AliRICHConst.h"
15 #include "AliRICHChamber.h"
16 static const int kNCH=7;
17
18 class TFile;
19
20 class AliRICHHit;
21 class AliRICHPadHit;
22 class AliRICHRawCluster;
23 class AliRICHRecHit1D;
24 class AliRICHRecHit3D;
25 class AliRICHClusterFinder;
26 class AliRICHDetect;
27 class AliRICHChamber;
28 class AliRICHCerenkov;
29 class AliSegmentation;
30 class AliRICHResponse;
31 class AliRICHEllipse;
32 class AliRICHGeometry;
33
34 class AliRICH : public  AliDetector {
35  public:
36     AliRICH();
37     AliRICH(const char *name, const char *title);
38     AliRICH(const AliRICH& RICH);
39     virtual       ~AliRICH();
40     virtual void   AddHit(Int_t track, Int_t *vol, Float_t *hits);
41     virtual void   AddCerenkov(Int_t track, Int_t *vol, Float_t *cerenkovs);
42     virtual void   AddPadHit(Int_t *clhits);
43     virtual void   AddDigits(Int_t id, Int_t *tracks, Int_t *charges, Int_t *digits);
44     virtual void   AddRawCluster(Int_t id, const AliRICHRawCluster& cluster);
45     virtual void   AddRecHit1D(Int_t id, Float_t* rechit, Float_t* photons, Int_t* padsx, Int_t* padsy);
46     virtual void   AddRecHit3D(Int_t id, Float_t* rechit);
47
48
49     virtual void   BuildGeometry();
50     virtual void   CreateGeometry();
51     virtual void   CreateMaterials();
52     virtual Float_t AbsoCH4(Float_t x);
53     virtual Float_t Fresnel(Float_t ene,Float_t pdoti, Bool_t pola);
54     virtual void   StepManager();
55     Int_t          DistancetoPrimitive(Int_t px, Int_t py);
56     virtual Int_t  IsVersion() const =0;
57 //
58     TClonesArray  *PadHits() {return fPadHits;}
59     TClonesArray  *Cerenkovs() {return fCerenkovs;}
60     virtual void   MakeBranch(Option_t *opt=" ", char *file=0);
61     void           SetTreeAddress();
62     virtual void   ResetHits();
63     virtual void   ResetDigits();
64     virtual void   ResetRawClusters();
65     virtual void   ResetRecHits1D();
66     virtual void   ResetRecHits3D();
67     virtual void   FindClusters(Int_t nev,Int_t lastEntry);
68     virtual void   Digitise(Int_t nev,Int_t flag,Option_t *opt=" ",Text_t *name=" ");
69     virtual void   SDigits2Digits();
70 // 
71 // Configuration Methods (per station id)
72 //
73 // Set Chamber Segmentation Parameters
74 // id refers to the station and isec to the cathode plane   
75 // Set Segmentation and Response Model
76     virtual void   SetGeometryModel(Int_t id, AliRICHGeometry *geometry);
77     virtual void   SetSegmentationModel(Int_t id, AliSegmentation *segmentation);
78     virtual void   SetResponseModel(Int_t id, AliRICHResponse *response);
79     virtual void   SetNsec(Int_t id, Int_t nsec);
80 // Set Reconstruction Model
81     virtual void   SetReconstructionModel(Int_t id, AliRICHClusterFinder *reconstruction);
82 // Set source debugging level
83     void SetDebugLevel(Int_t level) {fDebugLevel=level;}
84 // Get source debugging level
85     Int_t GetDebugLevel() {return fDebugLevel;}
86 // Response Simulation
87     virtual Int_t   MakePadHits(Float_t xhit,Float_t yhit,Float_t eloss,Int_t id, ResponseType res);
88 // Return reference to Chamber #id
89     virtual AliRICHChamber& Chamber(Int_t id) {return *((AliRICHChamber *) (*fChambers)[id]);}
90 // Retrieve pad hits for a given Hit
91     virtual AliRICHPadHit* FirstPad(AliRICHHit *hit, TClonesArray *clusters);
92     virtual AliRICHPadHit* NextPad(TClonesArray *clusters);
93 // Return pointers to digits 
94     TObjArray            *Dchambers() {return fDchambers;}
95     Int_t                *Ndch() {return fNdch;}
96     virtual TClonesArray *DigitsAddress(Int_t id) {return ((TClonesArray *) (*fDchambers)[id]);}
97 // Return pointers to rec. hits
98     TObjArray            *RecHits1D() {return fRecHits1D;}
99     Int_t                *Nrechits1D() {return fNrechits1D;}
100     virtual TClonesArray *RecHitsAddress1D(Int_t id) {return ((TClonesArray *) (*fRecHits1D)[id]);}
101     TObjArray            *RecHits3D() {return fRecHits3D;}
102     Int_t                *Nrechits3D() {return fNrechits3D;}
103     virtual TClonesArray *RecHitsAddress3D(Int_t id) {return ((TClonesArray *) (*fRecHits3D)[id]);}
104     
105 // Return pointers to reconstructed clusters
106     virtual TClonesArray *RawClustAddress(Int_t id) {return ((TClonesArray *) (*fRawClusters)[id]);}    
107 // Assignment operator
108     AliRICH& operator=(const AliRICH& rhs);
109     
110     
111  protected:
112     TObjArray            *fChambers;           // List of Tracking Chambers
113     Int_t                 fNPadHits;           // Number of clusters
114     Int_t                 fNcerenkovs;         // Number of cerenkovs
115     TClonesArray         *fPadHits;            // List of clusters
116     TObjArray            *fDchambers;          // List of digits
117     TClonesArray         *fCerenkovs;          // List of cerenkovs
118     Int_t                 fNdch[kNCH];         // Number of digits
119     Text_t               *fFileName;           //! Filename for event mixing
120     TObjArray            *fRawClusters;        // List of raw clusters
121     TObjArray            *fRecHits1D;          // List of rec. hits
122     TObjArray            *fRecHits3D;          // List of rec. hits
123     Int_t                 fNrawch[kNCH];       // Number of raw clusters
124     Int_t                 fNrechits1D[kNCH];   // Number of rec hits 
125     Int_t                 fNrechits3D[kNCH];   // Number of rec hits 
126     Int_t                 fDebugLevel;         // Source debugging level
127
128     Int_t fCkovNumber;                   // Number of Cerenkov photons
129     Int_t fCkovQuarz;                    // Cerenkovs crossing quartz
130     Int_t fCkovGap;                      // Cerenkovs crossing gap
131     Int_t fCkovCsi;                      // Cerenkovs crossing csi
132     Int_t fLostRfreo;                    // Cerenkovs reflected in freon
133     Int_t fLostRquar;                    // Cerenkovs reflected in quartz
134     Int_t fLostAfreo;                    // Cerenkovs absorbed in freon 
135     Int_t fLostAquarz;                   // Cerenkovs absorbed in quartz
136     Int_t fLostAmeta;                    // Cerenkovs absorbed in methane
137     Int_t fLostCsi;                      // Cerenkovs below csi quantum efficiency 
138     Int_t fLostWires;                    // Cerenkovs lost in wires
139     Int_t fFreonProd;                    // Cerenkovs produced in freon
140     Float_t fMipx;                       // x coord. of MIP
141     Float_t fMipy;                       // y coord. of MIP
142     Int_t fFeedbacks;                    // Number of feedback photons
143     Int_t fLostFresnel;                  // Cerenkovs lost by Fresnel reflection
144     
145     ClassDef(AliRICH,1)  //Hits manager for set:RICH
146 };
147 #endif
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162