47890cd3 |
1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
3 | * * |
4 | * Author: The ALICE Off-line Project. * |
5 | * Contributors are mentioned in the code where appropriate. * |
6 | * * |
7 | * Permission to use, copy, modify and distribute this software and its * |
8 | * documentation strictly for non-commercial purposes is hereby granted * |
9 | * without fee, provided that the above copyright notice appears in all * |
10 | * copies and that both the copyright notice and this permission notice * |
11 | * appear in the supporting documentation. The authors make no claims * |
12 | * about the suitability of this software for any purpose. It is * |
13 | * provided "as is" without express or implied warranty. * |
14 | **************************************************************************/ |
15 | |
88cb7938 |
16 | /* $Id$ */ |
47890cd3 |
17 | |
18 | /////////////////////////////////////////////////////////////////////////// |
19 | // // |
20 | // V-Zero Detector // |
21 | // This class contains the base procedures for the VZERO detector // |
22 | // All comments should be sent to Brigitte CHEYNIS : // |
61874e87 |
23 | // b.cheynis@ipnl.in2p3.fr // |
24 | // // |
47890cd3 |
25 | // // |
26 | /////////////////////////////////////////////////////////////////////////// |
27 | |
88cb7938 |
28 | |
b2501ea3 |
29 | // --- Standard libraries --- |
3af027ba |
30 | #include <Riostream.h> |
47890cd3 |
31 | |
b2501ea3 |
32 | // --- ROOT libraries --- |
33 | #include <TNamed.h> |
34 | #include <TTree.h> |
35 | |
36 | // --- AliRoot header files --- |
37 | #include "AliRun.h" |
38 | #include "AliMC.h" |
47890cd3 |
39 | #include "AliVZERO.h" |
b2501ea3 |
40 | #include "AliVZEROLoader.h" |
47890cd3 |
41 | |
42 | ClassImp(AliVZERO) |
43 | |
47890cd3 |
44 | //_____________________________________________________________________________ |
45 | AliVZERO::AliVZERO(const char *name, const char *title) |
46 | : AliDetector(name,title) |
47 | { |
48 | // |
49 | // Standard constructor for VZERO Detector |
50 | // |
51 | |
61874e87 |
52 | fIshunt = 1; // All hits are associated with primary particles |
47890cd3 |
53 | |
61874e87 |
54 | fHits = new TClonesArray("AliVZEROhit", 400); |
55 | fDigits = new TClonesArray("AliVZEROdigit",400); |
56 | |
5d12ce38 |
57 | gAlice->GetMCApp()->AddHitList(fHits); |
61874e87 |
58 | |
c288a388 |
59 | fThickness = 4.1; // total thickness of the V0R box |
60 | fThickness1 = 0.7; // thickness of the thickest cell (2.5 in version 0) |
47890cd3 |
61 | |
62 | fMaxStepQua = 0.05; |
63 | fMaxStepAlu = 0.01; |
64 | |
65 | fMaxDestepQua = -1.0; |
66 | fMaxDestepAlu = -1.0; |
67 | |
68 | SetMarkerColor(kRed); |
61874e87 |
69 | } |
70 | |
71 | //_____________________________________________________________________________ |
72 | AliVZERO::~AliVZERO() |
73 | { |
b2501ea3 |
74 | // |
75 | // Default destructor for VZERO Detector |
76 | // |
77 | |
61874e87 |
78 | if (fHits) { |
79 | fHits->Delete(); |
80 | delete fHits; |
b2501ea3 |
81 | fHits=0; |
82 | } |
83 | |
84 | if (fDigits) { |
85 | fDigits->Delete(); |
86 | delete fDigits; |
87 | fDigits=0; |
61874e87 |
88 | } |
89 | } |
47890cd3 |
90 | |
91 | //_____________________________________________________________________________ |
92 | void AliVZERO::BuildGeometry() |
93 | { |
94 | // |
b2501ea3 |
95 | // Builds simple ROOT TNode geometry for event display |
47890cd3 |
96 | // |
97 | } |
98 | |
99 | //_____________________________________________________________________________ |
100 | void AliVZERO::CreateGeometry() |
101 | { |
102 | // |
b2501ea3 |
103 | // Builds simple Geant3 geometry |
47890cd3 |
104 | // |
105 | } |
106 | //_____________________________________________________________________________ |
107 | void AliVZERO::CreateMaterials() |
108 | { |
109 | // |
b2501ea3 |
110 | // Creates materials used for Geant3 geometry |
47890cd3 |
111 | // |
112 | } |
61874e87 |
113 | |
47890cd3 |
114 | //_____________________________________________________________________________ |
652e94c3 |
115 | Int_t AliVZERO::DistanceToPrimitive(Int_t /*px*/, Int_t /*py*/) |
47890cd3 |
116 | { |
117 | // |
b2501ea3 |
118 | // Calculates the distance from the mouse to the VZERO on the screen |
47890cd3 |
119 | // Dummy routine |
120 | // |
121 | |
122 | return 9999; |
123 | } |
124 | |
b2501ea3 |
125 | //_____________________________________________________________________________ |
47890cd3 |
126 | void AliVZERO::Init() |
127 | { |
128 | // |
b2501ea3 |
129 | // Initialises the VZERO class after it has been built |
47890cd3 |
130 | // |
131 | } |
132 | |
61874e87 |
133 | |
b2501ea3 |
134 | //_____________________________________________________________________________ |
47890cd3 |
135 | void AliVZERO::SetMaxStepQua(Float_t p1) |
136 | { |
b2501ea3 |
137 | // |
138 | // Possible parametrisation of steps in active materials |
139 | // |
47890cd3 |
140 | fMaxStepQua = p1; |
141 | } |
142 | |
b2501ea3 |
143 | //_____________________________________________________________________________ |
47890cd3 |
144 | void AliVZERO::SetMaxStepAlu(Float_t p1) |
145 | { |
b2501ea3 |
146 | // |
147 | // Possible parametrisation of steps in Aluminum foils (not used in |
148 | // version v2) |
149 | // |
47890cd3 |
150 | fMaxStepAlu = p1; |
151 | } |
152 | |
b2501ea3 |
153 | //_____________________________________________________________________________ |
47890cd3 |
154 | void AliVZERO::SetMaxDestepQua(Float_t p1) |
155 | { |
b2501ea3 |
156 | // |
157 | // Possible parametrisation of steps in active materials (quartz) |
158 | // |
47890cd3 |
159 | fMaxDestepQua = p1; |
160 | } |
161 | |
b2501ea3 |
162 | //_____________________________________________________________________________ |
47890cd3 |
163 | void AliVZERO::SetMaxDestepAlu(Float_t p1) |
164 | { |
b2501ea3 |
165 | // |
166 | // Possible parametrisation of steps in Aluminum (not used in |
167 | // version v2) |
168 | // |
47890cd3 |
169 | fMaxDestepAlu = p1; |
170 | } |
4dbb3fd3 |
171 | |
b2501ea3 |
172 | //_____________________________________________________________________________ |
4dbb3fd3 |
173 | AliLoader* AliVZERO::MakeLoader(const char* topfoldername) |
174 | { |
b2501ea3 |
175 | // |
176 | // Builds VZEROgetter (AliLoader type) |
4dbb3fd3 |
177 | // if detector wants to use customized getter, it must overload this method |
b2501ea3 |
178 | // |
4dbb3fd3 |
179 | |
180 | Info("MakeLoader","Creating AliVZEROLoader. Top folder is %s.",topfoldername); |
181 | fLoader = new AliVZEROLoader(GetName(),topfoldername); |
182 | return fLoader; |
183 | } |
184 | |
b2501ea3 |
185 | //_____________________________________________________________________________ |
186 | void AliVZERO::SetTreeAddress() |
187 | { |
188 | // |
0e305a84 |
189 | // Sets tree address for hits. |
b2501ea3 |
190 | // |
0e305a84 |
191 | |
192 | if (fLoader->TreeH() && (fHits == 0x0)) |
193 | fHits = new TClonesArray("AliVZEROhit", 400); |
194 | |
195 | AliDetector::SetTreeAddress(); |
196 | } |
4dbb3fd3 |
197 | |
198 | |