32 int main(
int argc,
char **argv)
37 JMultipleFileScanner<Evt> inputFile;
38 JFileRecorder<JTYPELIST<JAAnetTypes_t, JMeta, JRootTypes_t>::typelist>
outputFile;
48 JParser<> zap(
"Auxiliary program to manipulate MUPAGE data.");
52 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
53 zap[
'P'] =
make_field(P,
"Keep muons in event with given probability (<= 1, 1 == all)") = 1.0;
54 zap[
'u'] =
make_field(u,
"Reject events as a function of multiplicity (>= 0, 0 == none)") = 0.0;
55 zap[
'E'] =
make_field(E,
"Energy scaling factor") = 1.0;
61 catch(
const exception &error) {
62 FATAL(error.what() << endl);
65 gRandom->SetSeed(seed);
77 JMultipleFileScanner<Head> io(inputFile);
81 while (inputFile.hasNext()) {
83 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
85 Evt*
event = inputFile.next();
91 if (gRandom->Rndm() < P)
94 i =
event->mc_trks.erase(i);
107 i =
event->mc_trks.erase(i);
112 if (gRandom->Rndm() < pow(
event->mc_trks.size(),-u)) {
Utility class to parse command line options.
static const JGeane gWater(2.67e-1 *JTOOLS::DENSITY_SEA_WATER, 3.4e-4 *JTOOLS::DENSITY_SEA_WATER)
Function object for Energy loss of muon in sea water.
Recording of objects on file according a format that follows from the file name extension.
Structure to store the ToT mean and standard deviation of the hits produced by a nanobeacon in a sour...
JLimit JLimit_t
Type definition of limit.
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
ROOT TTree parameter settings.
const JLimit & getLimit() const
Get limit.
#define DEBUG(A)
Message macros.
int main(int argc, char *argv[])