WCSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WCSimRootOptions.cc
Go to the documentation of this file.
1 
3 #include "TObject.h"
4 #include <iostream>
5 
6 #include "WCSimRootOptions.hh"
7 
8 #ifndef REFLEX_DICTIONARY
9 ClassImp(WCSimRootOptions)
10 #endif
11 
12 using std::endl;
13 using std::cout;
14 
15 //______________________________________________________________________________
17 {
18  // Create a WCSimRootOptions object.
19 
20 }
21 
22 //______________________________________________________________________________
24 {
25 }
26 
27 //______________________________________________________________________________
28 void WCSimRootOptions::Print(Option_t *) const
29 {
30  cout
31  << "Detector construction:" << endl
32  << "\tDetectorName: " << DetectorName << endl
33  << "\tDetectorHasOD: " << (GeomHasOD ? "yes" : "no") << endl
34  << "\tSavePi0: " << SavePi0 << endl
35  << "\tPMTQEMethod: " << PMTQEMethod << endl
36  << "\tPMTCollEff: " << PMTCollEff << endl
37  << "Dark Noise options:" << endl;
38  for(std::map<string, WCSimDarkNoiseOptions>::const_iterator it=DarkOptMap.begin(); it != DarkOptMap.end(); ++it) {
39  cout
40  << "\t" << it->first << endl
41  << "\t\tPMTDarkRate: " << it->second.PMTDarkRate << " kHz" << endl
42  << "\t\tConvRate: " << it->second.ConvRate << " kHz" << endl
43  << "\t\tDarkHigh: " << it->second.DarkHigh << " ns" << endl
44  << "\t\tDarkLow: " << it->second.DarkLow << " ns" << endl
45  << "\t\tDarkWindow: " << it->second.DarkWindow << " ns" << endl
46  << "\t\tDarkMode: " << it->second.DarkMode << endl;
47  }
48  cout
49  << "Digitizer options:" << endl
50  << "\tDigitizerClassName: " << DigitizerClassName << endl
51  << "\tDigitizerDeadTime: " << DigitizerDeadTime << " ns" << endl
52  << "\tDigitizerIntegrationWindow: " << DigitizerIntegrationWindow << " ns" << endl
53  << "\tDigitizerTimingPrecision: " << DigitizerTimingPrecision << " ns" << endl
54  << "\tDigitizerPEPrecision: " << DigitizerPEPrecision << " ns" << endl
55  << "Trigger options:" << endl
56  << "\tTriggerClassName: " << TriggerClassName << endl
57  << "\tMultiDigitsPerTrigger: " << MultiDigitsPerTrigger << endl
58  << "NDigits-style trigger options:" << endl
59  << "\tNDigitsThreshold: " << NDigitsThreshold << " digitized hits" << endl
60  << "\tNDigitsWindow: " << NDigitsWindow << " ns" << endl
61  << "\tNDigitsAdjustForNoise: " << NDigitsAdjustForNoise << endl
62  << "\tNDigitsPreTriggerWindow: " << NDigitsPreTriggerWindow << " ns" << endl
63  << "\tNDigitsPostTriggerWindow: " << NDigitsPostTriggerWindow << " ns" << endl
64  << "Save failures trigger options:" << endl
65  << "\tSaveFailuresMode: " << SaveFailuresMode << endl
66  << "\tSaveFailuresTime: " << SaveFailuresTime << " ns" << endl
67  << "\tSaveFailuresPreTriggerWindow: " << SaveFailuresPreTriggerWindow << " ns" << endl
68  << "\tSaveFailuresPostTriggerWindow: " << SaveFailuresPostTriggerWindow << " ns" << endl
69  << "Tuning parameters:" << endl
70  << "\tRayff: " << Rayff << endl
71  << "\tBsrff: " << Bsrff << endl
72  << "\tAbwff: " << Abwff << endl
73  << "\tRgcff: " << Rgcff << endl
74  << "\tMieff: " << Mieff << endl
75  << "\tTvspacing: " << Tvspacing << endl
76  << "\tTopveto: " << Topveto << endl
77  << "Physics List Factory:" << endl
78  << "\tPhysicsListName: " << PhysicsListName << endl
79  << "WCSimPrimaryGeneratorAction" << endl
80  << "\tVectorFileName: " << VectorFileName << endl
81  << "\tGeneratorType: " << GeneratorType << endl
82  << "WCSimRandomParameters" << endl
83  << "\tRandomSeed: " << RandomSeed << endl
84  << "\tRandomGenerator: " << WCSimEnumerations::EnumAsString(RandomGenerator) << endl
85  << endl;
86 }
87 //______________________________________________________________________________
88 bool WCSimRootOptions::IsValidDarkTag(string tag) const
89 {
90  if(DarkOptMap.find(tag) != DarkOptMap.end())
91  return true;
92  return false;
93 }
94 //______________________________________________________________________________
96 {
97  if(IsValidDarkTag(tag))
98  return DarkOptMap[tag].PMTDarkRate;
99  std::cerr << "WCSimDarkNoiseOptions with tag: " << tag << " does not exist in WCSimRootOptions. Returning -999" << std::endl;
100  return -999;
101 }
102 //______________________________________________________________________________
104 {
105  if(IsValidDarkTag(tag))
106  return DarkOptMap[tag].ConvRate;
107  std::cerr << "WCSimDarkNoiseOptions with tag: " << tag << " does not exist in WCSimRootOptions. Returning -999" << std::endl;
108  return -999;
109 }
110 //______________________________________________________________________________
112 {
113  if(IsValidDarkTag(tag))
114  return DarkOptMap[tag].DarkHigh;
115  std::cerr << "WCSimDarkNoiseOptions with tag: " << tag << " does not exist in WCSimRootOptions. Returning -999" << std::endl;
116  return -999;
117 }
118 //______________________________________________________________________________
120 {
121  if(IsValidDarkTag(tag))
122  return DarkOptMap[tag].DarkLow;
123  std::cerr << "WCSimDarkNoiseOptions with tag: " << tag << " does not exist in WCSimRootOptions. Returning -999" << std::endl;
124  return -999;
125 }
126 //______________________________________________________________________________
128 {
129  if(IsValidDarkTag(tag))
130  return DarkOptMap[tag].DarkWindow;
131  std::cerr << "WCSimDarkNoiseOptions with tag: " << tag << " does not exist in WCSimRootOptions. Returning -999" << std::endl;
132  return -999;
133 }
134 //______________________________________________________________________________
136 {
137  if(IsValidDarkTag(tag))
138  return DarkOptMap[tag].DarkMode;
139  std::cerr << "WCSimDarkNoiseOptions with tag: " << tag << " does not exist in WCSimRootOptions. Returning -999" << std::endl;
140  return -999;
141 }
142 //______________________________________________________________________________
143 
double GetDarkWindow(string tag)
double GetDarkLow(string tag)
int GetDarkMode(string tag)
WCSimRandomGenerator_t RandomGenerator
double GetPMTDarkRate(string tag)
map< string, WCSimDarkNoiseOptions > DarkOptMap
void Print(Option_t *option="") const
bool IsValidDarkTag(string tag) const
static std::string EnumAsString(DigitizerType_t d)
virtual ~WCSimRootOptions()
double GetDarkHigh(string tag)
double GetConvRate(string tag)