Jpp  16.0.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Friends | List of all members
JAANET::JHit_t Struct Reference

Auxiliary class to set-up Hit. More...

#include <JHit_t.hh>

Public Member Functions

 JHit_t (const int id, const int pmt_id, const int type, const int origin, const double t, const int npe)
 Constructor. More...
 
 operator const Hit & () const
 Type conversion operator. More...
 

Public Attributes

int id
 
int pmt_id
 
int type
 
int origin
 
double t
 
int npe
 

Friends

bool operator< (const JHit_t &first, const JHit_t &second)
 Less than operator for hits. More...
 

Detailed Description

Auxiliary class to set-up Hit.

This class is primarily used to limit the size of a Monte Carlo hit and thereby the memory usage of applications in case of large numbers of hits.

Definition at line 25 of file JHit_t.hh.

Constructor & Destructor Documentation

JAANET::JHit_t::JHit_t ( const int  id,
const int  pmt_id,
const int  type,
const int  origin,
const double  t,
const int  npe 
)
inline

Constructor.

Parameters
ididentifier
pmt_idPMT identifier
typetype
originorigin
ttime [ns]
npenumber of photo-electrons

Definition at line 37 of file JHit_t.hh.

43  {
44  this->id = id;
45  this->pmt_id = pmt_id;
46  this->type = type;
47  this->origin = origin;
48  this->t = t;
49  this->npe = npe;
50  }
double t
Definition: JHit_t.hh:97

Member Function Documentation

JAANET::JHit_t::operator const Hit & ( ) const
inline

Type conversion operator.

Returns
hit

Definition at line 58 of file JHit_t.hh.

59  {
60  static Hit hit;
61 
62  hit.id = this->id;
63  hit.pmt_id = this->pmt_id;
64  hit.type = this->type;
65  hit.origin = this->origin;
66  hit.t = this->t;
67  hit.a = this->npe;
68 
69  return hit;
70  }
int pmt_id
global PMT identifier as found in evt files
Definition: Hit.hh:20
int origin
track id of the track that created this hit
Definition: Hit.hh:29
double a
hit amplitude (in p.e.)
Definition: Hit.hh:24
int id
Definition: Hit.hh:11
Definition: Hit.hh:8
double t
hit time (from tdc+calibration or MC truth)
Definition: Hit.hh:23
double t
Definition: JHit_t.hh:97
int type
particle type or parametrisation used for hit (mc only)
Definition: Hit.hh:28

Friends And Related Function Documentation

bool operator< ( const JHit_t first,
const JHit_t second 
)
friend

Less than operator for hits.

First hit is defined as:

  1. smallest PMT identifier;
  2. earliest time if same PMT identifier;
Parameters
firstfirst hit
secondsecond hit
Returns
true if first hit earlier than second hit; else false

Definition at line 84 of file JHit_t.hh.

85  {
86  if (first.pmt_id == second.pmt_id)
87  return first.t < second.t;
88  else
89  return first.pmt_id < second.pmt_id;
90  }
double t
Definition: JHit_t.hh:97

Member Data Documentation

int JAANET::JHit_t::id

Definition at line 93 of file JHit_t.hh.

int JAANET::JHit_t::pmt_id

Definition at line 94 of file JHit_t.hh.

int JAANET::JHit_t::type

Definition at line 95 of file JHit_t.hh.

int JAANET::JHit_t::origin

Definition at line 96 of file JHit_t.hh.

double JAANET::JHit_t::t

Definition at line 97 of file JHit_t.hh.

int JAANET::JHit_t::npe

Definition at line 98 of file JHit_t.hh.


The documentation for this struct was generated from the following file: