ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
AsgElectronLikelihoodTool Class Reference

Electron selector tool to select objects in Athena using an underlying pure ROOT tool. More...

#include <AsgElectronLikelihoodTool.h>

Inheritance diagram for AsgElectronLikelihoodTool:
Collaboration diagram for AsgElectronLikelihoodTool:

Public Member Functions

virtual StatusCode initialize () override
 Gaudi Service Interface method implementations. More...
 
virtual const asg::AcceptInfogetAcceptInfo () const override
 Method to get the plain AcceptInfo. More...
 
virtual asg::AcceptData accept (const xAOD::IParticle *part) const override final
 The main accept method: using the generic interface. More...
 
virtual asg::AcceptData accept (const EventContext &ctx, const xAOD::IParticle *part) const override final
 
virtual asg::AcceptData accept (const EventContext &ctx, const xAOD::Electron *eg) const override final
 The main accept method: the actual cuts are applied here. More...
 
virtual asg::AcceptData accept (const EventContext &ctx, const xAOD::Egamma *eg) const override final
 The main accept method: the actual cuts are applied here. More...
 
virtual asg::AcceptData accept (const EventContext &ctx, const xAOD::Electron *eg, double mu) const override final
 The main accept method: in case mu not in EventInfo online. More...
 
virtual asg::AcceptData accept (const EventContext &ctx, const xAOD::Egamma *eg, double mu) const override final
 The main accept method: in case mu not in EventInfo online. More...
 
virtual double calculate (const EventContext &ctx, const xAOD::IParticle *part) const override final
 calculate method: for pointer to IParticle More...
 
virtual double calculate (const EventContext &ctx, const xAOD::Electron *eg) const override final
 The main result method: the actual likelihood is calculated here. More...
 
virtual double calculate (const EventContext &ctx, const xAOD::Egamma *eg) const override final
 The main result method: the actual likelihood is calculated here. More...
 
virtual double calculate (const EventContext &ctx, const xAOD::Electron *eg, double mu) const override final
 The main result method: the actual likelihood is calculated here. More...
 
virtual double calculate (const EventContext &ctx, const xAOD::Egamma *eg, double mu) const override final
 The main result method: the actual likelihood is calculated here. More...
 
virtual std::vector< float > calculateMultipleOutputs (const EventContext &ctx, const xAOD::Electron *eg, double mu=-99) const override final
 The result method for multiple outputs: only one output is used so return vector of that output. More...
 
virtual std::string getOperatingPointName () const override final
 Get the name of the current operating point. 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
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

virtual ASG_TOOL_CLASS2(AsgElectronLikelihoodTool, IAsgElectronLikelihoodTool, IAsgSelectionTool) public ~AsgElectronLikelihoodTool ()
 Standard constructor. More...
 
double getIpVariable (double mu, const EventContext &ctx) const
 Get IP variable based on user configuration. More...
 
unsigned int getNPrimVertices (const EventContext &ctx) const
 Get the number of primary vertices. More...
 
double getAverageMu (const EventContext &ctx) const
 Get the average mu. More...
 
double getFcalEt (const EventContext &ctx) const
 Get the FCal ET for centrality determination (for HI collisions) More...
 
bool isForwardElectron (const xAOD::Egamma *eg, const float eta) const
 check for FwdElectron More...
 
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...
 

Private Attributes

std::string m_WorkingPoint
 Working Point. More...
 
std::string m_configFile
 
Root::TElectronLikelihoodToolm_rootTool
 Pointer to the underlying ROOT based tool. More...
 
bool m_usePVCont
 Whether to use the PV (not available for trigger) More...
 
unsigned int m_nPVdefault
 defualt nPV (when not using PVCont) More...
 
bool m_useCaloSumsCont
 Whether or not to use the CaloSums container in HI events. More...
 
double m_fcalEtDefault
 defualt FCal ET (when not using CaloSums container, in HI events) More...
 
std::string m_pdfFileName
 The input ROOT file name that holds the PDFs. More...
 
bool m_caloOnly = false
 Flag for calo only LH. More...
 
bool m_skipDeltaPoverP
 Flag for skip the use of deltaPoverP in LH computation (like at HLT) More...
 
bool m_correctDeltaEta = false
 Flag to toggle the correction of deltaEta1 for the pear shape distortion of the LAr. More...
 
bool m_useAverageMu = false
 
SG::ReadHandleKey< xAOD::HIEventShapeContainerm_HIESContKey
 read handle key to heavy ion container More...
 
SG::ReadHandleKey< xAOD::VertexContainerm_primVtxContKey
 read handle key to primary vertex container More...
 
SG::ReadDecorHandleKey< xAOD::EventInfom_avgMuKey
 read handle key to averager mu More...
 
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
 

Detailed Description

Electron selector tool to select objects in Athena using an underlying pure ROOT tool.

Author
Karsten Koeneke , Jovan Mitrevski
Date
October 2012 @update April 2014, converted to ASGTool by Jovan Mitrevski

Definition at line 27 of file AsgElectronLikelihoodTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ~AsgElectronLikelihoodTool()

AsgElectronLikelihoodTool::~AsgElectronLikelihoodTool ( )
privatevirtual

Standard constructor.

Standard destructor

Definition at line 74 of file AsgElectronLikelihoodTool.cxx.

75 {
76  delete m_rootTool;
77 }

Member Function Documentation

◆ accept() [1/6]

virtual asg::AcceptData AsgElectronLikelihoodTool::accept ( const EventContext &  ctx,
const xAOD::Egamma eg 
) const
inlinefinaloverridevirtual

The main accept method: the actual cuts are applied here.

Implements IAsgElectronLikelihoodTool.

Definition at line 71 of file AsgElectronLikelihoodTool.h.

73  {
74  return accept(ctx, eg, -99); // mu = -99 as input will force accept to grab
75  // the pileup variable from the xAOD object
76  }

◆ accept() [2/6]

asg::AcceptData AsgElectronLikelihoodTool::accept ( const EventContext &  ctx,
const xAOD::Egamma eg,
double  mu 
) const
finaloverridevirtual

The main accept method: in case mu not in EventInfo online.

Implements IAsgElectronLikelihoodTool.

Definition at line 409 of file AsgElectronLikelihoodTool.cxx.

412 {
413  if (!eg) {
414  ATH_MSG_ERROR("Failed, no egamma object.");
415  return m_rootTool->accept();
416  }
417  // Call the main accept if this is not a calo-only LH
418  if (!m_caloOnly) {
419  if (eg->type() == xAOD::Type::Electron) {
420  const xAOD::Electron* el = static_cast<const xAOD::Electron*>(eg);
421  return accept(ctx, el, mu);
422  }
423  ATH_MSG_ERROR("Input is not an electron and not caloOnly is set");
424  return m_rootTool->accept();
425  }
426 
427  // Calo only LH
428  const xAOD::CaloCluster* cluster = eg->caloCluster();
429  if (!cluster) {
430  ATH_MSG_ERROR("Failed, no cluster.");
431  return m_rootTool->accept();
432  }
435  ATH_MSG_ERROR("Failed, cluster is missing samplings EMB2 and EME2");
436  return m_rootTool->accept();
437  }
438 
439  const double energy = cluster->e();
440  const float eta = (cluster->etaBE(2));
441  if (isForwardElectron(eg, eta)) {
443  "Failed, this is a forward electron! The AsgElectronLikelihoodTool is "
444  "only suitable for central electrons!");
445  return m_rootTool->accept();
446  }
447 
448  const double et = (cosh(eta) != 0.) ? energy / cosh(eta) : 0.;
449 
450  // Variables the EFCaloLH ignores
451  uint8_t nSiHitsPlusDeadSensors(0);
452  uint8_t nPixHitsPlusDeadSensors(0);
453  bool passBLayerRequirement(false);
454  uint8_t ambiguityBit(0);
455 
456  // Get the pileup or centrality information
457  double ip = getIpVariable(mu, ctx);
458 
459  // for now don't cache.
460  double likelihood = calculate(ctx, eg, ip);
461 
462  double deltaEta = 0;
463  double deltaPhiRescaled2 = 0;
464  double d0 = 0;
465  float wstot = 0;
466  float EoverP = 0;
467 
468  bool allFound = true;
469  std::string notFoundList = "";
470 
471  // Wstot for use when CutWstotAtHighET vector is filled
472  if (!eg->showerShapeValue(wstot, xAOD::EgammaParameters::wtots1)) {
473  allFound = false;
474  notFoundList += "wtots1 ";
475  }
476 
477  if (!allFound) {
479  "Skipping LH rectangular cuts! The following variables are missing: "
480  << notFoundList);
481  return m_rootTool->accept();
482  }
483 
484  // Get the answer from the underlying ROOT tool
485  return m_rootTool->accept(likelihood,
486  eta,
487  et,
488  nSiHitsPlusDeadSensors,
489  nPixHitsPlusDeadSensors,
491  ambiguityBit,
492  d0,
493  deltaEta,
495  wstot,
496  EoverP,
497  ip);
498 }

◆ accept() [3/6]

virtual asg::AcceptData AsgElectronLikelihoodTool::accept ( const EventContext &  ctx,
const xAOD::Electron eg 
) const
inlinefinaloverridevirtual

The main accept method: the actual cuts are applied here.

Implements IAsgElectronLikelihoodTool.

Definition at line 63 of file AsgElectronLikelihoodTool.h.

65  {
66  return accept(ctx, eg, -99); // mu = -99 as input will force accept to grab
67  // the pileup variable from the xAOD object
68  }

◆ accept() [4/6]

asg::AcceptData AsgElectronLikelihoodTool::accept ( const EventContext &  ctx,
const xAOD::Electron eg,
double  mu 
) const
finaloverridevirtual

The main accept method: in case mu not in EventInfo online.

Implements IAsgElectronLikelihoodTool.

Definition at line 265 of file AsgElectronLikelihoodTool.cxx.

268 {
269  if (!el) {
270  ATH_MSG_ERROR("Failed, no electron object.");
271  return m_rootTool->accept();
272  }
273 
274  const xAOD::CaloCluster* cluster = el->caloCluster();
275  if (!cluster) {
276  ATH_MSG_ERROR("exiting because cluster is NULL " << cluster);
277  return m_rootTool->accept();
278  }
279 
282  ATH_MSG_ERROR("Failed, cluster is missing samplings EMB2 and EME2");
283  return m_rootTool->accept();
284  }
285 
286  const double energy = cluster->e();
287  const float eta = (cluster->etaBE(2));
288 
289  if (isForwardElectron(el, eta)) {
291  "Failed, this is a forward electron! The AsgElectronLikelihoodTool is "
292  "only suitable for central electrons!");
293  return m_rootTool->accept();
294  }
295 
296  double et = 0.;
297  if (el->trackParticle() && !m_caloOnly) {
298  et = (cosh(el->trackParticle()->eta()) != 0.)
299  ? energy / cosh(el->trackParticle()->eta())
300  : 0.;
301  } else
302  et = (cosh(eta) != 0.) ? energy / cosh(eta) : 0.;
303 
304  // number of track hits
305  uint8_t nSiHitsPlusDeadSensors(0);
306  uint8_t nPixHitsPlusDeadSensors(0);
307  bool passBLayerRequirement(false);
308  float d0(0.0);
309  float deltaEta = 0;
310  float deltaPhiRescaled2 = 0;
311  float wstot = 0;
312  float EoverP = 0;
313  uint8_t ambiguityBit(0);
314  double ip(0);
315 
316  bool allFound = true;
317  std::string notFoundList = "";
318 
319  // Wstot for use when CutWstotAtHighET vector is filled
320  if (!el->showerShapeValue(wstot, xAOD::EgammaParameters::wtots1)) {
321  allFound = false;
322  notFoundList += "wtots1 ";
323  }
324 
325  // get the ambiguity type from the decoration
326  if (!m_rootTool->m_cutAmbiguity.empty()) {
327  static const SG::AuxElement::Accessor<uint8_t> ambiguityTypeAcc("ambiguityType");
328  if (ambiguityTypeAcc.isAvailable(*el)) {
329  ambiguityBit = ambiguityTypeAcc(*el);
330  } else {
331  allFound = false;
332  notFoundList += "ambiguityType ";
333  }
334  }
335 
336  if (!m_caloOnly) {
337  // retrieve associated track
338  const xAOD::TrackParticle* t = el->trackParticle();
339  if (t) {
340  nSiHitsPlusDeadSensors =
342  nPixHitsPlusDeadSensors =
345  d0 = t->d0();
346  EoverP = std::abs(t->qOverP()) * energy;
347  } else {
348  ATH_MSG_ERROR("Failed, no track particle. et= " << et << "eta= " << eta);
349  return m_rootTool->accept();
350  }
351 
352  if (!el->trackCaloMatchValue(deltaEta, xAOD::EgammaParameters::deltaEta1)) {
353  allFound = false;
354  notFoundList += "deltaEta1 ";
355  }
356  // correction of deltaEta1 for pear shape distortion
357  else if (m_correctDeltaEta) {
359  "deltaEta1PearDistortion");
360  if (acc.isAvailable(*el)) {
361  deltaEta -= acc(*el);
362  } else {
363  allFound = false;
364  notFoundList += "deltaEta1PearDistortion ";
365  }
366  }
367 
368  if (!el->trackCaloMatchValue(deltaPhiRescaled2,
370  allFound = false;
371  notFoundList += "deltaPhiRescaled2 ";
372  }
373 
374  } // if not calo ONly
375 
376  // Get the number of primary vertices,
377  // avg mu or FCal ET in this event,
378  // depending on user configuration
379  ip = getIpVariable(mu, ctx);
380 
381  // for now don't cache.
382  double likelihood = calculate(ctx, el, ip);
383 
384  if (!allFound) {
386  "Skipping LH rectangular cuts! The following variables are missing: "
387  << notFoundList);
388  return m_rootTool->accept();
389  }
390 
391  // Get the answer from the underlying ROOT tool
392  return m_rootTool->accept(likelihood,
393  eta,
394  et,
395  nSiHitsPlusDeadSensors,
396  nPixHitsPlusDeadSensors,
398  ambiguityBit,
399  d0,
400  deltaEta,
402  wstot,
403  EoverP,
404  ip);
405 }

◆ accept() [5/6]

asg::AcceptData AsgElectronLikelihoodTool::accept ( const EventContext &  ctx,
const xAOD::IParticle part 
) const
finaloverridevirtual

Implements IAsgElectronLikelihoodTool.

Definition at line 875 of file AsgElectronLikelihoodTool.cxx.

877 {
878  if (part->type() == xAOD::Type::Electron) {
879  const xAOD::Electron* el = static_cast<const xAOD::Electron*>(part);
880  return accept(ctx, el);
881  }
882  ATH_MSG_ERROR("Input is not an electron");
883  return m_rootTool->accept();
884 }

◆ accept() [6/6]

asg::AcceptData AsgElectronLikelihoodTool::accept ( const xAOD::IParticle part) const
finaloverridevirtual

The main accept method: using the generic interface.

Implements IAsgElectronLikelihoodTool.

Definition at line 868 of file AsgElectronLikelihoodTool.cxx.

869 {
870  // Backwards compatibility
871  return accept(Gaudi::Hive::currentContext(), part);
872 }

◆ calculate() [1/5]

virtual double AsgElectronLikelihoodTool::calculate ( const EventContext &  ctx,
const xAOD::Egamma eg 
) const
inlinefinaloverridevirtual

The main result method: the actual likelihood is calculated here.

Implements IAsgElectronLikelihoodTool.

Definition at line 102 of file AsgElectronLikelihoodTool.h.

104  {
105  return calculate(
106  ctx, eg, -99); // mu = -99 as input will force accept to grab the pileup
107  // variable from the xAOD object
108  }

◆ calculate() [2/5]

double AsgElectronLikelihoodTool::calculate ( const EventContext &  ctx,
const xAOD::Egamma eg,
double  mu 
) const
finaloverridevirtual

The main result method: the actual likelihood is calculated here.

Implements IAsgElectronLikelihoodTool.

Definition at line 723 of file AsgElectronLikelihoodTool.cxx.

726 {
727  if (!eg) {
728  ATH_MSG_ERROR("Failed, no egamma object.");
729  return -999;
730  }
731 
732  if (!m_caloOnly) {
733  if (eg->type() == xAOD::Type::Electron) {
734  const xAOD::Electron* el = static_cast<const xAOD::Electron*>(eg);
735  return calculate(ctx, el);
736  }
737 
738  ATH_MSG_ERROR("Input is not an electron and not Calo Only is required");
739  return -999;
740  }
741 
742  const xAOD::CaloCluster* cluster = eg->caloCluster();
743  if (!cluster) {
744  ATH_MSG_ERROR("Failed, no cluster.");
745  return -999;
746  }
747 
750  ATH_MSG_ERROR("Failed, cluster is missing samplings EMB2 and EME2");
751  return -999;
752  }
753 
754  const double energy = cluster->e();
755  const float eta = cluster->etaBE(2);
756 
757  if (isForwardElectron(eg, eta)) {
759  "Failed, this is a forward electron! The AsgElectronLikelihoodTool is "
760  "only suitable for central electrons!");
761  return -999;
762  }
763 
764  const double et = (cosh(eta) != 0.) ? energy / cosh(eta) : 0.;
765 
766  // Track variables that the EFCaloLH will not use
767  float d0(0.0);
768  float d0sigma(0.0);
769  double dpOverp(0.0);
770 
771  float deltaEta = 0;
772  float deltaPhiRescaled2 = 0;
773  float TRT_PID(0.0);
774 
775  // Calo Variables
776  float Reta(0);
777  float Rphi(0);
778  float Rhad1(0);
779  float Rhad(0);
780  float w2(0);
781  float f1(0);
782  float Eratio(0);
783  float f3(0);
784 
785  bool allFound = true;
786  std::string notFoundList = "";
787 
788  // reta = e237/e277
789  if (!eg->showerShapeValue(Reta, xAOD::EgammaParameters::Reta)) {
790  allFound = false;
791  notFoundList += "Reta ";
792  }
793  // rphi e233/e237
794  if (!eg->showerShapeValue(Rphi, xAOD::EgammaParameters::Rphi)) {
795  allFound = false;
796  notFoundList += "Rphi ";
797  }
798  // rhad1 = ethad1/et
799  if (!eg->showerShapeValue(Rhad1, xAOD::EgammaParameters::Rhad1)) {
800  allFound = false;
801  notFoundList += "Rhad1 ";
802  }
803  // rhad = ethad/et
804  if (!eg->showerShapeValue(Rhad, xAOD::EgammaParameters::Rhad)) {
805  allFound = false;
806  notFoundList += "Rhad ";
807  }
808  // shower width in 2nd sampling
809  if (!eg->showerShapeValue(w2, xAOD::EgammaParameters::weta2)) {
810  allFound = false;
811  notFoundList += "weta2 ";
812  }
813  // fraction of energy reconstructed in the 1st sampling
814  if (!eg->showerShapeValue(f1, xAOD::EgammaParameters::f1)) {
815  allFound = false;
816  notFoundList += "f1 ";
817  }
818  // E of 2nd max between max and min in strips
819  if (!eg->showerShapeValue(Eratio, xAOD::EgammaParameters::Eratio)) {
820  allFound = false;
821  notFoundList += "Eratio ";
822  }
823  // fraction of energy reconstructed in the 3rd sampling
824  if (!eg->showerShapeValue(f3, xAOD::EgammaParameters::f3)) {
825  allFound = false;
826  notFoundList += "f3 ";
827  }
828 
829  // Get the pileup or centrality information
830  double ip = getIpVariable(mu, ctx);
831 
832  if (!allFound) {
834  "Skipping LH calculation! The following variables are missing: "
835  << notFoundList);
836  return -999;
837  }
838 
839  // Get the answer from the underlying ROOT tool
840  return m_rootTool->calculate(eta,
841  et,
842  f3,
843  Rhad,
844  Rhad1,
845  Reta,
846  w2,
847  f1,
848  Eratio,
849  deltaEta,
850  d0,
851  d0sigma,
852  Rphi,
853  dpOverp,
855  TRT_PID,
856  ip);
857 }

◆ calculate() [3/5]

virtual double AsgElectronLikelihoodTool::calculate ( const EventContext &  ctx,
const xAOD::Electron eg 
) const
inlinefinaloverridevirtual

The main result method: the actual likelihood is calculated here.

Implements IAsgElectronLikelihoodTool.

Definition at line 94 of file AsgElectronLikelihoodTool.h.

96  {
97  return calculate(
98  ctx, eg, -99); // mu = -99 as input will force accept to grab the pileup
99  // variable from the xAOD object
100  }

◆ calculate() [4/5]

double AsgElectronLikelihoodTool::calculate ( const EventContext &  ctx,
const xAOD::Electron eg,
double  mu 
) const
finaloverridevirtual

The main result method: the actual likelihood is calculated here.

Implements IAsgElectronLikelihoodTool.

Definition at line 502 of file AsgElectronLikelihoodTool.cxx.

505 {
506  if (!el) {
507  ATH_MSG_ERROR("Failed, no egamma object.");
508  return -999;
509  }
510  const xAOD::CaloCluster* cluster = el->caloCluster();
511  if (!cluster) {
512  ATH_MSG_ERROR("Failed, no cluster.");
513  return -999;
514  }
517  ATH_MSG_ERROR("Failed, cluster is missing samplings EMB2 and EME2");
518  return -999;
519  }
520 
521  const double energy = cluster->e();
522  const float eta = cluster->etaBE(2);
523 
524  if (isForwardElectron(el, eta)) {
526  "Failed, this is a forward electron! The AsgElectronLikelihoodTool is "
527  "only suitable for central electrons!");
528  return -999;
529  }
530 
531  double et = 0.;
532  if (el->trackParticle() && !m_caloOnly) {
533  et = (cosh(el->trackParticle()->eta()) != 0.)
534  ? energy / cosh(el->trackParticle()->eta())
535  : 0.;
536  } else {
537  et = (cosh(eta) != 0.) ? energy / cosh(eta) : 0.;
538  }
539 
540  // number of track hits and other track quantities
541  float trackqoverp(0.0);
542  float d0(0.0);
543  float d0sigma(0.0);
544  double dpOverp(0.0);
545  float TRT_PID(0.0);
546  double trans_TRT_PID(0.0);
547  float deltaEta = 0;
548  float deltaPhiRescaled2 = 0;
549 
550  bool allFound = true;
551  std::string notFoundList = "";
552 
553  if (!m_caloOnly) {
554  // retrieve associated TrackParticle
555  const xAOD::TrackParticle* t = el->trackParticle();
556  if (t) {
557  trackqoverp = t->qOverP();
558  d0 = t->d0();
559  float vard0 = t->definingParametersCovMatrix()(0, 0);
560  if (vard0 > 0) {
561  d0sigma = sqrtf(vard0);
562  }
563 
564  const static SG::AuxElement::Accessor<float> trans_TRT_PID_acc("transformed_e_probability_ht");
565  if (!trans_TRT_PID_acc.isAvailable(*el)) {
566  // most probable case, need to compute the variable
567 
568  if (!t->summaryValue(TRT_PID, xAOD::eProbabilityHT)) {
569  allFound = false;
570  notFoundList += "eProbabilityHT ";
571  }
572 
573  // Transform the TRT PID output for use in the LH tool.
574  const double tau = 15.0;
575  const double fEpsilon = 1.0e-30; // to avoid zero division
576  double pid_tmp = TRT_PID;
577  if (pid_tmp >= 1.0)
578  pid_tmp = 1.0 - 1.0e-15; // this number comes from TMVA
579  else if (pid_tmp <= fEpsilon)
580  pid_tmp = fEpsilon;
581  trans_TRT_PID = -log(1.0 / pid_tmp - 1.0) * (1. / double(tau));
582  }
583  else
584  {
585  // it means the variable have been already computed by another tool
586  // usually this is the EGammaVariableCorrection, which means that
587  // it is also fudged (only MC)
588  trans_TRT_PID = trans_TRT_PID_acc(*el);
589  }
590 
591  unsigned int index;
592  if (t->indexOfParameterAtPosition(index, xAOD::LastMeasurement)) {
593 
594  double refittedTrack_LMqoverp =
595  t->charge() / sqrt(std::pow(t->parameterPX(index), 2) +
596  std::pow(t->parameterPY(index), 2) +
597  std::pow(t->parameterPZ(index), 2));
598 
599  dpOverp = 1 - trackqoverp / (refittedTrack_LMqoverp);
600  } else if (!m_skipDeltaPoverP) {
601  allFound = false;
602  notFoundList += "deltaPoverP ";
603  }
604 
605  } else {
606  ATH_MSG_ERROR("Failed, no track particle. et= " << et << "eta= " << eta);
607  return -999;
608  }
609  } // if not calo Only
610 
611  float Reta(0);
612  float Rphi(0);
613  float Rhad1(0);
614  float Rhad(0);
615  float w2(0);
616  float f1(0);
617  float Eratio(0);
618  float f3(0);
619 
620  // reta = e237/e277
621  if (!el->showerShapeValue(Reta, xAOD::EgammaParameters::Reta)) {
622  allFound = false;
623  notFoundList += "Reta ";
624  }
625  // rphi e233/e237
626  if (!el->showerShapeValue(Rphi, xAOD::EgammaParameters::Rphi)) {
627  allFound = false;
628  notFoundList += "Rphi ";
629  }
630  // rhad1 = ethad1/et
631  if (!el->showerShapeValue(Rhad1, xAOD::EgammaParameters::Rhad1)) {
632  allFound = false;
633  notFoundList += "Rhad1 ";
634  }
635  // rhad = ethad/et
636  if (!el->showerShapeValue(Rhad, xAOD::EgammaParameters::Rhad)) {
637  allFound = false;
638  notFoundList += "Rhad ";
639  }
640  // shower width in 2nd sampling
641  if (!el->showerShapeValue(w2, xAOD::EgammaParameters::weta2)) {
642  allFound = false;
643  notFoundList += "weta2 ";
644  }
645  // fraction of energy reconstructed in the 1st sampling
646  if (!el->showerShapeValue(f1, xAOD::EgammaParameters::f1)) {
647  allFound = false;
648  notFoundList += "f1 ";
649  }
650  // E of 2nd max between max and min in strips
651  if (!el->showerShapeValue(Eratio, xAOD::EgammaParameters::Eratio)) {
652  allFound = false;
653  notFoundList += "Eratio ";
654  }
655  // fraction of energy reconstructed in the 3rd sampling
656  if (!el->showerShapeValue(f3, xAOD::EgammaParameters::f3)) {
657  allFound = false;
658  notFoundList += "f3 ";
659  }
660 
661  if (!m_caloOnly) {
662  // deltaEta1
663  if (!el->trackCaloMatchValue(deltaEta, xAOD::EgammaParameters::deltaEta1)) {
664  allFound = false;
665  notFoundList += "deltaEta1 ";
666  }
667  // correction of deltaEta1 for pear shape distortion
668  else if (m_correctDeltaEta) {
670  "deltaEta1PearDistortion");
671  if (acc.isAvailable(*el)) {
672  deltaEta -= acc(*el);
673  } else {
674  allFound = false;
675  notFoundList += "deltaEta1PearDistortion ";
676  }
677  }
678 
679  // difference between the cluster phi (sampling 2) and the eta of the track
680  // extrapolated from the last measurement point.
681  if (!el->trackCaloMatchValue(deltaPhiRescaled2,
683  allFound = false;
684  notFoundList += "deltaPhiRescaled2 ";
685  }
686  }
687 
688  // Get the number of primary vertices, avg mu or FCal ET in this event,
689  // depending on user configuration
690  double ip = static_cast<double>(m_nPVdefault);
691 
692  ip = getIpVariable(mu, ctx);
693 
694  if (!allFound) {
696  "Skipping LH calculation! The following variables are missing: "
697  << notFoundList);
698  return -999;
699  }
700 
701  // Get the answer from the underlying ROOT tool
702  return m_rootTool->calculate(eta,
703  et,
704  f3,
705  Rhad,
706  Rhad1,
707  Reta,
708  w2,
709  f1,
710  Eratio,
711  deltaEta,
712  d0,
713  d0sigma,
714  Rphi,
715  dpOverp,
717  trans_TRT_PID,
718  ip);
719 }

◆ calculate() [5/5]

double AsgElectronLikelihoodTool::calculate ( const EventContext &  ctx,
const xAOD::IParticle part 
) const
finaloverridevirtual

calculate method: for pointer to IParticle

Implements IAsgElectronLikelihoodTool.

Definition at line 887 of file AsgElectronLikelihoodTool.cxx.

889 {
890  if (part->type() == xAOD::Type::Electron) {
891  const xAOD::Electron* el = static_cast<const xAOD::Electron*>(part);
892  return calculate(ctx, el);
893  }
894 
895  ATH_MSG_ERROR("Input is not an electron");
896  return -999;
897 }

◆ calculateMultipleOutputs()

virtual std::vector<float> AsgElectronLikelihoodTool::calculateMultipleOutputs ( const EventContext &  ctx,
const xAOD::Electron eg,
double  mu = -99 
) const
inlinefinaloverridevirtual

The result method for multiple outputs: only one output is used so return vector of that output.

Implements IAsgElectronLikelihoodTool.

Definition at line 122 of file AsgElectronLikelihoodTool.h.

125  {
126  return {static_cast<float>(calculate(ctx, eg, mu))};
127  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

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()

const asg::AcceptInfo & AsgElectronLikelihoodTool::getAcceptInfo ( ) const
overridevirtual

Method to get the plain AcceptInfo.

This is needed so that one can already get the AcceptInfo and query what cuts are defined before the first object is passed to the tool.

Implements IAsgSelectionTool.

Definition at line 258 of file AsgElectronLikelihoodTool.cxx.

259 {
260  return m_rootTool->getAcceptInfo();
261 }

◆ getAverageMu()

double AsgElectronLikelihoodTool::getAverageMu ( const EventContext &  ctx) const
private

Get the average mu.

Definition at line 940 of file AsgElectronLikelihoodTool.cxx.

941 {
943  if(!eventInfoDecor.isPresent()) {
944  ATH_MSG_WARNING("Cannot find " << m_avgMuKey.key()
945  << ", returning 0");
946  }
947  return eventInfoDecor(0);
948 }

◆ getFcalEt()

double AsgElectronLikelihoodTool::getFcalEt ( const EventContext &  ctx) const
private

Get the FCal ET for centrality determination (for HI collisions)

Definition at line 952 of file AsgElectronLikelihoodTool.cxx.

953 {
954  static const SG::ConstAccessor<std::string> SummaryAcc ("Summary");
955  double fcalEt(0.);
957  xAOD::HIEventShapeContainer::const_iterator es_itr = HIESCont->begin();
958  xAOD::HIEventShapeContainer::const_iterator es_end = HIESCont->end();
959  for (; es_itr != es_end; ++es_itr) {
960  double et = (*es_itr)->et();
961  const std::string name = SummaryAcc (**es_itr);
962  if (name == "FCal")
963  fcalEt = et * 1.e-6;
964  }
965  return fcalEt;
966 }

◆ getIpVariable()

double AsgElectronLikelihoodTool::getIpVariable ( double  mu,
const EventContext &  ctx 
) const
private

Get IP variable based on user configuration.

Definition at line 902 of file AsgElectronLikelihoodTool.cxx.

903 {
904  if (mu < 0) { // determine variable if mu is negative (not given)
905  bool doCentralityTransform = m_rootTool->m_doCentralityTransform;
906  if (doCentralityTransform)
907  return static_cast<double>(m_useCaloSumsCont ? this->getFcalEt(ctx)
908  : m_fcalEtDefault);
909  else if (m_useAverageMu)
910  return this->getAverageMu(ctx);
911  else
912  return static_cast<double>(m_usePVCont ? this->getNPrimVertices(ctx)
913  : m_nPVdefault);
914  }
915  return mu;
916 }

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

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
ptrThe 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.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ 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
ptrThe 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.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getNPrimVertices()

unsigned int AsgElectronLikelihoodTool::getNPrimVertices ( const EventContext &  ctx) const
private

Get the number of primary vertices.

Definition at line 921 of file AsgElectronLikelihoodTool.cxx.

922 {
923  unsigned int nVtx(0);
925  if (!vtxCont.isValid()) {
926  ATH_MSG_WARNING("Cannot find " << m_primVtxContKey.key()
927  << " container, returning default nVtx");
928  return m_nPVdefault;
929  }
930  for (const auto *vxcand : *vtxCont) {
931  if (vxcand->nTrackParticles() >= 2)
932  nVtx++;
933  }
934  return nVtx;
935 }

◆ getOperatingPointName()

std::string AsgElectronLikelihoodTool::getOperatingPointName ( ) const
finaloverridevirtual

Get the name of the current operating point.

Implements IAsgElectronLikelihoodTool.

Definition at line 861 of file AsgElectronLikelihoodTool.cxx.

862 {
863  return m_WorkingPoint;
864 }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ initialize()

StatusCode AsgElectronLikelihoodTool::initialize ( )
overridevirtual

Gaudi Service Interface method implementations.

--------—Begin of text config-------------------------—

--------—End of text config-------------------------—

Reimplemented from asg::AsgTool.

Definition at line 80 of file AsgElectronLikelihoodTool.cxx.

81 {
82  std::string configFile, PDFfilename, resolvedPDF; // Default
83 
84  if (!m_WorkingPoint.empty()) {
87  }
88 
89  if (!m_configFile.empty()) {
91  if (configFile.empty()) {
92  ATH_MSG_ERROR("Could not locate config " << m_configFile);
93  return StatusCode::FAILURE;
94  }
95 
96  TEnv env;
97  if (env.ReadFile(configFile.c_str(), kEnvLocal)) {
98  ATH_MSG_ERROR("Could not open config " << configFile);
99  return StatusCode::FAILURE;
100  }
101 
102  // Get the input PDFs for the tool.
103  // We need to see if the user had provided
104  // an override, if not needs to be in the input
105  // config file
106  if (!m_pdfFileName.empty()) {
107  // If the property was set by the user, take that.
108  ATH_MSG_INFO("Setting user specified PDF file " << m_pdfFileName);
109  PDFfilename = m_pdfFileName;
110  } else {
111  if (!env.Defined("inputPDFFileName")) {
112  ATH_MSG_WARNING("will use default PDF filename "
113  "since none is specified in the config "
114  << m_configFile);
115  }
116  PDFfilename = env.GetValue(
117  "inputPDFFileName",
118  "ElectronPhotonSelectorTools/v1/ElectronLikelihoodPdfs.root");
119  if (PDFfilename.empty()) {
120  ATH_MSG_ERROR("empty inputPDFFilename in " << configFile);
121  return StatusCode::FAILURE;
122  }
123  if (m_configFile.find("dev/") != std::string::npos) {
124  PDFfilename.insert(0, "dev/");
125  }
126  }
127 
128  resolvedPDF = PathResolverFindCalibFile(PDFfilename);
129  if (!resolvedPDF.empty()) {
130  m_rootTool->setPDFFileName(resolvedPDF);
131  } else {
132  ATH_MSG_ERROR("Couldn't resolve PDF filename from "
133  << PDFfilename << ", config file = " << configFile);
134  return StatusCode::FAILURE;
135  }
136 
138  // The following are all taken from the config
139  // file
140  m_rootTool->m_variableNames = env.GetValue("VariableNames", "");
142  AsgConfigHelper::HelperDouble("CutLikelihood", env);
144  AsgConfigHelper::HelperDouble("CutLikelihoodPileupCorrection", env);
146  AsgConfigHelper::HelperDouble("CutLikelihood4GeV", env);
148  AsgConfigHelper::HelperDouble("CutLikelihoodPileupCorrection4GeV", env);
149  // do the ambiguity cut
151  AsgConfigHelper::HelperInt("CutAmbiguity", env);
152  // cut on b-layer
154  // cut on pixel hits
156  // cut on precision hits
158  // cut on d0
160  // cut on deltaEta
162  AsgConfigHelper::HelperDouble("CutDeltaEta", env);
163  // cut on deltaPhiRes
165  AsgConfigHelper::HelperDouble("CutDeltaPhiRes", env);
166  // turn off f3 at high Et
168  env.GetValue("doRemoveF3AtHighEt", false);
169  // turn off TRTPID at high Et
171  env.GetValue("doRemoveTRTPIDAtHighEt", false);
172  // do smooth interpolation between bins
174  env.GetValue("doSmoothBinInterpolation", false);
175  m_caloOnly = env.GetValue("caloOnly", false);
176 
178  env.GetValue("useOneExtraHighETLHBin", false);
179  // cut on Wstot above HighETBinThreshold
181  AsgConfigHelper::HelperDouble("CutWstotAtHighET", env);
182  // cut on EoverP above HighETBinThreshold
184  AsgConfigHelper::HelperDouble("CutEoverPAtHighET", env);
185  m_rootTool->m_highETBinThreshold = env.GetValue("HighETBinThreshold", 125);
186 
187  m_rootTool->m_doPileupTransform = env.GetValue("doPileupTransform", false);
189  env.GetValue("doCentralityTransform", false);
191  AsgConfigHelper::HelperDouble("DiscHardCutForPileupTransform", env);
193  AsgConfigHelper::HelperDouble("DiscHardCutSlopeForPileupTransform", env);
195  AsgConfigHelper::HelperDouble("DiscHardCutQuadForPileupTransform", env);
197  AsgConfigHelper::HelperDouble("DiscLooseForPileupTransform", env);
199  AsgConfigHelper::HelperDouble("DiscHardCutForPileupTransform4GeV", env);
201  AsgConfigHelper::HelperDouble("DiscHardCutSlopeForPileupTransform4GeV",
202  env);
204  AsgConfigHelper::HelperDouble("DiscHardCutQuadForPileupTransform4GeV",
205  env);
207  AsgConfigHelper::HelperDouble("DiscLooseForPileupTransform4GeV", env);
209  env.GetValue("DiscMaxForPileupTransform", 2.0);
211  env.GetValue("PileupMaxForPileupTransform", 50);
212  // if true, deltaEta1 will be corrected for the pear shape distortion of the
213  // LAr
214  m_correctDeltaEta = env.GetValue("doCorrectDeltaEta", false);
215 
217  ATH_MSG_ERROR("Cannot use centrality transform and average mu "
218  << "at the same time as they affect the same variable");
219  return StatusCode::FAILURE;
220  }
221  } else { // Error if it cant find the conf
222  ATH_MSG_ERROR("Could not find configuration file");
223  return StatusCode::FAILURE;
224  }
225 
227 
228  // Setup primary vertex key handle
230  // Setup average mu key handle
231  ATH_CHECK(m_avgMuKey.initialize(m_useAverageMu));
232 
233  // Setup HI container key handle (must come after init from env)
234  bool doCentralityTransform = m_rootTool->m_doCentralityTransform;
235  ATH_CHECK(
236  m_HIESContKey.initialize(doCentralityTransform && m_useCaloSumsCont));
237 
238  // Get the message level and set the underlying ROOT tool message level
239  // accordingly
240  m_rootTool->msg().setLevel(this->msg().level());
241 
242  // We need to initialize the underlying ROOT TSelectorTool
243  if (m_rootTool->initialize().isFailure()) {
244  ATH_MSG_ERROR("Could not initialize the TElectronLikelihoodTool! "
245  "Configuration details: "
246  << "working point = \"" << m_WorkingPoint
247  << "\", config file = \"" << m_configFile
248  << "\", resolved file = \"" << configFile
249  << "\", PDF file = \"" << PDFfilename
250  << "\", resolved file = \"" << resolvedPDF);
251  return StatusCode::FAILURE;
252  }
253  return StatusCode::SUCCESS;
254 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

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.

◆ isForwardElectron()

bool AsgElectronLikelihoodTool::isForwardElectron ( const xAOD::Egamma eg,
const float  eta 
) const
private

check for FwdElectron

Definition at line 969 of file AsgElectronLikelihoodTool.cxx.

971 {
972 
973  static const SG::AuxElement::ConstAccessor<uint16_t> accAuthor("author");
974 
975  if (accAuthor.isAvailable(*eg)) {
976 
977  // cannot just do eg->author() because it isn't always filled
978  // at trigger level
979  if (accAuthor(*eg) == xAOD::EgammaParameters::AuthorFwdElectron) {
981  "Failed, this is a forward electron! The AsgElectronLikelihoodTool is "
982  "only suitable for central electrons!");
983  return true;
984  }
985  } else {
986  // Check for fwd via eta range the old logic
987  if (std::abs(eta) > 2.5) {
988  ATH_MSG_WARNING("Failed, cluster->etaBE(2) range due to "
989  << eta << " seems like a fwd electron");
990  return true;
991  }
992  }
993 
994  return false;
995 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ 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.

101  {
102 
103  return MSG::name( msg().level() );
104  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

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

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_avgMuKey

SG::ReadDecorHandleKey<xAOD::EventInfo> AsgElectronLikelihoodTool::m_avgMuKey
private
Initial value:
{
this, "averageInteractionsPerCrossingKey",
"EventInfo.averageInteractionsPerCrossing",
"Decoration for Average Interaction Per Crossing"
}

read handle key to averager mu

Definition at line 204 of file AsgElectronLikelihoodTool.h.

◆ m_caloOnly

bool AsgElectronLikelihoodTool::m_caloOnly = false
private

Flag for calo only LH.

Definition at line 176 of file AsgElectronLikelihoodTool.h.

◆ m_configFile

std::string AsgElectronLikelihoodTool::m_configFile
private

Definition at line 155 of file AsgElectronLikelihoodTool.h.

◆ m_correctDeltaEta

bool AsgElectronLikelihoodTool::m_correctDeltaEta = false
private

Flag to toggle the correction of deltaEta1 for the pear shape distortion of the LAr.

Definition at line 182 of file AsgElectronLikelihoodTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_fcalEtDefault

double AsgElectronLikelihoodTool::m_fcalEtDefault
private

defualt FCal ET (when not using CaloSums container, in HI events)

Definition at line 170 of file AsgElectronLikelihoodTool.h.

◆ m_HIESContKey

SG::ReadHandleKey<xAOD::HIEventShapeContainer> AsgElectronLikelihoodTool::m_HIESContKey
private
Initial value:
{
this,
"CaloSumsContainer",
"CaloSums",
"The CaloSums container name"
}

read handle key to heavy ion container

Definition at line 188 of file AsgElectronLikelihoodTool.h.

◆ m_nPVdefault

unsigned int AsgElectronLikelihoodTool::m_nPVdefault
private

defualt nPV (when not using PVCont)

Definition at line 164 of file AsgElectronLikelihoodTool.h.

◆ m_pdfFileName

std::string AsgElectronLikelihoodTool::m_pdfFileName
private

The input ROOT file name that holds the PDFs.

Definition at line 173 of file AsgElectronLikelihoodTool.h.

◆ m_primVtxContKey

SG::ReadHandleKey<xAOD::VertexContainer> AsgElectronLikelihoodTool::m_primVtxContKey
private
Initial value:
{
this,
"primaryVertexContainer",
"PrimaryVertices",
"The primary vertex container name"
}

read handle key to primary vertex container

Definition at line 196 of file AsgElectronLikelihoodTool.h.

◆ m_rootTool

Root::TElectronLikelihoodTool* AsgElectronLikelihoodTool::m_rootTool
private

Pointer to the underlying ROOT based tool.

Definition at line 158 of file AsgElectronLikelihoodTool.h.

◆ m_skipDeltaPoverP

bool AsgElectronLikelihoodTool::m_skipDeltaPoverP
private

Flag for skip the use of deltaPoverP in LH computation (like at HLT)

Definition at line 179 of file AsgElectronLikelihoodTool.h.

◆ m_useAverageMu

bool AsgElectronLikelihoodTool::m_useAverageMu = false
private

Definition at line 185 of file AsgElectronLikelihoodTool.h.

◆ m_useCaloSumsCont

bool AsgElectronLikelihoodTool::m_useCaloSumsCont
private

Whether or not to use the CaloSums container in HI events.

Definition at line 167 of file AsgElectronLikelihoodTool.h.

◆ m_usePVCont

bool AsgElectronLikelihoodTool::m_usePVCont
private

Whether to use the PV (not available for trigger)

Definition at line 161 of file AsgElectronLikelihoodTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_WorkingPoint

std::string AsgElectronLikelihoodTool::m_WorkingPoint
private

Working Point.

Definition at line 152 of file AsgElectronLikelihoodTool.h.


The documentation for this class was generated from the following files:
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
AsgElectronLikelihoodTool::m_avgMuKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_avgMuKey
read handle key to averager mu
Definition: AsgElectronLikelihoodTool.h:204
Root::TElectronLikelihoodTool::m_cutLikelihoodPileupCorrection4GeV
std::vector< double > m_cutLikelihoodPileupCorrection4GeV
pileup correction factor for cut on likelihood output, 4 GeV bin
Definition: TElectronLikelihoodTool.h:223
AsgElectronLikelihoodTool::m_usePVCont
bool m_usePVCont
Whether to use the PV (not available for trigger)
Definition: AsgElectronLikelihoodTool.h:161
AsgElectronLikelihoodTool::getIpVariable
double getIpVariable(double mu, const EventContext &ctx) const
Get IP variable based on user configuration.
Definition: AsgElectronLikelihoodTool.cxx:902
et
Extra patterns decribing particle interation process.
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
Root::TElectronLikelihoodTool::m_doCentralityTransform
bool m_doCentralityTransform
do centrality-dependent transform on discriminant value
Definition: TElectronLikelihoodTool.h:215
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
taskman.configFile
configFile
Definition: taskman.py:311
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ElectronSelectorHelpers::numberOfSiliconHitsAndDeadSensors
std::size_t numberOfSiliconHitsAndDeadSensors(const xAOD::TrackParticle &tp)
return the number of Silicon hits plus dead sensors in the track particle
Definition: ElectronSelectorHelpers.cxx:51
Root::TElectronLikelihoodTool::accept
asg::AcceptData accept(LikeEnum::LHAcceptVars_t &vars_struct) const
The main accept method: the actual cuts are applied here.
Definition: TElectronLikelihoodTool.cxx:487
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
ParticleTest.eg
eg
Definition: ParticleTest.py:29
xAOD::EgammaParameters::Reta
@ Reta
e237/e277
Definition: EgammaEnums.h:154
AsgElectronLikelihoodTool::m_pdfFileName
std::string m_pdfFileName
The input ROOT file name that holds the PDFs.
Definition: AsgElectronLikelihoodTool.h:173
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:66
AsgElectronLikelihoodTool::m_configFile
std::string m_configFile
Definition: AsgElectronLikelihoodTool.h:155
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
index
Definition: index.py:1
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Root::TElectronLikelihoodTool::m_discHardCutQuadForPileupTransform4GeV
std::vector< double > m_discHardCutQuadForPileupTransform4GeV
reference quadratic par on disc for very hard cut; used by centrality transform - 4-7 GeV
Definition: TElectronLikelihoodTool.h:243
Root::TElectronLikelihoodTool::m_cutDeltaEta
std::vector< double > m_cutDeltaEta
do cut on delta eta bit
Definition: TElectronLikelihoodTool.h:193
Root::TElectronLikelihoodTool::m_discHardCutSlopeForPileupTransform
std::vector< double > m_discHardCutSlopeForPileupTransform
reference slope on disc for very hard cut; used by pileup transform
Definition: TElectronLikelihoodTool.h:228
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
AsgElectronLikelihoodTool::m_correctDeltaEta
bool m_correctDeltaEta
Flag to toggle the correction of deltaEta1 for the pear shape distortion of the LAr.
Definition: AsgElectronLikelihoodTool.h:182
AsgElectronLikelihoodTool::accept
virtual asg::AcceptData accept(const xAOD::IParticle *part) const override final
The main accept method: using the generic interface.
Definition: AsgElectronLikelihoodTool.cxx:868
Root::TElectronLikelihoodTool::m_cutBL
std::vector< int > m_cutBL
cut min on b-layer hits
Definition: TElectronLikelihoodTool.h:185
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Root::TElectronLikelihoodTool::initialize
StatusCode initialize()
Initialize this class.
Definition: TElectronLikelihoodTool.cxx:91
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:54
xAOD::EgammaParameters::Rphi
@ Rphi
e233/e237
Definition: EgammaEnums.h:156
AsgElectronLikelihoodTool::calculate
virtual double calculate(const EventContext &ctx, const xAOD::IParticle *part) const override final
calculate method: for pointer to IParticle
Definition: AsgElectronLikelihoodTool.cxx:887
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
AsgElectronLikelihoodTool::m_caloOnly
bool m_caloOnly
Flag for calo only LH.
Definition: AsgElectronLikelihoodTool.h:176
xAOD::EgammaParameters::AuthorFwdElectron
const uint16_t AuthorFwdElectron
Electron reconstructed by the Forward cluster-based algorithm.
Definition: EgammaDefs.h:30
xAOD::LastMeasurement
@ LastMeasurement
Parameter defined at the position of the last measurement.
Definition: TrackingPrimitives.h:215
xAOD::wstot
setEt setPhi setE277 setWeta2 setEta1 setE2tsts1 wstot
Definition: TrigEMCluster_v1.cxx:49
Root::TElectronLikelihoodTool::getAcceptInfo
const asg::AcceptInfo & getAcceptInfo() const
accesss to the accept info object
Definition: TElectronLikelihoodTool.h:95
Root::TElectronLikelihoodTool::m_discHardCutQuadForPileupTransform
std::vector< double > m_discHardCutQuadForPileupTransform
reference quadratic apr on disc for very hard cut; used by centrality transform
Definition: TElectronLikelihoodTool.h:231
AsgElectronLikelihoodTool::getFcalEt
double getFcalEt(const EventContext &ctx) const
Get the FCal ET for centrality determination (for HI collisions)
Definition: AsgElectronLikelihoodTool.cxx:952
Root::TElectronLikelihoodTool::m_discLooseForPileupTransform4GeV
std::vector< double > m_discLooseForPileupTransform4GeV
reference disc for a pileup independent loose menu; used by pileup transform - 4-7 GeV
Definition: TElectronLikelihoodTool.h:246
Root::TElectronLikelihoodTool::calculate
double calculate(LikeEnum::LHCalcVars_t &vars_struct) const
Definition: TElectronLikelihoodTool.cxx:724
ElectronSelectorHelpers::passBLayerRequirement
bool passBLayerRequirement(const xAOD::TrackParticle &tp)
return true if effective number of BL hits + outliers is at least one
Definition: ElectronSelectorHelpers.cxx:59
Root::TElectronLikelihoodTool::m_highETBinThreshold
double m_highETBinThreshold
ET threshold for using high ET cuts and bin.
Definition: TElectronLikelihoodTool.h:207
xAOD::EgammaParameters::wtots1
@ wtots1
shower width is determined in a window detaxdphi = 0,0625 ×~0,2, corresponding typically to 20 strips...
Definition: EgammaEnums.h:140
Root::TElectronLikelihoodTool::m_variableNames
std::string m_variableNames
variables to use in the LH
Definition: TElectronLikelihoodTool.h:252
AsgElectronLikelihoodTool::m_rootTool
Root::TElectronLikelihoodTool * m_rootTool
Pointer to the underlying ROOT based tool.
Definition: AsgElectronLikelihoodTool.h:158
Root::TElectronLikelihoodTool::m_cutWstotAtHighET
std::vector< double > m_cutWstotAtHighET
Definition: TElectronLikelihoodTool.h:209
AsgElectronLikelihoodTool::getNPrimVertices
unsigned int getNPrimVertices(const EventContext &ctx) const
Get the number of primary vertices.
Definition: AsgElectronLikelihoodTool.cxx:921
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
AsgElectronLikelihoodTool::m_fcalEtDefault
double m_fcalEtDefault
defualt FCal ET (when not using CaloSums container, in HI events)
Definition: AsgElectronLikelihoodTool.h:170
xAOD::EgammaParameters::f3
@ f3
fraction of energy reconstructed in 3rd sampling
Definition: EgammaEnums.h:54
xAOD::CaloCluster_v1::etaBE
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
Definition: CaloCluster_v1.cxx:644
Root::TElectronLikelihoodTool::m_cutPi
std::vector< int > m_cutPi
cut min on pixel hits
Definition: TElectronLikelihoodTool.h:187
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
Root::TElectronLikelihoodTool::m_doSmoothBinInterpolation
bool m_doSmoothBinInterpolation
do smooth interpolation between bins
Definition: TElectronLikelihoodTool.h:203
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
xAOD::EgammaParameters::f1
@ f1
E1/E = fraction of energy reconstructed in the first sampling, where E1 is energy in all strips belon...
Definition: EgammaEnums.h:52
P4Helpers::deltaEta
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:53
Root::TElectronLikelihoodTool::m_cutLikelihoodPileupCorrection
std::vector< double > m_cutLikelihoodPileupCorrection
pileup correction factor for cut on likelihood output
Definition: TElectronLikelihoodTool.h:219
PyAlgorithmExample.EoverP
int EoverP
Definition: PyAlgorithmExample.py:122
Root::TElectronLikelihoodTool::m_cutLikelihood
std::vector< double > m_cutLikelihood
cut on likelihood output
Definition: TElectronLikelihoodTool.h:217
Root::TElectronLikelihoodTool::m_useOneExtraHighETLHBin
bool m_useOneExtraHighETLHBin
use one extra bin for high ET LH
Definition: TElectronLikelihoodTool.h:205
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
Root::TElectronLikelihoodTool::m_cutAmbiguity
std::vector< int > m_cutAmbiguity
do cut on ambiguity bit
Definition: TElectronLikelihoodTool.h:197
asg::AsgMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AsgMessaging.cxx:49
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
AthenaPoolTestRead.acc
acc
Definition: AthenaPoolTestRead.py:16
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::EgammaParameters::deltaPhiRescaled2
@ deltaPhiRescaled2
difference between the cluster phi (second sampling) and the phi of the track extrapolated to the sec...
Definition: EgammaEnums.h:225
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
AsgElectronLikelihoodTool::m_nPVdefault
unsigned int m_nPVdefault
defualt nPV (when not using PVCont)
Definition: AsgElectronLikelihoodTool.h:164
Root::TElectronLikelihoodTool::m_doRemoveTRTPIDAtHighEt
bool m_doRemoveTRTPIDAtHighEt
do remove TRTPID variable from likelihood at high Et (>80 GeV)
Definition: TElectronLikelihoodTool.h:201
xAOD::EgammaParameters::Rhad1
@ Rhad1
ethad1/et
Definition: EgammaEnums.h:162
AsgConfigHelper::HelperInt
std::vector< int > HelperInt(const std::string &input, TEnv &env)
Definition: AsgEGammaConfigHelper.cxx:115
Root::TElectronLikelihoodTool::m_doRemoveF3AtHighEt
bool m_doRemoveF3AtHighEt
do remove f3 variable from likelihood at high Et (>80 GeV)
Definition: TElectronLikelihoodTool.h:199
Root::TElectronLikelihoodTool::m_discMaxForPileupTransform
double m_discMaxForPileupTransform
max discriminant for which pileup transform is to be used
Definition: TElectronLikelihoodTool.h:248
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
AsgElectronLikelihoodTool::m_HIESContKey
SG::ReadHandleKey< xAOD::HIEventShapeContainer > m_HIESContKey
read handle key to heavy ion container
Definition: AsgElectronLikelihoodTool.h:188
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
AsgElectronLikelihoodTool::getAverageMu
double getAverageMu(const EventContext &ctx) const
Get the average mu.
Definition: AsgElectronLikelihoodTool.cxx:940
Root::TElectronLikelihoodTool::m_doPileupTransform
bool m_doPileupTransform
do pileup-dependent transform on discriminant value
Definition: TElectronLikelihoodTool.h:213
xAOD::Electron_v1
Definition: Electron_v1.h:34
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
Root::TElectronLikelihoodTool::m_cutEoverPAtHighET
std::vector< double > m_cutEoverPAtHighET
Definition: TElectronLikelihoodTool.h:211
Root::TElectronLikelihoodTool::m_discLooseForPileupTransform
std::vector< double > m_discLooseForPileupTransform
reference disc for a pileup independent loose menu; used by pileup transform
Definition: TElectronLikelihoodTool.h:234
DeMoScan.index
string index
Definition: DeMoScan.py:362
a
TList * a
Definition: liststreamerinfos.cxx:10
h
Root::TElectronLikelihoodTool::m_cutA0
std::vector< double > m_cutA0
cut max on track d0 bit
Definition: TElectronLikelihoodTool.h:191
EgammaSelectors::LHPointToConfFile
const std::map< std::string, std::string > LHPointToConfFile
Definition: EGSelectorConfigurationMapping.h:19
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AsgElectronLikelihoodTool::m_useAverageMu
bool m_useAverageMu
Definition: AsgElectronLikelihoodTool.h:185
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
AsgElectronLikelihoodTool::m_useCaloSumsCont
bool m_useCaloSumsCont
Whether or not to use the CaloSums container in HI events.
Definition: AsgElectronLikelihoodTool.h:167
xAOD::eProbabilityHT
@ eProbabilityHT
Electron probability from High Threshold (HT) information [float].
Definition: TrackingPrimitives.h:301
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
Root::TElectronLikelihoodTool::m_discHardCutSlopeForPileupTransform4GeV
std::vector< double > m_discHardCutSlopeForPileupTransform4GeV
reference slope on disc for very hard cut; used by pileup transform
Definition: TElectronLikelihoodTool.h:240
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
AsgElectronLikelihoodTool::m_WorkingPoint
std::string m_WorkingPoint
Working Point.
Definition: AsgElectronLikelihoodTool.h:152
Root::TElectronLikelihoodTool::m_cutDeltaPhiRes
std::vector< double > m_cutDeltaPhiRes
Definition: TElectronLikelihoodTool.h:195
xAOD::EgammaParameters::Eratio
@ Eratio
(emaxs1-e2tsts1)/(emaxs1+e2tsts1)
Definition: EgammaEnums.h:158
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
xAOD::EgammaParameters::deltaEta1
@ deltaEta1
difference between the cluster eta (first sampling) and the eta of the track extrapolated to the firs...
Definition: EgammaEnums.h:184
xAOD::CaloCluster_v1::hasSampling
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.
Definition: CaloCluster_v1.h:890
AsgElectronLikelihoodTool::isForwardElectron
bool isForwardElectron(const xAOD::Egamma *eg, const float eta) const
check for FwdElectron
Definition: AsgElectronLikelihoodTool.cxx:969
Root::TElectronLikelihoodTool::m_cutLikelihood4GeV
std::vector< double > m_cutLikelihood4GeV
cut on likelihood output, 4 GeV bin
Definition: TElectronLikelihoodTool.h:221
xAOD::EgammaParameters::Rhad
@ Rhad
ethad/et
Definition: EgammaEnums.h:160
python.DataFormatRates.env
env
Definition: DataFormatRates.py:32
Root::TElectronLikelihoodTool::m_discHardCutForPileupTransform
std::vector< double > m_discHardCutForPileupTransform
reference disc for very hard cut; used by pileup transform
Definition: TElectronLikelihoodTool.h:225
SG::DataProxy
Definition: DataProxy.h:44
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
Root::TElectronLikelihoodTool::m_pileupMaxForPileupTransform
double m_pileupMaxForPileupTransform
max nvtx or mu to be used in pileup transform
Definition: TElectronLikelihoodTool.h:250
AsgConfigHelper::HelperDouble
std::vector< double > HelperDouble(const std::string &input, TEnv &env)
Definition: AsgEGammaConfigHelper.cxx:105
Root::TElectronLikelihoodTool::setPDFFileName
void setPDFFileName(const std::string &val)
Add an input file that holds the PDFs.
Definition: TElectronLikelihoodTool.h:135
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
AsgElectronLikelihoodTool::m_primVtxContKey
SG::ReadHandleKey< xAOD::VertexContainer > m_primVtxContKey
read handle key to primary vertex container
Definition: AsgElectronLikelihoodTool.h:196
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
Root::TElectronLikelihoodTool::m_discHardCutForPileupTransform4GeV
std::vector< double > m_discHardCutForPileupTransform4GeV
reference disc for very hard cut; used by pileup transform - 4-7 GeV
Definition: TElectronLikelihoodTool.h:237
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
AsgElectronLikelihoodTool::m_skipDeltaPoverP
bool m_skipDeltaPoverP
Flag for skip the use of deltaPoverP in LH computation (like at HLT)
Definition: AsgElectronLikelihoodTool.h:179
fitman.k
k
Definition: fitman.py:528
Root::TElectronLikelihoodTool::m_cutSi
std::vector< int > m_cutSi
cut min on precision hits
Definition: TElectronLikelihoodTool.h:189
read_hist_ntuple.f1
f1
Definition: read_hist_ntuple.py:4
xAOD::EgammaParameters::weta2
@ weta2
the lateral width is calculated with a window of 3x5 cells using the energy weighted sum over all cel...
Definition: EgammaEnums.h:103
AsgConfigHelper::findConfigFile
std::string findConfigFile(const std::string &input, const std::map< std::string, std::string > &configmap)
Definition: AsgEGammaConfigHelper.cxx:14
ElectronSelectorHelpers::numberOfPixelHitsAndDeadSensors
std::size_t numberOfPixelHitsAndDeadSensors(const xAOD::TrackParticle &tp)
return the number of Pixel hits plus dead sensors in the track particle
Definition: ElectronSelectorHelpers.cxx:12