29 int main(
int argc,
char **argv)
43 JParser<> zap(
"Auxiliary program to convert data formats.");
47 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
54 catch(
const exception& error) {
55 FATAL(error.what() << endl);
61 Vec center(xshift,yshift,0);
64 NOTICE(
"Offset applied to true tracks is: " << center << endl);
80 buffer.
simul.push_back(shiftinfo);
81 buffer.
push(&JHead::simul);
83 bool can_found = buffer.
is_valid(&JHead::can);
84 bool fixedcan_found = buffer.
is_valid(&JHead::fixedcan);
88 NOTICE(
"can found" << endl);
91 NOTICE(
"fixedcan found" << endl);
95 if (can_found and !(fixedcan_found)) {
101 buffer.
erase(&JHead::can);
102 buffer.
push(&JHead::fixedcan);
103 }
else if (fixedcan_found and !(can_found)) {
106 }
else if (!(can_found) and !(fixedcan_found)) {
107 FATAL(
"Neither can nor fixedcan is found" << endl);
109 FATAL(
"Both can and fixedcan are found" << endl);
112 copy(buffer, header);
120 while (inputFile.hasNext()) {
122 Evt* evt = inputFile.next();
125 track->pos += center;
Utility class to parse command line options.
bool is_valid(T JHead::*pd) const
Check validity of given data member in JHead.
int main(int argc, char *argv[])
ROOT TTree parameter settings of various packages.
Generator for simulation.
std::string program
program name
Recording of objects on file according a format that follows from the file name extension.
void erase(T JHead::*pd)
Reset and remove given data member from Head.
double getTime(const Hit &hit)
Get true time of hit.
double ycenter
y-center [m]
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
Auxiliary class for defining the range of iterations of objects.
double xcenter
x-center [m]
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
General purpose messaging.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
void push(T JHead::*pd)
Push given data member to Head.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
const char * getDate()
Get current local date conform ISO-8601 standard.
std::vector< JAANET::simul > simul
General purpose class for object reading from a list of file names.
std::string date
processing date
Utility class to parse command line options.
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.
JAANET::fixedcan fixedcan