ATLAS Offline Software
ParticleBaseSelector.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***********************************************************************
6 ParticleBaseSelector.h:
7  Example of a Selector class with ParticleBaseContainer
8  Note that for every type of Container there is a ParticleLinks<Container>
9  that needs an id for the store gate and a uuid for an output file. See for example;
10  ParticleEvent/ParticleBaseLinks.h
11  ParticleEvent/selection.xml
12 
13 When running the selector you have the options to generate a SelectedParticles object
14 and/or a ParticleLinks<Container> object. The SelectorBase expects a Container key
15 and keys for output SelectedParticles and/or ParticleLinks. You can also specify an input
16 key for SelectedParticles or for ParticleLinks (but not both)..
17 
18  S. Protopopescu 11-DEC-2008
19 
20 ***********************************************************************/
21 
22 #ifndef PARTICLEBASESELECTOR_H
23 #define PARTICLEBASESELECTOR_H
24 
26 #include "CLHEP/Units/SystemOfUnits.h"
29 
30 
32 //
33 // Selection can be made on:
34 //
35 // PtMin (default 15 GeV, expects GeV)
36 // PtMax (default 10000 GeV, expects GeV)
37 // EtaMin (eta, default -2.5)
38 // EtaMax (eta, default 2.5)
39 // AbsEtaMin (default 0)
40 // AbsEtaMax (|eta|, default 2.5)
41 //
42 // These parameters are in SelectorBase
43 //
45 
46 class ParticleBaseSelector : public SelectorBase<ParticleBaseSelector>{
47 
48  public:
49 
51  typedef ParticleBase Contained;
52  typedef ParticleBaseLinks Links;
53  typedef ParticleBaseLink Link;
54 
55  ParticleBaseSelector(const std::string& name, ISvcLocator* pSvcLocator);
58  bool accept(const ParticleBaseLink& link);
59  bool accept(const Contained* part);
60 
61  private:
62  double m_Emax;
63  double m_Emin;
64 };
65 
66 
67 #endif
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
ParticleBaseSelector::Contained
ParticleBase Contained
Definition: ParticleBaseSelector.h:66
ParticleBase
Definition: ParticleBase.h:17
ParticleBaseContainer.h
SelectorBase
Definition: SelectorBase.h:36
ParticleBaseSelector::m_Emax
double m_Emax
Definition: ParticleBaseSelector.h:77
ParticleBaseSelector::Links
ParticleBaseLinks Links
Definition: ParticleBaseSelector.h:67
ParticleBaseSelector
Definition: ParticleBaseSelector.h:46
ParticleBaseSelector::initialize
StatusCode initialize()
Definition: ParticleBaseSelector.cxx:19
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ParticleBaseSelector::Link
ParticleBaseLink Link
Definition: ParticleBaseSelector.h:68
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
ParticleBaseSelector::~ParticleBaseSelector
~ParticleBaseSelector()
Definition: ParticleBaseSelector.h:71
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ParticleBaseSelector::ParticleBaseSelector
ParticleBaseSelector(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ParticleBaseSelector.cxx:11
ParticleBaseSelector::accept
bool accept(const ParticleBaseLink &link)
Definition: ParticleBaseSelector.cxx:30
ParticleBaseSelector::Container
ParticleBaseContainer Container
Definition: ParticleBaseSelector.h:65
SelectorBase.h
ParticleBaseSelector::m_Emin
double m_Emin
Definition: ParticleBaseSelector.h:78