Jpp  17.0.0
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
JSIRENE::JHit_t Struct Reference

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

#include <JSirene.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 55 of file JSirene.hh.

Constructor & Destructor Documentation

JSIRENE::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 67 of file JSirene.hh.

73  {
74  this->id = id;
75  this->pmt_id = pmt_id;
76  this->type = type;
77  this->origin = origin;
78  this->t = t;
79  this->npe = npe;
80  }

Member Function Documentation

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

Type conversion operator.

Returns
hit

Definition at line 88 of file JSirene.hh.

89  {
90  static Hit hit;
91 
92  hit.id = this->id;
93  hit.pmt_id = this->pmt_id;
94  hit.type = this->type;
95  hit.origin = this->origin;
96  hit.t = this->t;
97  hit.a = this->npe;
98 
99  return hit;
100  }
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
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 114 of file JSirene.hh.

115  {
116  if (first.pmt_id == second.pmt_id)
117  return first.t < second.t;
118  else
119  return first.pmt_id < second.pmt_id;
120  }

Member Data Documentation

int JSIRENE::JHit_t::id

Definition at line 123 of file JSirene.hh.

int JSIRENE::JHit_t::pmt_id

Definition at line 124 of file JSirene.hh.

int JSIRENE::JHit_t::type

Definition at line 125 of file JSirene.hh.

int JSIRENE::JHit_t::origin

Definition at line 126 of file JSirene.hh.

double JSIRENE::JHit_t::t

Definition at line 127 of file JSirene.hh.

int JSIRENE::JHit_t::npe

Definition at line 128 of file JSirene.hh.


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