Project
Loading...
Searching...
No Matches
o2::focal::Hit Class Reference

Common FOCAL hit class for the detector simulation. More...

#include <Hit.h>

Inherits o2::BasicXYZEHit< float >.

Classes

struct  HitID
 Mapped information of a channel. More...
 
struct  HitIDHasher
 Hash functor for hit ID. More...
 

Public Types

enum class  Subsystem_t { EPADS , EPIXELS , HCAL , UNKNOWN }
 Subsystem index of the Hit. More...
 

Public Member Functions

 Hit ()=default
 Dummy constructor.
 
 Hit (int primary, int trackID, int detID, Subsystem_t subsystem, double initialEnergy, const math_utils::Point3D< float > &pos, double tof, double eLoss)
 Construction of the FOCAL hit with full information.
 
 ~Hit ()=default
 Destructor.
 
bool operator== (const Hit &other) const
 Comparison operator for equalness.
 
bool operator< (const Hit &other) const
 Comparison operator for smaller.
 
Hitoperator+= (const Hit &other)
 Operator for incremental sum, adding energy loss of the other hit to this energy loss.
 
Subsystem_t getSubsystem () const
 Get the type of the subsystem for which the hit was created.
 
bool isPixelHit () const
 Check if the hit is a FOCAL-E pixel hit.
 
bool isPadHit () const
 Check if the hit is a FOCAL-E pad hit.
 
bool isHCALHit () const
 Check if the hit is a FOCAL-H hit.
 
int getPrimary () const
 Get index of the incomimg primary particle associated with the hit.
 
double getInitialEnergy () const
 Get energy of the incoming primary particle at the entrance of FOCAL.
 
void setInitialEnergy (double energy)
 Set energy of the incoming primary particle at the entrance of FOCAL.
 
void setPrimary (int primary)
 Set index of the incomimg primary particle associated with the hit.
 
void printStream (std::ostream &stream) const
 Print information of this hit on the output stream.
 
- Public Member Functions inherited from o2::BasicXYZEHit< float >
float GetEnergyLoss () const
 
void SetEnergyLoss (float val)
 
 ClassDefNV (BasicXYZEHit, 1)
 
- Public Member Functions inherited from o2::BasicXYZVHit< T, E, V >
 BasicXYZVHit ()=default
 
 BasicXYZVHit (T x, T y, T z, E time, V val, int trackid, short did)
 
GetX () const
 
GetY () const
 
GetZ () const
 
math_utils::Point3D< T > GetPos () const
 
GetHitValue () const
 
GetTime () const
 
short GetDetectorID () const
 
void SetTime (E time)
 
void SetHitValue (V val)
 
void SetDetectorID (short detID)
 
void SetX (T x)
 
void SetY (T y)
 
void SetZ (T z)
 
void SetXYZ (T x, T y, T z)
 
void SetPos (math_utils::Point3D< T > const &p)
 
 ClassDefNV (BasicXYZVHit, 1)
 
- Public Member Functions inherited from o2::BaseHit
 BaseHit ()=default
 
 BaseHit (int id)
 
int GetTrackID () const
 
void SetTrackID (int id)
 

Detailed Description

Common FOCAL hit class for the detector simulation.

Author
Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Oak Ridge National Laboratory
Since
May 29, 2024

Definition at line 27 of file Hit.h.

Member Enumeration Documentation

◆ Subsystem_t

enum class o2::focal::Hit::Subsystem_t
strong

Subsystem index of the Hit.

Enumerator
EPADS 

ECAL pads.

EPIXELS 

ECAL pixels.

HCAL 

HCAL.

UNKNOWN 

Undefined.

Definition at line 32 of file Hit.h.

Constructor & Destructor Documentation

◆ Hit() [1/2]

o2::focal::Hit::Hit ( )
default

Dummy constructor.

◆ Hit() [2/2]

Hit::Hit ( int  primary,
int  trackID,
int  detID,
Subsystem_t  subsystem,
double  initialEnergy,
const math_utils::Point3D< float > &  pos,
double  tof,
double  eLoss 
)

Construction of the FOCAL hit with full information.

Parameters
primaryIndex of the incoming primary particle
trackIDIndex of the MC particle (also shower particle) responsible for the energy loss
detIDModule index inside the subsystem
subsystemFOCAL Subdetector (E-Pads, E-Pixels, HCAL)
posGeometric hit position (global coordintate system)
tofTime-of-flight of the particle to the FOCAL
eLossEnergy loss

Definition at line 16 of file Hit.cxx.

◆ ~Hit()

o2::focal::Hit::~Hit ( )
default

Destructor.

Member Function Documentation

◆ getInitialEnergy()

double o2::focal::Hit::getInitialEnergy ( ) const
inline

Get energy of the incoming primary particle at the entrance of FOCAL.

Returns
Initial energy

Definition at line 126 of file Hit.h.

◆ getPrimary()

int o2::focal::Hit::getPrimary ( ) const
inline

Get index of the incomimg primary particle associated with the hit.

Returns
Associated primary particle

Definition at line 122 of file Hit.h.

◆ getSubsystem()

Subsystem_t o2::focal::Hit::getSubsystem ( ) const
inline

Get the type of the subsystem for which the hit was created.

Returns
Subsystem type

Definition at line 106 of file Hit.h.

◆ isHCALHit()

bool o2::focal::Hit::isHCALHit ( ) const
inline

Check if the hit is a FOCAL-H hit.

Returns
True if the hit is a FOCAL-H, false otherwise

Definition at line 118 of file Hit.h.

◆ isPadHit()

bool o2::focal::Hit::isPadHit ( ) const
inline

Check if the hit is a FOCAL-E pad hit.

Returns
True if the hit is a FOCAL-E pad hit, false otherwise

Definition at line 114 of file Hit.h.

◆ isPixelHit()

bool o2::focal::Hit::isPixelHit ( ) const
inline

Check if the hit is a FOCAL-E pixel hit.

Returns
True if the hit is a FOCAL-E pixel hit, false otherwise

Definition at line 110 of file Hit.h.

◆ operator+=()

Hit & Hit::operator+= ( const Hit other)

Operator for incremental sum, adding energy loss of the other hit to this energy loss.

Parameters
otherHit to add to this one
Returns
This hit containing the sum of the two energy losses

Definition at line 40 of file Hit.cxx.

◆ operator<()

bool Hit::operator< ( const Hit other) const

Comparison operator for smaller.

Parameters
otherHit to compare to
Returns
True if other hit is smaller (first track ID, then, subsystem ID, then module ID), false otherwise

Definition at line 29 of file Hit.cxx.

◆ operator==()

bool Hit::operator== ( const Hit other) const

Comparison operator for equalness.

Parameters
otherHit to compare to
Returns
True if subsytem, module and MC particle ID match, false otherwise

Definition at line 24 of file Hit.cxx.

◆ printStream()

void Hit::printStream ( std::ostream &  stream) const

Print information of this hit on the output stream.

Parameters
streamStream to print on

Definition at line 46 of file Hit.cxx.

◆ setInitialEnergy()

void o2::focal::Hit::setInitialEnergy ( double  energy)
inline

Set energy of the incoming primary particle at the entrance of FOCAL.

Parameters
energyInitial energy

Definition at line 130 of file Hit.h.

◆ setPrimary()

void o2::focal::Hit::setPrimary ( int  primary)
inline

Set index of the incomimg primary particle associated with the hit.

Parameters
primaryAssociated primary particle

Definition at line 134 of file Hit.h.


The documentation for this class was generated from the following files: