ATLAS Offline Software
EntryLayerFilter.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // class header include
6 #include "EntryLayerFilter.h"
7 
8 // ISF includes
10 
11 // ISF interfaces
13 
15 ISF::EntryLayerFilter::EntryLayerFilter(const std::string& t, const std::string& n, const IInterface* p) :
16  base_class(t,n,p),
17  m_ekinCharged(-1),
18  m_ekinNeutral(-1)
19 {
20  declareProperty( "MinEkinCharged",
21  m_ekinCharged=-1.,
22  "Minimum kinetic energy cut for charged particles (set -1 to filter out all)");
23  declareProperty( "MinEkinNeutral",
24  m_ekinNeutral=-1.,
25  "Minimum kinetic energy cut for neutral particles (set -1 to filter out all)");
26 }
27 
28 
31  double ekin = p.ekin();
32  bool isCharged = fabs(p.charge()) > 1e-5;
33 
34  double curEkinCut = isCharged ? m_ekinCharged : m_ekinNeutral;
35 
36  // pass if cut is activated and energy is above threshold
37  bool pass = ( curEkinCut > 0. ) && ( ekin > curEkinCut );
38 
39  return pass;
40 }
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ISF::ISFParticle
Definition: ISFParticle.h:42
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ISF::EntryLayerFilter::m_ekinNeutral
double m_ekinNeutral
mininum Ekin cut for neutral particles
Definition: EntryLayerFilter.h:42
ISFParticle.h
beamspotman.n
n
Definition: beamspotman.py:731
IParticleFilter.h
ISF::EntryLayerFilter::EntryLayerFilter
EntryLayerFilter(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition: EntryLayerFilter.cxx:15
ISF::EntryLayerFilter::passFilter
virtual bool passFilter(const ISFParticle &isp) const
Returns a pass boolean on the particle
Definition: EntryLayerFilter.cxx:30
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
isCharged
bool isCharged(const T &p)
Definition: AtlasPID.h:496
ISF::EntryLayerFilter::m_ekinCharged
double m_ekinCharged
mininum Ekin cut for charged particles
Definition: EntryLayerFilter.h:41
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
EntryLayerFilter.h