|
ATLAS Offline Software
|
#include <TrigEgammaEmulationFastCaloHypoTool.h>
|
| TrigEgammaEmulationFastCaloHypoTool (const std::string &myname) |
|
| ~TrigEgammaEmulationFastCaloHypoTool ()=default |
|
virtual bool | emulate (const Trig::TrigData &input, bool &pass) const override |
| ========================================================================== More...
|
|
virtual StatusCode | initialize () override |
| ========================================================================== More...
|
|
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 |
|
|
Gaudi::Property< bool > | m_acceptAll { this, "AcceptAll", false , "Accept all" } |
|
Gaudi::Property< bool > | m_useRinger { this, "UseRinger", false , "Use Ringer Selection" } |
|
Gaudi::Property< std::string > | m_pidName {this,"PidName", "", "Pid name"} |
|
Gaudi::Property< float > | m_emEtCut {this,"EtCut", 0.0, "Et threshold"} |
|
Gaudi::Property< std::vector< float > > | m_etabin { this, "EtaBins", {} , "Bins of eta" } |
| selection variable for L2 calo selection:eta bins More...
|
|
Gaudi::Property< std::vector< float > > | m_eTthr { this, "ETthr", {}, "ET Threshold" } |
|
Gaudi::Property< std::vector< float > > | m_eT2thr { this, "ET2thr", {}, "Second layer ET threshold" } |
|
Gaudi::Property< std::vector< float > > | m_hadeTthr { this, "HADETthr", {}, "" } |
|
Gaudi::Property< std::vector< float > > | m_hadeT2thr { this, "HADET2thr", {}, "" } |
|
Gaudi::Property< std::vector< float > > | m_carcorethr { this, "CARCOREthr", {}, "" } |
|
Gaudi::Property< std::vector< float > > | m_caeratiothr { this, "CAERATIOthr", {}, "" } |
|
Gaudi::Property< std::vector< float > > | m_F1thr { this, "F1thr", {}, "" } |
|
Gaudi::Property< std::vector< float > > | m_WETA2thr { this, "WETA2thr", {}, "" } |
|
Gaudi::Property< std::vector< float > > | m_WSTOTthr { this, "WSTOTthr", {}, "" } |
|
Gaudi::Property< std::vector< float > > | m_F3thr { this, "F3thr", {}, "" } |
|
Gaudi::Property< float > | m_detacluster { this, "dETACLUSTERthr", 0. , "" } |
|
Gaudi::Property< float > | m_dphicluster { this, "dPHICLUSTERthr", 0. , "" } |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
◆ StoreGateSvc_t
◆ TrigEgammaEmulationFastCaloHypoTool()
TrigEgammaEmulationFastCaloHypoTool::TrigEgammaEmulationFastCaloHypoTool |
( |
const std::string & |
myname | ) |
|
◆ ~TrigEgammaEmulationFastCaloHypoTool()
Trig::TrigEgammaEmulationFastCaloHypoTool::~TrigEgammaEmulationFastCaloHypoTool |
( |
| ) |
|
|
default |
◆ avgmu()
float TrigEgammaEmulationBaseHypoTool::avgmu |
( |
| ) |
const |
|
protectedinherited |
◆ decide()
==========================================================================
Definition at line 49 of file TrigEgammaEmulationFastCaloHypoTool.cxx.
54 float rCore, F1, F3, Weta2, Wstot, hadET_T2Calo, energyRatio = -1;
58 PassedCuts = PassedCuts + 1;
62 ATH_MSG_DEBUG(
"AcceptAll property is set: taking all events" );
65 ATH_MSG_DEBUG(
"AcceptAll property not set: applying selection" );
69 if ( std::abs( roiDescriptor->
eta() ) > 2.6 ) {
70 ATH_MSG_DEBUG(
"REJECT The cluster had eta coordinates beyond the EM fiducial volume : " << roiDescriptor->
eta() <<
"; stop the chain now" );
76 <<
": Eta = " << roiDescriptor->
eta()
77 <<
", Phi = " << roiDescriptor->
phi() );
80 float etaRef = roiDescriptor->
eta();
81 float phiRef = roiDescriptor->
phi();
83 if ( std::abs( phiRef ) >
M_PI ) phiRef -= 2*
M_PI;
85 auto pClus =
input.emCluster;
86 float absEta = std::abs( pClus->eta() );
92 float dEta = pClus->eta() - etaRef;
95 float dPhi = std::abs( pClus->phi() - phiRef );
99 if ( pClus->emaxs1() + pClus->e2tsts1() > 0 )
100 energyRatio = ( pClus->emaxs1() - pClus->e2tsts1() ) / ( pClus->emaxs1() + pClus->e2tsts1() );
103 if ( pClus->e277()!= 0. ) rCore = pClus->e237() / pClus->e277();
107 float eT_T2Calo = pClus->et();
108 if ( eT_T2Calo!=0 && pClus->eta()!=0 ) hadET_T2Calo = pClus->ehad1()/cosh( fabs( pClus->eta() ) )/eT_T2Calo;
111 Weta2 = pClus->weta2();
114 Wstot = pClus->wstot();
122 F3 = std::abs( eallsamples )>0. ?
e3/eallsamples : 0.;
126 <<
" roi eta=" << etaRef <<
" DeltaEta=" <<
dEta
133 PassedCuts = PassedCuts + 1;
137 <<
" roi phi="<< phiRef <<
" DeltaPhi="<<
dPhi
144 PassedCuts = PassedCuts + 1;
147 if ( cutIndex == -1 ) {
154 PassedCuts = PassedCuts + 1;
163 PassedCuts = PassedCuts + 1;
167 if ( inCrack || F1 <
m_F1thr[0] ) {
168 ATH_MSG_DEBUG (
"TrigEMCluster: InCrack= " << inCrack <<
" F1=" << F1 );
176 PassedCuts = PassedCuts + 1;
177 if( inCrack ) energyRatio = -1;
181 if ( eT_T2Calo <
m_eTthr[cutIndex] ) {
185 PassedCuts = PassedCuts + 1;
187 float hadET_cut = 0.0;
189 if ( eT_T2Calo >
m_eT2thr[cutIndex] ) {
199 ATH_MSG_DEBUG (
"TrigEMCluster: ET_had=" << hadET_T2Calo <<
" cut: <" << hadET_cut );
200 if ( hadET_T2Calo > hadET_cut ) {
204 PassedCuts = PassedCuts + 1;
208 PassedCuts = PassedCuts + 1;
216 PassedCuts = PassedCuts + 1;
224 PassedCuts = PassedCuts + 1;
228 if ( F3 >
m_F3thr[cutIndex] ) {
232 PassedCuts = PassedCuts + 1;
◆ decide_ringer()
◆ 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()
◆ emulate()
bool TrigEgammaEmulationFastCaloHypoTool::emulate |
( |
const Trig::TrigData & |
input, |
|
|
bool & |
pass |
|
) |
| const |
|
overridevirtual |
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ 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
◆ findCutIndex()
int TrigEgammaEmulationFastCaloHypoTool::findCutIndex |
( |
float |
eta | ) |
const |
|
private |
==========================================================================
Definition at line 283 of file TrigEgammaEmulationFastCaloHypoTool.cxx.
285 const float absEta = std::abs(eta);
286 auto binIterator = std::adjacent_find(
m_etabin.begin(),
m_etabin.end(), [=](
float left,
float right){ return left < absEta and absEta < right; } );
287 if ( binIterator ==
m_etabin.end() ) {
290 return binIterator -
m_etabin.begin();
◆ 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
◆ 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
◆ getProperty()
template<class T >
const T* asg::AsgTool::getProperty |
( |
const std::string & |
name | ) |
const |
|
inherited |
Get one of the tool's properties.
◆ initialize()
StatusCode TrigEgammaEmulationFastCaloHypoTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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()
◆ 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_acceptAll
Gaudi::Property< bool > Trig::TrigEgammaEmulationFastCaloHypoTool::m_acceptAll { this, "AcceptAll", false , "Accept all" } |
|
private |
◆ m_caeratiothr
Gaudi::Property< std::vector<float> > Trig::TrigEgammaEmulationFastCaloHypoTool::m_caeratiothr { this, "CAERATIOthr", {}, "" } |
|
private |
◆ m_carcorethr
Gaudi::Property< std::vector<float> > Trig::TrigEgammaEmulationFastCaloHypoTool::m_carcorethr { this, "CARCOREthr", {}, "" } |
|
private |
◆ m_detacluster
Gaudi::Property< float > Trig::TrigEgammaEmulationFastCaloHypoTool::m_detacluster { this, "dETACLUSTERthr", 0. , "" } |
|
private |
◆ m_detStore
◆ m_dphicluster
Gaudi::Property< float > Trig::TrigEgammaEmulationFastCaloHypoTool::m_dphicluster { this, "dPHICLUSTERthr", 0. , "" } |
|
private |
◆ m_emEtCut
Gaudi::Property<float> Trig::TrigEgammaEmulationFastCaloHypoTool::m_emEtCut {this,"EtCut", 0.0, "Et threshold"} |
|
private |
◆ m_eT2thr
Gaudi::Property< std::vector<float> > Trig::TrigEgammaEmulationFastCaloHypoTool::m_eT2thr { this, "ET2thr", {}, "Second layer ET threshold" } |
|
private |
◆ m_etabin
Gaudi::Property< std::vector<float> > Trig::TrigEgammaEmulationFastCaloHypoTool::m_etabin { this, "EtaBins", {} , "Bins of eta" } |
|
private |
◆ m_eTthr
Gaudi::Property< std::vector<float> > Trig::TrigEgammaEmulationFastCaloHypoTool::m_eTthr { this, "ETthr", {}, "ET Threshold" } |
|
private |
◆ m_evtStore
◆ m_F1thr
Gaudi::Property< std::vector<float> > Trig::TrigEgammaEmulationFastCaloHypoTool::m_F1thr { this, "F1thr", {}, "" } |
|
private |
◆ m_F3thr
Gaudi::Property< std::vector<float> > Trig::TrigEgammaEmulationFastCaloHypoTool::m_F3thr { this, "F3thr", {}, "" } |
|
private |
◆ m_hadeT2thr
Gaudi::Property< std::vector<float> > Trig::TrigEgammaEmulationFastCaloHypoTool::m_hadeT2thr { this, "HADET2thr", {}, "" } |
|
private |
◆ m_hadeTthr
Gaudi::Property< std::vector<float> > Trig::TrigEgammaEmulationFastCaloHypoTool::m_hadeTthr { this, "HADETthr", {}, "" } |
|
private |
◆ m_lumiBlockMuTool
ToolHandle<ILumiBlockMuTool> Trig::TrigEgammaEmulationBaseHypoTool::m_lumiBlockMuTool |
|
protectedinherited |
◆ m_pidName
Gaudi::Property<std::string> Trig::TrigEgammaEmulationFastCaloHypoTool::m_pidName {this,"PidName", "", "Pid name"} |
|
private |
◆ m_trigdec
◆ m_useRinger
Gaudi::Property< bool > Trig::TrigEgammaEmulationFastCaloHypoTool::m_useRinger { this, "UseRinger", false , "Use Ringer Selection" } |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_WETA2thr
Gaudi::Property< std::vector<float> > Trig::TrigEgammaEmulationFastCaloHypoTool::m_WETA2thr { this, "WETA2thr", {}, "" } |
|
private |
◆ m_WSTOTthr
Gaudi::Property< std::vector<float> > Trig::TrigEgammaEmulationFastCaloHypoTool::m_WSTOTthr { this, "WSTOTthr", {}, "" } |
|
private |
The documentation for this class was generated from the following files:
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
virtual unsigned int roiId() const override final
these quantities probably don't need to be used any more
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
virtual double phi() const override final
Methods to retrieve data members.
bool absEta(const xAOD::TauJet &tau, double &out)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual double eta() const override final
double e0(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in pre-sampler
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>