@@ -135,7 +135,7 @@ Bool_t Detector::ProcessHits(FairVolume* vol)
135135 return kFALSE ; // do nothing more
136136 }
137137
138- return kTRUE ;
138+ return kTRUE ;
139139}
140140
141141o2::fvd::Hit* Detector::addHit (Int_t trackId, Int_t cellId,
@@ -149,16 +149,16 @@ o2::fvd::Hit* Detector::addHit(Int_t trackId, Int_t cellId,
149149 return &(mHits ->back ());
150150}
151151
152- void Detector::ConstructGeometry ()
152+ void Detector::ConstructGeometry ()
153153{
154- createMaterials ();
155- buildModules ();
156- defineSensitiveVolumes ();
154+ createMaterials ();
155+ buildModules ();
156+ defineSensitiveVolumes ();
157157}
158158
159-
160- void Detector::EndOfEvent () {
161- Reset ();
159+ void Detector::EndOfEvent ()
160+ {
161+ Reset ();
162162}
163163
164164void Detector::Register ()
@@ -195,16 +195,16 @@ void Detector::createMaterials()
195195
196196 Int_t matId = 0 ; // tmp material id number
197197 const Int_t unsens = 0 , sens = 1 ; // sensitive or unsensitive medium
198- //
199- Int_t fieldType = 3 ; // Field type
200- Float_t maxField = 5.0 ; // Field max.
198+ //
199+ Int_t fieldType = 3 ; // Field type
200+ Float_t maxField = 5.0 ; // Field max.
201201
202202 Float_t tmaxfd = -10.0 ; // max deflection angle due to magnetic field in one step
203203 Float_t stemax = 0.1 ; // max step allowed [cm]
204204 Float_t deemax = 1.0 ; // maximum fractional energy loss in one step 0<deemax<=1
205205 Float_t epsil = 0.03 ; // tracking precision [cm]
206206 Float_t stmin = -0.001 ; // minimum step due to continuous processes [cm] (negative value: choose it automatically)
207-
207+
208208 LOG (info) << " FVD: CreateMaterials(): fieldType " << fieldType << " , maxField " << maxField;
209209
210210 o2::base::Detector::Mixture (++matId, " Scintillator" , aScint, zScint, dScint, nScint, wScint);
@@ -218,12 +218,12 @@ void Detector::buildModules()
218218
219219 TGeoVolume* vCave = gGeoManager ->GetVolume (" cave" );
220220 if (!vCave) {
221- LOG (fatal) << " Could not find the top volume!" ;
221+ LOG (fatal) << " Could not find the top volume!" ;
222222 }
223223
224224 // create modules
225- TGeoVolumeAssembly * vFVDA = buildModuleA ();
226- TGeoVolumeAssembly * vFVDC = buildModuleC ();
225+ TGeoVolumeAssembly* vFVDA = buildModuleA ();
226+ TGeoVolumeAssembly* vFVDC = buildModuleC ();
227227
228228 vCave->AddNode (vFVDA, 1 , new TGeoTranslation (0 ., 0 ., FVDBaseParam::zModA));
229229 vCave->AddNode (vFVDC, 1 , new TGeoTranslation (0 ., 0 ., FVDBaseParam::zModC));
@@ -233,27 +233,27 @@ TGeoVolumeAssembly* Detector::buildModuleA()
233233{
234234 TGeoVolumeAssembly* mod = new TGeoVolumeAssembly (" FVDA" );
235235
236- const TGeoMedium* medium = gGeoManager ->GetMedium (" FVD_Scintillator" );
236+ const TGeoMedium* medium = gGeoManager ->GetMedium (" FVD_Scintillator" );
237237
238238 const float dphiDeg = 45 .;
239239
240240 for (int ir = 0 ; ir < FVDBaseParam::nRingsA; ir++) {
241- std::string rName = " fvd_ring" + std::to_string (ir+ 1 );
242- TGeoVolumeAssembly * ring = new TGeoVolumeAssembly (rName.c_str ());
243- for (int ic = 0 ; ic < 8 ; ic ++) {
244- int cellId = ic + 8 * ir;
245- std::string tbsName = " tbs" + std::to_string (cellId);
246- std::string nodeName = " fvd_node" + std::to_string (cellId);
247- float rmin = FVDBaseParam::rRingsA[ir];
248- float rmax = FVDBaseParam::rRingsA[ir+ 1 ];
249- float phimin = dphiDeg * ic;
250- float phimax = dphiDeg * (ic + 1 );
251- float dz = FVDBaseParam::dzScint;
252- auto tbs = new TGeoTubeSeg (tbsName.c_str (), rmin, rmax, dz, phimin, phimax);
253- auto nod = new TGeoVolume (nodeName.c_str (), tbs, medium);
254- ring->AddNode (nod, cellId);
255- }
256- mod->AddNode (ring, ir);
241+ std::string rName = " fvd_ring" + std::to_string (ir + 1 );
242+ TGeoVolumeAssembly* ring = new TGeoVolumeAssembly (rName.c_str ());
243+ for (int ic = 0 ; ic < 8 ; ic++) {
244+ int cellId = ic + 8 * ir;
245+ std::string tbsName = " tbs" + std::to_string (cellId);
246+ std::string nodeName = " fvd_node" + std::to_string (cellId);
247+ float rmin = FVDBaseParam::rRingsA[ir];
248+ float rmax = FVDBaseParam::rRingsA[ir + 1 ];
249+ float phimin = dphiDeg * ic;
250+ float phimax = dphiDeg * (ic + 1 );
251+ float dz = FVDBaseParam::dzScint;
252+ auto tbs = new TGeoTubeSeg (tbsName.c_str (), rmin, rmax, dz, phimin, phimax);
253+ auto nod = new TGeoVolume (nodeName.c_str (), tbs, medium);
254+ ring->AddNode (nod, cellId);
255+ }
256+ mod->AddNode (ring, ir);
257257 }
258258
259259 return mod;
@@ -263,42 +263,42 @@ TGeoVolumeAssembly* Detector::buildModuleC()
263263{
264264 TGeoVolumeAssembly* mod = new TGeoVolumeAssembly (" FVDC" );
265265
266- const TGeoMedium* medium = gGeoManager ->GetMedium (" FVD_Scintillator" );
266+ const TGeoMedium* medium = gGeoManager ->GetMedium (" FVD_Scintillator" );
267267
268268 const float dphiDeg = 45 .;
269269
270270 for (int ir = 0 ; ir < FVDBaseParam::nRingsC; ir++) {
271- std::string rName = " fvd_ring" + std::to_string (ir+ 1 + FVDBaseParam::nRingsA);
272- TGeoVolumeAssembly * ring = new TGeoVolumeAssembly (rName.c_str ());
273- for (int ic = 0 ; ic < 8 ; ic ++) {
274- int cellId = ic + 8 * ir + FVDBaseParam::nCellA;
275- std::string tbsName = " tbs" + std::to_string (cellId);
276- std::string nodeName = " fvd_node" + std::to_string (cellId);
277- float rmin = FVDBaseParam::rRingsC[ir];
278- float rmax = FVDBaseParam::rRingsC[ir+ 1 ];
279- float phimin = dphiDeg * ic;
280- float phimax = dphiDeg * (ic + 1 );
281- float dz = FVDBaseParam::dzScint;
282- auto tbs = new TGeoTubeSeg (tbsName.c_str (), rmin, rmax, dz, phimin, phimax);
283- auto nod = new TGeoVolume (nodeName.c_str (), tbs, medium);
284- ring->AddNode (nod, cellId);
285- }
286- mod->AddNode (ring, ir);
271+ std::string rName = " fvd_ring" + std::to_string (ir + 1 + FVDBaseParam::nRingsA);
272+ TGeoVolumeAssembly* ring = new TGeoVolumeAssembly (rName.c_str ());
273+ for (int ic = 0 ; ic < 8 ; ic++) {
274+ int cellId = ic + 8 * ir + FVDBaseParam::nCellA;
275+ std::string tbsName = " tbs" + std::to_string (cellId);
276+ std::string nodeName = " fvd_node" + std::to_string (cellId);
277+ float rmin = FVDBaseParam::rRingsC[ir];
278+ float rmax = FVDBaseParam::rRingsC[ir + 1 ];
279+ float phimin = dphiDeg * ic;
280+ float phimax = dphiDeg * (ic + 1 );
281+ float dz = FVDBaseParam::dzScint;
282+ auto tbs = new TGeoTubeSeg (tbsName.c_str (), rmin, rmax, dz, phimin, phimax);
283+ auto nod = new TGeoVolume (nodeName.c_str (), tbs, medium);
284+ ring->AddNode (nod, cellId);
285+ }
286+ mod->AddNode (ring, ir);
287287 }
288288
289289 return mod;
290290}
291291
292292void Detector::defineSensitiveVolumes ()
293293{
294- LOG (info) << " Adding FVD Sentitive Volumes" ;
295- TGeoVolume * v;
296- TString volumeName;
297-
298- for (int iv = 0 ; iv < FVDBaseParam::nCellA + FVDBaseParam::nCellC; iv ++) {
299- volumeName = " fvd_node" + std::to_string (iv);
300- v = gGeoManager ->GetVolume (volumeName);
301- LOG (info) << " Adding FVD Sensitive Volume => " << v->GetName ();
302- AddSensitiveVolume (v);
303- }
294+ LOG (info) << " Adding FVD Sentitive Volumes" ;
295+ TGeoVolume* v;
296+ TString volumeName;
297+
298+ for (int iv = 0 ; iv < FVDBaseParam::nCellA + FVDBaseParam::nCellC; iv++) {
299+ volumeName = " fvd_node" + std::to_string (iv);
300+ v = gGeoManager ->GetVolume (volumeName);
301+ LOG (info) << " Adding FVD Sensitive Volume => " << v->GetName ();
302+ AddSensitiveVolume (v);
303+ }
304304}
0 commit comments