40{
43
46 string detectorFile;
47
49
50 bool useBoost;
51
52 bool useWeights;
53 string oscProbTable;
56
58
59 try {
60
61 JParser<> zap(
"Auxiliary program to test event shape variables.");
62
76
77 zap(argc, argv);
78 }
79 catch(const exception &error) {
80 FATAL(error.what() << endl);
81 }
82
83 if (useWeights && numberOfEvents !=
JLimit::max()) {
84 FATAL(
"Cannot apply weighting to limited number of events.");
85 }
86
87
88
89
91
92 if (!detectorFile.empty()) {
93 try {
95 }
98 }
99 }
100
102
105 }
106
107
108
109
110 if (!oscProbTable.empty()) {
111
113
114 interpolator.
load(oscProbTable.c_str());
115 interpolator.set (oscParameters);
116 }
117
118
119
120
122
123 if (scanners.setFlux(fluxMap) == 0) {
124 WARNING(
"No flux function set." << endl);
125 }
126
127
128
129
131
132 TH1D hT("hT", "thrust", 50, 0.5, 1.0);
133
134 TH1D hA("hA", "aplanarity", 50, 0.0, 0.5);
135 TH1D hS("hS", "sphericity", 100, 0.0, 1.0);
136 TH1D hc("hc", "circularity", 100, 0.0, 1.0);
137 TH1D hp("hp", "planar flow", 100, 0.0, 1.0);
138
139 TH1D hC("hC", "C-variable", 100, 0.0, 1.0);
140 TH1D hD("hD", "D-variable", 100, 0.0, 1.0);
141
142 TH1D hH10("hH10", "H10", 100, 0.0, 1.0);
143 TH1D hH20("hH20", "H20", 100, 0.0, 1.0);
144 TH1D hH30("hH30", "H30", 100, 0.0, 1.0);
145 TH1D hH40("hH40", "H40", 100, 0.0, 1.0);
146
147 TH1D hq("hq", "Logarithmic eigenvalue ratio hit inertia tensor", 200, -20.0, 0.0);
148
149
150
151
153
155
156 scanner->setLimit(numberOfEvents);
157
159
162 }
163
164 while (scanner->hasNext()) {
165
166 Evt*
event = scanner->next();
167
168 const double weight = (useWeights ? scanner->getWeight(*event) : 1.0);
169
171 RIGHT (15) << scanner->getCounter() <<
173
175
177
180
182
184
186
187 const double aplanarity = S2.getAplanarity();
188 const double sphericity = S2.getSphericity();
189 const double circularity = S2.getCircularity();
190 const double planarflow = S2.getPlanarFlow();
191
192 const double C =
S1.getC();
193 const double D =
S1.getD();
194
195 const double q = Q.getEigenvalueRatio();
196
197 hT.Fill(thrust, weight);
198
199 hA.Fill(aplanarity, weight);
200 hS.Fill(sphericity, weight);
201 hc.Fill(circularity, weight);
202 hp.Fill(planarflow, weight);
203
204 hC.Fill(C, weight);
205 hD.Fill(D, weight);
206
207 hH10.Fill(
H[1]/
H[0], weight);
208 hH20.Fill(
H[2]/
H[0], weight);
209 hH30.Fill(
H[3]/
H[0], weight);
210 hH40.Fill(
H[4]/
H[0], weight);
211
212 hq.Fill(log10(q), weight);
213 }
214 }
215
217
218 out.Write();
219 out.Close();
220
221 return 0;
222}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Template specialisation for a map between event categories and flux factors.
const JHead & getHeader() const
Get header.
void set(const JVector2D &p0, const JVector2D &p1)
Set circle.
Data structure for single set of oscillation parameters.
Template definition of a multi-dimensional oscillation probability interpolation table.
void load(const char *const fileName)
Load oscillation probability table from file.
Utility class to parse command line options.
void boostToCOM(Evt &event)
Boost event to the Center of Mass (COM) frame.
JCylinder3D getCylinder(const JHead &header)
Get cylinder corresponding to the positions of generated tracks (i.e.
JVertex3D getVertex(const Trk &track)
Get vertex.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
static const double H
Planck constant [eV s].
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
double getThrust(const std::vector< Trk >::const_iterator __begin, const std::vector< Trk >::const_iterator __end)
Compute thrust for a given range of tracks.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Class for computing Fox-Wolfram moments.
Class for hit inertia tensor calculations.
Class for sphericity tensor calculations.
Auxiliary class for organising Monte Carlo file scanners associated with event weighters.
std::vector< filescanner_type >::iterator iterator
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
Auxiliary base class for list of file names.
Auxiliary data structure for alignment of data.
Auxiliary data structure for floating point format specification.