37{
41
43 JLimit_t& numberOfEvents = inputFile.getLimit();
49
50 try {
51
52 JParser<> zap(
"Example program to equalize QE of PMTs based on summary data.");
53
57 zap[
'P'] =
make_field(
pmtFile,
"specify PMT file name that can be given to JTriggerEfficiency.") =
"";
61
63 }
64 catch(const exception& error) {
66 }
67
68
69 const double factor = 1.0e-3;
70
72
73
75
78 }
79
80
82
83 for (JPMTParametersMap::const_iterator i = parameters.begin(); i != parameters.end(); ++i) {
85 }
86
87
90
92
93 while (inputFile.hasNext()) {
94
96
98
100
102
103 for (JDAQSummaryslice::const_iterator frame = summary->begin(); frame != summary->end(); ++frame) {
104
106
107 TH1D* h0 =
H0[frame->getModuleID()];
109
111
112 if (
rings.find(
memo.getPMTPhysicalAddress(pmt).ring) != string::npos) {
113
115
117
118 double R = frame->getRate (pmt, factor);
119 double W = frame->getWeight(pmt, factor);
120 double P = 1.0;
121
122 if (p != QE.end()) {
123 P = p->second;
124 }
125
126 if (P > 0.0) {
127
128 h0->Fill(R / P, W);
130
131 h1->Fill(pmt, R / P);
132 H1->Fill(pmt, R / P);
133 }
134 }
135 }
136 }
137 }
139
140
142
144
146
148
150
151 parameters[id].
QE *= i->second->GetBinContent(pmt + 1) /
rate_kHz;
152 }
153 }
154
156 }
157
158
160
162
165 }
166
167
169
172
173 out.Write();
174 out.Close();
175}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Lookup table for PMT addresses in detector.
Lookup table for PMT addresses in optical module.
Auxiliary class for map of PMT parameters.
Template definition of a multi-dimensional oscillation probability interpolation table.
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys.
int getDetectorID() const
Get detector identifier.
static int getN()
Get number of bins.
static const double * getData(const double factor=1.0)
Get abscissa values.
JDetectorAddressMap & getDetectorAddressMap()
Get detector address map.
double getSurvivalProbability(const JPMTParameters ¶meters)
Get model dependent probability that a one photo-electron hit survives the simulation of the PMT assu...
void setAxisLabels(TAxis *axis, const JModuleAddressMap &memo)
Set axis with PMT address labels.
std::string to_upper(const std::string &value)
Convert all character to upper case.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
void store(const char *file_name) const
Store to output file.
void load(const char *file_name)
Load from input file.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.