![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
11 m_trigdec(
"Trig::TrigDecisionTool/TrigDecisionTool"),
12 m_matchTool(
"Trig::TrigEgammaMatchingToolMT/TrigEgammaMatchingToolMT")
34 std::vector<std::string>
steps = {
"L1Calo",
"L2Calo",
"L2",
"EFCalo",
"EFTrack",
"HLT"};
40 return StatusCode::SUCCESS;
51 const auto& ctx = Gaudi::Hive::currentContext() ;
52 if (pidname ==
"tight"){
55 else if (pidname ==
"medium"){
58 else if (pidname ==
"loose"){
61 else if (pidname ==
"lhtight"){
64 else if (pidname ==
"lhmedium"){
67 else if (pidname ==
"lhloose"){
70 else if (pidname ==
"lhvloose"){
73 else if (pidname ==
"dnntight"){
76 else if (pidname ==
"dnnmedium"){
79 else if (pidname ==
"dnnloose"){
93 const auto& ctx = Gaudi::Hive::currentContext() ;
94 if (pidname ==
"tight"){
97 else if (pidname ==
"medium"){
100 else if (pidname ==
"loose"){
117 ATH_MSG_DEBUG(
"Electron doesn't provide isolation for ptcone20");
120 if (!(fabs(
eg->pt()) > 0)) {
121 ATH_MSG_DEBUG(
"Electron pt is zero, can't calculate relative isolation");
127 if (isolation ==
"loose"){
128 if (ptcone20_rel > 0.1) {
137 ATH_MSG_DEBUG(
"No valid working point defined for " << isolation <<
" continue without isolation");
146 bool efprescale=
false;
147 bool l1prescale=
false;
150 std::string l1item=
"";
152 if(
trigger.starts_with(
"L1" ))
154 if(
trigger.starts_with(
"HLT")){
156 const unsigned int bit=
tdt()->isPassedBits(
trigger);
157 efprescale=bit & TrigDefs::EF_prescaled;
158 rerun=bit&TrigDefs::EF_resurrected;
163 const unsigned int l1bit=
tdt()->isPassedBits(l1item);
164 bool l1_afterpre=l1bit&TrigDefs::L1_isPassedAfterPrescale;
165 bool l1_beforepre=l1bit&TrigDefs::L1_isPassedBeforePrescale;
166 l1prescale=l1_beforepre && !l1_afterpre;
167 prescale=efprescale || l1prescale;
168 ATH_MSG_DEBUG(
"L1 prescale " << l1item <<
" " << l1prescale <<
" before " << l1_beforepre <<
" after " << l1_afterpre);
170 if(rerun)
return false;
171 if(prescale)
return true;
181 unsigned int condition=TrigDefs::includeFailedDecisions;
185 bool passedL1Calo=
false;
186 bool passedL2Calo=
false;
187 bool passedEFCalo=
false;
189 bool passedEFTrk=
false;
205 if(
info.signature ==
"Electron"){
206 std::string
key =
match()->key(
"FastElectrons");
209 }
else if(
info.signature ==
"Photon"){
216 std::string
key =
match()->key(
"PrecisionCalo_Electron");
217 if(
info.signature ==
"Photon")
key =
match()->key(
"PrecisionCalo_Photon");
229 if(
info.signature ==
"Electron"){
233 std::string
key =
match()->key(
"Electrons_GSF");
239 }
else if(
info.signature ==
"Photon"){
274 float dphi = fabs(phi1 - phi2) < TMath::Pi() ? fabs(phi1 - phi2) : 2*TMath:: \
275 Pi() - fabs(phi1 - phi2);
276 return sqrt(deta*deta + dphi*dphi);
283 if(
eg && (
eg->caloCluster())){
285 return fabs(cluster->
etaBE(2));
292 if(
eg && (
eg->caloCluster()) && (
eg->trackParticle())){
295 float eta = fabs(trk->
eta());
296 return clus->
e()/cosh(
eta);
303 if(
eg && (
eg->caloCluster())){
306 return cluster->
e()/cosh(
eta2);
318 float den = emax+emax2;
320 if (fabs(den) < 1
e-6)
return -99.;
322 float val = (emax-emax2)/(den);
330 if(
eg &&
eg->trackParticle()){
335 if (fabs(trtHits) < 1
e-6) {
339 return ( (
double)trtHTHits / (
double)trtHits );
351 float vard0 =
t->definingParametersCovMatrix()(0,0);
353 d0sigma=sqrtf(vard0);
367 float vard0 =
t->definingParametersCovMatrix()(0,0);
369 d0sigma=sqrtf(vard0);
373 if (fabs(d0sigma) < 1
e-6)
return -99.;
374 return t->d0()/d0sigma;
381 if(
eg && (
eg->caloCluster())){
390 if(
eg && (
eg->caloCluster())){
399 if(
eg && (
eg->caloCluster())){
408 if(
eg && (
eg->caloCluster())){
417 if(
eg && (
eg->caloCluster())){
422 return (ebe1+ebe2+ebe3);
429 if(
eg && (
eg->caloCluster())){
435 float eacc = ebe1+ebe2+ebe3;
436 if(eacc==0.)
return 0.;
444 #define GETTER(_name_) float TrigEgammaMonitorBaseAlgorithm::getShowerShape_##_name_(const xAOD::Egamma* eg) const \
446 eg->showerShapeValue(val,xAOD::EgammaParameters::_name_); \
474 #define GETTER(_name_) float TrigEgammaMonitorBaseAlgorithm::getIsolation_##_name_(const xAOD::Electron* eg) const\
476 eg->isolationValue(val,xAOD::Iso::_name_); \
487 #define GETTER(_name_) float TrigEgammaMonitorBaseAlgorithm::getIsolation_##_name_(const xAOD::Egamma* eg) const\
489 eg->isolationValue(val,xAOD::Iso::_name_); \
502 #define GETTER(_name_) float TrigEgammaMonitorBaseAlgorithm::getCluster_##_name_(const xAOD::Egamma* eg) const\
503 { if(eg && eg->caloCluster()) \
504 return eg->caloCluster()->_name_(); \
513 #define GETTER(_name_) float TrigEgammaMonitorBaseAlgorithm::getTrack_##_name_(const xAOD::Electron* eg) const\
514 { if(eg && eg->trackParticle()) \
515 return eg->trackParticle()->_name_(); \
526 #define GETTER(_name_) float TrigEgammaMonitorBaseAlgorithm::getTrackSummary_##_name_(const xAOD::Electron* eg) const \
527 { uint8_t val_uint8{0}; \
529 eg->trackParticleSummaryValue(val_uint8,xAOD::_name_); \
530 return val_uint8; } \
549 #define GETTER(_name_) float TrigEgammaMonitorBaseAlgorithm::getTrackSummaryFloat_##_name_(const xAOD::Electron* eg) const\
550 { float val_float{0}; \
552 eg->trackParticleSummaryValue(val_float,xAOD::_name_); \
553 return val_float; } \
562 #define GETTER(_name_) float TrigEgammaMonitorBaseAlgorithm::getCaloTrackMatch_##_name_(const xAOD::Electron* eg) const\
563 { float val={-99.}; \
565 eg->trackCaloMatchValue(val,xAOD::EgammaParameters::_name_);} \
617 std::map<std::string, std::string> pidMap = { {
"vloose" ,
"loose" },
618 {
"loose" ,
"loose" },
619 {
"medium" ,
"medium" },
620 {
"tight" ,
"tight" },
621 {
"loose1" ,
"loose" },
622 {
"medium1" ,
"medium" },
623 {
"tight1" ,
"tight" },
624 {
"lhvloose" ,
"lhvloose" },
625 {
"lhloose" ,
"lhloose" },
626 {
"lhmedium" ,
"lhmedium" },
627 {
"lhtight" ,
"lhtight" },
628 {
"dnnloose" ,
"dnnloose" },
629 {
"dnnmedium",
"dnnmedium"},
630 {
"dnntight" ,
"dnntight" } };
632 std::vector<std::string> isoNames = {
"ivarloose",
"ivarmedium",
"ivartight",
"icaloloose",
"icalomedium",
"icalotight"};
639 bool isolated =
false;
641 std::string isolation=
"";
645 std::string signature =
"";
651 std::vector<std::string>
parts;
657 signature =
"Electron";
660 signature =
"Photon";
667 if(
parts.at(1) ==
"idperf"){
671 else if(
parts.at(1)==
"etcut"){
677 pidname = pidMap.at(
parts.at(1));
686 for(
auto& iso : isoNames){
688 isolation=iso; isolated=
true;
break;
693 std::string str_thr =
parts.at(0);
694 str_thr.erase( 0, 1);
702 ATH_MSG_DEBUG(
"=================== Chain Parser =======================");
714 ATH_MSG_DEBUG(
"L1Seed : " << l1seed <<
" (Is Legacy? " << (l1legacy?
"Yes":
"No") <<
")");
715 ATH_MSG_DEBUG(
"========================================================");
717 TrigInfo info{l1legacy,l1seed,
trigger,signature,
threshold,pidname,idperf,etcut,nogsf,lrt,ion,isolation,isolated};
725 std::vector<std::string>
parts;
728 std::string l1seed =
parts.back();
734 return m_trigdec->ExperimentalAndExpertMethods().isHLTTruncated();
743 #include "GaudiKernel/ParsersFactory.h"
756 #include "GaudiKernel/ToStream.h"
763 for (
const auto& dict : vecDict ) {
float getDEmaxs1(const xAOD::Egamma *eg) const
ToolHandleArray< IAsgPhotonIsEMSelector > m_photonIsEMTool
Offline isEM Photon Selectors.
bool isIsolated(const xAOD::Electron *, const std::string &) const
Check if electron fulfils isolation criteria.
float getEnergyBE1(const xAOD::Egamma *eg) const
float dR(const float, const float, const float, const float) const
Get delta R.
Extra patterns decribing particle interation process.
@ deltaPhi0
difference between the cluster phi (presampler) and the eta of the track extrapolated to the presampl...
@ topoetcone20
Topo-cluster ET-sum.
@ ptvarcone20
Mini-Isolation http://arxiv.org/abs/1007.2221.
@ eProbabilityComb
Electron probability from combining the below probabilities [float].
@ deltaPhi3
difference between the cluster eta (3rd sampling) and the eta of the track extrapolated to the 3rd sa...
StatusCode parse(std::tuple< Tup... > &tup, const Gaudi::Parsers::InputData &input)
Scalar phi() const
phi method
ToolHandle< Trig::TrigDecisionTool > m_trigdec
Trigger decision tool.
float getEt(const xAOD::Electron *eg) const
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
@ numberOfTRTXenonHits
number of TRT hits on track in straws with xenon [unit8_t].
bool ApplyPhotonPid(const xAOD::Photon *eg, const std::string &) const
Get offline electron decision.
@ deltaEta0
difference between the cluster eta (presampler) and the eta of the track extrapolated to the presampl...
@ deltaEta2
difference between the cluster eta (second sampling) and the eta of the track extrapolated to the sec...
@ ptcone20
Track isolation.
@ ethad1
transverse energy in the first sampling of the hadronic calorimeters behind the cluster calculated fr...
setEt setPhi setE277 setWeta2 eta1
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
@ expectInnermostPixelLayerHit
Do we expect a 0th-layer barrel hit for this track?
@ deltaPhiRescaled3
difference between the cluster eta (3rd sampling) and the eta of the track extrapolated to the 3rd sa...
@ numberOfTRTHits
number of TRT hits [unit8_t].
const ToolHandle< Trig::TrigDecisionTool > & tdt() const
Get the TDT
float getE0Eaccordion(const xAOD::Egamma *eg) const
@ wtots1
shower width is determined in a window detaxdphi = 0,0625 ×~0,2, corresponding typically to 20 strips...
float getEnergyBE0(const xAOD::Egamma *eg) const
float getEnergyBE3(const xAOD::Egamma *eg) const
@ numberOfTRTHighThresholdHits
number of TRT hits which pass the high threshold (only xenon counted) [unit8_t].
asg::AcceptData setAccept(const TrigCompositeUtils::Decision *, const TrigInfo &) const
Set the accept object for all trigger levels.
@ deltaPhi1
difference between the cluster eta (1st sampling) and the eta of the track extrapolated to the 1st sa...
Base class for Athena Monitoring Algorithms.
@ f3
fraction of energy reconstructed in 3rd sampling
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
bool isHLTTruncated() const
@ numberOfInnermostPixelLayerOutliers
number of 0th layer barrel outliers
@ ethad
ET leakage into hadronic calorimeter with exclusion of energy in CaloSampling::TileGap3.
TrigInfo getTrigInfo(const std::string &) const
Get the trigger info parsed from the chain name (only single lepton triggers)
@ numberOfTRTHighThresholdOutliers
number of TRT high threshold outliers (only xenon counted) [unit8_t].
Description of a calorimeter cluster.
std::map< std::string, TrigInfo > m_trigInfo
creates map of trigger name and TrigInfo struct
Gaudi::Property< std::string > m_defaultProbePidElectron
default probe pid for electron trigitems that don't have pid in their name
void setTrigInfo(const std::string &)
Set the trigger info parsed from the chain name.
@ etcone20
Calorimeter isolation.
::StatusCode StatusCode
StatusCode definition for legacy code.
@ emins1
energy reconstructed in the strip with the minimal value between the first and second maximum
ToolHandle< Trig::TrigEgammaEmulationToolMT > m_emulatorTool
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
@ e011
uncalibrated energy (sum of cells) in presampler in a 1x1 window in cells in eta X phi
@ deltaEta3
difference between the cluster eta (3rd sampling) and the eta of the track extrapolated to the 3rd sa...
@ numberOfPixelOutliers
these are the pixel outliers, including the b-layer [unit8_t].
@ deltaPhiRescaled2
difference between the cluster phi (second sampling) and the phi of the track extrapolated to the sec...
ToolHandleArray< IAsgElectronIsEMSelector > m_electronIsEMTool
Offline isEM Selectors.
@ deltaPhiRescaled0
difference between the cluster phi (presampler) and the eta of the track extrapolated to the presampl...
Class used to describe composite objects in the HLT.
float getEaccordion(const xAOD::Egamma *eg) const
ToolHandleArray< IAsgElectronLikelihoodTool > m_electronLHTool
Offline LH Selectors.
double atof(std::string_view str)
Converts a string into a double / float.
float getEta2(const xAOD::Egamma *eg) const
Features helper.
bool ApplyElectronPid(const xAOD::Electron *eg, const std::string &) const
Get offline electron decision.
float getSigmaD0(const xAOD::Electron *eg) const
@ deltaPhi2
difference between the cluster phi (second sampling) and the phi of the track extrapolated to the sec...
std::ostream & operator<<(std::ostream &lhs, const TestGaudiProperty &rhs)
std::vector< Dict_t > VecDict_t
ToolHandle< TrigEgammaMatchingToolMT > m_matchTool
TrigEgammaMonitorBaseAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
const ToolHandle< TrigEgammaMatchingToolMT > & match() const
Get the e/g match tool.
virtual StatusCode initialize() override
initialize
@ numberOfTRTOutliers
number of TRT outliers [unit8_t].
@ pixeldEdx
the dE/dx estimate, calculated using the pixel clusters [?]
@ deltaPhiRescaled1
difference between the cluster eta (1st sampling) and the eta of the track extrapolated to the 1st sa...
ToolHandleArray< IAsgElectronLikelihoodTool > m_electronDNNTool
Offline DNN Selectors.
float getD0sig(const xAOD::Electron *eg) const
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer)
std::ostream &GAUDI_API toStream(const SG::VarHandleKeyArray &v, std::ostream &o)
Gaudi function used to convert a property to a string.
@ numberOfSCTOutliers
number of SCT outliers [unit8_t].
@ numberOfSCTDeadSensors
number of dead SCT sensors crossed [unit8_t].
float rTRT(const xAOD::Electron *eg) const
float energyBE(const unsigned layer) const
Get the energy in one layer of the EM Calo.
@ eProbabilityHT
Electron probability from High Threshold (HT) information [float].
=============================================================================
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ e277
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
@ weta1
shower width using +/-3 strips around the one with the maximal energy deposit: w3 strips = sqrt{sum(E...
@ e132
uncalibrated energy (sum of cells) in strips in a 3x2 window in cells in eta X phi
@ Eratio
(emaxs1-e2tsts1)/(emaxs1+e2tsts1)
Class describing a TrackParticle.
@ e237
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x7
#define GETTER(_name_)
Macros for plotting.
@ deltaEta1
difference between the cluster eta (first sampling) and the eta of the track extrapolated to the firs...
float getEnergyBE2(const xAOD::Egamma *eg) const
@ f3core
E3(3x3)/E fraction of the energy reconstructed in the third compartment of the electromagnetic calori...
@ e2tsts1
energy of the cell corresponding to second energy maximum in the first sampling
virtual StatusCode initialize() override
initialize
Gaudi::Property< std::string > m_defaultProbePidPhoton
default probe pid for photon trigitems that don't have pid in their name
bool isPrescaled(const std::string &) const
Check if the event is prescaled.
@ emaxs1
energy of strip with maximal energy deposit
virtual double e() const
The total energy of the particle.
virtual ~TrigEgammaMonitorBaseAlgorithm()
std::string getL1Item(const std::string &trigger) const
Creates static map to return L1 item from trigger name.
@ fracs1
shower shape in the shower core : [E(+/-3)-E(+/-1)]/E(+/-1), where E(+/-n) is the energy in ± n strip...
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
int addCut(const std::string &cutName, const std::string &cutDescription)
Add a cut; returning the cut position.
float getEtCluster37(const xAOD::Egamma *eg) const
@ weta2
the lateral width is calculated with a window of 3x5 cells using the energy weighted sum over all cel...