REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
Public Member Functions | Protected Attributes | Private Attributes
TRestDetectorHitsEvent Class Reference

Detailed Description

An event data type that register a std::vector of TRestHits, allowing us to save a 3-coordinate position and energy.

TRestDetectorHitsEvent is a structure that ...


RESTsoft - Software for Rare Event Searches with TPCs

History of developments:

2016-March: First implementation of hits event data type into REST_v2. Javier Galan

Author
Javier Galan

Definition at line 18 of file TRestDetectorHitsEvent.h.

#include <TRestDetectorHitsEvent.h>

Inheritance diagram for TRestDetectorHitsEvent:
TRestEvent

Public Member Functions

void AddHit (const TVector3 &position, Double_t energy, Double_t time, REST_HitType type=XYZ)
 Adds a new hit to this event. More...
 
void AddHit (Double_t x, Double_t y, Double_t z, Double_t en, Double_t t=0, REST_HitType type=XYZ)
 Adds a new hit to this event. More...
 
Bool_t allHitsInsideCylinder (TVector3 x0, TVector3 x1, Double_t radius)
 This method returns true if all hits are contained inside the cylinder volume given by argument. More...
 
Bool_t allHitsInsidePrism (TVector3 x0, TVector3 x1, Double_t sX, Double_t sY, Double_t theta)
 This method returns true if all hits are found inside the prism volume given by argument. More...
 
Bool_t anyHitInsideCylinder (TVector3 x0, TVector3 x1, Double_t radius)
 This method returns true if at least 1 hit is found inside the cylinder volume given by argument. More...
 
Bool_t anyHitInsidePrism (TVector3 x0, TVector3 x1, Double_t sizeX, Double_t sizeY, Double_t theta)
 This method returns true if at least 1 hit is found inside the prism volume given by argument. More...
 
TPad * DrawEvent (const TString &option="")
 This method draws the hits event structure into a TPad. More...
 
void DrawGraphs (Int_t &column)
 This method draw the hits events as a graph. More...
 
void DrawHistograms (Int_t &column, const TString &histOption="", double pitch=0)
 This method draw the hits events as an histogram. More...
 
Int_t GetClosestHit (const TVector3 &position) const
 
Double_t GetClosestHitInsideDistanceToCylinderBottom (TVector3 x0, TVector3 x1, Double_t radius)
 This method returns the distance to the cylinder bottom face from the closest hit contained inside the cylinder volume given by argument. More...
 
Double_t GetClosestHitInsideDistanceToCylinderTop (TVector3 x0, TVector3 x1, Double_t radius)
 This method returns the distance to the cylinder top face from the closest hit contained inside the cylinder volume given by argument. More...
 
Double_t GetClosestHitInsideDistanceToCylinderWall (TVector3 x0, TVector3 x1, Double_t radius)
 This method returns the distance to the cylinder wall from the closest hit contained inside the cylinder volume given by argument. More...
 
Double_t GetClosestHitInsideDistanceToPrismBottom (const TVector3 &x0, const TVector3 &x1, Double_t sizeX, Double_t sizeY, Double_t theta)
 This method returns the distance to the prism bottom face from the closest hit contained inside the prism volume given by argument. More...
 
Double_t GetClosestHitInsideDistanceToPrismTop (TVector3 x0, TVector3 x1, Double_t sizeX, Double_t sizeY, Double_t theta)
 This method returns the distance to the prism top face from the closest hit contained inside the prism volume given by argument. More...
 
Double_t GetClosestHitInsideDistanceToPrismWall (TVector3 x0, TVector3 x1, Double_t sizeX, Double_t sizeY, Double_t theta)
 This method returns the distance to the prism wall from the closest hit contained inside the prism volume given by argument. More...
 
Double_t GetDistance2 (int n, int m) const
 Returns the squared distance between hits n and m. More...
 
Double_t GetEnergy () const
 
Double_t GetEnergy (int n) const
 
Double_t GetEnergyInCylinder (TVector3 x0, TVector3 x1, Double_t radius)
 This method returns the total integrated energy of all hits found inside the cylinder volume given by argument. More...
 
Double_t GetEnergyInPrism (TVector3 x0, TVector3 x1, Double_t sizeX, Double_t sizeY, Double_t theta)
 This method returns the total integrated energy of all hits found inside the prism volume given by argument. More...
 
Double_t GetEnergyX () const
 
Double_t GetEnergyY () const
 
Double_t GetGaussSigmaX (Double_t error, Int_t nHitsMin)
 
Double_t GetGaussSigmaY (Double_t error, Int_t nHitsMin)
 
Double_t GetGaussSigmaZ (Double_t error, Int_t nHitsMin) const
 
TRestHitsGetHits () const
 
Double_t GetMaximumHitEnergy () const
 
Double_t GetMeanHitEnergy () const
 
TVector3 GetMeanPosition () const
 
TVector3 GetMeanPositionInCylinder (TVector3 x0, TVector3 x1, Double_t radius)
 This method returns the mean position of the hits found inside the cylinder volume given by argument. More...
 
TVector3 GetMeanPositionInPrism (TVector3 x0, TVector3 x1, Double_t sizeX, Double_t sizeY, Double_t theta)
 This method returns the mean position of all hits found inside the prism volume given by argument. More...
 
Double_t GetMeanPositionX () const
 
Double_t GetMeanPositionY () const
 
Double_t GetMeanPositionZ () const
 
Double_t GetMinimumHitEnergy () const
 
size_t GetNumberOfHits () const
 
Int_t GetNumberOfHitsInsideCylinder (TVector3 x0, TVector3 x1, Double_t radius)
 This method returns the total number hits found inside the cylinder volume given by argument. More...
 
Int_t GetNumberOfHitsInsidePrism (TVector3 x0, TVector3 x1, Double_t sizeX, Double_t sizeY, Double_t theta)
 This method returns the total number of hits found inside the prism volume given by argument. More...
 
Int_t GetNumberOfHitsX () const
 
Int_t GetNumberOfHitsY () const
 
TVector3 GetPosition (int n) const
 
Double_t GetSigmaX () const
 
Double_t GetSigmaXY2 () const
 
Double_t GetSigmaY () const
 
Double_t GetSigmaZ2 () const
 
Double_t GetSkewXY () const
 
Double_t GetSkewZ () const
 
Double_t GetTime (int n) const
 
Double_t GetTotalEnergy () const
 
REST_HitType GetType (int n) const
 
Double_t GetX (int n) const
 Returns the X-coordinate of hit entry n in mm. More...
 
TH2F * GetXYHistogram (std::vector< float > ranges, Double_t pitch=3, Double_t border=5)
 This method draws the hits found on XY as a TH2F and it returns the generated histogram. More...
 
TRestHitsGetXYZHits ()
 This method collects all hits which are compatible with a XYZ hit. More...
 
TH2F * GetXZHistogram (std::vector< float > ranges, Double_t pitch=3, Double_t border=5)
 This method draws the hits found on XY as a TH2F and it returns the generated histogram. More...
 
TRestHitsGetXZHits ()
 This method collects all hits which are compatible with a XZ-projected hit. More...
 
Double_t GetY (int n) const
 Returns the Y-coordinate of hit entry n in mm. More...
 
TH2F * GetYZHistogram (std::vector< float > ranges, Double_t pitch=3, Double_t border=5)
 This method draws the hits found on YZ as a TH2F and it returns the generated histogram. More...
 
TRestHitsGetYZHits ()
 This method collects all hits which are compatible with a YZ-projected hit. More...
 
Double_t GetZ (int n) const
 Returns the Z-coordinate of hit entry n in mm. More...
 
virtual void Initialize ()
 Removes all hits from this event, and clears all auxiliar variables. More...
 
virtual void PrintEvent () const
 
virtual void PrintEvent (Int_t nHits) const
 
void Shuffle (int NLoop)
 
void Sort (bool(compareCondition)(const TRestHits::iterator &hit1, const TRestHits::iterator &hit2)=nullptr)
 
 TRestDetectorHitsEvent ()
 TRestDetectorHitsEvent default constructor. More...
 
 ~TRestDetectorHitsEvent ()
 TRestDetectorHitsEvent default destructor. More...
 
- Public Member Functions inherited from TRestEvent
virtual void CloneTo (TRestEvent *target)
 Clone the content of this TRestEvent object to another. More...
 
virtual TPad * DrawEvent (const TString &option="")
 Draw the event. More...
 
Int_t GetID () const
 
Int_t GetRunOrigin () const
 
TString GetSubEventTag () const
 
Int_t GetSubID () const
 
Int_t GetSubRunOrigin () const
 
Double_t GetTime () const
 
TTimeStamp GetTimeStamp () const
 
virtual void Initialize ()=0
 
virtual void InitializeReferences (TRestRun *run)
 Initialize dynamical references when loading the event from a root file. More...
 
virtual void InitializeWithMetadata (TRestRun *run)
 
Bool_t isOk () const
 
virtual void PrintEvent () const
 
void SetEventInfo (TRestEvent *eve)
 
void SetID (Int_t id)
 
void SetOK (Bool_t state)
 
void SetRunOrigin (Int_t run_origin)
 
void SetState (Bool_t state)
 
void SetSubEventTag (const TString &tag)
 
void SetSubID (Int_t id)
 
void SetSubRunOrigin (Int_t sub_run_origin)
 
void SetTime (Double_t seconds, Double_t nanoseconds)
 
void SetTime (Double_t time)
 
void SetTimeStamp (const TTimeStamp &time)
 
 TRestEvent ()
 
virtual ~TRestEvent ()
 

Protected Attributes

TRestHitsfHits
 The hits structure that is is saved to disk. More...
 
TH1F * fXHisto
 An auxiliary TH1F histogram to visualize hits on X-projection. More...
 
TH2F * fXYHisto
 An auxiliary TH2F histogram to visualize hits on XY-projection. More...
 
TGraph * fXYHitGraph
 An auxiliary TGraph pointer to visualize hits on XY-projection. More...
 
TH2F * fXZHisto
 An auxiliary TH2F histogram to visualize hits on XZ-projection. More...
 
TGraph * fXZHitGraph
 An auxiliary TGraph pointer to visualize hits on XZ-projection. More...
 
TH1F * fYHisto
 An auxiliary TH1F histogram to visualize hits on Y-projection. More...
 
TH2F * fYZHisto
 An auxiliary TH2F histogram to visualize hits on YZ-projection. More...
 
TGraph * fYZHitGraph
 An auxiliary TGraph pointer to visualize hits on YZ-projection. More...
 
TH1F * fZHisto
 An auxiliary TH1F histogram to visualize hits on Z-projection. More...
 
- Protected Attributes inherited from TRestEvent
Int_t fEventID
 Event identification number. More...
 
TTimeStamp fEventTime
 Absolute event time. More...
 
Bool_t fOk
 Flag to be used by processes to define an event status. fOk=true is the default. More...
 
TPad * fPad
 
TRestRunfRun = nullptr
 
Int_t fRunOrigin
 Run ID number of the event. More...
 
Int_t fSubEventID
 Sub-Event identification number. More...
 
TString fSubEventTag
 A short length label to identify the sub-Event. More...
 
Int_t fSubRunOrigin
 Sub-run ID number of the event. More...
 

Private Attributes

TRestHitsfXYZHits
 An auxiliary TRestHits structure to register hits on XYZ projection. More...
 
TRestHitsfXZHits
 An auxiliary TRestHits structure to register hits on XZ projection. More...
 
TRestHitsfYZHits
 An auxiliary TRestHits structure to register hits on YZ projection. More...
 

Additional Inherited Members

- Protected Member Functions inherited from TRestEvent
void RestartPad (Int_t nElements)
 

Constructor & Destructor Documentation

◆ TRestDetectorHitsEvent()

TRestDetectorHitsEvent::TRestDetectorHitsEvent ( )

TRestDetectorHitsEvent default constructor.

If no configuration path is defined using TRestMetadata::SetConfigFilePath the path to the config file must be specified using full path, absolute or relative.

The default behaviour is that the config file must be specified with full path, absolute or relative.

Parameters
configFilenameA const char* giving the path to an RML file.

Definition at line 65 of file TRestDetectorHitsEvent.cxx.

◆ ~TRestDetectorHitsEvent()

TRestDetectorHitsEvent::~TRestDetectorHitsEvent ( )

TRestDetectorHitsEvent default destructor.

Definition at line 90 of file TRestDetectorHitsEvent.cxx.

Member Function Documentation

◆ AddHit() [1/2]

void TRestDetectorHitsEvent::AddHit ( const TVector3 &  position,
Double_t  energy,
Double_t  time,
REST_HitType  type = XYZ 
)

Adds a new hit to this event.

It adds a new hit with position pos in mm, and energy en in keV, to this TRestDetectorHitsEvent structure. Additionally a time delay value in us may be added to the hits.

Definition at line 108 of file TRestDetectorHitsEvent.cxx.

◆ AddHit() [2/2]

void TRestDetectorHitsEvent::AddHit ( Double_t  x,
Double_t  y,
Double_t  z,
Double_t  en,
Double_t  t = 0,
REST_HitType  type = XYZ 
)

Adds a new hit to this event.

It adds a new hit with coordinates x,y,z in mm, and energy en in keV, to this TRestDetectorHitsEvent structure. Additionally a time delay value in us may be added to the hits.

Definition at line 98 of file TRestDetectorHitsEvent.cxx.

◆ allHitsInsideCylinder()

Bool_t TRestDetectorHitsEvent::allHitsInsideCylinder ( TVector3  x0,
TVector3  x1,
Double_t  radius 
)

This method returns true if all hits are contained inside the cylinder volume given by argument.

Parameters
x0The center of the bottom face of the cylinder.
x1The center of the top face of the cylinder.
radiusThe radius of the cylinder.

Definition at line 252 of file TRestDetectorHitsEvent.cxx.

◆ allHitsInsidePrism()

Bool_t TRestDetectorHitsEvent::allHitsInsidePrism ( TVector3  x0,
TVector3  x1,
Double_t  sizeX,
Double_t  sizeY,
Double_t  theta 
)

This method returns true if all hits are found inside the prism volume given by argument.

Parameters
x0The center of the bottom face of the prism.
x1The center of the top face of the prism.
sizeXSize of the side X of the prism face.
sizeYSize of the side X of the prism face.
thetaAn angle in radians to rotate the face of the prism.

Definition at line 319 of file TRestDetectorHitsEvent.cxx.

◆ anyHitInsideCylinder()

Bool_t TRestDetectorHitsEvent::anyHitInsideCylinder ( TVector3  x0,
TVector3  x1,
Double_t  radius 
)

This method returns true if at least 1 hit is found inside the cylinder volume given by argument.

Parameters
x0The center of the bottom face of the cylinder.
x1The center of the top face of the cylinder.
radiusThe radius of the cylinder.

Definition at line 237 of file TRestDetectorHitsEvent.cxx.

◆ anyHitInsidePrism()

Bool_t TRestDetectorHitsEvent::anyHitInsidePrism ( TVector3  x0,
TVector3  x1,
Double_t  sizeX,
Double_t  sizeY,
Double_t  theta 
)

This method returns true if at least 1 hit is found inside the prism volume given by argument.

Parameters
x0The center of the bottom face of the prism.
x1The center of the top face of the prism.
sizeXSize of the side X of the prism face.
sizeYSize of the side X of the prism face.
thetaAn angle in radians to rotate the face of the prism.

Definition at line 303 of file TRestDetectorHitsEvent.cxx.

◆ DrawEvent()

TPad * TRestDetectorHitsEvent::DrawEvent ( const TString &  option = "")
virtual

This method draws the hits event structure into a TPad.

This method receives as argument a string that defines the different plots to be produced.

The following options are allowed:

  1. graph: It draws the hits using a TGraph drawing method.
  2. hist: It generates histograms in XY, XZ and YZ projections using the projected event hits at the corresponding plane, the bins are weighted with their corresponding energy. Histograms will accept as argument, between parenthesis, a conventional ROOT option, i.e. hist(rootOption), where rootOption is any valid ROOT option as described by the THistPainter ROOT class. The default binning size is defined to be automatic, but the user is able to define a custom bin size of the histogram using the [ ]. i.e. the following example will define the bin size to 1mm. Example: hist(Cont0,colz)[1].

3 print: It will print on screen the result of TRestDetectorHitsEvent::PrintEvent.

The different options must separated by colons, as "option1:option2:option3".

Returns
A pointer to the TPad where the event was drawn is returned.

The default histogram using a pitch of 0 mm,

Reimplemented from TRestEvent.

Definition at line 616 of file TRestDetectorHitsEvent.cxx.

◆ DrawGraphs()

void TRestDetectorHitsEvent::DrawGraphs ( Int_t &  column)

This method draw the hits events as a graph.

This method receives as argument the column to be drawn in the TPad.

The different TGraphs are drawn in a TPad *fPad defined as global variable

Definition at line 687 of file TRestDetectorHitsEvent.cxx.

◆ DrawHistograms()

void TRestDetectorHitsEvent::DrawHistograms ( Int_t &  column,
const TString &  histOption = "",
double  pitch = 0 
)

This method draw the hits events as an histogram.

This method receives the following arguments: -The column to be drawn in the TPad. -The histOption used as Draw option for the histograms -The pitch size which defines the number of bins of the histograms, if the pitch size is zero, the bins are drawn based on the minDiff of a particular axis. Otherwise, the pitch passed as argument is used to define the bin size, the histogram boundaries are based on the max/min values of a particular axis.

The different histograms are drawn in a TPad *fPad defined as global variable

Definition at line 798 of file TRestDetectorHitsEvent.cxx.

◆ GetClosestHit()

Int_t TRestDetectorHitsEvent::GetClosestHit ( const TVector3 &  position) const
inline

Definition at line 131 of file TRestDetectorHitsEvent.h.

◆ GetClosestHitInsideDistanceToCylinderBottom()

Double_t TRestDetectorHitsEvent::GetClosestHitInsideDistanceToCylinderBottom ( TVector3  x0,
TVector3  x1,
Double_t  radius 
)

This method returns the distance to the cylinder bottom face from the closest hit contained inside the cylinder volume given by argument.

Parameters
x0The center of the bottom face of the cylinder.
x1The center of the top face of the cylinder.
radiusThe radius of the cylinder.
Returns
If no hit is found inside the cylinder, -1 is returned.

Definition at line 454 of file TRestDetectorHitsEvent.cxx.

◆ GetClosestHitInsideDistanceToCylinderTop()

Double_t TRestDetectorHitsEvent::GetClosestHitInsideDistanceToCylinderTop ( TVector3  x0,
TVector3  x1,
Double_t  radius 
)

This method returns the distance to the cylinder top face from the closest hit contained inside the cylinder volume given by argument.

Parameters
x0The center of the bottom face of the cylinder.
x1The center of the top face of the cylinder.
radiusThe radius of the cylinder.
Returns
If no hit is found inside the cylinder, -1 is returned.

Definition at line 420 of file TRestDetectorHitsEvent.cxx.

◆ GetClosestHitInsideDistanceToCylinderWall()

Double_t TRestDetectorHitsEvent::GetClosestHitInsideDistanceToCylinderWall ( TVector3  x0,
TVector3  x1,
Double_t  radius 
)

This method returns the distance to the cylinder wall from the closest hit contained inside the cylinder volume given by argument.

Parameters
x0The center of the bottom face of the cylinder.
x1The center of the top face of the cylinder.
radiusThe radius of the cylinder.
Returns
If no hit is found inside the cylinder, -1 is returned.

Definition at line 382 of file TRestDetectorHitsEvent.cxx.

◆ GetClosestHitInsideDistanceToPrismBottom()

Double_t TRestDetectorHitsEvent::GetClosestHitInsideDistanceToPrismBottom ( const TVector3 &  x0,
const TVector3 &  x1,
Double_t  sizeX,
Double_t  sizeY,
Double_t  theta 
)

This method returns the distance to the prism bottom face from the closest hit contained inside the prism volume given by argument.

Parameters
x0The center of the bottom face of the prism.
x1The center of the top face of the prism.
sizeXSize of the side X of the prism face.
sizeYSize of the side X of the prism face.
thetaAn angle in radians to rotate the face of the prism.
Returns
If no hit is found inside the prism, -1 is returned.

Definition at line 567 of file TRestDetectorHitsEvent.cxx.

◆ GetClosestHitInsideDistanceToPrismTop()

Double_t TRestDetectorHitsEvent::GetClosestHitInsideDistanceToPrismTop ( TVector3  x0,
TVector3  x1,
Double_t  sizeX,
Double_t  sizeY,
Double_t  theta 
)

This method returns the distance to the prism top face from the closest hit contained inside the prism volume given by argument.

Parameters
x0The center of the bottom face of the prism.
x1The center of the top face of the prism.
sizeXSize of the side X of the prism face.
sizeYSize of the side X of the prism face.
thetaAn angle in radians to rotate the face of the prism.
Returns
If no hit is found inside the prism, -1 is returned.

Definition at line 530 of file TRestDetectorHitsEvent.cxx.

◆ GetClosestHitInsideDistanceToPrismWall()

Double_t TRestDetectorHitsEvent::GetClosestHitInsideDistanceToPrismWall ( TVector3  x0,
TVector3  x1,
Double_t  sizeX,
Double_t  sizeY,
Double_t  theta 
)

This method returns the distance to the prism wall from the closest hit contained inside the prism volume given by argument.

Parameters
x0The center of the bottom face of the prism.
x1The center of the top face of the prism.
sizeXSize of the side X of the prism face.
sizeYSize of the side X of the prism face.
thetaAn angle in radians to rotate the face of the prism.
Returns
If no hit is found inside the prism, -1 is returned.

Definition at line 490 of file TRestDetectorHitsEvent.cxx.

◆ GetDistance2()

Double_t TRestDetectorHitsEvent::GetDistance2 ( int  n,
int  m 
) const
inline

Returns the squared distance between hits n and m.

Definition at line 80 of file TRestDetectorHitsEvent.h.

◆ GetEnergy() [1/2]

Double_t TRestDetectorHitsEvent::GetEnergy ( ) const
inline

Definition at line 126 of file TRestDetectorHitsEvent.h.

◆ GetEnergy() [2/2]

Double_t TRestDetectorHitsEvent::GetEnergy ( int  n) const
inline

Definition at line 128 of file TRestDetectorHitsEvent.h.

◆ GetEnergyInCylinder()

Double_t TRestDetectorHitsEvent::GetEnergyInCylinder ( TVector3  x0,
TVector3  x1,
Double_t  radius 
)

This method returns the total integrated energy of all hits found inside the cylinder volume given by argument.

Parameters
x0The center of the bottom face of the cylinder.
x1The center of the top face of the cylinder.
radiusThe radius of the cylinder.

Definition at line 266 of file TRestDetectorHitsEvent.cxx.

◆ GetEnergyInPrism()

Double_t TRestDetectorHitsEvent::GetEnergyInPrism ( TVector3  x0,
TVector3  x1,
Double_t  sizeX,
Double_t  sizeY,
Double_t  theta 
)

This method returns the total integrated energy of all hits found inside the prism volume given by argument.

Parameters
x0The center of the bottom face of the prism.
x1The center of the top face of the prism.
sizeXSize of the side X of the prism face.
sizeYSize of the side X of the prism face.
thetaAn angle in radians to rotate the face of the prism.

Definition at line 337 of file TRestDetectorHitsEvent.cxx.

◆ GetEnergyX()

Double_t TRestDetectorHitsEvent::GetEnergyX ( ) const
inline

Definition at line 123 of file TRestDetectorHitsEvent.h.

◆ GetEnergyY()

Double_t TRestDetectorHitsEvent::GetEnergyY ( ) const
inline

Definition at line 124 of file TRestDetectorHitsEvent.h.

◆ GetGaussSigmaX()

Double_t TRestDetectorHitsEvent::GetGaussSigmaX ( Double_t  error,
Int_t  nHitsMin 
)
inline

Definition at line 105 of file TRestDetectorHitsEvent.h.

◆ GetGaussSigmaY()

Double_t TRestDetectorHitsEvent::GetGaussSigmaY ( Double_t  error,
Int_t  nHitsMin 
)
inline

Definition at line 108 of file TRestDetectorHitsEvent.h.

◆ GetGaussSigmaZ()

Double_t TRestDetectorHitsEvent::GetGaussSigmaZ ( Double_t  error,
Int_t  nHitsMin 
) const
inline

Definition at line 111 of file TRestDetectorHitsEvent.h.

◆ GetHits()

TRestHits * TRestDetectorHitsEvent::GetHits ( ) const
inline

Definition at line 66 of file TRestDetectorHitsEvent.h.

◆ GetMaximumHitEnergy()

Double_t TRestDetectorHitsEvent::GetMaximumHitEnergy ( ) const
inline

Definition at line 119 of file TRestDetectorHitsEvent.h.

◆ GetMeanHitEnergy()

Double_t TRestDetectorHitsEvent::GetMeanHitEnergy ( ) const
inline

Definition at line 121 of file TRestDetectorHitsEvent.h.

◆ GetMeanPosition()

TVector3 TRestDetectorHitsEvent::GetMeanPosition ( ) const
inline

Definition at line 93 of file TRestDetectorHitsEvent.h.

◆ GetMeanPositionInCylinder()

TVector3 TRestDetectorHitsEvent::GetMeanPositionInCylinder ( TVector3  x0,
TVector3  x1,
Double_t  radius 
)

This method returns the mean position of the hits found inside the cylinder volume given by argument.

Parameters
x0The center of the bottom face of the cylinder.
x1The center of the top face of the cylinder.
radiusThe radius of the cylinder.

Definition at line 290 of file TRestDetectorHitsEvent.cxx.

◆ GetMeanPositionInPrism()

TVector3 TRestDetectorHitsEvent::GetMeanPositionInPrism ( TVector3  x0,
TVector3  x1,
Double_t  sizeX,
Double_t  sizeY,
Double_t  theta 
)

This method returns the mean position of all hits found inside the prism volume given by argument.

Parameters
x0The center of the bottom face of the prism.
x1The center of the top face of the prism.
sizeXSize of the side X of the prism face.
sizeYSize of the side X of the prism face.
thetaAn angle in radians to rotate the face of the prism.

Definition at line 367 of file TRestDetectorHitsEvent.cxx.

◆ GetMeanPositionX()

Double_t TRestDetectorHitsEvent::GetMeanPositionX ( ) const
inline

Definition at line 98 of file TRestDetectorHitsEvent.h.

◆ GetMeanPositionY()

Double_t TRestDetectorHitsEvent::GetMeanPositionY ( ) const
inline

Definition at line 99 of file TRestDetectorHitsEvent.h.

◆ GetMeanPositionZ()

Double_t TRestDetectorHitsEvent::GetMeanPositionZ ( ) const
inline

Definition at line 100 of file TRestDetectorHitsEvent.h.

◆ GetMinimumHitEnergy()

Double_t TRestDetectorHitsEvent::GetMinimumHitEnergy ( ) const
inline

Definition at line 120 of file TRestDetectorHitsEvent.h.

◆ GetNumberOfHits()

size_t TRestDetectorHitsEvent::GetNumberOfHits ( ) const
inline

Definition at line 64 of file TRestDetectorHitsEvent.h.

◆ GetNumberOfHitsInsideCylinder()

Int_t TRestDetectorHitsEvent::GetNumberOfHitsInsideCylinder ( TVector3  x0,
TVector3  x1,
Double_t  radius 
)

This method returns the total number hits found inside the cylinder volume given by argument.

Parameters
x0The center of the bottom face of the cylinder.
x1The center of the top face of the cylinder.
radiusThe radius of the cylinder.

Definition at line 278 of file TRestDetectorHitsEvent.cxx.

◆ GetNumberOfHitsInsidePrism()

Int_t TRestDetectorHitsEvent::GetNumberOfHitsInsidePrism ( TVector3  x0,
TVector3  x1,
Double_t  sizeX,
Double_t  sizeY,
Double_t  theta 
)

This method returns the total number of hits found inside the prism volume given by argument.

Parameters
x0The center of the bottom face of the prism.
x1The center of the top face of the prism.
sizeXSize of the side X of the prism face.
sizeYSize of the side X of the prism face.
thetaAn angle in radians to rotate the face of the prism.

Definition at line 352 of file TRestDetectorHitsEvent.cxx.

◆ GetNumberOfHitsX()

Int_t TRestDetectorHitsEvent::GetNumberOfHitsX ( ) const
inline

Definition at line 95 of file TRestDetectorHitsEvent.h.

◆ GetNumberOfHitsY()

Int_t TRestDetectorHitsEvent::GetNumberOfHitsY ( ) const
inline

Definition at line 96 of file TRestDetectorHitsEvent.h.

◆ GetPosition()

TVector3 TRestDetectorHitsEvent::GetPosition ( int  n) const
inline

Definition at line 91 of file TRestDetectorHitsEvent.h.

◆ GetSigmaX()

Double_t TRestDetectorHitsEvent::GetSigmaX ( ) const
inline

Definition at line 102 of file TRestDetectorHitsEvent.h.

◆ GetSigmaXY2()

Double_t TRestDetectorHitsEvent::GetSigmaXY2 ( ) const
inline

Definition at line 101 of file TRestDetectorHitsEvent.h.

◆ GetSigmaY()

Double_t TRestDetectorHitsEvent::GetSigmaY ( ) const
inline

Definition at line 103 of file TRestDetectorHitsEvent.h.

◆ GetSigmaZ2()

Double_t TRestDetectorHitsEvent::GetSigmaZ2 ( ) const
inline

Definition at line 115 of file TRestDetectorHitsEvent.h.

◆ GetSkewXY()

Double_t TRestDetectorHitsEvent::GetSkewXY ( ) const
inline

Definition at line 116 of file TRestDetectorHitsEvent.h.

◆ GetSkewZ()

Double_t TRestDetectorHitsEvent::GetSkewZ ( ) const
inline

Definition at line 117 of file TRestDetectorHitsEvent.h.

◆ GetTime()

Double_t TRestDetectorHitsEvent::GetTime ( int  n) const
inline

Definition at line 129 of file TRestDetectorHitsEvent.h.

◆ GetTotalEnergy()

Double_t TRestDetectorHitsEvent::GetTotalEnergy ( ) const
inline

Definition at line 125 of file TRestDetectorHitsEvent.h.

◆ GetType()

REST_HitType TRestDetectorHitsEvent::GetType ( int  n) const
inline

Definition at line 77 of file TRestDetectorHitsEvent.h.

◆ GetX()

Double_t TRestDetectorHitsEvent::GetX ( int  n) const
inline

Returns the X-coordinate of hit entry n in mm.

Definition at line 69 of file TRestDetectorHitsEvent.h.

◆ GetXYHistogram()

TH2F * TRestDetectorHitsEvent::GetXYHistogram ( std::vector< float >  ranges,
Double_t  pitch = 3,
Double_t  border = 5 
)

This method draws the hits found on XY as a TH2F and it returns the generated histogram.

The first argument allows to define the ranges in the format: {binsX, minX, maxX, binsY, minY, maxY}.

The pitch allows to adjust the binning in automatic mode (when ranges vector is empty).

The border gives an additional margin to the automatic minX, maxX, minY, maxY found.

Definition at line 989 of file TRestDetectorHitsEvent.cxx.

◆ GetXYZHits()

TRestHits * TRestDetectorHitsEvent::GetXYZHits ( )

This method collects all hits which are compatible with a XYZ hit.

A XYZ hit compatible are those hits that have valid X, Y and Z coordinates.

Returns
It returns back a TRestHits structure with the hits fulfilling the XYZ condition.

Definition at line 215 of file TRestDetectorHitsEvent.cxx.

◆ GetXZHistogram()

TH2F * TRestDetectorHitsEvent::GetXZHistogram ( std::vector< float >  ranges,
Double_t  pitch = 3,
Double_t  border = 5 
)

This method draws the hits found on XY as a TH2F and it returns the generated histogram.

The first argument allows to define the ranges in the format: {binsX, minX, maxX, binsZ, minZ, maxZ}.

The pitch allows to adjust the binning in automatic mode (when ranges vector is empty).

The border gives an additional margin to the automatic minX, maxX, minZ, maxZ found.

Definition at line 1076 of file TRestDetectorHitsEvent.cxx.

◆ GetXZHits()

TRestHits * TRestDetectorHitsEvent::GetXZHits ( )

This method collects all hits which are compatible with a XZ-projected hit.

A hit compatible with XZ projection are those hits that have undetermined Y coordinate, and valid X and Z coordinates.

Returns
It returns back a TRestHits structure with the hits fulfilling the XZ condition.

Definition at line 175 of file TRestDetectorHitsEvent.cxx.

◆ GetY()

Double_t TRestDetectorHitsEvent::GetY ( int  n) const
inline

Returns the Y-coordinate of hit entry n in mm.

Definition at line 72 of file TRestDetectorHitsEvent.h.

◆ GetYZHistogram()

TH2F * TRestDetectorHitsEvent::GetYZHistogram ( std::vector< float >  ranges,
Double_t  pitch = 3,
Double_t  border = 5 
)

This method draws the hits found on YZ as a TH2F and it returns the generated histogram.

The first argument allows to define the ranges in the format: {binsY, minY, maxY, binsZ, minZ, maxZ}.

The pitch allows to adjust the binning in automatic mode (when ranges vector is empty).

The border gives an additional margin to the automatic minY, maxY, minZ, maxZ found.

Definition at line 1163 of file TRestDetectorHitsEvent.cxx.

◆ GetYZHits()

TRestHits * TRestDetectorHitsEvent::GetYZHits ( )

This method collects all hits which are compatible with a YZ-projected hit.

A hit compatible with XZ projection are those hits that have undetermined X coordinate, and valid Y and Z coordinates.

Returns
It returns back a TRestHits structure with the hits fulfilling the XZ condition.

Definition at line 195 of file TRestDetectorHitsEvent.cxx.

◆ GetZ()

Double_t TRestDetectorHitsEvent::GetZ ( int  n) const
inline

Returns the Z-coordinate of hit entry n in mm.

Definition at line 75 of file TRestDetectorHitsEvent.h.

◆ Initialize()

void TRestDetectorHitsEvent::Initialize ( )
virtual

Removes all hits from this event, and clears all auxiliar variables.

Implements TRestEvent.

Definition at line 116 of file TRestDetectorHitsEvent.cxx.

◆ PrintEvent() [1/2]

virtual void TRestDetectorHitsEvent::PrintEvent ( ) const
inlinevirtual

Run to print event data info on console To be re-implemented in derived class. You may want to call the base class inside the re-implemented one, by calling TRestEvent::PrintEvent();

Reimplemented from TRestEvent.

Definition at line 88 of file TRestDetectorHitsEvent.h.

◆ PrintEvent() [2/2]

void TRestDetectorHitsEvent::PrintEvent ( Int_t  nHits) const
virtual

Definition at line 963 of file TRestDetectorHitsEvent.cxx.

◆ Shuffle()

void TRestDetectorHitsEvent::Shuffle ( int  NLoop)

Definition at line 156 of file TRestDetectorHitsEvent.cxx.

◆ Sort()

void TRestDetectorHitsEvent::Sort ( bool(compareCondition)(const TRestHits::iterator &hit1, const TRestHits::iterator &hit2)  = nullptr)

Definition at line 138 of file TRestDetectorHitsEvent.cxx.

Field Documentation

◆ fHits

TRestHits* TRestDetectorHitsEvent::fHits
protected

The hits structure that is is saved to disk.

Definition at line 54 of file TRestDetectorHitsEvent.h.

◆ fXHisto

TH1F* TRestDetectorHitsEvent::fXHisto
protected

An auxiliary TH1F histogram to visualize hits on X-projection.

Definition at line 47 of file TRestDetectorHitsEvent.h.

◆ fXYHisto

TH2F* TRestDetectorHitsEvent::fXYHisto
protected

An auxiliary TH2F histogram to visualize hits on XY-projection.

Definition at line 40 of file TRestDetectorHitsEvent.h.

◆ fXYHitGraph

TGraph* TRestDetectorHitsEvent::fXYHitGraph
protected

An auxiliary TGraph pointer to visualize hits on XY-projection.

Definition at line 33 of file TRestDetectorHitsEvent.h.

◆ fXYZHits

TRestHits* TRestDetectorHitsEvent::fXYZHits
private

An auxiliary TRestHits structure to register hits on XYZ projection.

Definition at line 26 of file TRestDetectorHitsEvent.h.

◆ fXZHisto

TH2F* TRestDetectorHitsEvent::fXZHisto
protected

An auxiliary TH2F histogram to visualize hits on XZ-projection.

Definition at line 44 of file TRestDetectorHitsEvent.h.

◆ fXZHitGraph

TGraph* TRestDetectorHitsEvent::fXZHitGraph
protected

An auxiliary TGraph pointer to visualize hits on XZ-projection.

Definition at line 35 of file TRestDetectorHitsEvent.h.

◆ fXZHits

TRestHits* TRestDetectorHitsEvent::fXZHits
private

An auxiliary TRestHits structure to register hits on XZ projection.

Definition at line 21 of file TRestDetectorHitsEvent.h.

◆ fYHisto

TH1F* TRestDetectorHitsEvent::fYHisto
protected

An auxiliary TH1F histogram to visualize hits on Y-projection.

Definition at line 49 of file TRestDetectorHitsEvent.h.

◆ fYZHisto

TH2F* TRestDetectorHitsEvent::fYZHisto
protected

An auxiliary TH2F histogram to visualize hits on YZ-projection.

Definition at line 42 of file TRestDetectorHitsEvent.h.

◆ fYZHitGraph

TGraph* TRestDetectorHitsEvent::fYZHitGraph
protected

An auxiliary TGraph pointer to visualize hits on YZ-projection.

Definition at line 37 of file TRestDetectorHitsEvent.h.

◆ fYZHits

TRestHits* TRestDetectorHitsEvent::fYZHits
private

An auxiliary TRestHits structure to register hits on YZ projection.

Definition at line 23 of file TRestDetectorHitsEvent.h.

◆ fZHisto

TH1F* TRestDetectorHitsEvent::fZHisto
protected

An auxiliary TH1F histogram to visualize hits on Z-projection.

Definition at line 51 of file TRestDetectorHitsEvent.h.


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