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