PandaRoot
BSEmcEnergies_t Struct Reference

#include <BSEmcEnergies_t.h>

Public Member Functions

Double_t MaxRatio ()
 
Double_t SumRatio ()
 
Double_t MaxPlusRatio ()
 
Double_t SumPlusRatio ()
 

Static Public Member Functions

static BSEmcEnergies_t GetEnergies (Int_t t_centralcrystal, const std::vector< const BSEmcDigi *> &t_digiArray, BSEmcGeoNeighbouringRelationPar *t_neighbouring)
 

Public Attributes

Double_t CenterEnergy {0}
 
Double_t NeighbourEnergy {0}
 
Double_t MaxNeighbourEnergy {0}
 
Int_t NeighbourNumber {0}
 

Detailed Description

Definition at line 9 of file BSEmcEnergies_t.h.

Member Function Documentation

◆ GetEnergies()

static BSEmcEnergies_t BSEmcEnergies_t::GetEnergies ( Int_t  t_centralcrystal,
const std::vector< const BSEmcDigi *> &  t_digiArray,
BSEmcGeoNeighbouringRelationPar t_neighbouring 
)
inlinestatic

Definition at line 20 of file BSEmcEnergies_t.h.

References BSEmcGeoNeighbouringRelationPar::AreNeighbours(), CenterEnergy, MaxNeighbourEnergy, NeighbourEnergy, and NeighbourNumber.

21  {
22  BSEmcEnergies_t energies;
23  Double_t energy = 0.0;
24  Int_t detectorid = 0;
25  for (const BSEmcDigi *digi : t_digiArray) {
26  energy = digi->GetEnergy();
27  detectorid = digi->GetDetectorId();
28  if (detectorid == t_centralcrystal) {
29  energies.CenterEnergy += energy;
30  } else if (t_neighbouring->AreNeighbours(detectorid, t_centralcrystal)) {
31  energies.NeighbourNumber += 1;
32  energies.NeighbourEnergy += energy;
33  if (energy > energies.MaxNeighbourEnergy) {
34  energies.MaxNeighbourEnergy = energy;
35  }
36  }
37  }
38  return energies;
39  }
Bool_t AreNeighbours(Int_t t_a, Int_t t_b) const
Double_t CenterEnergy
Double_t NeighbourEnergy
Double_t MaxNeighbourEnergy
represents the reconstructed hit of one emc crystal
Definition: BSEmcDigi.h:47

◆ MaxPlusRatio()

Double_t BSEmcEnergies_t::MaxPlusRatio ( )
inline

Definition at line 17 of file BSEmcEnergies_t.h.

References CenterEnergy, and MaxNeighbourEnergy.

Double_t CenterEnergy
Double_t MaxNeighbourEnergy

◆ MaxRatio()

Double_t BSEmcEnergies_t::MaxRatio ( )
inline

Definition at line 15 of file BSEmcEnergies_t.h.

References CenterEnergy, and MaxNeighbourEnergy.

15 { return MaxNeighbourEnergy / CenterEnergy; }
Double_t CenterEnergy
Double_t MaxNeighbourEnergy

◆ SumPlusRatio()

Double_t BSEmcEnergies_t::SumPlusRatio ( )
inline

Definition at line 18 of file BSEmcEnergies_t.h.

References CenterEnergy, and NeighbourEnergy.

Double_t CenterEnergy
Double_t NeighbourEnergy

◆ SumRatio()

Double_t BSEmcEnergies_t::SumRatio ( )
inline

Definition at line 16 of file BSEmcEnergies_t.h.

References CenterEnergy, and NeighbourEnergy.

16 { return NeighbourEnergy / CenterEnergy; }
Double_t CenterEnergy
Double_t NeighbourEnergy

Member Data Documentation

◆ CenterEnergy

Double_t BSEmcEnergies_t::CenterEnergy {0}

Definition at line 10 of file BSEmcEnergies_t.h.

Referenced by GetEnergies(), MaxPlusRatio(), MaxRatio(), SumPlusRatio(), and SumRatio().

◆ MaxNeighbourEnergy

Double_t BSEmcEnergies_t::MaxNeighbourEnergy {0}

Definition at line 12 of file BSEmcEnergies_t.h.

Referenced by GetEnergies(), MaxPlusRatio(), and MaxRatio().

◆ NeighbourEnergy

Double_t BSEmcEnergies_t::NeighbourEnergy {0}

Definition at line 11 of file BSEmcEnergies_t.h.

Referenced by GetEnergies(), SumPlusRatio(), and SumRatio().

◆ NeighbourNumber

Int_t BSEmcEnergies_t::NeighbourNumber {0}

Definition at line 13 of file BSEmcEnergies_t.h.

Referenced by GetEnergies().


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