1#ifndef __JAANETTESTKIT__ 
    2#define __JAANETTESTKIT__ 
   32  p->
x = getRandom<double>();
 
   33  p->
y = getRandom<double>();
 
   34  p->
z = getRandom<double>();
 
 
   51  p->
x = getRandom<double>(-1.0e4, +1.0e4, 1.0);
 
   52  p->
y = getRandom<double>(-1.0e4, +1.0e4, 1.0);
 
   53  p->
z = getRandom<double>(-1.0e4, +1.0e4, 1.0);
 
 
   70  p->
x = getRandom<double>(-1.0, +1.0, 1.0e-3);
 
   71  p->
y = getRandom<double>(-1.0, +1.0, 1.0e-3);
 
   72  p->
z = getRandom<double>(-1.0, +1.0, 1.0e-3);
 
 
   83  p->
id           = getRandom<int>(0, 1000);
 
   85    p->
dom_id     = getRandom<int>(0, 1000);
 
   86    p->
channel_id = getRandom<unsigned int>(0,  31);
 
   87    p->
tdc        = getRandom<unsigned int>();
 
   88    p->
tot        = getRandom<unsigned int>(0, 256);
 
   89    p->
trig       = getRandom<int>(0, 1000);
 
   91  p->
pmt_id       = getRandom<int>(0, 1000);
 
   92  p->
t            = getRandom<double>(0.0, 100.0e6, 0.1);
 
   93  p->
a            = getRandom<double>(0.0, 100.0e0, 0.1);
 
   95    p->
pos        = getRandom<pos_type>();
 
   96    p->
dir        = getRandom<dir_type>();
 
   98  p->
type         = getRandom<int>(0, 1000);
 
   99  p->
origin       = getRandom<int>(0, 1000);
 
 
  108  operator int()
 const { 
return type; }
 
 
  123  const JPDB& pdb = JPDB::getInstance();
 
  127    const JParticle& particle = pdb[getRandom<int>(0, pdb.size())];
 
  129    if ( (
use_root) || (particle.
geant != GEANT4_TYPE_NEUTRINO && particle.
geant != 0) ) {
 
 
  146  p->
id      = getRandom<int>(0, 1000);
 
  147  p->
pos     = getRandom<pos_type>();
 
  148  p->
dir     = getRandom<dir_type>();
 
  149  p->
t       = getRandom<double>(0.0, 1.0e6, 1.0);
 
  150  p->
E       = getRandom<double>(1.0, 1.0e6, 1.0);
 
  152    p->
len   = getRandom<double>();
 
  153    p->
lik   = getRandom<double>();
 
  155  p->
type    = getRandom<pdg_type>();
 
 
  171    p->
id              = getRandom<int>(0, 1000);
 
  172    p->
det_id          = getRandom<int>(0, 1000);
 
  174  p->
mc_id             = getRandom<int>(0, 1000);
 
  176    p->
run_id          = getRandom<int>(0, 1000);
 
  183  for (
int i = getRandom<int>(1, 1000); i != 0; --i) {
 
  184    p->
mc_hits.push_back(getRandom<Hit>());
 
  187  for (
int i = getRandom<int>(1,  100); i != 0; --i) {
 
  188    p->
mc_trks.push_back(getRandom<Trk>());
 
  193    for (
int i = getRandom<int>(1, 1000); i != 0; --i) {
 
  194      p->
hits.push_back(getRandom<Hit>());
 
  197    for (
int i = getRandom<int>(1,  100); i != 0; --i) {
 
  198      p->
trks.push_back(getRandom<Trk>());
 
 
  213  return  (first.
id           == second.
id                    &&
 
  215           first.
tdc          == second.
tdc                   &&
 
  216           first.
tot          == second.
tot                   &&
 
  219           first.
t            == second.
t                     &&
 
  220           first.
a            == second.
a                     &&
 
  221           first.
pos          == second.
pos                   &&
 
  222           first.
dir          == second.
dir                   &&
 
 
  237  return  (first.
id           == second.
id                    &&
 
  238           first.
pos          == second.
pos                   &&
 
  239           first.
dir          == second.
dir                   &&
 
  240           first.
t            == second.
t                     &&
 
  241           first.
E            == second.
E                     &&
 
  242           first.
len          == second.
len                   &&
 
  243           first.
lik          == second.
lik                   &&
 
 
  262  return  (first.
id               == second.
id                &&
 
 
bool operator==(const Hit &first, const Hit &second)
Equal operator hit.
 
void randomize(Vec *p)
Randomize 3D vector.
 
static bool use_root
Global file format parameter.
 
Definition of random value generator.
 
Extensions to Evt data format.
 
T getRandom()
Get random value.
 
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
 
int mc_id
identifier of the MC event (as found in ascii or antcc file).
 
int frame_index
from the raw data
 
int run_id
DAQ run identifier.
 
ULong64_t trigger_mask
trigger mask from raw data (i.e. the trigger bits)
 
std::vector< Hit > hits
list of hits
 
int mc_run_id
MC run identifier.
 
std::vector< Hit > mc_hits
MC: list of MC truth hits.
 
std::vector< Trk > mc_trks
MC: list of MC truth tracks.
 
int det_id
detector identifier from DAQ
 
ULong64_t trigger_counter
trigger counter
 
int id
offline event identifier
 
std::vector< Trk > trks
list of reconstructed tracks (can be several because of prefits,showers, etc).
 
int pmt_id
global PMT identifier as found in evt files
 
int dom_id
module identifier from the data (unique in the detector).
 
int origin
track id of the track that created this hit (mc only)
 
double a
hit amplitude (in p.e.)
 
Vec dir
hit direction; i.e. direction of the PMT
 
ULong64_t trig
non-zero if the hit is a trigger hit.
 
int type
particle type or parametrisation used for hit (mc only)
 
unsigned int tdc
hit tdc (=time in ns)
 
unsigned int channel_id
PMT channel id {0,1, .., 30} local to moduke.
 
unsigned int tot
tot value as stored in raw data (int for pyroot)
 
double t
hit time (from tdc+calibration or MC truth)
 
Auxiliary class to handle particle name, codes and mass.
 
int geant
GEANT code of particle.
 
int pdg
PDG code of particle.
 
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
 
int type
MC: particle type in PDG encoding.
 
std::vector< int > hit_ids
list of associated hit-ids (corresponds to Hit::id).
 
std::vector< double > error_matrix
(NxN) error covariance matrix for fit parameters (stored as linear vector)
 
std::vector< double > fitinf
place to store additional fit info, see km3net-dataformat/definitions/fitparameters....
 
std::string comment
use as you like
 
std::vector< int > rec_stages
list of identifyers of succesfull fitting stages resulting in this track
 
double E
Energy [GeV] (either MC truth or reconstructed)
 
double t
track time [ns] (when the particle is at pos )
 
double len
length, if applicable [m]
 
int rec_type
identifier of the fitting algorithm/chain/strategy, see km3net-dataformat/definitions/reconstruction....
 
double lik
likelihood or lambda value (for aafit, lambda)
 
Vec pos
postion [m] of the track at time t
 
The Vec class is a straightforward 3-d vector, which also works in pyroot.
 
Type definition for direction.
 
Type definition for position.