26 int main(
int argc,
char **argv)
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);
77 buffer.
simul.push_back(shiftinfo);
78 buffer.
push(&JHead::simul);
80 bool can_found = buffer.
pull(&JHead::can) != buffer.end();
81 bool fixedcan_found = buffer.
pull(&JHead::fixedcan) != buffer.end();
85 NOTICE(
"can found" << endl);
88 NOTICE(
"fixedcan found" << endl);
92 if (can_found and !(fixedcan_found)) {
98 buffer.
erase(&JHead::can);
99 buffer.
push(&JHead::fixedcan);
100 }
else if (fixedcan_found and !(can_found)) {
103 }
else if (!(can_found) and !(fixedcan_found)) {
104 FATAL(
"Neither can nor fixedcan is found" << endl);
106 FATAL(
"Both can and fixedcan are found" << endl);
109 copy(buffer, header);
117 while (inputFile.hasNext()) {
119 Evt* evt = inputFile.next();
122 track->pos += center;
Utility class to parse command line options.
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.
std::vector< JAANET::simul > simul
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.
JAANET::fixedcan fixedcan
double xcenter
x-center [m]
The Vec class is a straightforward 3-d vector, which also works in pyroot.
void push(T JHead::*pd)
Push given data member to Head.
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
void erase(T JHead::*pd)
Remove given data member from Head.
std::string version
program version
const char * getDate(const JDateAndTimeFormat option=ISO8601)
Get ASCII formatted date.
General purpose messaging.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
Scanning of objects from multiple files according a format that follows from the extension of each fi...
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.
const_iterator pull(T JHead::*pd) const
Pull given data member from Head.