6#include <boost/algorithm/string.hpp>
39 return StatusCode::SUCCESS;
43 double deta = fabs(eta1 - eta2);
44 double dphi = fabs(phi1 - phi2) < TMath::Pi() ? fabs(phi1 - phi2) : 2*TMath:: \
45 Pi() - fabs(phi1 - phi2);
46 return sqrt(deta*deta + dphi*dphi);
74 for(
const auto el : *cont){
86 if(dRMax <
m_dR)
return elEF;
97 for(
const auto ph : *cont){
109 if(dRMax <
m_dR)
return phEF;
130 for(
const auto& feat :
vec){
132 if(cont ==
nullptr) {
136 for(
const auto el : *cont){
141 deltaR =
dR(eg->eta(),eg->phi(), el->eta(),el->phi());
149 std::string key =
"egamma_Photons";
150 if(boost::contains(trigger,
"icaloloose") || boost::contains(trigger,
"icalovloose") || boost::contains(trigger,
"icalotight")) key =
"egamma_Iso_Photons";
159 for(
const auto& feat :
vec){
161 if(cont ==
nullptr) {
165 for(
const auto ph : *cont){
185 std::string key =
"egamma_Photons";
186 if(boost::contains(trigger,
"iloose") || boost::contains(trigger,
"ivloose") || boost::contains(trigger,
"itight")) key =
"egamma_Iso_Photons";
197 for(
auto feat :
vec){
199 if(cont ==
nullptr) {
204 for(
const auto ph : *cont){
209 deltaR =
dR(eg->eta(),eg->phi(), ph->eta(),ph->phi());
211 finalFC = (feat.te());
232 for(
auto feat :
vec){
234 if(cont ==
nullptr) {
239 for(
const auto el : *cont){
244 deltaR =
dR(eg->eta(),eg->phi(), el->eta(),el->phi());
246 finalFC = (feat.te());
252 ATH_MSG_DEBUG(
"Reached the end in matchHLTElectron. So didn't match!");
268 for(
auto feat :
vec){
270 if(cont ==
nullptr) {
275 for(
const auto clus : *cont){
276 if(clus ==
nullptr) {
280 deltaR =
dR(eg->eta(),eg->phi(), clus->eta(),clus->phi());
282 finalFC = (feat.te());
303 for(
auto feat :
vec){
305 if(cont ==
nullptr) {
310 for(
const auto l2 : *cont){
315 deltaR =
dR(eg->eta(),eg->phi(), l2->eta(),l2->phi());
317 finalFC = (feat.te());
336 for(
auto feat :
vec){
338 if(cont ==
nullptr) {
343 for(
const auto l2 : *cont){
348 deltaR =
dR(eg->eta(),eg->phi(), l2->eta(),l2->phi());
350 finalFC = (feat.te());
363 ATH_MSG_DEBUG(
"No matching for TrigEMCluster in AnalysisBase");
369 for(
auto feat :
vec){
379 finalFC = (feat.te());
397 if ( initRois.size() < 1 )
return false;
398 for (
auto initRoi: initRois) {
405 deltaR =
dR(eg->eta(),eg->phi(), l1->eta(),l1->phi());
408 finalFC = (itEmTau.te());
479 if(
matchL1(eg,trigger,finalFC) )
return true;
489 if(
match(eg,trigger,finalFC) ){
490 if( finalFC ==
nullptr)
return false;
Scalar deltaR(const MatrixBase< Derived > &vec) const
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
std::vector< size_t > vec
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
size_type size() const noexcept
Returns the number of elements in the collection.
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
const std::vector< Trig::Feature< T > > get(const std::string &label="", unsigned int condition=TrigDefs::Physics, const std::string &teName="") const
returns flattened vector of Features of given type This method is in fact sullied by 3 arguments.
std::vector< Feature< CONTAINER > > containerFeature(const std::string &label="", unsigned int condition=TrigDefs::Physics, const std::string &teName="") const
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
const xAOD::TrackParticle * trackParticle(size_t index=0) const
Pointer to the xAOD::TrackParticle/s that match the electron candidate.
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
float et() const
get Et (calibrated)
float eta() const
get Eta (calibrated)
float phi() const
get Phi (calibrated)
static const unsigned int alsoDeactivateTEs
The common trigger namespace for trigger analysis tools.
@ Photon
The object is a photon.
@ Electron
The object is an electron.
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
TrigElectronContainer_v1 TrigElectronContainer
Declare the latest version of the container.
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
TrigPhotonContainer_v1 TrigPhotonContainer
Declare the latest version of the container.
Egamma_v1 Egamma
Definition of the current "egamma version".
TrigEMCluster_v1 TrigEMCluster
Define the latest version of the trigger EM cluster class.
Photon_v1 Photon
Definition of the current "egamma version".
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
Electron_v1 Electron
Definition of the current "egamma version".