Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
io_ascii.hh
Go to the documentation of this file.
1 #ifndef IO_ASCII_INCLUDED
2 #define IO_ASCII_INCLUDED
3 
4 #include <string>
5 #include <istream>
6 #include <ostream>
7 #include <sstream>
8 
9 #include "Evt.hh"
10 #include "Hit.hh"
11 #include "Trk.hh"
12 #include "Head.hh"
13 #include "Exception.hh"
14 #include "../definitions/w2list_gseagen.hh"
15 
16 #include "TDatabasePDG.h"
17 
18 namespace mc_keys
19 {
20 const char* const auto_t = "auto";
21 const char* const start_run_t = "start_run:";
22 const char* const start_event_t = "start_event:";
23 const char* const hit_t = "hit:";
24 const char* const hit_raw_t = "hit_raw:";
25 const char* const track_in_t = "track_in:";
26 const char* const track_t = "track:";
27 const char* const track_fit_t = "track_fit:";
28 const char* const neutrino_t = "neutrino:";
29 const char* const track_primary_t = "track_primary:";
30 //const char* const primarylepton_t = "primarylepton:";
31 const char* const weights_t = "weights:";
32 const char* const w2list_t = "w2list:";
33 const char* const w3list_t = "w3list:";
34 const char* const hourangle_t = "hourangle:";
35 const char* const center_on_can_t = "center_on_can:";
36 const char* const muon_decay_t = "muon_decay:";
37 const char* const end_event_t = "end_event:";
38 }
39 
40 namespace mc_usr_keys
41 {
42 // track-level quantities
43 const char* const energy_lost_in_can = "energy_lost_in_can";
44 
45 
46 // event-level corsika variables
47 const char* const muon_decay_x = "muon_decay_x";
48 const char* const muon_decay_y = "muon_decay_y";
49 const char* const muon_decay_z = "muon_decay_z";
50 
51 const char* const center_on_can_x = "center_on_can_x";
52 const char* const center_on_can_y = "center_on_can_y";
53 const char* const center_on_can_z = "center_on_can_z";
54 const char* const hourangle = "hourangle";
55 }
56 
57 
58 namespace io_stringutil
59 {
60 /**
61  * Check if string starts with given text.
62  *
63  * \param a input string
64  * \param b text
65  * \return true if string start with text; else false
66  */
67 inline bool startswith( const std::string& a, const std::string& b )
68 {
69  if ( a.find( b ) == 0 ) return true;
70  return false;
71 }
72 
73 /**
74  * Remove leading and trailing white spaces.
75  *
76  * \param s input string
77  * \return trimmed string
78  */
79 inline std::string trim(const std::string& s)
80 {
81  using namespace std;
82 
83  if ( s == "" ) return s;
84 
85  string::size_type i1;
86  string::size_type i2;
87 
88  for (i1 = 0; i1 < s.length(); i1++)
89  {
90  if ( !isspace (s[i1]) ) break;
91  }
92  for (i2 = s.length() - 1 ; i2 > i1 ; i2--)
93  {
94  if ( !isspace (s[i2]) ) break;
95  }
96  return s.substr( i1, i2 - i1 + 1 );
97 }
98 
99 }
100 
101 
102 /**
103  * Convert Geant3 to PDG particle type.
104  *
105  * \param geant3_code Geant3 code
106  * \return PDG code
107  */
108 inline int pdg_code( int geant3_code )
109 {
110  if ( geant3_code == -1 ) return -1; // used for k40 hits
111  if ( geant3_code < 0 ) return pdg_code( -geant3_code ); // used for scattered
112 
113  return TDatabasePDG::Instance()->ConvertGeant3ToPdg( geant3_code );
114 }
115 
116 /**
117  * Convert PDG to Geant3 particle type.
118  *
119  * \param pdg_code PDG code
120  * \return Geant3 code
121  */
122 inline int geant3_code( int pdg_code )
123 {
124  if (pdg_code == -1 ) return -1;
125  if (pdg_code == +311 ) return geant3_code( 130 ); // K0 -> K0long
126  if (pdg_code == -311 ) return geant3_code( 130 ); // K0bar -> K0long
127 
128  return TDatabasePDG::Instance()->ConvertPdgToGeant3( pdg_code );
129 }
130 
131 
132 /**
133  * Read a Vec(tor) from a stream.
134  *
135  * \param v vector
136  * \param is input stream
137  * \return true if correctly read; else false
138  */
139 inline bool read ( Vec& v, std::istream& is)
140 {
141  is >> v.x >> v.y >> v.z;
142  return !is.fail();
143 }
144 
145 /**
146  * Write a Vec(tor) to a stream.
147  *
148  * \param v vector
149  * \param os output stream
150  * \return true if correctly written; else false
151  */
152 inline bool write( const Vec& v, std::ostream& os)
153 {
154  os << v.x << ' ' << v.y << ' ' << v.z;
155  return !os.fail();
156 }
157 
158 /**
159  * Read a hit from a stream.
160  *
161  * \param h hit
162  * \param is input stream
163  * \param read_mc option to read also type and origin
164  * \return true if correctly read; else false
165  */
166 inline bool read ( Hit& h, std::istream& is, bool read_mc = false )
167 {
168  h.dom_id = 0; // need a proper det file to
169  h.channel_id = 0; // set these.
170 
171  is >> h.id >> h.pmt_id >> h.a >> h.t;
172  if ( !read_mc )
173  {
174  return !is.fail();
175  }
176  else
177  {
178  is >> h.type >> h.origin;
179  }
180 
181  // If we get here without failing, we will return true, but
182  // will attempt to read also pure_a and pure_t which may
183  // or may not be present, depending on the km3 version.
184 
185  bool r = !is.fail();
186  is >> h.pure_a >> h.pure_t;
187  if (is.fail())
188  {
189  h.pure_a = h.pure_t = 0 ;
190  is.clear();
191  }
192  return r;
193 }
194 
195 
196 /**
197  * Write a hit to a stream.
198  *
199  * \param h hit
200  * \param os output stream
201  * \param tag tag
202  * \return true if correctly written; else false
203  */
204 inline bool write( const Hit& h, std::ostream& os, const std::string& tag = mc_keys::hit_t)
205 {
206  int om_id = h.pmt_id; // todo: deal with this better.
207 
208  os << tag << ' ' << h.id << ' ' << om_id << ' ' << h.a << ' ' << h.t;
209  if ( tag != mc_keys::hit_raw_t ) {
210  os << ' ' << h.type << ' ' << h.origin << ' ' << h.pure_a << ' ' << h.pure_t;
211  }
212  os << std::endl;
213  return !os.fail();
214 }
215 
216 
217 /**
218  * Read track from a stream.
219  *
220  * \param t track
221  * \param evt event (for storing nu info in w2list)
222  * \param is input stream
223  * \param tag tag
224  * \return true if correctly read; else false
225  */
226 inline bool read ( Trk& t, Evt& evt, std::istream& is , const std::string& tag = mc_keys::track_in_t)
227 {
228  using namespace std;
229 
230  string line;
231  getline( is, line );
232  istringstream ii(line);
233 
234  ii >> t.id >> t.pos >> t.dir >> t.E >> t.t;
235 
236  if (!ii) return false;
237 
238  t.len = 0.0;
239  t.clearusr();
240  t.comment = tag;
241 
242  if ( tag == mc_keys::track_in_t)
243  {
244  ii >> t.type; if (!ii) return false;
245  t.type = pdg_code( t.type );
246  ii >> t.len;
247  if (!ii) return true; // missing length is not an error
248 
249  double eloss = 0;
250  ii >> eloss;
251  if (!ii) return true; // missing eloss is not an error
252 
254  }
255 
256  if ( tag == mc_keys::neutrino_t )
257  {
258  if (evt.w2list.size() < 11 ) evt.w2list.resize(11);
259 
260  ii >> evt.w2list[W2LIST_GSEAGEN_BX] >>
261  evt.w2list[W2LIST_GSEAGEN_BY] >>
263  t.type >>
265  // bx by ichan t.type cc;
266  }
267 
268  if ( tag == mc_keys::track_primary_t )
269  {
270  ii >> t.type; // nucleus id (in pdg format or not?)
271  }
272 
273  if ( ii.fail() )
274  {
275  ostream& out = Exception::getOstream();
276  out << "Error reading trk ";
277  t.print(out);
278  throw Exception(static_cast<ostringstream&>(out).str());
279  }
280 
281  return !ii.fail();
282 }
283 
284 /**
285  * Write track to a stream.
286  *
287  * \param t track
288  * \param os output stream
289  * \param tag tag
290  * \return true if correctly read; else false
291  */
292 inline bool write( const Trk& t, const Evt& evt, std::ostream& os, std::string tag = mc_keys::track_in_t )
293 {
294  using namespace std;
295 
296  int type = t.type;
297 
298  if ( tag == mc_keys::auto_t )
299  {
300  tag = t.comment;
301  }
302 
303  os << tag << ' ' << t.id << ' ' << t.pos << ' ' << t.dir << ' ' << t.E << ' ' << t.t;
304 
305  if ( tag == mc_keys::track_in_t)
306  {
307  os << ' ' << geant3_code(type) << ' ' << t.len;
308 
310  {
311  os << ' ' << t.getusr( mc_usr_keys::energy_lost_in_can );
312  }
313  os << endl;
314  }
315 
316  else if (tag == mc_keys::track_primary_t)
317  {
318  os << ' ' << t.type << endl;
319  }
320 
321 
322  else if ( tag == mc_keys::neutrino_t )
323  {
324  double bx(0),by(0);
325  int ichan(0), cc(0);
326 
327  if ( evt.w2list.size() > W2LIST_GSEAGEN_CC ) {
328  bx = evt.w2list[W2LIST_GSEAGEN_BX];
329  by = evt.w2list[W2LIST_GSEAGEN_BY];
330  ichan = evt.w2list[W2LIST_GSEAGEN_ICHAN];
331  cc = evt.w2list[W2LIST_GSEAGEN_CC];
332  }
333 
334  os << ' ' << bx
335  << ' ' << by
336  << ' ' << ichan
337  << ' ' << t.type
338  << ' ' << cc
339  << endl;
340  }
341 
342  else
343  os << endl;
344 
345  return !os.fail();
346 }
347 
348 
349 /**
350  * Read data.
351  *
352  * \param is input stream
353  * \return data
354  */
356 {
357  using namespace std;
358 
360 
361  string ss;
362  getline(is, ss);
363  istringstream il(ss);
364  for ( double x; il >> x ; ) r.push_back( x );
365 
366  return r;
367 }
368 
369 
370 /**
371  * Put value in front of data.
372  *
373  * \param vec data
374  * \param value value
375  */
376 template<typename T>
377 inline void push_front( std::vector<T>& vec, T& value )
378 {
379  vec.insert( vec.begin(), value );
380 }
381 
382 
383 /**
384  * Read event from a stream.
385  *
386  * \param evt event
387  * \param is input stream
388  * \param skip_hits option to skip reading of hits
389  * \return true if correctly read; else false
390  */
391 inline bool read ( Evt& evt, std::istream& is, bool skip_hits = false )
392 {
393  using namespace std;
394 
395  string w;
396 
397  // find next start_event
398 
399  while ( w != mc_keys::start_event_t && is.good() ) is >> w;
400 
401  int mc_event_type; // dummy - this is always 1 in all files.
402  is >> evt.mc_id >> mc_event_type;
403 
404  Trk trk_nu, trk_primary;
405  bool have_trk_nu(false), have_trk_primary(false);
406 
407 
408  evt.mc_trks.clear();
409  evt.hits.clear();
410  evt.mc_hits.clear();
411 
412  string w_old;
413 
414  while ( is )
415  {
416  static Hit h;
417  static Trk t;
418 
419  is >> w;
420 
421  if (skip_hits && ( w == mc_keys::hit_t || w == mc_keys::hit_raw_t) )
422  {
423  is.ignore( 1000, '\n' );
424  continue;
425  }
426 
427  if ( w == mc_keys::hit_t )
428  {
429  read( h, is, true );
430  evt.mc_hits.push_back( h );
431  }
432  else if ( w == mc_keys::hit_raw_t )
433  {
434  read( h, is, false);
435  evt.hits.push_back( h );
436  }
437  else if ( w == mc_keys::track_in_t )
438  {
439  read( t, evt, is , w);
440  evt.mc_trks.push_back( t );
441  }
442  else if ( w == mc_keys::track_t )
443  {
444  read( t, evt, is );
445  evt.trks.push_back( t );
446  }
447  else if ( w == mc_keys::neutrino_t)
448  {
449  read( trk_nu ,evt, is, w );
450  have_trk_nu = true;
451  }
452  else if ( w == mc_keys::track_primary_t)
453  {
454  read( trk_primary, evt, is, w );
455  have_trk_primary = true;
456  }
457  // else if ( w == mc_keys::primarylepton_t)
458  // {
459  // read( trk_primary_lepton, is, w);
460  // have_trk_primary_lepton = true;
461  // }
462  else if ( w == mc_keys::weights_t)
463  {
464  evt.w = read_line_to_vector( is );
465  }
466  else if ( w == mc_keys::w2list_t)
467  {
468  auto v = read_line_to_vector( is );
469  evt.w2list.resize( std::max( evt.w2list.size(), v.size()));
470  std::copy( v.begin(), v.end() , evt.w2list.begin() );
471  }
472  else if ( w == mc_keys::w3list_t)
473  {
474  evt.w3list = read_line_to_vector( is );
475  }
476  else if ( w == mc_keys::hourangle_t )
477  {
478  double ha;
479  is >> ha;
480  evt.setusr(mc_usr_keys::hourangle, ha );
481  }
482 
483 
484  else if ( w == mc_keys::center_on_can_t)
485  {
486  // in corsika files, there is the (undocumented?) center_on_can tag,
487  // which denoets the projection of the primary on the can. The direction
488  // of the center_on_can 'track' is by defintion the direction of the
489  // primary. We record the position in the usr data.
490 
492  if ( v.size() > 3 )
493  {
497  }
498  }
499 
500  else if ( w == mc_keys::muon_decay_t)
501  {
502  // in km3sim files, there are additional tags, including this one
504  if ( v.size() > 4 )
505  {
506  evt.setusr(mc_usr_keys::muon_decay_x, v[2] );
507  evt.setusr(mc_usr_keys::muon_decay_y, v[3] );
508  evt.setusr(mc_usr_keys::muon_decay_z, v[4] );
509  }
510  }
511 
512 
513  else if ( w == mc_keys::end_event_t)
514  {
515  // finalize the mc_tracks -- as best we can.
516 
517  // If there is both a primary, and a neutrino, then the primary
518  // will go second (mc_trks[1]) with id=-1 and the neutrino will
519  // be mc_trks[0] with id=0. Unless they are same particle (identical
520  // pos,dir,E); in that case the primary is skipped.
521  // The primarylepton tag is not stored as a seperate Trk.
522 
523  if ( have_trk_primary && have_trk_nu )
524  {
525  bool same = trk_nu.pos == trk_primary.pos &&
526  trk_nu.dir == trk_primary.dir &&
527  trk_nu.E == trk_primary.E;
528 
529  if (!same)
530  {
531  trk_primary.id = -1;
532  push_front( evt.mc_trks, trk_primary);
533  }
534 
535  trk_nu.id = 0;
536  push_front( evt.mc_trks, trk_nu);
537  }
538 
539  else if ( have_trk_primary )
540  {
541  trk_primary.id = 0;
542  push_front( evt.mc_trks, trk_primary);
543  }
544 
545  else if ( have_trk_nu )
546  {
547  trk_nu.id = 0;
548  push_front( evt.mc_trks, trk_nu);
549  }
550 
551  return true;
552  }
553  else
554  {
555  is.ignore( 1000, '\n' );
556  }
557  w_old = w;
558  }
559 
560  if (!is.eof())
561  {
562  THROW(Exception, "Error while reading ascii event" << w << ' ' << evt.id);
563  }
564 
565  return false;
566 }
567 
568 
569 /**
570  * Write event to a stream.
571  *
572  * \param evt event
573  * \param os output stream
574  * \return true if correctly read; else false
575  */
576 inline bool write( const Evt& evt, std::ostream& os)
577 {
578  using namespace std;
579 
580  os << mc_keys::start_event_t << ' ' << evt.mc_id << ' ' << 1 << endl;
581 
582  for ( auto& trk : evt.mc_trks ) write ( trk, evt, os, mc_keys::auto_t );
583  for ( auto& trk : evt.trks ) write ( trk, evt, os, mc_keys::track_fit_t );
584  for ( auto& hit : evt.mc_hits ) write ( hit, os, mc_keys::hit_t);
585  for ( auto& hit : evt.hits ) write ( hit, os, mc_keys::hit_raw_t);
586 
587  os << mc_keys::weights_t; for (auto& w : evt.w ) os << ' ' << w; os << endl;
588  os << mc_keys::w2list_t; for (auto& w : evt.w2list ) os << ' ' << w; os << endl;
589  os << mc_keys::w3list_t; for (auto& w : evt.w3list ) os << ' ' << w; os << endl;
590  os << mc_keys::end_event_t << endl;
591 
592  return true;
593 }
594 
595 
596 
597 /**
598  * Read header from a stream.
599  *
600  * The stream may be positioned at any point before the tag mc_keys::start_run_t,
601  * which marks the beginning of the header.
602  * Information before the header (if any) is disgarded.
603  *
604  * \param hdr header
605  * \param is input stream
606  * \return true if correctly read; else false
607  */
608 inline bool read( Head& hdr, std::istream& is )
609 {
610  using namespace std;
611 
612  string line;
613 
614  bool start = false;
615 
616  while (getline( is, line ))
617  {
619  {
620  break;
621  }
622 
624  {
625  start = true;
626  }
627 
629  {
630  THROW(Exception, "Unexpected tag " << mc_keys::start_event_t << " found while reading header at " << line << " (could mean the evt file has no header)");
631  }
632 
633  if (!start) continue;
634 
635  vector<string> v = splitstring( line, ':' );
636  if (v.size() < 2 )
637  {
638  THROW(Exception, "Invalid line found when reading header at " << line);
639  continue;
640  }
641 
642  // make sure key is unique
643  string key = v[0];
644  for (int i = 1; hdr.find(key) != hdr.end() ; i++)
645  {
646  key = v[0] + "_" + to_string(i);
647  }
648 
649  hdr[key] = io_stringutil::trim(v[1]);
650  }
651 
652  if (!start)
653  {
654  THROW(Exception, "Reading of MC header terminated before finding a start_run: tag. Please check your file");
655  }
656 
657  return start;
658 }
659 
660 
661 /**
662  * Write header to a stream.
663  *
664  * \param hdr header
665  * \param os output stream
666  * \return true if correctly written; else false
667  */
668 inline bool write( const Head& hdr, std::ostream& os )
669 {
670  hdr.print(os);
671  return true;
672 }
673 
674 #endif
void setusr(const std::string &key, double value)
Set user data item with given key.
Definition: AAObject.hh:95
const char *const energy_lost_in_can
Definition: io_ascii.hh:43
static const int W2LIST_GSEAGEN_BX
Bjorken x.
data_type w[N+1][M+1]
Definition: JPolint.hh:708
const char *const w2list_t
Definition: io_ascii.hh:32
const char *const center_on_can_y
Definition: io_ascii.hh:52
const char *const weights_t
Definition: io_ascii.hh:31
const char *const muon_decay_x
Definition: io_ascii.hh:47
double t
track time [ns] (when the particle is at pos )
Definition: Trk.hh:17
double z
Definition: Vec.hh:14
int pdg_code(int geant3_code)
Convert Geant3 to PDG particle type.
Definition: io_ascii.hh:108
const char *const neutrino_t
Definition: io_ascii.hh:28
const char *const center_on_can_z
Definition: io_ascii.hh:53
bool read(Vec &v, std::istream &is)
Read a Vec(tor) from a stream.
Definition: io_ascii.hh:139
Vec dir
track direction
Definition: Trk.hh:16
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:670
std::string comment
use as you like
Definition: Trk.hh:32
const char *const w3list_t
Definition: io_ascii.hh:33
int pmt_id
global PMT identifier as found in evt files
Definition: Hit.hh:20
std::vector< double > w
MC: Weights w[0]=w1, w[1]=w2, w[2]]=w3 (see e.g. Tag list)
Definition: Evt.hh:39
const char *const muon_decay_t
Definition: io_ascii.hh:36
const char *const track_fit_t
Definition: io_ascii.hh:27
data_type r[M+1]
Definition: JPolint.hh:709
const char *const muon_decay_y
Definition: io_ascii.hh:48
fi JEventTimesliceWriter a
is
Definition: JDAQCHSM.chsm:167
double E
Energy [GeV] (either MC truth or reconstructed)
Definition: Trk.hh:18
double y
Definition: Vec.hh:14
int origin
track id of the track that created this hit
Definition: Hit.hh:31
void clearusr()
Clear user data.
Definition: AAObject.hh:139
const char *const hourangle
Definition: io_ascii.hh:54
double pure_t
photon time before pmt simultion (MC only)
Definition: Hit.hh:28
double a
hit amplitude (in p.e.)
Definition: Hit.hh:24
double x
Definition: Vec.hh:14
The Vec class is a straightforward 3-d vector, which also works in pyroot.
Definition: Vec.hh:12
int geant3_code(int pdg_code)
Convert PDG to Geant3 particle type.
Definition: io_ascii.hh:122
static const int W2LIST_GSEAGEN_ICHAN
Interaction channel.
int mc_id
identifier of the MC event (as found in ascii or antcc file).
Definition: Evt.hh:23
do set_variable OUTPUT_DIRECTORY $WORKDIR T
const char *const hourangle_t
Definition: io_ascii.hh:34
void print(std::ostream &out=std::cout) const
Print header.
Definition: Head.hh:221
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.
Definition: JString.hh:478
double len
length, if applicable [m]
Definition: Trk.hh:20
double pure_a
amptitude before pmt simution (MC only)
Definition: Hit.hh:29
void push_front(std::vector< T > &vec, T &value)
Put value in front of data.
Definition: io_ascii.hh:377
int id
Definition: Hit.hh:11
bool startswith(const std::string &a, const std::string &b)
Check if string starts with given text.
Definition: io_ascii.hh:67
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
Definition: Head.hh:66
double getusr(const std::string &key) const
Get user data item with given key.
Definition: AAObject.hh:72
int type
MC: particle type in PDG encoding.
Definition: Trk.hh:22
int id
track identifier
Definition: Trk.hh:14
const char *const center_on_can_t
Definition: io_ascii.hh:35
static const int W2LIST_GSEAGEN_CC
Charged current interaction flag.
static const int W2LIST_GSEAGEN_BY
Bjorken y.
const char *const center_on_can_x
Definition: io_ascii.hh:51
Vec pos
postion of the track at time t [m]
Definition: Trk.hh:15
const char *const track_in_t
Definition: io_ascii.hh:25
Definition: Hit.hh:8
const char *const track_t
Definition: io_ascii.hh:26
bool haveusr(const std::string &key) const
Check availability of user data of the item with given key.
Definition: AAObject.hh:42
std::vector< Trk > trks
list of reconstructed tracks (can be several because of prefits,showers, etc).
Definition: Evt.hh:36
General exception.
Definition: Exception.hh:13
bool write(const Vec &v, std::ostream &os)
Write a Vec(tor) to a stream.
Definition: io_ascii.hh:152
std::vector< Hit > mc_hits
MC: list of MC truth hits.
Definition: Evt.hh:44
double t
hit time (from calibration or MC truth)
Definition: Hit.hh:23
int dom_id
module identifier from the data (unique in the detector).
Definition: Hit.hh:14
const char *const muon_decay_z
Definition: io_ascii.hh:49
std::string to_string(const T &value)
Convert value to string.
void copy(const Head &from, JHead &to)
Copy header from from to to.
Definition: JHead.cc:153
const char *const hit_t
Definition: io_ascii.hh:23
int id
offline event identifier
Definition: Evt.hh:21
unsigned int channel_id
PMT channel id {0,1, .., 31} local to moduke.
Definition: Hit.hh:15
void print(std::ostream &out=std::cout) const
Print track.
Definition: Trk.hh:175
const char *const track_primary_t
Definition: io_ascii.hh:29
const char *const end_event_t
Definition: io_ascii.hh:37
std::vector< double > read_line_to_vector(std::istream &is)
Read data.
Definition: io_ascii.hh:355
std::vector< Hit > hits
list of hits
Definition: Evt.hh:35
const char *const start_run_t
Definition: io_ascii.hh:21
std::string trim(const std::string &s)
Remove leading and trailing white spaces.
Definition: io_ascii.hh:79
data_type v[N+1][M+1]
Definition: JPolint.hh:707
static std::ostream & getOstream()
Get output stream for conversion of exception.
Definition: Exception.hh:63
const char *const hit_raw_t
Definition: io_ascii.hh:24
std::vector< std::string > splitstring(const std::string &str, char delim= ' ')
Split string at delimiter.
Definition: Head.hh:45
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
Definition: Trk.hh:12
const char *const start_event_t
Definition: io_ascii.hh:22
int type
particle type or parametrisation used for hit (mc only)
Definition: Hit.hh:30
std::vector< double > w2list
MC: factors that make up w[1]=w2 (see e.g. Tag list)
Definition: Evt.hh:40
std::vector< Trk > mc_trks
MC: list of MC truth tracks.
Definition: Evt.hh:45
std::vector< double > w3list
MC: atmospheric flux information.
Definition: Evt.hh:41
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Definition: Evt.hh:19
const char *const auto_t
Definition: io_ascii.hh:20