43 int main(
int argc,
char **argv)
51 typedef JTriggeredFileScanner_t::multi_pointer_type multi_pointer_type;
54 JLimit_t& numberOfEvents = inputFile.getLimit();
57 size_t numberOfPrefits;
66 JParser<> zap(
"Program to histogram fit results from reconstructed data.");
70 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
85 const double rad_to_deg = 180/M_PI;
86 const double R_m = 700.0;
87 const int MAX_OVERLAYS = 300;
88 const double MAX_TRIGGERED_HITS = 2500;
89 const double E_RANGE_MIN = -1.0;
90 const double E_RANGE_MAX = 7;
95 TH1D job(
"job", NULL, 100, 0.5, 100.5);
96 TH1D hz (
"hz",
"; cos(#theta_{zenith})" , 21 , Z_RANGE_MIN, Z_RANGE_MAX);
97 TH1D ho (
"ho",
"; # of overlays" , MAX_OVERLAYS , -0.5, MAX_OVERLAYS-0.5);
98 TH2D hzo (
"hzo",
"; cos(#theta_{zenith}) ; # of overlays" , 21, Z_RANGE_MIN, Z_RANGE_MAX, MAX_OVERLAYS , -0.5, MAX_OVERLAYS-0.5);
99 TH2D hxy (
"hxy",
"; x position ; y position" , 201, -R_m, R_m, 201, -R_m, R_m);
100 TH1D hn (
"hn",
"; # of triggered hits" , 600, -0.5, MAX_TRIGGERED_HITS-0.5);
101 TH1D hN (
"hN",
"; JEnergy # of hits" , 600, -0.5, MAX_TRIGGERED_HITS-0.5);
102 TH1D hq (
"hq",
"; quality parameter" , 200, -200.0, 800);
103 TH1D hb0 (
"hb0",
"; log(beta0)" , 60, -1, 3.5);
104 TH1D he (
"he",
"; log(Ereco [GeV])" , 75, E_RANGE_MIN, E_RANGE_MAX);
105 TH2D heo (
"heo",
"; log(Ereco [GeV]) ; # of overlays" , 75, E_RANGE_MIN, E_RANGE_MAX, MAX_OVERLAYS , -0.5, MAX_OVERLAYS-0.5);
106 TH2D hen (
"hen",
"; log(Ereco [GeV]) ; # of triggered hits" , 75, E_RANGE_MIN, E_RANGE_MAX, 600 , -0.5, MAX_TRIGGERED_HITS-0.5);
107 TH2D heN (
"heN",
"; log(Ereco [GeV]) ; JEnergy # of hits" , 75, E_RANGE_MIN, E_RANGE_MAX, 600 , -0.5, MAX_TRIGGERED_HITS-0.5);
108 TH2D hzq (
"hzq",
"; cos(#theta_{zenith}); quality" , 21, Z_RANGE_MIN, Z_RANGE_MAX, 600, -200.0, 800.0);
109 TH2D hzn (
"hzn",
"; cos(#theta_{zenith}); # of triggered hits", 21, Z_RANGE_MIN, Z_RANGE_MAX, 600 , -0.5, MAX_TRIGGERED_HITS-0.5);
110 TH2D hzN (
"hzN",
"; cos(#theta_{zenith}); JEnergy # of hits" , 21, Z_RANGE_MIN, Z_RANGE_MAX, 600, -0.5, MAX_TRIGGERED_HITS-0.5);
111 TH2D hze (
"hze",
"; cos(#theta_{zenith}); log(Ereco [GeV])" , 21, Z_RANGE_MIN, Z_RANGE_MAX, 75, E_RANGE_MIN, E_RANGE_MAX);
112 TH2D hzb0(
"hzb0",
"; cos(#theta_{zenith}); log(beta0)" , 21, Z_RANGE_MIN, Z_RANGE_MAX, 60, E_RANGE_MIN, 3.5);
119 multi_pointer_type ps = inputFile.
next();
128 JEvt::iterator __end = partition(evt->begin(), evt->end(),
JHistory::is_event(application));
130 if (evt->begin() == __end) {
134 if (numberOfPrefits > 0) {
136 JEvt::iterator __q = __end;
138 advance(__end = evt->begin(), min(numberOfPrefits, (
size_t)
distance(evt->begin(), __q)));
147 if (numberOfPrefits > 0) {
148 advance(__end = evt->begin(), min(numberOfPrefits, evt->size()));
151 for (JEvt::const_iterator fit = evt->begin(); fit != __end; ++fit) {
157 const double Efit = fit->getE();
161 hz .Fill(track.
getDZ());
163 hzo.Fill(track.
getDZ(), overlays) ;
164 hxy.Fill(track.
getX(), track.
getY());
165 hq .Fill(fit->getQ());
166 hzq.Fill(track.
getDZ(), fit->getQ() );
178 he .Fill(log10(Efit));
180 hze .Fill(track.
getDZ(), log10(Efit) );
181 heo .Fill(log10(Efit), overlays );
187 STATUS(
"Number of events input " << setw(8) << right << job.GetBinContent(1) << endl);
int main(int argc, char **argv)
General purpose messaging.
#define DEBUG(A)
Message macros.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
ROOT TTree parameter settings of various packages.
Synchronously read DAQ events and Monte Carlo events (and optionally other events).
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
double getY() const
Get y position.
double getX() const
Get x position.
double getDZ() const
Get z direction.
Utility class to parse command line options.
counter_type getCounter() const
Get counter.
unsigned int size() const
Get number of hits.
static const int JMUONGANDALF
static const int JMUONPREFIT
static const int JMUONENERGY
static const int JMUONSIMPLEX
static const int JMUONSTART
static const int JENERGY_NUMBER_OF_HITS
number of hits from JEnergy.cc
static const int JGANDALF_BETA0_RAD
KM3NeT Data Definitions v3.4.0-8-ge14cb17 https://git.km3net.de/common/km3net-dataformat.
JTrack3E getTrack(const Trk &track)
Get track.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
counter_type advance(counter_type &counter, const counter_type value, const counter_type limit=std::numeric_limits< counter_type >::max())
Advance counter.
KM3NeT DAQ data structures and auxiliaries.
Auxiliary class to test history.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
General purpose sorter of fit results.
Auxiliary class for defining the range of iterations of objects.
Auxiliary class to synchronously read DAQ events and Monte Carlo events (and optionally other events)...
virtual bool hasNext() override
Check availability of next element.
virtual const multi_pointer_type & next() override
Get next element.
Reconstruction type dependent comparison of track quality.