|
ATLAS Offline Software
|
Photon isEM selector.
More...
#include <AsgPhotonIsEMSelector.h>
|
virtual void | print () const |
| Print the state of the tool. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
ASG_TOOL_CLASS3(AsgPhotonIsEMSelector, IAsgPhotonIsEMSelector, IAsgEGammaIsEMSelector, IAsgSelectionTool) public | ~AsgPhotonIsEMSelector () |
| Default constructor. More...
|
|
virtual StatusCode | initialize () |
| AlgTool initialize method. More...
|
|
virtual const asg::AcceptInfo & | getAcceptInfo () const |
| Method to get the plain AcceptInfo. More...
|
|
virtual asg::AcceptData | accept (const xAOD::IParticle *part) const |
| Accept with generic interface. More...
|
|
virtual asg::AcceptData | accept (const EventContext &ctx, const xAOD::IParticle *part) const |
|
virtual asg::AcceptData | accept (const EventContext &ctx, const xAOD::Egamma *part) const |
| Accept with Egamma objects. More...
|
|
virtual asg::AcceptData | accept (const EventContext &ctx, const xAOD::Photon *part) const |
| The main accept method: the actual cuts are applied here. More...
|
|
virtual asg::AcceptData | accept (const EventContext &ctx, const xAOD::Electron *part) const |
| The main accept method: the actual cuts are applied here. More...
|
|
virtual std::string | getOperatingPointName () const |
| Method to get the operating point. More...
|
|
virtual StatusCode | execute (const EventContext &ctx, const xAOD::Egamma *eg, unsigned int &isEM) const |
| The basic isem. More...
|
|
float | getMu (const EventContext &ctx) const |
|
int | RunNumber (const EventContext &ctx) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Photon isEM selector.
- Author
- Jovan Mitrevski Karsten Koeneke
- Date
- Dec 2011 - Fab 2012 11-MAR-2014 convert to ASG tool
Definition at line 38 of file AsgPhotonIsEMSelector.h.
◆ StoreGateSvc_t
◆ ~AsgPhotonIsEMSelector()
AsgPhotonIsEMSelector::~AsgPhotonIsEMSelector |
( |
| ) |
|
|
private |
◆ accept() [1/5]
◆ accept() [2/5]
◆ accept() [3/5]
◆ accept() [4/5]
◆ accept() [5/5]
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode AsgPhotonIsEMSelector::execute |
( |
const EventContext & |
ctx, |
|
|
const xAOD::Egamma * |
eg, |
|
|
unsigned int & |
isEM |
|
) |
| const |
|
privatevirtual |
The basic isem.
Implements IAsgEGammaIsEMSelector.
Definition at line 318 of file AsgPhotonIsEMSelector.cxx.
336 return StatusCode::SUCCESS;
341 if (cluster ==
nullptr) {
342 ATH_MSG_ERROR(
"exiting because cluster is NULL " << cluster);
345 return StatusCode::SUCCESS;
350 const float eta2 = fabsf(cluster->
etaBE(2));
352 const double energy = cluster->
e();
355 const double cosheta = cosh(
eta2);
356 et = (cosheta != 0.) ?
energy / cosheta : 0.;
425 bool excludeTRT =
false;
461 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ getAcceptInfo()
◆ getKey()
Get the (hashed) key of an object that is in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the SG::sgkey_t
key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getName
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The hashed key of the object in the store. If not found, an invalid (zero) key.
Definition at line 119 of file AsgTool.cxx.
121 #ifdef XAOD_STANDALONE
127 return (
proxy ==
nullptr ? 0 :
proxy->sgkey() );
128 #endif // XAOD_STANDALONE
◆ getMu()
float AsgPhotonIsEMSelector::getMu |
( |
const EventContext & |
ctx | ) |
const |
|
private |
◆ getName()
const std::string & asg::AsgTool::getName |
( |
const void * |
ptr | ) |
const |
|
inherited |
Get the name of an object that is / should be in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the std::string
name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getKey
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The string name of the object in the store. If not found, an empty string.
Definition at line 106 of file AsgTool.cxx.
108 #ifdef XAOD_STANDALONE
114 static const std::string
dummy =
"";
116 #endif // XAOD_STANDALONE
◆ getOperatingPointName()
std::string AsgPhotonIsEMSelector::getOperatingPointName |
( |
| ) |
const |
|
privatevirtual |
◆ getProperty()
template<class T >
const T* asg::AsgTool::getProperty |
( |
const std::string & |
name | ) |
const |
|
inherited |
Get one of the tool's properties.
◆ initialize()
StatusCode AsgPhotonIsEMSelector::initialize |
( |
| ) |
|
|
privatevirtual |
AlgTool initialize method.
----— Read in the TEnv config ---—///
----— Use helpers to read in the cut arrays ---—///
Reimplemented from asg::AsgTool.
Definition at line 89 of file AsgPhotonIsEMSelector.cxx.
101 return StatusCode::FAILURE;
196 ATH_MSG_ERROR(
"Could not initialize the TPhotonIsEMSelector!");
197 return StatusCode::FAILURE;
210 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msg_level_name()
const std::string & asg::AsgTool::msg_level_name |
( |
| ) |
const |
|
inherited |
A deprecated function for getting the message level's name.
Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:
MSG::name( msg().level() )
This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.
- Returns
- The string name of the current minimum message level that's printed
Definition at line 101 of file AsgTool.cxx.
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ print()
void asg::AsgTool::print |
( |
| ) |
const |
|
virtualinherited |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ renounce()
◆ renounceArray()
◆ RunNumber()
int AsgPhotonIsEMSelector::RunNumber |
( |
const EventContext & |
ctx | ) |
const |
|
private |
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_caloOnly
bool AsgPhotonIsEMSelector::m_caloOnly |
|
private |
◆ m_configFile
std::string AsgPhotonIsEMSelector::m_configFile |
|
private |
◆ m_detStore
◆ m_EvtInfoKey
Initial value:{ this,
"EventInfo", "EventInfo", "The event info object key" }
Definition at line 109 of file AsgPhotonIsEMSelector.h.
◆ m_evtStore
◆ m_isMuDep
bool AsgPhotonIsEMSelector::m_isMuDep = false |
|
private |
◆ m_removeTRTConversion
bool AsgPhotonIsEMSelector::m_removeTRTConversion |
|
private |
◆ m_rootTool
◆ m_skipAmbiguityCut
bool AsgPhotonIsEMSelector::m_skipAmbiguityCut |
|
private |
◆ m_trigEtTh
float AsgPhotonIsEMSelector::m_trigEtTh |
|
private |
◆ m_useF3core
bool AsgPhotonIsEMSelector::m_useF3core |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_WorkingPoint
std::string AsgPhotonIsEMSelector::m_WorkingPoint |
|
private |
The documentation for this class was generated from the following files:
std::vector< float > m_cutBinMuStrips_photonsNonConverted
binning in pielup in strips for photons
Extra patterns decribing particle interation process.
const unsigned int PhotonTight
Tight photon selection.
Electron_v1 Electron
Definition of the current "egamma version".
std::vector< float > m_cutBinEta_photonsNonConverted
range of eta bins for photon-ID
const std::map< std::string, unsigned int > PhotonCutPointToMask
Helper class to provide type-safe access to aux data.
const unsigned int PhotonLoose
Loose photon selection.
std::vector< float > m_f1_photonsConverted
Cut on fraction of energy rec.
std::vector< float > m_e277_photonsNonConverted
Cut in E277 for photons.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< float > m_deltae_photonsNonConverted
Cut on Demax2 for photons.
std::vector< float > m_cutBinMuStrips_photonsConverted
binning in pileup in strips for photons
std::vector< float > m_cutBinEnergyStrips_photonsNonConverted
Root::TPhotonIsEMSelector * m_rootTool
Pointer to the underlying ROOT based tool.
std::vector< float > m_cutminEp_photonsConverted
cut min on E/p for e-ID
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::vector< float > m_wtot_photonsConverted
Cut on total width in strips for photons.
bool m_caloOnly
Flag for calo only cut-base.
std::vector< float > m_cutBinEnergy_photonsConverted
range of ET bins for photon-ID
std::vector< float > m_Rphi33_photonsNonConverted
ratio E233/E237
std::vector< float > m_Reta37_photonsNonConverted
ratio E237/E277
std::vector< float > m_fracm_photonsNonConverted
Cut on fraction of energy outside core for photons.
StatusCode initialize()
Initialize this class.
std::string m_WorkingPoint
Working Point.
@ wtots1
shower width is determined in a window detaxdphi = 0,0625 ×~0,2, corresponding typically to 20 strips...
std::vector< float > m_Reta37_photonsConverted
ratio E237/E277
unsigned int calcIsEm(float eta2, double et, float Rhad1, float Rhad, float e277, float Reta, float Rphi, float weta2c, float f1, float Eratio, float DeltaE, float weta1c, float wtot, float fracm, float f3, double ep, bool isConversion, float mu) const
std::vector< float > m_cutBinEtaStrips_photonsConverted
binning in eta in strips for photons
virtual void setOwner(IDataHandleHolder *o)=0
const unsigned int EgPidUndefined
std::vector< float > m_DEmaxs1_photonsNonConverted
cut on (Emax1-Emax2)/(Emax1-Emax2) for photons
@ f3
fraction of energy reconstructed in 3rd sampling
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Description of a calorimeter cluster.
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
std::vector< float > m_cutHadLeakage_photonsNonConverted
Cut on hadronic leakage for photons.
@ f1
E1/E = fraction of energy reconstructed in the first sampling, where E1 is energy in all strips belon...
bool m_useF3core
use f3core or f3 (default: use f3)
std::vector< float > m_cutF3_photonsConverted
cut values for cut on f3 or f3core
virtual asg::AcceptData accept(const xAOD::IParticle *part) const
Accept with generic interface.
std::vector< float > m_deltae_photonsConverted
Cut on Demax2 for photons.
std::vector< float > m_cutBinEtaStrips_photonsNonConverted
binning in eta in strips for photons
const uint16_t AuthorAmbiguous
Object Reconstructed by standard cluster-based algorithm.
::StatusCode StatusCode
StatusCode definition for legacy code.
const unsigned int PhotonLooseEF
TrigEgamma Pid Definitions.
std::vector< float > m_cutBinEnergyStrips_photonsConverted
Amg::Vector3D momentumAtVertex(const xAOD::Photon *, bool debug=false)
return the momentum at the vertex (which can be 0)
MsgStream & msg() const
The standard message stream.
@ AmbiguityResolution_Photon
ambiguity resolution for photon (vs electron)
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
std::vector< float > m_cutBinMu_photonsConverted
range of mu bins for photon-ID
std::vector< float > m_wtot_photonsNonConverted
Cut on total width in strips for photons.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
std::vector< float > m_cutBinEta_photonsConverted
range of eta bins for photon-ID
virtual void renounce()=0
@ ClusterEtaRange_Photon
cluster eta range
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
std::vector< float > m_f1_photonsNonConverted
Cut on fraction of energy rec.
unsigned int m_isEMMask
which subset of cuts to apply
std::vector< float > m_weta2_photonsNonConverted
Cut on width in 2nd sampling for photons.
std::string m_configFile
Config File.
std::vector< float > m_cutBinEnergy_photonsNonConverted
range of ET bins for photon-ID
std::vector< float > m_weta2_photonsConverted
Cut on width in 2nd sampling for photons.
asg::AcceptData accept(float eta2, double et, float Rhad1, float Rhad, float e277, float Reta, float Rphi, float weta2c, float f1, float Eratio, float DeltaE, float weta1c, float wtot, float fracm, float f3, double ep, bool isConversion, float mu)
The main accept method: the actual cuts are applied here.
Photon_v1 Photon
Definition of the current "egamma version".
int RunNumber(const EventContext &ctx) const
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
std::vector< float > m_cutBinMu_photonsNonConverted
range of mu bins for photon-ID
const unsigned int PhotonMedium
Medium photon selection.
std::vector< float > m_cutmaxEp_photonsConverted
cut max on E/p for e-ID
const std::map< std::string, std::string > PhotonCutPointToConfFile
const unsigned int PhotonMediumEF
Medium photon selection for online EF.
#define ATH_MSG_WARNING(x)
std::vector< float > m_w1_photonsConverted
Cut on width in 3 strips for photons.
virtual StatusCode execute(const EventContext &ctx, const xAOD::Egamma *eg, unsigned int &isEM) const
The basic isem.
SG::ReadHandleKey< xAOD::EventInfo > m_EvtInfoKey
std::vector< float > m_w1_photonsNonConverted
Cut on width in 3 strips for photons.
const asg::AcceptInfo & getAcceptInfo() const
accesss to the accept info object
std::vector< float > m_fracm_photonsConverted
Cut on fraction of energy outside core for photons.
unsigned int findMask(const std::string &input, const std::map< std::string, unsigned int > &maskmap)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
@ e277
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
std::vector< float > m_e277_photonsConverted
Cut in E277 for photons.
@ weta1
shower width using +/-3 strips around the one with the maximal energy deposit: w3 strips = sqrt{sum(E...
@ Eratio
(emaxs1-e2tsts1)/(emaxs1+e2tsts1)
bool m_removeTRTConversion
std::vector< float > HelperFloat(const std::string &input, TEnv &env)
@ f3core
E3(3x3)/E fraction of the energy reconstructed in the third compartment of the electromagnetic calori...
std::vector< float > m_cutF3_photonsNonConverted
cut values for cut on f3 or f3core
std::vector< float > m_Rphi33_photonsConverted
ratio E233/E237
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
asg::AcceptData fillAccept(unsigned int isEM) const
virtual double e() const
The total energy of the particle.
std::vector< float > m_cutHadLeakage_photonsConverted
Cut on hadronic leakage for photons.
float getMu(const EventContext &ctx) const
@ fracs1
shower shape in the shower core : [E(+/-3)-E(+/-1)]/E(+/-1), where E(+/-n) is the energy in ± n strip...
std::vector< float > m_DEmaxs1_photonsConverted
cut on (Emax1-Emax2)/(Emax1-Emax2) for photons
@ weta2
the lateral width is calculated with a window of 3x5 cells using the energy weighted sum over all cel...
std::string findConfigFile(const std::string &input, const std::map< std::string, std::string > &configmap)