36int main(
int argc,
char **argv)
56 JParser<> zap(
"Auxiliary program to test event shape variables.");
70 catch(
const exception &error) {
71 FATAL(error.what() << endl);
74 if (useWeights && numberOfEvents !=
JLimit::max()) {
75 FATAL(
"Cannot apply weighting to limited number of events.");
83 if (!detectorFile.empty()) {
103 if (scanners.
setFlux(fluxMap) == 0) {
104 WARNING(
"No flux function set." << endl);
112 TH1D hT(
"hT",
"thrust", 50, 0.5, 1.0);
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);
119 TH1D hC(
"hC",
"C-variable", 100, 0.0, 1.0);
120 TH1D hD(
"hD",
"D-variable", 100, 0.0, 1.0);
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);
127 TH1D hq(
"hq",
"Logarithmic eigenvalue ratio hit inertia tensor", 200, -20.0, 0.0);
136 scanner->setLimit(numberOfEvents);
144 while (scanner->hasNext()) {
146 Evt*
event = scanner->next();
148 const double weight = (useWeights ? scanner->getWeight(*event) : 1.0);
151 RIGHT (15) << scanner->getCounter() <<
172 const double C =
S1.getC();
173 const double D =
S1.getD();
177 hT.Fill(thrust, weight);
179 hA.Fill(aplanarity, weight);
180 hS.Fill(sphericity, weight);
181 hc.Fill(circularity, weight);
182 hp.Fill(planarflow, weight);
187 hH10.Fill(
H[1]/
H[0], weight);
188 hH20.Fill(
H[2]/
H[0], weight);
189 hH30.Fill(
H[3]/
H[0], weight);
190 hH40.Fill(
H[4]/
H[0], weight);
192 hq.Fill(log10(q), weight);
Data structure for detector geometry and calibration.
int main(int argc, char **argv)
Auxiliary methods for calculating Lorentz boosts.
General purpose messaging.
#define DEBUG(A)
Message macros.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
ROOT TTree parameter settings of various packages.
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.
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.
double getEigenvalueRatio() const
Get eigenvalue ratio.
Class for sphericity tensor calculations.
double getSphericity() const
Get sphericity.
double getAplanarity() const
Get aplanarity.
double getCircularity() const
Get circularity.
double getPlanarFlow() const
Get planar flow.
Auxiliary class for organising Monte Carlo file scanners associated with event weighters.
size_t setFlux(const JEvtCategoryHelper &category, const JFluxHelper &flux)
Set flux function for all MC-files corresponding to a given event category.
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.