1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////
21 // This class contains the base procedures for the VZERO detector //
22 // Geometry of November 2003 : V0R box is now 4.4 cm thick //
23 // scintillators are 2 cm thick //
24 // All comments should be sent to Brigitte CHEYNIS : //
25 // b.cheynis@ipnl.in2p3.fr //
28 ///////////////////////////////////////////////////////////////////////////
31 // --- Standard libraries ---
32 #include <Riostream.h>
34 // --- ROOT libraries ---
38 // --- AliRoot header files ---
42 #include "AliVZEROLoader.h"
46 //_____________________________________________________________________________
47 AliVZERO::AliVZERO(const char *name, const char *title)
48 : AliDetector(name,title)
51 // Standard constructor for VZERO Detector
54 // fIshunt = 1; // All hits are associated with primary particles
56 fHits = new TClonesArray("AliVZEROhit", 400);
57 fDigits = new TClonesArray("AliVZEROdigit",400);
59 gAlice->GetMCApp()->AddHitList(fHits);
61 fThickness = 4.4; // total thickness of the V0R box in cm
62 fThickness1 = 2.0; // thickness of scintillating cells in cm
73 //_____________________________________________________________________________
77 // Default destructor for VZERO Detector
93 //_____________________________________________________________________________
94 void AliVZERO::BuildGeometry()
97 // Builds simple ROOT TNode geometry for event display
101 //_____________________________________________________________________________
102 void AliVZERO::CreateGeometry()
105 // Builds simple Geant3 geometry
108 //_____________________________________________________________________________
109 void AliVZERO::CreateMaterials()
112 // Creates materials used for Geant3 geometry
116 //_____________________________________________________________________________
117 Int_t AliVZERO::DistanceToPrimitive(Int_t /*px*/, Int_t /*py*/)
120 // Calculates the distance from the mouse to the VZERO on the screen
127 //_____________________________________________________________________________
128 void AliVZERO::Init()
131 // Initialises the VZERO class after it has been built
136 //_____________________________________________________________________________
137 void AliVZERO::SetMaxStepQua(Float_t p1)
140 // Possible parametrisation of steps in active materials
145 //_____________________________________________________________________________
146 void AliVZERO::SetMaxStepAlu(Float_t p1)
149 // Possible parametrisation of steps in Aluminum foils (not used in
155 //_____________________________________________________________________________
156 void AliVZERO::SetMaxDestepQua(Float_t p1)
159 // Possible parametrisation of steps in active materials (quartz)
164 //_____________________________________________________________________________
165 void AliVZERO::SetMaxDestepAlu(Float_t p1)
168 // Possible parametrisation of steps in Aluminum (not used in
174 //_____________________________________________________________________________
175 AliLoader* AliVZERO::MakeLoader(const char* topfoldername)
178 // Builds VZEROgetter (AliLoader type)
179 // if detector wants to use customized getter, it must overload this method
182 Info("MakeLoader","Creating AliVZEROLoader. Top folder is %s.",topfoldername);
183 fLoader = new AliVZEROLoader(GetName(),topfoldername);
187 //_____________________________________________________________________________
188 void AliVZERO::SetTreeAddress()
191 // Sets tree address for hits.
194 if (fLoader->TreeH() && (fHits == 0x0))
195 fHits = new TClonesArray("AliVZEROhit", 400);
197 AliDetector::SetTreeAddress();