All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
filt::SimEnergyDepFakeTriggerFilter Class Reference
Inheritance diagram for filt::SimEnergyDepFakeTriggerFilter:

Public Member Functions

 SimEnergyDepFakeTriggerFilter (fhicl::ParameterSet const &pset)
 
virtual bool filter (art::Event &e) override
 

Private Attributes

const double fBeamTimeMin
 
const double fBeamTimeMax
 
const double fEnergyDeposit
 
const std::string fSimEnergyDepModuleName
 

Detailed Description

Definition at line 9 of file SimEnergyDepFakeTriggerFilter_module.cc.

Constructor & Destructor Documentation

filt::SimEnergyDepFakeTriggerFilter::SimEnergyDepFakeTriggerFilter ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 22 of file SimEnergyDepFakeTriggerFilter_module.cc.

23  : EDFilter(pset)
24  , fBeamTimeMin(pset.get<double>("BeamTimeMin"))
25  , fBeamTimeMax(pset.get<double>("BeamTimeMax"))
26  , fEnergyDeposit(pset.get<double>("EnergyDeposit"))
27  , fSimEnergyDepModuleName(pset.get<std::string>("SimEnergyDepModuleName"))
28 {
29 }

Member Function Documentation

bool filt::SimEnergyDepFakeTriggerFilter::filter ( art::Event &  e)
overridevirtual

Definition at line 31 of file SimEnergyDepFakeTriggerFilter_module.cc.

32 {
33  const art::ValidHandle<std::vector<sim::SimEnergyDeposit>>&
34  energyDeps(e.getValidHandle<std::vector<sim::SimEnergyDeposit>>(fSimEnergyDepModuleName));
35 
36  double energy(0);
37 
38  for (const sim::SimEnergyDeposit& energyDep : *energyDeps) {
39  // Check particle time is within the beam time
40  const double time(energyDep.Time() * 1e-3); // [ns] -> [us]
41  if (time < fBeamTimeMin || time > fBeamTimeMax)
42  continue;
43 
44  // Add up the energy deposit inside the TPC
45  energy += energyDep.Energy(); // [MeV]
46  }
47 
48  // If the energy deposit within the beam time is greater than some limit then trigger the event
49  return energy > fEnergyDeposit;
50 }
Energy deposition in the active material.
do i e

Member Data Documentation

const double filt::SimEnergyDepFakeTriggerFilter::fBeamTimeMax
private

Definition at line 16 of file SimEnergyDepFakeTriggerFilter_module.cc.

const double filt::SimEnergyDepFakeTriggerFilter::fBeamTimeMin
private

Definition at line 15 of file SimEnergyDepFakeTriggerFilter_module.cc.

const double filt::SimEnergyDepFakeTriggerFilter::fEnergyDeposit
private

Definition at line 17 of file SimEnergyDepFakeTriggerFilter_module.cc.

const std::string filt::SimEnergyDepFakeTriggerFilter::fSimEnergyDepModuleName
private

Definition at line 19 of file SimEnergyDepFakeTriggerFilter_module.cc.


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