All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
EventInfo_t Struct Reference

Information about the event. More...

Public Member Functions

 EventInfo_t ()
 Constructor. As if nobody noticed. More...
 
void dump (std::ostream &out) const
 Prints the content of the object into a stream. More...
 
Query interface
unsigned int nWeakChargedCurrentInteractions () const
 Returns the number of weak charged current interactions in the event. More...
 
unsigned int nWeakNeutralCurrentInteractions () const
 Returns the number of weak neutral current interactions in the event. More...
 
unsigned int nWeakCurrentInteractions () const
 Returns the number of weak current interactions in the event. More...
 
bool isWeakChargedCurrent () const
 Returns whether the event is generated as a neutrino CC interaction. More...
 
bool isWeakNeutralCurrent () const
 Returns whether the event is generated as a neutrino NC interaction. More...
 
bool isNeutrino () const
 Returns whether the event is generated as a neutrino interaction. More...
 
bool isNu_mu () const
 Returns which neutrino flavor is present in an event. More...
 
bool isNu_e () const
 
int NeutrinoPDG () const
 Returns the neutrino PDG code. More...
 
GeV DepositedEnergy () const
 Returns the total energy deposited in the detector during the event [GeV]. More...
 
GeV DepositedEnergyInSpill () const
 Returns the total energy deposited in the detector during beam [GeV]. More...
 
GeV DepositedEnergyInActiveVolume () const
 Returns the energy deposited in the active volume during the event [GeV]. More...
 
GeV DepositedEnergyInSpillInActiveVolume () const
 Returns the energy deposited in the active volume during the beam [GeV]. More...
 
GeV NeutrinoEnergy () const
 
GeV LeptonEnergy () const
 
int InteractionType () const
 
bool hasVertex () const
 Returns whether this type of event has a known vertex. More...
 
bool isInActiveVolume () const
 Returns whether there is an interaction within the active volume. More...
 

Private Attributes

std::array< unsigned int,
NInteractionTypes
fInteractions
 
GeV fEnergyDepTotal { 0.0 }
 Total deposited energy. More...
 
GeV fEnergyDepSpill { 0.0 }
 Energy deposited in spill. More...
 
GeV fEnergyDepActive { 0.0 }
 
GeV fEnergyDepSpillActive { 0.0 }
 Energy deposited in active volume in spill. More...
 
int fNeutrinoPDG { 0 }
 
int fInteractionType { 0 }
 
GeV fNeutrinoEnergy { 0.0 }
 
GeV fLeptonEnergy { 0.0 }
 
bool nu_mu { false }
 
bool nu_e { false }
 
bool fInActiveVolume { false }
 Whether the event has activity inside the active volume. More...
 

Static Private Attributes

static constexpr std::size_t itWCC { 0U }
 Charged weak current. More...
 
static constexpr std::size_t itWNC { 1U }
 Neutral weak current. More...
 
static constexpr std::size_t NInteractionTypes { 2U }
 

Set interface

std::vector< geo::Point_tfVertices
 Position of all vertices. More...
 
void AddWeakChargedCurrentInteractions (unsigned int n=1U)
 Marks this event as including n more weak charged current interactions. More...
 
void AddWeakNeutralCurrentInteractions (unsigned int n=1U)
 Marks this event as including n more weak neutral current interactions. More...
 
void SetNu_mu (bool numu)
 Marks the neutrino flavor. More...
 
void SetNu_e (bool nue)
 
void SetNeutrinoPDG (int NU)
 Marks this event's neutrino type. More...
 
void SetDepositedEnergy (GeV e)
 Sets the total deposited energy of the event [GeV]. More...
 
void SetDepositedEnergyInSpill (GeV e)
 Sets the energy of the event deposited during beam gate [GeV]. More...
 
void SetDepositedEnergyInActiveVolume (GeV e)
 Sets the total deposited energy of the event in active volume [GeV]. More...
 
void SetDepositedEnergyInActiveVolumeInSpill (GeV e)
 
void SetNeutrinoEnergy (GeV eNu)
 
void SetLeptonEnergy (GeV eL)
 
void SetInteractionType (int type)
 
void SetInActiveVolume (bool active=true)
 Set whether the event has relevant activity in the active volume. More...
 
void AddVertex (geo::Point_t const &vertex)
 Adds a point to the list of interaction vertices in the event. More...
 

Detailed Description

Information about the event.

Definition at line 97 of file TriggerEfficiencyPlots_module.cc.

Constructor & Destructor Documentation

EventInfo_t::EventInfo_t ( )
inline

Constructor. As if nobody noticed.

Definition at line 100 of file TriggerEfficiencyPlots_module.cc.

100 { fInteractions.fill(0U); }
std::array< unsigned int, NInteractionTypes > fInteractions

Member Function Documentation

void EventInfo_t::AddVertex ( geo::Point_t const &  vertex)
inline

Adds a point to the list of interaction vertices in the event.

Definition at line 218 of file TriggerEfficiencyPlots_module.cc.

218 { fVertices.push_back(vertex); }
process_name vertex
Definition: cheaterreco.fcl:51
std::vector< geo::Point_t > fVertices
Position of all vertices.
void EventInfo_t::AddWeakChargedCurrentInteractions ( unsigned int  n = 1U)
inline

Marks this event as including n more weak charged current interactions.

Definition at line 177 of file TriggerEfficiencyPlots_module.cc.

178  { fInteractions[itWCC] += n; }
std::array< unsigned int, NInteractionTypes > fInteractions
static constexpr std::size_t itWCC
Charged weak current.
void EventInfo_t::AddWeakNeutralCurrentInteractions ( unsigned int  n = 1U)
inline

Marks this event as including n more weak neutral current interactions.

Definition at line 181 of file TriggerEfficiencyPlots_module.cc.

182  { fInteractions[itWNC] += n; }
std::array< unsigned int, NInteractionTypes > fInteractions
static constexpr std::size_t itWNC
Neutral weak current.
GeV EventInfo_t::DepositedEnergy ( ) const
inline

Returns the total energy deposited in the detector during the event [GeV].

Definition at line 141 of file TriggerEfficiencyPlots_module.cc.

141 { return fEnergyDepTotal; }
GeV fEnergyDepTotal
Total deposited energy.
GeV EventInfo_t::DepositedEnergyInActiveVolume ( ) const
inline

Returns the energy deposited in the active volume during the event [GeV].

Definition at line 147 of file TriggerEfficiencyPlots_module.cc.

GeV EventInfo_t::DepositedEnergyInSpill ( ) const
inline

Returns the total energy deposited in the detector during beam [GeV].

Definition at line 144 of file TriggerEfficiencyPlots_module.cc.

144 { return fEnergyDepSpill; }
GeV fEnergyDepSpill
Energy deposited in spill.
GeV EventInfo_t::DepositedEnergyInSpillInActiveVolume ( ) const
inline

Returns the energy deposited in the active volume during the beam [GeV].

Definition at line 150 of file TriggerEfficiencyPlots_module.cc.

151  { return fEnergyDepSpillActive; }
GeV fEnergyDepSpillActive
Energy deposited in active volume in spill.
void EventInfo_t::dump ( std::ostream &  out) const
inline

Prints the content of the object into a stream.

Definition at line 226 of file TriggerEfficiencyPlots_module.cc.

227  {
228  out << "Event contains:";
229  if (isNeutrino()) {
231  out << " " << nWeakChargedCurrentInteractions() << " CC";
233  out << " " << nWeakNeutralCurrentInteractions() << " NC";
234  if (isNu_mu()) out << " nu_mu";
235  if (isNu_e()) out << " nu_e";
236  out << "\nThe first neutrino has E=" << NeutrinoEnergy()
237  << " and becomes a lepton with E=" << LeptonEnergy()
239  << " interaction"
240  ;
241  }
242  else {
243  out << " no neutrino interaction";
244  }
245  out << "\nTotal deposited energy: " << DepositedEnergy()
246  << ", of which in spill " << DepositedEnergyInSpill()
247  << ", in active volume " << DepositedEnergyInActiveVolume()
248  << ", in active volume and in spill "
250  if (fVertices.empty()) {
251  out << "\nNo interaction vertex found.";
252  }
253  else {
254  auto iVertex = fVertices.begin();
255  auto const vend = fVertices.end();
256  out
257  << "\n" << fVertices.size() << " interaction vertices: " << *iVertex;
258  while (++iVertex != vend) out << "; " << *iVertex;
259  out << ".";
260  }
261  out << "\nThe event is" << (isInActiveVolume()? "": " NOT")
262  << " marked as in the active volume of the detector.";
263  out << "\n";
264  out.flush();
265  } // dump()
GeV DepositedEnergyInSpill() const
Returns the total energy deposited in the detector during beam [GeV].
GeV DepositedEnergyInSpillInActiveVolume() const
Returns the energy deposited in the active volume during the beam [GeV].
std::string TruthInteractionTypeName(int type)
GeV DepositedEnergyInActiveVolume() const
Returns the energy deposited in the active volume during the event [GeV].
bool isInActiveVolume() const
Returns whether there is an interaction within the active volume.
bool isNeutrino() const
Returns whether the event is generated as a neutrino interaction.
unsigned int nWeakNeutralCurrentInteractions() const
Returns the number of weak neutral current interactions in the event.
unsigned int nWeakChargedCurrentInteractions() const
Returns the number of weak charged current interactions in the event.
GeV DepositedEnergy() const
Returns the total energy deposited in the detector during the event [GeV].
bool isNu_mu() const
Returns which neutrino flavor is present in an event.
std::vector< geo::Point_t > fVertices
Position of all vertices.
bool EventInfo_t::hasVertex ( ) const
inline

Returns whether this type of event has a known vertex.

Definition at line 163 of file TriggerEfficiencyPlots_module.cc.

163 { return !fVertices.empty(); }
std::vector< geo::Point_t > fVertices
Position of all vertices.
int EventInfo_t::InteractionType ( ) const
inline

Definition at line 160 of file TriggerEfficiencyPlots_module.cc.

bool EventInfo_t::isInActiveVolume ( ) const
inline

Returns whether there is an interaction within the active volume.

Definition at line 166 of file TriggerEfficiencyPlots_module.cc.

166 { return fInActiveVolume; }
bool fInActiveVolume
Whether the event has activity inside the active volume.
bool EventInfo_t::isNeutrino ( ) const
inline

Returns whether the event is generated as a neutrino interaction.

Definition at line 130 of file TriggerEfficiencyPlots_module.cc.

131  { return isWeakChargedCurrent() || isWeakNeutralCurrent(); }
bool isWeakNeutralCurrent() const
Returns whether the event is generated as a neutrino NC interaction.
bool isWeakChargedCurrent() const
Returns whether the event is generated as a neutrino CC interaction.
bool EventInfo_t::isNu_e ( ) const
inline

Definition at line 135 of file TriggerEfficiencyPlots_module.cc.

135 { return nu_e; }
bool EventInfo_t::isNu_mu ( ) const
inline

Returns which neutrino flavor is present in an event.

Definition at line 134 of file TriggerEfficiencyPlots_module.cc.

134 { return nu_mu; }
bool EventInfo_t::isWeakChargedCurrent ( ) const
inline

Returns whether the event is generated as a neutrino CC interaction.

Definition at line 122 of file TriggerEfficiencyPlots_module.cc.

123  { return nWeakChargedCurrentInteractions() > 0U; }
unsigned int nWeakChargedCurrentInteractions() const
Returns the number of weak charged current interactions in the event.
bool EventInfo_t::isWeakNeutralCurrent ( ) const
inline

Returns whether the event is generated as a neutrino NC interaction.

Definition at line 126 of file TriggerEfficiencyPlots_module.cc.

127  { return nWeakNeutralCurrentInteractions() > 0U; }
unsigned int nWeakNeutralCurrentInteractions() const
Returns the number of weak neutral current interactions in the event.
GeV EventInfo_t::LeptonEnergy ( ) const
inline

Definition at line 157 of file TriggerEfficiencyPlots_module.cc.

GeV EventInfo_t::NeutrinoEnergy ( ) const
inline

Definition at line 154 of file TriggerEfficiencyPlots_module.cc.

int EventInfo_t::NeutrinoPDG ( ) const
inline

Returns the neutrino PDG code.

Definition at line 138 of file TriggerEfficiencyPlots_module.cc.

unsigned int EventInfo_t::nWeakChargedCurrentInteractions ( ) const
inline

Returns the number of weak charged current interactions in the event.

Definition at line 107 of file TriggerEfficiencyPlots_module.cc.

108  { return fInteractions[itWCC]; }
std::array< unsigned int, NInteractionTypes > fInteractions
static constexpr std::size_t itWCC
Charged weak current.
unsigned int EventInfo_t::nWeakCurrentInteractions ( ) const
inline

Returns the number of weak current interactions in the event.

Definition at line 115 of file TriggerEfficiencyPlots_module.cc.

116  {
117  return
119  }
unsigned int nWeakNeutralCurrentInteractions() const
Returns the number of weak neutral current interactions in the event.
unsigned int nWeakChargedCurrentInteractions() const
Returns the number of weak charged current interactions in the event.
unsigned int EventInfo_t::nWeakNeutralCurrentInteractions ( ) const
inline

Returns the number of weak neutral current interactions in the event.

Definition at line 111 of file TriggerEfficiencyPlots_module.cc.

112  { return fInteractions[itWNC]; }
std::array< unsigned int, NInteractionTypes > fInteractions
static constexpr std::size_t itWNC
Neutral weak current.
void EventInfo_t::SetDepositedEnergy ( GeV  e)
inline

Sets the total deposited energy of the event [GeV].

Definition at line 192 of file TriggerEfficiencyPlots_module.cc.

192 { fEnergyDepTotal = e; }
do i e
GeV fEnergyDepTotal
Total deposited energy.
void EventInfo_t::SetDepositedEnergyInActiveVolume ( GeV  e)
inline

Sets the total deposited energy of the event in active volume [GeV].

Definition at line 198 of file TriggerEfficiencyPlots_module.cc.

void EventInfo_t::SetDepositedEnergyInActiveVolumeInSpill ( GeV  e)
inline

Sets the energy of the event deposited during beam gate in active volume [GeV]

Definition at line 202 of file TriggerEfficiencyPlots_module.cc.

203  { fEnergyDepSpillActive = e; }
GeV fEnergyDepSpillActive
Energy deposited in active volume in spill.
do i e
void EventInfo_t::SetDepositedEnergyInSpill ( GeV  e)
inline

Sets the energy of the event deposited during beam gate [GeV].

Definition at line 195 of file TriggerEfficiencyPlots_module.cc.

195 { fEnergyDepSpill = e; }
GeV fEnergyDepSpill
Energy deposited in spill.
do i e
void EventInfo_t::SetInActiveVolume ( bool  active = true)
inline

Set whether the event has relevant activity in the active volume.

Definition at line 215 of file TriggerEfficiencyPlots_module.cc.

215 { fInActiveVolume = active; }
bool fInActiveVolume
Whether the event has activity inside the active volume.
void EventInfo_t::SetInteractionType ( int  type)
inline
void EventInfo_t::SetLeptonEnergy ( GeV  eL)
inline

Definition at line 209 of file TriggerEfficiencyPlots_module.cc.

void EventInfo_t::SetNeutrinoEnergy ( GeV  eNu)
inline

Definition at line 206 of file TriggerEfficiencyPlots_module.cc.

void EventInfo_t::SetNeutrinoPDG ( int  NU)
inline

Marks this event's neutrino type.

Definition at line 189 of file TriggerEfficiencyPlots_module.cc.

void EventInfo_t::SetNu_e ( bool  nue)
inline

Definition at line 186 of file TriggerEfficiencyPlots_module.cc.

186 { nu_e = nue; }
void EventInfo_t::SetNu_mu ( bool  numu)
inline

Marks the neutrino flavor.

Definition at line 185 of file TriggerEfficiencyPlots_module.cc.

185 { nu_mu = numu; }

Member Data Documentation

GeV EventInfo_t::fEnergyDepActive { 0.0 }
private

Energy deposited in active volume.

Definition at line 281 of file TriggerEfficiencyPlots_module.cc.

GeV EventInfo_t::fEnergyDepSpill { 0.0 }
private

Energy deposited in spill.

Definition at line 280 of file TriggerEfficiencyPlots_module.cc.

GeV EventInfo_t::fEnergyDepSpillActive { 0.0 }
private

Energy deposited in active volume in spill.

Definition at line 283 of file TriggerEfficiencyPlots_module.cc.

GeV EventInfo_t::fEnergyDepTotal { 0.0 }
private

Total deposited energy.

Definition at line 279 of file TriggerEfficiencyPlots_module.cc.

bool EventInfo_t::fInActiveVolume { false }
private

Whether the event has activity inside the active volume.

Definition at line 296 of file TriggerEfficiencyPlots_module.cc.

std::array<unsigned int, NInteractionTypes> EventInfo_t::fInteractions
private

Definition at line 277 of file TriggerEfficiencyPlots_module.cc.

int EventInfo_t::fInteractionType { 0 }
private

Definition at line 286 of file TriggerEfficiencyPlots_module.cc.

GeV EventInfo_t::fLeptonEnergy { 0.0 }
private

Definition at line 289 of file TriggerEfficiencyPlots_module.cc.

GeV EventInfo_t::fNeutrinoEnergy { 0.0 }
private

Definition at line 288 of file TriggerEfficiencyPlots_module.cc.

int EventInfo_t::fNeutrinoPDG { 0 }
private

Definition at line 285 of file TriggerEfficiencyPlots_module.cc.

std::vector<geo::Point_t> EventInfo_t::fVertices

Position of all vertices.

Definition at line 220 of file TriggerEfficiencyPlots_module.cc.

constexpr std::size_t EventInfo_t::itWCC { 0U }
staticprivate

Charged weak current.

Definition at line 271 of file TriggerEfficiencyPlots_module.cc.

constexpr std::size_t EventInfo_t::itWNC { 1U }
staticprivate

Neutral weak current.

Definition at line 272 of file TriggerEfficiencyPlots_module.cc.

constexpr std::size_t EventInfo_t::NInteractionTypes { 2U }
staticprivate

Definition at line 273 of file TriggerEfficiencyPlots_module.cc.

bool EventInfo_t::nu_e { false }
private

Definition at line 293 of file TriggerEfficiencyPlots_module.cc.

bool EventInfo_t::nu_mu { false }
private

Definition at line 292 of file TriggerEfficiencyPlots_module.cc.


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