EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EicFieldGradDetector.cxx
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EicFieldGradDetector.cxx
1 //
2 // AYK (ayk@bnl.gov), 2015/08/06
3 //
4 // EIC field-map-related fake detector class;
5 //
6 
7 #include <EicFieldGradDetector.h>
8 
9 
10 #include <EicMagneticFieldGrad.h>
11 
12 // ---------------------------------------------------------------------------------------
13 
15  EicDetector(fmap ? fmap->GetDetectorName().Data() : 0, (char*)"no-geometry.cfg",
16  qDUMMY, qOneStepOneHit, Active),
17  mMap(fmap)
18 {
19 
20 } // EicFieldGradDetector::EicFieldGradDetector()
21 
22 // ---------------------------------------------------------------------------------------
23 
25 {
26  if (mMap && mMap->ConstructGeometry())
27  fLogger->Fatal(MESSAGE_ORIGIN, "\033[5m\033[31m Failed to construct geometry for '%s' field map! \033[0m",
28  mMap->GetFileName().Data());
29 
30  // Yes, just add sensitivity flag by hand if needed;
31  if (mMap && IsActive()) {
32  TGeoVolume *yoke = mMap->GetYokeVolume();
33 
34  // Yes, for now (acceptance studies) just want to kill the particle
35  // right away when it enters this volume;
36  if (yoke) AddKillerVolume(yoke);
37  } //if
38 } // EicFieldGradDetector::ConstructGeometry()
39 
40 // ---------------------------------------------------------------------------------------
41