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