45 int main(
int argc,
char **argv)
50 using namespace KM3NETDAQ;
53 typedef JTriggeredFileScanner_t::multi_pointer_type multi_pointer_type;
59 size_t numberOfPrefits;
66 JParser<> zap(
"Program to histogram fit results from reconstructed data.");
70 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
83 const double rad_to_deg = 180/M_PI;
84 const double R_m = 700.0;
85 const int MAX_OVERLAYS = 200;
86 const double zenith_min = -1.0;
87 const double zenith_max = 1.0;
90 TH1D hz (
"hz",
"; cos(#theta)" , 21 , zenith_min, zenith_max);
91 TH1D ho (
"ho",
"; #overlays" , MAX_OVERLAYS , -0.5, MAX_OVERLAYS-0.5);
92 TH2D hzo (
"hzo",
"; cos(#theta) ; #overlays" , 21, zenith_min, zenith_max, MAX_OVERLAYS , -0.5, MAX_OVERLAYS-0.5);
93 TH2D hxy (
"hxy",
"; x position ; y position" , 201, -R_m, R_m, 201, -R_m, R_m);
94 TH1D hq (
"hq",
"; quality parameter" , 100, -200.0, 800);
95 TH1D hb0 (
"hb0",
"; log(beta0)" , 60, -2, 3.5);
96 TH1D he (
"he",
"; log(Ereco [GeV])" , 75, -2, 4);
97 TH2D heo (
"heo",
"; log(Ereco [GeV]) ; #overlays" , 75, -2, 4, MAX_OVERLAYS , -0.5, MAX_OVERLAYS-0.5);
98 TH2D hzq (
"hzq",
"; cos(#theta); quality" , 21, zenith_min, zenith_max, 50, -10.0, 500.0);
99 TH2D hze (
"hze",
"; cos(#theta); log(Ereco [GeV])", 21, zenith_min, zenith_max, 75, -2, 4);
100 TH2D hzb0(
"hzb0",
"; cos(#theta); log(beta0)" , 21, zenith_min, zenith_max, 60, -2, 3.5);
102 while (inputFile.hasNext()) {
104 multi_pointer_type ps = inputFile.next();
111 JEvt::iterator __end = partition(evt->begin(), evt->end(),
JHistory::is_event(application));
113 if (evt->begin() == __end) {
117 if (numberOfPrefits > 0) {
119 JEvt::iterator __q = __end;
121 advance(__end = evt->begin(), min(numberOfPrefits, (
size_t)
distance(evt->begin(), __q)));
130 if (numberOfPrefits > 0) {
131 advance(__end = evt->begin(), min(numberOfPrefits, evt->size()));
134 for (JEvt::const_iterator fit = evt->begin(); fit != __end; ++fit) {
139 hz .Fill(track.
getDZ());
141 hxy.Fill(track.
getX(), track.
getY());
142 hq .Fill(fit->getQ());
143 hzq.Fill(track.
getDZ(), fit->getQ() );
149 const double Efit = fit->getE();
150 he .Fill(log10(Efit));
151 hze.Fill(track.
getDZ(), log10(Efit) );
static const int JMUONSTART
Utility class to parse command line options.
ROOT TTree parameter settings.
JTrack3E getTrack(const Trk &track)
Get track.
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.
General purpose sorter of fit results.
Auxiliary class to synchronously read DAQ events and Monte Carlo events (and optionally other events)...
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary class for defining the range of iterations of objects.
static const int JMUONPREFIT
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Auxiliary class to test history.
static const int JMUONGANDALF
static const int JGANDALF_BETA0_RAD
KM3NeT Data Definitions v1.2.3 https://git.km3net.de/common/km3net-dataformat.
double getY() const
Get y position.
Reconstruction type dependent comparison of track quality.
General purpose messaging.
counter_type advance(counter_type &counter, const counter_type value, const counter_type limit=std::numeric_limits< counter_type >::max())
Advance counter.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Data structure for set of track fit results.
static const int JMUONSIMPLEX
Utility class to parse command line options.
double getX() const
Get x position.
const JLimit & getLimit() const
Get limit.
double getDZ() const
Get z direction.
static const int JMUONENERGY
int main(int argc, char *argv[])