40 JParser<> zap(
"Auxiliary program to convert data formats.");
44 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
51 catch(
const exception& error) {
52 FATAL(error.what() << endl);
58 Vec center(xshift,yshift,0);
61 NOTICE(
"Offset applied to true tracks is: " << center << endl);
76 buffer.simul.push_back(shiftinfo);
77 buffer.push(&JHead::simul);
79 bool can_found = buffer.pull(&JHead::can) != buffer.end();
80 bool fixedcan_found = buffer.pull(&JHead::fixedcan) != buffer.end();
84 NOTICE(
"can found" << endl);
87 NOTICE(
"fixedcan found" << endl);
91 if (can_found and !(fixedcan_found)) {
92 buffer.fixedcan.xcenter = xshift;
93 buffer.fixedcan.ycenter = yshift;
94 buffer.fixedcan.zmin = buffer.can.zmin;
95 buffer.fixedcan.zmax = buffer.can.zmax;
96 buffer.fixedcan.radius = buffer.can.r;
97 buffer.erase(&JHead::can);
98 buffer.push(&JHead::fixedcan);
99 }
else if (fixedcan_found and !(can_found)) {
100 buffer.fixedcan.xcenter = buffer.fixedcan.xcenter + xshift;
101 buffer.fixedcan.ycenter = buffer.fixedcan.ycenter + yshift;
102 }
else if (!(can_found) and !(fixedcan_found)) {
103 FATAL(
"Neither can nor fixedcan is found" << endl);
105 FATAL(
"Both can and fixedcan are found" << endl);
108 copy(buffer, header);
116 while (inputFile.hasNext()) {
118 Evt* evt = inputFile.next();
121 track->pos += center;
Utility class to parse command line options.
Generator for simulation.
std::string program
program name
double getTime(const Hit &hit)
Get true time of hit.
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
Auxiliary class for defining the range of iterations of objects.
The Vec class is a straightforward 3-d vector, which also works in pyroot.
std::string getGITVersion(const std::string &tag)
Get GIT version for given GIT tag.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
std::string version
program version
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
const char * getDate()
Get ASCII formatted date.
General purpose class for object reading from a list of file names.
std::string date
processing date
void copy(const Head &from, JHead &to)
Copy header from from to to.
const JLimit & getLimit() const
Get limit.
std::string time
processing time
std::vector< Trk > mc_trks
MC: list of MC truth tracks.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.