]> git.uio.no Git - u/mrichter/AliRoot.git/blame - VZERO/AliVZERO.cxx
Do not call InitParameters in the default ctor
[u/mrichter/AliRoot.git] / VZERO / AliVZERO.cxx
CommitLineData
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 //
2f77b146 22// Geometry of November 2003 : V0R box is now 4.4 cm thick //
23// scintillators are 2 cm thick //
47890cd3 24// All comments should be sent to Brigitte CHEYNIS : //
61874e87 25// b.cheynis@ipnl.in2p3.fr //
26// //
47890cd3 27// //
28///////////////////////////////////////////////////////////////////////////
29
88cb7938 30
b2501ea3 31// --- Standard libraries ---
3af027ba 32#include <Riostream.h>
47890cd3 33
b2501ea3 34// --- ROOT libraries ---
35#include <TNamed.h>
36#include <TTree.h>
37
38// --- AliRoot header files ---
39#include "AliRun.h"
40#include "AliMC.h"
47890cd3 41#include "AliVZERO.h"
b2501ea3 42#include "AliVZEROLoader.h"
47890cd3 43
44ClassImp(AliVZERO)
45
47890cd3 46//_____________________________________________________________________________
47AliVZERO::AliVZERO(const char *name, const char *title)
48 : AliDetector(name,title)
49{
50 //
51 // Standard constructor for VZERO Detector
52 //
53
61874e87 54 fIshunt = 1; // All hits are associated with primary particles
47890cd3 55
61874e87 56 fHits = new TClonesArray("AliVZEROhit", 400);
57 fDigits = new TClonesArray("AliVZEROdigit",400);
58
5d12ce38 59 gAlice->GetMCApp()->AddHitList(fHits);
61874e87 60
2f77b146 61 fThickness = 4.4; // total thickness of the V0R box in cm
62 fThickness1 = 2.0; // thickness of scintillating cells in cm
47890cd3 63
64 fMaxStepQua = 0.05;
65 fMaxStepAlu = 0.01;
66
67 fMaxDestepQua = -1.0;
68 fMaxDestepAlu = -1.0;
69
70 SetMarkerColor(kRed);
61874e87 71}
72
73//_____________________________________________________________________________
74AliVZERO::~AliVZERO()
75{
b2501ea3 76 //
77 // Default destructor for VZERO Detector
78 //
79
61874e87 80 if (fHits) {
81 fHits->Delete();
82 delete fHits;
b2501ea3 83 fHits=0;
84 }
85
86 if (fDigits) {
87 fDigits->Delete();
88 delete fDigits;
89 fDigits=0;
61874e87 90 }
91}
47890cd3 92
93//_____________________________________________________________________________
94void AliVZERO::BuildGeometry()
95{
96 //
b2501ea3 97 // Builds simple ROOT TNode geometry for event display
47890cd3 98 //
99}
100
101//_____________________________________________________________________________
102void AliVZERO::CreateGeometry()
103{
104 //
b2501ea3 105 // Builds simple Geant3 geometry
47890cd3 106 //
107}
108//_____________________________________________________________________________
109void AliVZERO::CreateMaterials()
110{
111 //
b2501ea3 112 // Creates materials used for Geant3 geometry
47890cd3 113 //
114}
61874e87 115
47890cd3 116//_____________________________________________________________________________
652e94c3 117Int_t AliVZERO::DistanceToPrimitive(Int_t /*px*/, Int_t /*py*/)
47890cd3 118{
119 //
b2501ea3 120 // Calculates the distance from the mouse to the VZERO on the screen
47890cd3 121 // Dummy routine
122 //
123
124 return 9999;
125}
126
b2501ea3 127//_____________________________________________________________________________
47890cd3 128void AliVZERO::Init()
129{
130 //
b2501ea3 131 // Initialises the VZERO class after it has been built
47890cd3 132 //
133}
134
61874e87 135
b2501ea3 136//_____________________________________________________________________________
47890cd3 137void AliVZERO::SetMaxStepQua(Float_t p1)
138{
b2501ea3 139 //
140 // Possible parametrisation of steps in active materials
141 //
47890cd3 142 fMaxStepQua = p1;
143}
144
b2501ea3 145//_____________________________________________________________________________
47890cd3 146void AliVZERO::SetMaxStepAlu(Float_t p1)
147{
b2501ea3 148 //
149 // Possible parametrisation of steps in Aluminum foils (not used in
150 // version v2)
151 //
47890cd3 152 fMaxStepAlu = p1;
153}
154
b2501ea3 155//_____________________________________________________________________________
47890cd3 156void AliVZERO::SetMaxDestepQua(Float_t p1)
157{
b2501ea3 158 //
159 // Possible parametrisation of steps in active materials (quartz)
160 //
47890cd3 161 fMaxDestepQua = p1;
162}
163
b2501ea3 164//_____________________________________________________________________________
47890cd3 165void AliVZERO::SetMaxDestepAlu(Float_t p1)
166{
b2501ea3 167 //
168 // Possible parametrisation of steps in Aluminum (not used in
169 // version v2)
170 //
47890cd3 171 fMaxDestepAlu = p1;
172}
4dbb3fd3 173
b2501ea3 174//_____________________________________________________________________________
4dbb3fd3 175AliLoader* AliVZERO::MakeLoader(const char* topfoldername)
176{
b2501ea3 177 //
178 // Builds VZEROgetter (AliLoader type)
4dbb3fd3 179 // if detector wants to use customized getter, it must overload this method
b2501ea3 180 //
4dbb3fd3 181
182 Info("MakeLoader","Creating AliVZEROLoader. Top folder is %s.",topfoldername);
183 fLoader = new AliVZEROLoader(GetName(),topfoldername);
184 return fLoader;
185}
186
b2501ea3 187//_____________________________________________________________________________
188void AliVZERO::SetTreeAddress()
189{
190 //
0e305a84 191 // Sets tree address for hits.
b2501ea3 192 //
0e305a84 193
194 if (fLoader->TreeH() && (fHits == 0x0))
195 fHits = new TClonesArray("AliVZEROhit", 400);
196
197 AliDetector::SetTreeAddress();
198}
4dbb3fd3 199
200