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 #include <Riostream.h>
33 #include "AliVZEROLoader.h"
34 #include "AliVZEROdigit.h"
35 #include "AliVZEROhit.h"
40 //_____________________________________________________________________________
41 AliVZERO::AliVZERO(const char *name, const char *title)
42 : AliDetector(name,title)
45 // Standard constructor for VZERO Detector
48 fIshunt = 1; // All hits are associated with primary particles
50 fHits = new TClonesArray("AliVZEROhit", 400);
51 fDigits = new TClonesArray("AliVZEROdigit",400);
53 gAlice->AddHitList(fHits);
55 fThickness = 4.1; // total thickness of the V0R box
56 fThickness1 = 0.7; // thickness of the thickest cell (2.5 in version 0)
67 //_____________________________________________________________________________
76 //_____________________________________________________________________________
77 void AliVZERO::BuildGeometry()
80 // Build simple ROOT TNode geometry for event display
84 //_____________________________________________________________________________
85 void AliVZERO::CreateGeometry()
88 // Build simple ROOT TNode geometry for event display
91 //_____________________________________________________________________________
92 void AliVZERO::CreateMaterials()
95 // Build simple ROOT TNode geometry for event display
101 //_____________________________________________________________________________
102 Int_t AliVZERO::DistanceToPrimitive(Int_t /*px*/, Int_t /*py*/)
105 // Calculate the distance from the mouse to the VZERO on the screen
112 //-------------------------------------------------------------------------
113 void AliVZERO::Init()
116 // Initialise the VZERO after it has been built
121 //-------------------------------------------------------------------------
123 void AliVZERO::SetMaxStepQua(Float_t p1)
128 //___________________________________________
129 void AliVZERO::SetMaxStepAlu(Float_t p1)
134 //___________________________________________
135 void AliVZERO::SetMaxDestepQua(Float_t p1)
140 //___________________________________________
141 void AliVZERO::SetMaxDestepAlu(Float_t p1)
146 //___________________________________________
147 AliLoader* AliVZERO::MakeLoader(const char* topfoldername)
149 // builds VZEROgetter (AliLoader type)
150 // if detector wants to use customized getter, it must overload this method
152 Info("MakeLoader","Creating AliVZEROLoader. Top folder is %s.",topfoldername);
153 fLoader = new AliVZEROLoader(GetName(),topfoldername);
157 //___________________________________________
158 void AliVZERO::SetTreeAddress(){
159 // Sets tree address for hits.
161 if (fLoader->TreeH() && (fHits == 0x0))
162 fHits = new TClonesArray("AliVZEROhit", 400);
164 AliDetector::SetTreeAddress();