]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICH.h
removed a cout
[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 AliRICHSDigit;
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 class AliRICHMerger;
34
35 class AliRICH : public  AliDetector {
36  public:
37     AliRICH();
38     AliRICH(const char *name, const char *title);
39     AliRICH(const AliRICH& RICH);
40     virtual       ~AliRICH();
41     virtual void   AddHit(Int_t track, Int_t *vol, Float_t *hits);
42     virtual void   AddCerenkov(Int_t track, Int_t *vol, Float_t *cerenkovs);
43     virtual void   AddSDigit(Int_t *clhits);
44     virtual void   AddDigits(Int_t id, Int_t *tracks, Int_t *charges, Int_t *digits);
45     virtual void   AddRawCluster(Int_t id, const AliRICHRawCluster& cluster);
46     virtual void   AddRecHit1D(Int_t id, Float_t* rechit, Float_t* photons, Int_t* padsx, Int_t* padsy);
47     virtual void   AddRecHit3D(Int_t id, Float_t* rechit);
48
49
50     virtual void   BuildGeometry();
51     virtual void   CreateGeometry();
52     virtual void   CreateMaterials();
53     virtual Float_t AbsoCH4(Float_t x);
54     virtual Float_t Fresnel(Float_t ene,Float_t pdoti, Bool_t pola);
55     virtual void   StepManager();
56     Int_t          DistancetoPrimitive(Int_t px, Int_t py);
57     virtual Int_t  IsVersion() const =0;
58 //
59     TClonesArray  *SDigits() {return fSDigits;}
60     TClonesArray  *Cerenkovs() {return fCerenkovs;}
61     virtual void   MakeBranch(Option_t *opt=" ", const char *file=0);
62     void           SetTreeAddress();
63     virtual void   ResetHits();
64     virtual void   ResetDigits();
65     virtual void   ResetRawClusters();
66     virtual void   ResetRecHits1D();
67     virtual void   ResetRecHits3D();
68     virtual void   FindClusters(Int_t nev,Int_t lastEntry);
69     virtual void   Hits2SDigits();
70     virtual void   SDigits2Digits();
71     virtual void   SDigits2Digits(Int_t nev, Int_t flag);
72     virtual void   Digits2Reco();
73 // 
74 // Configuration Methods (per station id)
75 //
76 // Set Chamber Segmentation Parameters
77 // id refers to the station and isec to the cathode plane   
78 // Set Segmentation and Response Model
79     virtual void   SetGeometryModel(Int_t id, AliRICHGeometry *geometry);
80     virtual void   SetSegmentationModel(Int_t id, AliSegmentation *segmentation);
81     virtual void   SetResponseModel(Int_t id, AliRICHResponse *response);
82 // Set Reconstruction Model
83     virtual void   SetReconstructionModel(Int_t id, AliRICHClusterFinder *reconstruction);
84 // Set source debugging level
85     void           SetDebugLevel(Int_t level) {fDebugLevel=level;}
86 // Set Merger
87     virtual void   SetMerger(AliRICHMerger* thisMerger) {fMerger=thisMerger;}  
88 // Get source debugging level
89     Int_t          GetDebugLevel() {return fDebugLevel;}
90 // Response Simulation
91     virtual Int_t  Hits2SDigits(Float_t xhit,Float_t yhit,Float_t eloss,Int_t id, ResponseType res);
92 // Return reference to Chamber #id
93     virtual        AliRICHChamber& Chamber(Int_t id) {return *((AliRICHChamber *) (*fChambers)[id]);}
94 // Retrieve pad hits for a given Hit
95     virtual        AliRICHSDigit* FirstPad(AliRICHHit *hit, TClonesArray *clusters);
96     virtual        AliRICHSDigit* NextPad(TClonesArray *clusters);
97 // Return pointers to digits 
98     TObjArray     *Dchambers() {return fDchambers;}
99     Int_t         *Ndch() {return fNdch;}
100     virtual TClonesArray *DigitsAddress(Int_t id) {return ((TClonesArray *) (*fDchambers)[id]);}
101 // Return pointers to rec. hits
102     TObjArray     *RecHits1D() {return fRecHits1D;}
103     Int_t         *Nrechits1D() {return fNrechits1D;}
104     virtual TClonesArray *RecHitsAddress1D(Int_t id) {return ((TClonesArray *) (*fRecHits1D)[id]);}
105     TObjArray     *RecHits3D() {return fRecHits3D;}
106     Int_t         *Nrechits3D() {return fNrechits3D;}
107     virtual TClonesArray *RecHitsAddress3D(Int_t id) {return ((TClonesArray *) (*fRecHits3D)[id]);}
108     
109 // Return pointers to reconstructed clusters
110     virtual TClonesArray *RawClustAddress(Int_t id) {return ((TClonesArray *) (*fRawClusters)[id]);}    
111 // Assignment operator
112     AliRICH& operator=(const AliRICH& rhs);
113
114 // Analysis routines
115     // Full events
116     virtual void DiagnosticsFE(Int_t evNumber1=0,Int_t evNumber2=0);
117     // Single events
118     virtual void DiagnosticsSE(Int_t diaglevel,Int_t evNumber1=0,Int_t evNumber2=0);
119     
120  protected:
121     TObjArray            *fChambers;           // List of Tracking Chambers
122     Int_t                 fNSDigits;           // Number of clusters
123     Int_t                 fNcerenkovs;         // Number of cerenkovs
124     TClonesArray         *fSDigits;            // List of clusters
125     TObjArray            *fDchambers;          // List of digits
126     TClonesArray         *fCerenkovs;          // List of cerenkovs
127     Int_t                 fNdch[kNCH];         // Number of digits
128     TObjArray            *fRawClusters;        // List of raw clusters
129     TObjArray            *fRecHits1D;          // List of rec. hits
130     TObjArray            *fRecHits3D;          // List of rec. hits
131     Int_t                 fNrawch[kNCH];       // Number of raw clusters
132     Int_t                 fNrechits1D[kNCH];   // Number of rec hits 
133     Int_t                 fNrechits3D[kNCH];   // Number of rec hits 
134     Int_t                 fDebugLevel;         // Source debugging level
135
136     Int_t fCkovNumber;                         // Number of Cerenkov photons
137     Int_t fCkovQuarz;                          // Cerenkovs crossing quartz
138     Int_t fCkovGap;                            // Cerenkovs crossing gap
139     Int_t fCkovCsi;                            // Cerenkovs crossing csi
140     Int_t fLostRfreo;                          // Cerenkovs reflected in freon
141     Int_t fLostRquar;                          // Cerenkovs reflected in quartz
142     Int_t fLostAfreo;                          // Cerenkovs absorbed in freon 
143     Int_t fLostAquarz;                         // Cerenkovs absorbed in quartz
144     Int_t fLostAmeta;                          // Cerenkovs absorbed in methane
145     Int_t fLostCsi;                            // Cerenkovs below csi quantum efficiency 
146     Int_t fLostWires;                          // Cerenkovs lost in wires
147     Int_t fFreonProd;                          // Cerenkovs produced in freon
148     Float_t fMipx;                             // x coord. of MIP
149     Float_t fMipy;                             // y coord. of MIP
150     Int_t fFeedbacks;                          // Number of feedback photons
151     Int_t fLostFresnel;                        // Cerenkovs lost by Fresnel reflection
152
153
154 // Background eent for event mixing
155     Text_t *fFileName;                         // ! File with background hits
156     AliRICHMerger *fMerger;                    // ! pointer to merger
157     
158     ClassDef(AliRICH,1)                        //Hits manager for set:RICH
159 };
160 #endif
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175