37{
40
43 string detectorFile;
44
46
47 bool useBoost;
48
49 bool useWeights;
51
53
54 try {
55
56 JParser<> zap(
"Auxiliary program to test event shape variables.");
57
67
68 zap(argc, argv);
69 }
70 catch(const exception &error) {
71 FATAL(error.what() << endl);
72 }
73
74 if (useWeights && numberOfEvents !=
JLimit::max()) {
75 FATAL(
"Cannot apply weighting to limited number of events.");
76 }
77
78
79
80
82
83 if (!detectorFile.empty()) {
84 try {
86 }
89 }
90 }
91
93
96 }
97
98
99
100
102
103 if (scanners.setEvtWeightFactor(weightFactorMap) == 0) {
104 WARNING(
"No flux function set." << endl);
105 }
106
107
108
109
111
112 TH1D hT("hT", "thrust", 50, 0.5, 1.0);
113
114 TH1D hA("hA", "aplanarity", 50, 0.0, 0.5);
115 TH1D hS("hS", "sphericity", 100, 0.0, 1.0);
116 TH1D hc("hc", "circularity", 100, 0.0, 1.0);
117 TH1D hp("hp", "planar flow", 100, 0.0, 1.0);
118
119 TH1D hC("hC", "C-variable", 100, 0.0, 1.0);
120 TH1D hD("hD", "D-variable", 100, 0.0, 1.0);
121
122 TH1D hH10("hH10", "H10", 100, 0.0, 1.0);
123 TH1D hH20("hH20", "H20", 100, 0.0, 1.0);
124 TH1D hH30("hH30", "H30", 100, 0.0, 1.0);
125 TH1D hH40("hH40", "H40", 100, 0.0, 1.0);
126
127 TH1D hq("hq", "Logarithmic eigenvalue ratio hit inertia tensor", 200, -20.0, 0.0);
128
129
130
131
133
135
137
140 }
141
143
144 Evt*
event = in.next();
145
146 const double weight = (useWeights ? scanner->getWeight(*event) : 1.0);
147
149 RIGHT (15) << in.getCounter() <<
151
153
155
158
160
162
164
165 const double aplanarity = S2.getAplanarity();
166 const double sphericity = S2.getSphericity();
167 const double circularity = S2.getCircularity();
168 const double planarflow = S2.getPlanarFlow();
169
170 const double C =
S1.getC();
171 const double D =
S1.getD();
172
173 const double q = Q.getEigenvalueRatio();
174
175 hT.Fill(thrust, weight);
176
177 hA.Fill(aplanarity, weight);
178 hS.Fill(sphericity, weight);
179 hc.Fill(circularity, weight);
180 hp.Fill(planarflow, weight);
181
182 hC.Fill(C, weight);
183 hD.Fill(D, weight);
184
185 hH10.Fill(
H[1]/
H[0], weight);
186 hH20.Fill(
H[2]/
H[0], weight);
187 hH30.Fill(
H[3]/
H[0], weight);
188 hH40.Fill(
H[4]/
H[0], weight);
189
190 hq.Fill(log10(q), weight);
191 }
192 }
193
195
196 out.Write();
197 out.Close();
198
199 return 0;
200}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Template specialisation for a map between event categories and event-weight factor products.
const JHead & getHeader() const
Get header.
void set(const JVector2D &p0, const JVector2D &p1)
Set circle.
Utility class to parse command line options.
General purpose class for object reading from a list of file names.
virtual bool hasNext() override
Check availability of next element.
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.
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.