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