67 friend inline std::ostream&
operator<<(std::ostream& out,
const JTrack& track)
71 out <<
FIXED(8,2) << track.getX() <<
' '
72 <<
FIXED(8,2) << track.getY() <<
' '
73 <<
FIXED(8,2) << track.getZ() <<
' '
74 <<
FIXED(7,3) << track.getDX() <<
' '
75 <<
FIXED(7,3) << track.getDY() <<
' '
76 <<
FIXED(7,3) << track.getDZ() <<
' '
77 <<
FIXED(10,1) << track.getT() <<
' '
96 #define MAKE_ENTRY(A) std::make_pair(#A, A)
135 double operator()(
const JRECONSTRUCTION::JFit& fit,
const std::string& key,
const double value)
const
137 const_iterator p = this->find(key);
139 if (p != this->end() && fit.
hasW(p->second))
140 return fit.
getW(p->second);
151 int main(
int argc,
char **argv)
155 using namespace KM3NETDAQ;
158 typedef JParallelFileScanner_t::multi_pointer_type multi_pointer_type;
160 JParallelFileScanner_t inputFile;
169 JParser<> zap(
"Auxiliary program to print fit results.");
172 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
180 catch(
const exception& error) {
181 FATAL(error.what() << endl);
186 const int WIDTH = 16;
193 center = get<JPosition3D>(
getHeader(inputFile));
194 }
catch(
const exception& error) {}
197 while (inputFile.hasNext()) {
199 cout <<
"event: " << setw(10) << inputFile.getCounter() << endl;
201 multi_pointer_type ps = inputFile.next();
212 cout <<
"trigger: " << setw(10) << tev->
getCounter() <<
' '
215 if (mc.getEntries() != 0) {
229 cout <<
LEFT(
WIDTH) <<
"neutrino" << right <<
' ' << ta << endl;
241 is_hadron (*i) ?
"hadron" :
"other") << right <<
' ' << ta << endl;
246 cout <<
"number of fits " << setw(4) << right << evt->size() << endl;
248 for (
size_t i = 0; i != min(evt->size(), numberOfFits); ++i) {
250 const JFit& fit = (*evt)[i];
256 cout <<
LEFT(
WIDTH) <<
"fit" << right <<
' '
258 <<
FIXED(7,2) << fit.getQ();
260 for (
const auto& key : keys) {
261 cout <<
' ' <<
SCIENTIFIC(12,3) << getWeight(fit, key, 0.0);
265 cout << fit.getHistory() << endl;
bool is_electron(const Trk &track)
Test whether given track is a (anti-)electron.
Auxiliary data structure for alignment of data.
Utility class to parse command line options.
static const int JSTART_NPE_MIP_TOTAL
number of photo-electrons along the whole track from JStart.cc
int main(int argc, char *argv[])
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
ROOT TTree parameter settings of various packages.
static const int JVETO_NPE
number of photo-electrons from JVeto.cc
JTrack3E getTrack(const Trk &track)
Get track.
static const int JENERGY_ENERGY
uncorrected energy [GeV] from JEnergy.cc
static const int JENERGY_MAXIMAL_ENERGY
maximal energy [GeV] from JEnergy.cc
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon.
General purpose sorter of fit results.
static const int JGANDALF_BETA1_RAD
angular resolution [rad] from JGandalf.cc
static const int AASHOWERFIT_ENERGY
uncorrected energy [GeV]
General purpose class for parallel reading of objects from a single file or multiple files...
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary class to convert DAQ hit time to/from Monte Carlo hit time.
Auxiliary data structure for floating point format specification.
static const int JENERGY_CHI2
chi2 from JEnergy.cc
#define MAKE_STRING(A)
Make string.
static const int JENERGY_NOISE_LIKELIHOOD
log likelihood of every hit being K40 from JEnergy.cc
static const int JSTART_NPE_MIP
number of photo-electrons up to the barycentre from JStart.cc
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
Data structure for track fit results.
static const int JENERGY_NDF
number of degrees of freedom from JEnergy.cc
static const int JENERGY_MINIMAL_ENERGY
minimal energy [GeV] from JEnergy.cc
Auxiliary class for defining the range of iterations of objects.
static const int JCOPY_Z_M
true vertex position along track [m] from JCopy.cc
static const int JGANDALF_NUMBER_OF_HITS
number of hits from JGandalf.cc
static const int JSHOWERFIT_ENERGY
uncorrected energy [GeV] from JShowerFit.cc
I/O formatting auxiliaries.
static const int JGANDALF_LAMBDA
control parameter from JGandalf.cc
bool hasW(const int i) const
Check availability of value.
static const int JENERGY_NUMBER_OF_HITS
number of hits from JEnergy.cc
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
double getE(const double z) const
Get muon energy at given position.
Parallel scanning of objects from a single file or multiple files according a format that follows fro...
static const int JGANDALF_BETA0_RAD
KM3NeT Data Definitions v2.0.0-15-g59d2e2b https://git.km3net.de/common/km3net-dataformat.
double putTime() const
Get Monte Carlo time minus DAQ/trigger time.
static const int JVETO_NUMBER_OF_HITS
number of hits from JVeto.cc
Reconstruction type dependent comparison of track quality.
Auxiliary methods to convert data members or return values of member methods of a set of objects to a...
General purpose messaging.
Auxiliary include file for time conversion between DAQ/trigger hit and Monte Carlo hit...
static const int JPP_COVERAGE_ORIENTATION
coverage of dynamic orientation calibration from any Jpp application
static const int JSTART_LENGTH_METRES
distance between first and last hits in metres from JStart.cc
Utility class to parse command line options.
static const int JGANDALF_NUMBER_OF_ITERATIONS
number of iterations from JGandalf.cc
Data structure for position in three dimensions.
const JLimit & getLimit() const
Get limit.
static const int JGANDALF_CHI2
chi2 from JGandalf.cc
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
bool is_hadron(const Trk &track)
Test whether given track is a hadron.
const std::vector< double > & getW() const
Get values.
Auxiliary data structure for floating point format specification.
JTriggerCounter_t getCounter() const
Get trigger counter.
static const int JENERGY_MUON_RANGE_METRES
range of a muon with the reconstructed energy [m] from JEnergy.cc
const array_type< JKey_t > & get_keys(const std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > &data)
Method to create array of keys of map.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
static const int AASHOWERFIT_NUMBER_OF_HITS
number of hits used
static const int JPP_COVERAGE_POSITION
coverage of dynamic position calibration from any Jpp application