Jpp  18.2.1-ARCA-DF-PATCH
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 57 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 69 of file JSirene.hh.

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

Member Function Documentation

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

Type conversion operator.

Returns
hit

Definition at line 90 of file JSirene.hh.

91  {
92  static Hit hit;
93 
94  hit.id = this->id;
95  hit.pmt_id = this->pmt_id;
96  hit.type = this->type;
97  hit.origin = this->origin;
98  hit.t = this->t;
99  hit.a = this->npe;
100 
101  return hit;
102  }
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 (mc only)
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 116 of file JSirene.hh.

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

Member Data Documentation

int JSIRENE::JHit_t::id

Definition at line 125 of file JSirene.hh.

int JSIRENE::JHit_t::pmt_id

Definition at line 126 of file JSirene.hh.

int JSIRENE::JHit_t::type

Definition at line 127 of file JSirene.hh.

int JSIRENE::JHit_t::origin

Definition at line 128 of file JSirene.hh.

double JSIRENE::JHit_t::t

Definition at line 129 of file JSirene.hh.

int JSIRENE::JHit_t::npe

Definition at line 130 of file JSirene.hh.


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