Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 34 of file JORCAShowerPositionPDF.cc.
40 typedef JTriggeredFileScanner_t::multi_pointer_type multi_pointer_type;
42 JTriggeredFileScanner_t inputFile;
64 if (zap.
read(argc, argv) != 0)
return 1;
66 catch(
const exception& error){
67 FATAL(error.what() << endl);
87 TFile *out =
new TFile(
outputFile.c_str(),
"RECREATE");
88 if ( !out->IsOpen() ) printf(
"Can't open outputfile\n");
90 TH2D hPDF2Dist(
"hPDF2Dist",
"PDF for ORCA Shower Position Fit; #delta t [ns]; D [m]",
94 while(inputFile.hasNext()){
96 multi_pointer_type ps = inputFile.next();
104 cascade.
pos =
event->mc_trks[1].pos;
105 cascade.
pos -=
Vec(0.0, 0.0, -117.164);
107 for (
unsigned int i = 1; i <
event->mc_trks.size(); i++) {
108 cascade.
E +=
event->mc_trks[i].E;
109 cascade.
dir +=
event->mc_trks[i].dir *
event->mc_trks[i].E;
114 double t_vx = converter.putTime(event->mc_trks[1].t);
118 buildL0(
JDAQTimeslice(*tev,
true), moduleRouter, back_inserter(dataL0));
127 hit.transform(R, vx);
129 const double D = hit.getLength();
131 const double dt = hit.getT() - t_expected;
133 const double ct = photonDir.
getDot(hit.getDirection());
145 hPDF2Dist.Fill(dt, D,
w);
void load(const JString &file_name, JDetector &detector)
Load detector from input file.
double getDot(const JAngle3D &angle) const
Get dot product.
double E
Energy (either MC truth or reconstructed)
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
Data structure for direction in three dimensions.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Auxiliary class to convert DAQ/trigger hit time to/from Monte Carlo hit time.
Utility class to parse command line options.
Router for direct addressing of PMT data in detector data structure.
JPosition3D & rotate(const JRotation3D &R)
Rotate.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Data structure for position in three dimensions.
Vec pos
postion of the track at time t
Router for direct addressing of module data in detector data structure.
JDirection3D getDirection(const Vec &v)
Get direction.
Auxiliary class to synchronously read DAQ events and Monte Carlo events (and optionally other events)...
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
JPosition3D getPosition(const Vec &v)
Get position.
Data structure for L0 hit.
The Vec class is a straightforward 3-d vector, which also works in pyroot.
Vec & normalize()
Normalise this vector.
Template specialisation of L0 builder for JHitL0 data type.
int read(const int argc, const char *const argv[])
Parse the program's command line options.