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 // All comments should be sent to Brigitte CHEYNIS : //
23 // b.cheynis@ipnl.in2p3.fr //
26 ///////////////////////////////////////////////////////////////////////////
29 // --- Standard libraries ---
30 #include <Riostream.h>
32 // --- ROOT libraries ---
36 // --- AliRoot header files ---
40 #include "AliVZEROLoader.h"
44 //_____________________________________________________________________________
45 AliVZERO::AliVZERO(const char *name, const char *title)
46 : AliDetector(name,title)
49 // Standard constructor for VZERO Detector
52 fIshunt = 1; // All hits are associated with primary particles
54 fHits = new TClonesArray("AliVZEROhit", 400);
55 fDigits = new TClonesArray("AliVZEROdigit",400);
57 gAlice->GetMCApp()->AddHitList(fHits);
59 fThickness = 4.1; // total thickness of the V0R box
60 fThickness1 = 0.7; // thickness of the thickest cell (2.5 in version 0)
71 //_____________________________________________________________________________
75 // Default destructor for VZERO Detector
91 //_____________________________________________________________________________
92 void AliVZERO::BuildGeometry()
95 // Builds simple ROOT TNode geometry for event display
99 //_____________________________________________________________________________
100 void AliVZERO::CreateGeometry()
103 // Builds simple Geant3 geometry
106 //_____________________________________________________________________________
107 void AliVZERO::CreateMaterials()
110 // Creates materials used for Geant3 geometry
114 //_____________________________________________________________________________
115 Int_t AliVZERO::DistanceToPrimitive(Int_t /*px*/, Int_t /*py*/)
118 // Calculates the distance from the mouse to the VZERO on the screen
125 //_____________________________________________________________________________
126 void AliVZERO::Init()
129 // Initialises the VZERO class after it has been built
134 //_____________________________________________________________________________
135 void AliVZERO::SetMaxStepQua(Float_t p1)
138 // Possible parametrisation of steps in active materials
143 //_____________________________________________________________________________
144 void AliVZERO::SetMaxStepAlu(Float_t p1)
147 // Possible parametrisation of steps in Aluminum foils (not used in
153 //_____________________________________________________________________________
154 void AliVZERO::SetMaxDestepQua(Float_t p1)
157 // Possible parametrisation of steps in active materials (quartz)
162 //_____________________________________________________________________________
163 void AliVZERO::SetMaxDestepAlu(Float_t p1)
166 // Possible parametrisation of steps in Aluminum (not used in
172 //_____________________________________________________________________________
173 AliLoader* AliVZERO::MakeLoader(const char* topfoldername)
176 // Builds VZEROgetter (AliLoader type)
177 // if detector wants to use customized getter, it must overload this method
180 Info("MakeLoader","Creating AliVZEROLoader. Top folder is %s.",topfoldername);
181 fLoader = new AliVZEROLoader(GetName(),topfoldername);
185 //_____________________________________________________________________________
186 void AliVZERO::SetTreeAddress()
189 // Sets tree address for hits.
192 if (fLoader->TreeH() && (fHits == 0x0))
193 fHits = new TClonesArray("AliVZEROhit", 400);
195 AliDetector::SetTreeAddress();