ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
met::METSignificance Class Reference

#include <METSignificance.h>

Inheritance diagram for met::METSignificance:
Collaboration diagram for met::METSignificance:

Public Member Functions

 METSignificance (const std::string &name)
 Constructor with parameters: More...
 
virtual ~METSignificance ()
 Destructor: More...
 
StatusCode initialize ()
 Dummy implementation of the initialisation function. More...
 
StatusCode finalize ()
 
StatusCode varianceMET (xAOD::MissingETContainer *metCont, float avgmu, const std::string &jetTermName, const std::string &softTermName, const std::string &totalMETName)
 
StatusCode RotateToPhi (float phi)
 
StatusCode SetLambda (const float px, const float py, const bool GeV=true)
 
double GetMETOverSqrtSumET () const
 
double GetMETOverSqrtHT () const
 
double GetSignificance () const
 
double GetSigDirectional () const
 
double GetRho () const
 
double GetVarL () const
 
double GetVarT () const
 
double GetTermVarL (const int term) const
 
double GetTermVarT (const int term) const
 
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

 METSignificance ()
 Default constructor: More...
 
StatusCode AddMuon (const xAOD::IParticle *obj, float &pt_reso, float &phi_reso, float avgmu)
 
StatusCode AddElectron (const xAOD::IParticle *obj, float &pt_reso, float &phi_reso, float avgmu)
 
StatusCode AddPhoton (const xAOD::IParticle *obj, float &pt_reso, float &phi_reso)
 
StatusCode AddJet (const xAOD::IParticle *obj, float &pt_reso, float &phi_reso, float &avgmu)
 
void AddTau (const xAOD::IParticle *obj, float &pt_reso, float &phi_reso)
 
void AddSoftTerm (const xAOD::MissingET *soft, const TVector3 &met_vect, double(&particle_sum)[2][2])
 
double GetPUProb (double jet_eta, double jet_phi, double jet_pt, double jet_jvt, double jet_fjvt, float avgmu)
 
double GetPhiUnc (double jet_eta, double jet_phi, double jet_pt)
 
std::tuple< double, double, double > CovMatrixRotation (double var_x, double var_y, double cv_xy, double Phi)
 
double Significance_LT (double Numerator, double var_parall, double var_perpen, double cov)
 
void InvertMatrix (double(&mat)[2][2], double(&m)[2][2])
 
void AddMatrix (double(&X)[2][2], double(&Y)[2][2], double(&mat_new)[2][2])
 
void RotateXY (const double(&mat)[2][2], double(&mat_new)[2][2], double phi)
 
double BiasPtSoftdir (const double PtSoft)
 Parameterization with PtSoft Direction //. More...
 
double VarparPtSoftdir (const double PtSoft, const double SoftSumet)
 
double Bias_PtSoftParall (const double PtSoft_Parall)
 
double Var_Ptsoft (const double PtSoft)
 
void AddResoMap (const double varL, const double varT, const double CvTV, const int term)
 
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...
 

Static Private Member Functions

static unsigned int getEtaBin (double jet_eta)
 

Private Attributes

ToolHandle< IJetCalibrationToolm_jetCalibTool {this, "jetCalibTool", "", "the IJetCalibrationTool we use"}
 
ToolHandle< CP::IMuonCalibrationAndSmearingToolm_muonCalibrationAndSmearingTool {this, "MuonCalibTool", "", "the IMuonCalibrationAndSmearingTool we use"}
 
ToolHandle< CP::IEgammaCalibrationAndSmearingToolm_egammaCalibTool {this, "egammaCalibTool", "", "the IEgammaCalibrationAndSmearingTool we use"}
 
ToolHandle< ITauToolBasem_tauCombinedTES {this, "tauCombinedTES", "", "the TauCombinedTES tool we use"}
 
double m_GeV
 
TVector3 m_met_vect
 
TVector3 m_soft_vect
 
TVector3 m_pthard_vect
 
TVector3 m_lamda_vect
 
int m_softTermParam
 
double m_softTermReso
 
bool m_treatPUJets
 
bool m_doPhiReso
 
bool m_applyBias
 
bool m_jerForEMu
 
bool m_isDataJet
 
bool m_isDataMuon
 
bool m_isAFII
 
float m_jetPtThr
 
float m_jetEtaThr
 
double m_scalarBias
 
double m_significance
 
double m_rho
 
double m_VarL
 
double m_VarT
 
double m_CvLT
 
double m_met_VarL
 
double m_met_VarT
 
double m_met_CvLT
 
std::map< int, double > m_term_VarL
 
std::map< int, double > m_term_VarT
 
std::map< int, double > m_term_CvLT
 
double m_met
 
double m_metx
 
double m_mety
 
double m_metphi
 
double m_metsoft
 
double m_metsoftphi
 
double m_ht
 
double m_sumet
 
TFile * m_file
 
TH2F * m_phi_reso_pt20
 
TH2F * m_phi_reso_pt50
 
TH2F * m_phi_reso_pt100
 
std::string m_configPrefix
 
std::string m_configJetPhiResoFile
 
std::string m_JetResoAux
 
std::string m_EMuResoAux
 
std::string m_JetCollection
 
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

Definition at line 43 of file METSignificance.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

◆ METSignificance() [1/2]

met::METSignificance::METSignificance ( const std::string &  name)

Constructor with parameters:

Definition at line 54 of file METSignificance.cxx.

54  :
55  AsgTool(name),
56  m_GeV(1.0e3),
58  m_jerForEMu(false),
59  m_jetPtThr(-1.0),
60  m_jetEtaThr(-1.0),
61  m_significance(0.0),
62  m_rho(0.0),
63  m_VarL(0.0),
64  m_VarT(0.0),
65  m_CvLT(0.0),
66  m_met_VarL(0.0),
67  m_met_VarT(0.0),
68  m_met_CvLT(0.0),
69  m_met(0.0),
70  m_metx(0.0),
71  m_mety(0.0),
72  m_metphi(0.0),
73  m_metsoft(0.0),
74  m_metsoftphi(0.0),
75  m_ht(0.0),
76  m_sumet(0.0),
77  m_file(nullptr),
78  m_phi_reso_pt20(nullptr),
79  m_phi_reso_pt50(nullptr),
80  m_phi_reso_pt100(nullptr)
81  {
82  declareProperty("SoftTermParam", m_softTermParam = met::Random );
83  declareProperty("SoftTermReso", m_softTermReso = 8.5 );
84  declareProperty("TreatPUJets", m_treatPUJets = true );
85  declareProperty("DoPhiReso", m_doPhiReso = false );
86  declareProperty("ApplyBias", m_applyBias = false );
87  declareProperty("DoJerForEMu", m_jerForEMu = false ); // run jet resolution for all electrons and muons
88  declareProperty("ScalarBias", m_scalarBias = 0.0 );
89  declareProperty("JetPtThr", m_jetPtThr = -1.0 );
90  declareProperty("JetEtaThr", m_jetEtaThr = -1.0 );
91  declareProperty("ConfigPrefix", m_configPrefix = "METUtilities/data17_13TeV/metsig_Aug15/");
92  declareProperty("ConfigJetPhiResoFile", m_configJetPhiResoFile = "jet_unc.root" );
93  declareProperty("JetResoAux", m_JetResoAux = "" ); // relative pT resolution in addition to normal JES
94  declareProperty("EMuResoAux", m_EMuResoAux = "" ); // aux string sets a bool for the leptons to run the jet resolation
95  declareProperty("JetCollection", m_JetCollection = "AntiKt4EMPFlow" );
96 
97  // properties to delete eventually
98  declareProperty("IsDataJet", m_isDataJet = false );
99  declareProperty("IsDataMuon", m_isDataMuon = false );
100  declareProperty("IsAFII", m_isAFII = false );
101 
102  m_file = nullptr;
103  }

◆ ~METSignificance()

met::METSignificance::~METSignificance ( )
virtualdefault

Destructor:

◆ METSignificance() [2/2]

met::METSignificance::METSignificance ( )
private

Default constructor:

Member Function Documentation

◆ AddElectron()

StatusCode met::METSignificance::AddElectron ( const xAOD::IParticle obj,
float &  pt_reso,
float &  phi_reso,
float  avgmu 
)
private

Definition at line 476 of file METSignificance.cxx.

476  {
477 
478  bool DoEMuReso = false;
479  if(obj->type()==xAOD::Type::TruthParticle){
480  pt_reso=m_egammaCalibTool->resolution(obj->e(),obj->eta(),obj->eta(),PATCore::ParticleType::Electron);
481  if(m_doPhiReso) phi_reso = obj->pt()*0.004;
482  }
483  else{
484  const xAOD::Electron* ele(static_cast<const xAOD::Electron*>(obj));
485  const auto cl_etaCalo = xAOD::get_eta_calo(*(ele->caloCluster()), ele->author());
486  pt_reso=m_egammaCalibTool->resolution(ele->e(),ele->caloCluster()->eta(),cl_etaCalo,PATCore::ParticleType::Electron);
487  if(m_doPhiReso) phi_reso = ele->pt()*0.004;
488  ATH_MSG_VERBOSE("el: " << pt_reso << " " << ele->pt() << " " << ele->p4().Eta() << " " << ele->p4().Phi());
489 
490  // run the jet resolution for muons. for validation region extrapolation
491  if(!m_EMuResoAux.empty()){
493  DoEMuReso = acc_EMReso.isAvailable(*ele) ? acc_EMReso(*ele) : false;
494  }
495  }
496 
497  if(m_jerForEMu || DoEMuReso){
498  bool treatPUJets = m_treatPUJets;
499  m_treatPUJets=false; //turn off pileup jet treatement for this electron
500  ATH_CHECK(AddJet(obj, pt_reso, phi_reso, avgmu));
501  m_treatPUJets = treatPUJets; // reset value
502  }
503  return StatusCode::SUCCESS;
504  }

◆ AddJet()

StatusCode met::METSignificance::AddJet ( const xAOD::IParticle obj,
float &  pt_reso,
float &  phi_reso,
float &  avgmu 
)
private

Definition at line 523 of file METSignificance.cxx.

523  {
524 
525  const xAOD::Jet* jet(static_cast<const xAOD::Jet*>(obj));
526  double pt_reso_dbl_data=0.0, pt_reso_dbl_mc=0.0, pt_reso_dbl_max=0.0;
527 
528  // setting limits on jets if requested
529  if(m_jetPtThr>0.0 && m_jetPtThr>jet->pt()) return StatusCode::SUCCESS;
530  if(m_jetEtaThr>0.0 && m_jetEtaThr<std::abs(jet->eta())) return StatusCode::SUCCESS;
531 
532  ATH_CHECK(m_jetCalibTool->getNominalResolutionData(*jet, pt_reso_dbl_data));
533  ATH_CHECK(m_jetCalibTool->getNominalResolutionMC(*jet, pt_reso_dbl_mc));
534  pt_reso_dbl_max = std::max(pt_reso_dbl_data,pt_reso_dbl_mc);
535  pt_reso = pt_reso_dbl_max;
536 
537  ATH_MSG_VERBOSE("jet: " << pt_reso << " jetpT: " << jet->pt() << " " << jet->p4().Eta() << " " << jet->p4().Phi());
538 
539  // Add extra uncertainty for PU jets based on JVT
540  if(m_treatPUJets){
541  double jet_pu_unc = 0.;
542  if(acc_fjvt.isAvailable(*jet))
543  jet_pu_unc = GetPUProb(jet->eta(), jet->phi(),jet->pt()/m_GeV, acc_jvt(*jet), acc_fjvt(*jet), avgmu);
544  else if(acc_fjvt_der.isAvailable(*jet))
545  jet_pu_unc = GetPUProb(jet->eta(), jet->phi(),jet->pt()/m_GeV, acc_jvt(*jet), acc_fjvt_der(*jet), avgmu);
546  else{
547  ATH_MSG_ERROR("No fJVT decoration available - must have treat pileup jets set to off or provide fJVT!");
548  return StatusCode::FAILURE;
549  }
550  pt_reso = std::sqrt(jet_pu_unc*jet_pu_unc + pt_reso*pt_reso);
551  ATH_MSG_VERBOSE("jet_pu_unc: " << jet_pu_unc);
552  }
553 
554  // Use the phi resolution of the jets
555  // needs to be finished
556  if(m_doPhiReso){
557  double jet_phi_unc = std::abs(GetPhiUnc(jet->eta(), jet->phi(),jet->pt()/m_GeV));
558  phi_reso = jet->pt()*jet_phi_unc;
559  }
560 
561  // Add user defined additional resolutions. For example, b-tagged jets
562  if(!m_JetResoAux.empty()){
564  if(acc_extra.isAvailable(*jet)){
565  float extra_relative_pt_reso = acc_extra(*jet);
566  pt_reso = std::sqrt(pt_reso*pt_reso + extra_relative_pt_reso*extra_relative_pt_reso);
567  }
568  }
569 
570  return StatusCode::SUCCESS;
571  }

◆ AddMatrix()

void met::METSignificance::AddMatrix ( double(&)  X[2][2],
double(&)  Y[2][2],
double(&)  mat_new[2][2] 
)
private

Definition at line 993 of file METSignificance.cxx.

993  {
994  mat_new[0][0]=X[0][0]+Y[0][0];
995  mat_new[0][1]=X[0][1]+Y[0][1];
996  mat_new[1][0]=X[1][0]+Y[1][0];
997  mat_new[1][1]=X[1][1]+Y[1][1];
998  }

◆ AddMuon()

StatusCode met::METSignificance::AddMuon ( const xAOD::IParticle obj,
float &  pt_reso,
float &  phi_reso,
float  avgmu 
)
private

Definition at line 424 of file METSignificance.cxx.

424  {
425 
426  int dettype = 0;
427  bool DoEMuReso = false;
428  ATH_MSG_VERBOSE("Particle type: " << obj->type());
429 
430  if(obj->type()==xAOD::Type::TruthParticle){
431  pt_reso =0.01;
432  if(obj->pt()>0.5e6) pt_reso=0.03;
433  if(obj->pt()>1.0e6) pt_reso=0.1;// this is just a rough estimate for the time being until the interface can handle truth muons
434  }
435  else{
436  const xAOD::Muon* muon(static_cast<const xAOD::Muon*>(obj));
437  if(muon->muonType()==0){//Combined
438  dettype=3;//CB
439  }
440  else if(muon->muonType()==1){//MuonStandAlone
441  dettype=1;//MS
442  }
443  else if(muon->muonType()>1){//Segment, Calo, Silicon
444  dettype=2;//ID
445  }
446  else{
447  ATH_MSG_VERBOSE("This muon had none of the normal muon types (ID,MS,CB) - check this in detail");
448  return StatusCode::FAILURE;
449  }
450 
451  pt_reso=m_muonCalibrationAndSmearingTool->expectedResolution(dettype,*muon,!m_isDataMuon);
452  if(m_doPhiReso) phi_reso = muon->pt()*0.001;
453  // run the jet resolution for muons. for validation region extrapolation
454  if(!m_EMuResoAux.empty()){
456  DoEMuReso = acc_EMReso.isAvailable(*muon) ? acc_EMReso(*muon) : false;
457  }
458  ATH_MSG_VERBOSE("muon: " << pt_reso << " dettype: " << dettype << " " << muon->pt() << " " << muon->p4().Eta() << " " << muon->p4().Phi());
459  }// end reco setup
460 
461  // Common setup
462  if(m_doPhiReso) phi_reso = obj->pt()*0.001;
463  ATH_MSG_VERBOSE("muon: " << pt_reso << " dettype: " << dettype << " " << obj->pt() << " " << obj->p4().Eta() << " " << obj->p4().Phi());
464 
465  if(m_jerForEMu || DoEMuReso){
466  bool treatPUJets = m_treatPUJets;
467  m_treatPUJets=false; //turn off pileup jet treatement for this electron
468  ATH_CHECK(AddJet(obj, pt_reso, phi_reso, avgmu));
469  m_treatPUJets = treatPUJets; // reset value
470  }
471 
472  return StatusCode::SUCCESS;
473  }

◆ AddPhoton()

StatusCode met::METSignificance::AddPhoton ( const xAOD::IParticle obj,
float &  pt_reso,
float &  phi_reso 
)
private

Definition at line 507 of file METSignificance.cxx.

507  {
508 
509  if(obj->type()==xAOD::Type::TruthParticle){
510  pt_reso=m_egammaCalibTool->resolution(obj->e(),obj->eta(),obj->eta(),PATCore::ParticleType::Electron); // leaving as an electron for the truth implementation rather than declaring a reco photon
511  if(m_doPhiReso) phi_reso = obj->pt()*0.004;
512  }
513  else{
514  const xAOD::Egamma* pho(static_cast<const xAOD::Egamma*>(obj));
515  pt_reso=m_egammaCalibTool->getResolution(*pho);
516  if(m_doPhiReso) phi_reso = pho->pt()*0.004;
517  ATH_MSG_VERBOSE("pho: " << pt_reso << " " << pho->pt() << " " << pho->p4().Eta() << " " << pho->p4().Phi());
518  }
519  return StatusCode::SUCCESS;
520  }

◆ AddResoMap()

void met::METSignificance::AddResoMap ( const double  varL,
const double  varT,
const double  CvTV,
const int  term 
)
private

Definition at line 1055 of file METSignificance.cxx.

1055  {
1056 
1057  m_term_VarL[term] += varL;
1058  m_term_VarT[term] += varT;
1059  m_term_CvLT[term] += CvLT;
1060 
1061  }

◆ AddSoftTerm()

void met::METSignificance::AddSoftTerm ( const xAOD::MissingET soft,
const TVector3 &  met_vect,
double(&)  particle_sum[2][2] 
)
private

Definition at line 595 of file METSignificance.cxx.

595  {
596 
598 
599  ATH_MSG_VERBOSE("Resolution Soft term set to 10GeV");
600 
601  m_soft_vect.SetXYZ(soft->mpx()/m_GeV, soft->mpy()/m_GeV, 0);
602 
603  double particle_u[2][2] = {{m_softTermReso*m_softTermReso,0.0},
605  double particle_u_rot[2][2] = {{m_softTermReso*m_softTermReso,0.0},
607 
608  RotateXY(particle_u, particle_u_rot,met_vect.DeltaPhi(m_soft_vect));
609  m_VarL+=particle_u_rot[0][0];
610  m_VarT+=particle_u_rot[1][1];
611  m_CvLT+=particle_u_rot[0][1];
612 
613  // Save the resolutions separated for each object type
614  AddResoMap(particle_u_rot[0][0],
615  particle_u_rot[1][1],
616  particle_u_rot[0][1],
617  met::ResoSoft);
618 
619  RotateXY (particle_u, particle_u_rot,-1.0*soft->phi()); // negative phi rotation
620  AddMatrix(particle_sum, particle_u_rot, particle_sum);
621 
622  ATH_MSG_VERBOSE("SOFT " << soft->name() <<" - pt_reso: " << m_softTermReso << " soft: " << soft->met() << " phi: " << soft->phi()
623  << " Var_L: " << particle_u_rot[0][0] << " Var_T: " << particle_u_rot[1][1]
624  << " " << particle_u_rot[0][1]);
625  }
627 
628  ATH_MSG_VERBOSE("Resolution Soft term parameterized in pthard direction");
629 
630  m_soft_vect.SetXYZ(soft->mpx()/m_GeV, soft->mpy()/m_GeV, 0);
631 
632  m_pthard_vect = m_soft_vect - met_vect;
633 
634  double varTST = Var_Ptsoft(soft->met()/m_GeV);
635 
636  double particle_u[2][2] = {{varTST,0.0},
637  {0.0,varTST}};
638  double particle_u_rot[2][2] = {{varTST,0.0},
639  {0.0,varTST}};
640 
641  RotateXY(particle_u, particle_u_rot,met_vect.DeltaPhi(m_pthard_vect));
642  m_VarL+=particle_u_rot[0][0];
643  m_VarT+=particle_u_rot[1][1];
644  m_CvLT+=particle_u_rot[0][1];
645 
646  // Save the resolutions separated for each object type
647  AddResoMap(particle_u_rot[0][0],
648  particle_u_rot[1][1],
649  particle_u_rot[0][1],
650  met::ResoSoft);
651 
652  RotateXY (particle_u, particle_u_rot,-1.0*m_pthard_vect.Phi()); // negative phi rotation
653  AddMatrix(particle_sum, particle_u_rot, particle_sum);
654 
655  }
656  else if (m_softTermParam==met::TSTParam){
657 
658  ATH_MSG_VERBOSE("Resolution Soft term parameterized in TST");
659 
660  m_soft_vect.SetXYZ(soft->mpx()/m_GeV, soft->mpy()/m_GeV, 0);
661 
662  double varTST = VarparPtSoftdir(soft->met()/m_GeV, soft->sumet()/m_GeV);
663 
664  double particle_u[2][2] = {{varTST,0.0},
665  {0.0,varTST}};
666  double particle_u_rot[2][2] = {{varTST,0.0},
667  {0.0,varTST}};
668 
669  RotateXY(particle_u, particle_u_rot,met_vect.DeltaPhi(m_soft_vect));
670  m_VarL+=particle_u_rot[0][0];
671  m_VarT+=particle_u_rot[1][1];
672  m_CvLT+=particle_u_rot[0][1];
673 
674  // Save the resolutions separated for each object type
675  AddResoMap(particle_u_rot[0][0],
676  particle_u_rot[1][1],
677  particle_u_rot[0][1],
678  met::ResoSoft);
679 
680  RotateXY (particle_u, particle_u_rot,-1.0*soft->phi()); // negative phi rotation
681  AddMatrix(particle_sum, particle_u_rot, particle_sum);
682 
683  }
684  else{
685  ATH_MSG_ERROR("Soft term parameterization is NOT defined for:" << m_softTermParam);
686  }
687 
688  }

◆ AddTau()

void met::METSignificance::AddTau ( const xAOD::IParticle obj,
float &  pt_reso,
float &  phi_reso 
)
private

Definition at line 574 of file METSignificance.cxx.

574  {
575 
576  // tau objects
577  if(obj->type()==xAOD::Type::TruthParticle){
578  pt_reso= 0.1;
579  if(m_doPhiReso) phi_reso = obj->pt()*0.01;
580  }
581  else{
582  const xAOD::TauJet* tau(static_cast<const xAOD::TauJet*>(obj));
583  if (auto *combp4 = dynamic_cast<TauCombinedTES*>(&*m_tauCombinedTES)) {
584  pt_reso = combp4->getMvaEnergyResolution(*tau);
585  }
586 
587  if(m_doPhiReso) phi_reso = tau->pt()*0.01;
588  ATH_MSG_VERBOSE("tau: " << pt_reso << " " << tau->pt() << " " << tau->p4().Eta() << " " << tau->p4().Phi() << " phi reso: " << phi_reso);
589  }
590  }

◆ Bias_PtSoftParall()

double met::METSignificance::Bias_PtSoftParall ( const double  PtSoft_Parall)
private

Definition at line 1046 of file METSignificance.cxx.

1047  {
1048  if (-60.<=PtSoft_Parall && PtSoft_Parall<0.) return -8. -0.4*PtSoft_Parall;
1049  if (-60.>PtSoft_Parall) return -8. -0.4 * (-60.);
1050  if( PtSoft_Parall>=0. && PtSoft_Parall<60.) return -8. -PtSoft_Parall;
1051  if(PtSoft_Parall>60.) return -8. -60.;
1052  return 0.0;
1053  }

◆ BiasPtSoftdir()

double met::METSignificance::BiasPtSoftdir ( const double  PtSoft)
private

Parameterization with PtSoft Direction //.

Definition at line 1021 of file METSignificance.cxx.

1021  {
1022  if (PtSoft<60.) return (0.145)+(-0.45)*PtSoft;
1023  else return (0.145)+(-0.45)*(60.);
1024  }

◆ CovMatrixRotation()

std::tuple< double, double, double > met::METSignificance::CovMatrixRotation ( double  var_x,
double  var_y,
double  cv_xy,
double  Phi 
)
private

Definition at line 950 of file METSignificance.cxx.

950  {
951  // Covariance matrix parallel and transverse to the Phi direction
952  Double_t V11 = std::pow(std::cos(Phi),2)*var_x + 2*std::sin(Phi)*std::cos(Phi)*cv_xy + std::pow(std::sin(Phi),2)*var_y;
953  Double_t V22 = std::pow(std::sin(Phi),2)*var_x - 2*std::sin(Phi)*std::cos(Phi)*cv_xy + std::pow(std::cos(Phi),2)*var_y;
954  Double_t V12 = std::pow(std::cos(Phi),2)*cv_xy -std::sin(Phi)*std::cos(Phi)*var_x + std::sin(Phi)*std::cos(Phi)*var_y - std::pow(std::sin(Phi),2)*cv_xy; // rho is equal to one for just one jet
955  return std::make_tuple( V11, V22, V12);
956  }

◆ 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

◆ finalize()

StatusCode met::METSignificance::finalize ( )

Definition at line 190 of file METSignificance.cxx.

190  {
191 
192  ATH_MSG_INFO ("Finalizing " << name() << "...");
193  delete m_phi_reso_pt20;
194  delete m_phi_reso_pt50;
195  delete m_phi_reso_pt100;
196 
197  return StatusCode::SUCCESS;
198  }

◆ getEtaBin()

unsigned int met::METSignificance::getEtaBin ( double  jet_eta)
staticprivate

Definition at line 929 of file METSignificance.cxx.

929  {
930  // For the phi uncertainty lookup
931  if(-4.5<jet_eta && -3.8>=jet_eta) return 1;
932  else if(-3.8<jet_eta && -3.5>=jet_eta) return 2;
933  else if(-3.5<jet_eta && -3.0>=jet_eta) return 3;
934  else if(-3.0<jet_eta && -2.7>=jet_eta) return 4;
935  else if(-2.7<jet_eta && -2.4>=jet_eta) return 5;
936  else if(-2.4<jet_eta && -1.5>=jet_eta) return 6;
937  else if(-1.5<jet_eta && -0.5>=jet_eta) return 7;
938  else if(-0.5<jet_eta && 0.0>=jet_eta) return 8;
939  else if(0.0<jet_eta && 0.5>=jet_eta) return 9;
940  else if(0.5<jet_eta && 1.5>=jet_eta) return 10;
941  else if(1.5<jet_eta && 2.4>=jet_eta) return 11;
942  else if(2.4<jet_eta && 2.7>=jet_eta) return 12;
943  else if(2.7<jet_eta && 3.0>=jet_eta) return 13;
944  else if(3.0<jet_eta && 3.5>=jet_eta) return 14;
945  else if(3.5<jet_eta && 3.8>=jet_eta) return 15;
946  else if(3.8<jet_eta ) return 16;
947  return 0;
948  }

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

◆ GetMETOverSqrtHT()

double met::METSignificance::GetMETOverSqrtHT ( ) const
inlinevirtual

Implements IMETSignificance.

Definition at line 74 of file METSignificance.h.

74 { if(m_ht>0.0) return (m_met/std::sqrt(m_ht)); return -1.0; }

◆ GetMETOverSqrtSumET()

double met::METSignificance::GetMETOverSqrtSumET ( ) const
inlinevirtual

Implements IMETSignificance.

Definition at line 73 of file METSignificance.h.

73 { if(m_sumet>0.0) return (m_met/std::sqrt(m_sumet)); return -1.0; }

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

◆ GetPhiUnc()

double met::METSignificance::GetPhiUnc ( double  jet_eta,
double  jet_phi,
double  jet_pt 
)
private

Definition at line 910 of file METSignificance.cxx.

910  {
911 
912  unsigned int xbin = getEtaBin(jet_eta);
913  unsigned int ybin = jet_phi>0.0 ? int(jet_phi/0.4)+9 : int(jet_phi/0.4)+8;
914 
915  // Stored as bin content = Mean, error = RMS, we want to use the RMS.
917  ATH_MSG_ERROR("Jet Phi Resolution histograms are invalid.");
918  return 0.0;
919  }
920 
921  // Collect the phi resolution
922  if(jet_pt<50.0)
923  return m_phi_reso_pt20->GetBinError(xbin, ybin);
924  else if(jet_pt<100.0)
925  return m_phi_reso_pt50->GetBinError(xbin, ybin);
926  return m_phi_reso_pt100->GetBinError(xbin, ybin);
927  }

◆ getProperty()

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

Get one of the tool's properties.

◆ GetPUProb()

double met::METSignificance::GetPUProb ( double  jet_eta,
double  jet_phi,
double  jet_pt,
double  jet_jvt,
double  jet_fjvt,
float  avgmu 
)
private

Definition at line 690 of file METSignificance.cxx.

693  {
694 
695  double unc=0.0;
696 
697  // Coefficients from Doug Schaefer <schae@cern.ch> and the MET subgroup
698  if(m_JetCollection == "AntiKt4EMTopoJets"){
699  if(std::abs(jet_eta)<2.4){
700  if(jet_pt<30){
701  if(jet_jvt<0.11) unc = 1;
702  else if(jet_jvt<0.25) unc = 0.0730 + 0.0024 * avgmu + 0.00001 * avgmu * avgmu;
703  else if(jet_jvt<0.85) unc = 0.0995 + 0.0031 * avgmu + 0.00005 * avgmu * avgmu;
704  else if(jet_jvt<0.95) unc = 0.0311 + 0.0025 * avgmu + 0.00005 * avgmu * avgmu;
705  else unc = 0.0308 -0.0010 * avgmu + 0.00006 * avgmu * avgmu ;
706  }else if(jet_pt<40){
707  if(jet_jvt<0.11) unc = 1.;
708  else if(jet_jvt<0.25) unc = 1.;
709  else if(jet_jvt<0.85) unc = -0.0188 + 0.0039 * avgmu + 0.00002 * avgmu * avgmu;
710  else if(jet_jvt<0.95) unc = 0.0252 -0.0009 * avgmu + 0.00006 * avgmu * avgmu ;
711  else unc = 0.0085 -0.0003 * avgmu + 0.00002 * avgmu * avgmu ;
712  }else if(jet_pt<50){
713  if(jet_jvt<0.11) unc = 1;
714  else if(jet_jvt<0.25) unc = 0.0345 -0.0006 * avgmu + 0.00004 * avgmu * avgmu ;
715  else if(jet_jvt<0.85) unc = 0.1078 -0.0051 * avgmu + 0.00011 * avgmu * avgmu ;
716  else if(jet_jvt<0.95) unc = -0.0026 + 0.0005 * avgmu + 0.00002 * avgmu * avgmu;
717  else unc = 0.0090 -0.0004 * avgmu + 0.00001 * avgmu * avgmu ;
718  }else if(jet_pt<60){
719  if(jet_jvt<0.11) unc = 1;
720  else if(jet_jvt<0.25) unc = -0.0321 + 0.0030 * avgmu -0.00002 * avgmu * avgmu;
721  else if(jet_jvt<0.85) unc = 0.0260 -0.0007 * avgmu + 0.00003 * avgmu * avgmu ;
722  else unc = -0.0040 + 0.0003 * avgmu;
723  }else if(jet_pt<100){
724  unc = 0.9492 -2.0757 * jet_jvt + 1.13328 * jet_jvt * jet_jvt;
725  }else if(jet_pt<150){
726  unc = 0.7888 -1.8372 * jet_jvt + 1.05539 * jet_jvt * jet_jvt;
727  }
728  }else if(std::abs(jet_eta)<2.6){
729  if(jet_pt<30){
730  if(jet_jvt<0.11) unc = 0.2633 + 0.0091 * avgmu + -0.00009 * avgmu * avgmu;
731  else if(jet_jvt<0.25) unc = 0.1841 + 0.0144 * avgmu + -0.00008 * avgmu * avgmu;
732  else if(jet_jvt<0.85) unc = 0.1401 + 0.0048 * avgmu + 0.00006 * avgmu * avgmu ;
733  else if(jet_jvt<0.95) unc = -0.0118 + 0.0076 * avgmu + 0.00003 * avgmu * avgmu;
734  else unc = 0.0534 + -0.0011 * avgmu + 0.00010 * avgmu * avgmu;
735  }else if(jet_pt<40){
736  if(jet_jvt<0.11) unc = 0.1497 + 0.0133 * avgmu + -0.00015 * avgmu * avgmu ;
737  else if(jet_jvt<0.25) unc = -0.2260 + 0.0276 * avgmu + -0.00021 * avgmu * avgmu ;
738  else if(jet_jvt<0.85) unc = 0.2743 + -0.0093 * avgmu + 0.00022 * avgmu * avgmu ;
739  else if(jet_jvt<0.95) unc = 0.0604 + 0.0006 * avgmu + 0.00006 * avgmu * avgmu ;
740  else unc = 0.0478 + -0.0009 * avgmu + 0.00004 * avgmu * avgmu ;
741  }else if(jet_pt<50){
742  if(jet_jvt<0.11) unc = -0.2187 + 0.0317 * avgmu + -0.00037 * avgmu * avgmu ;
743  else if(jet_jvt<0.25) unc = 0.0964 + 0.0053 * avgmu + 0.00002 * avgmu * avgmu ;
744  else if(jet_jvt<0.85) unc = 1.1730 + -0.0624 * avgmu + 0.00088 * avgmu * avgmu ;
745  else if(jet_jvt<0.95) unc = -0.2011 + 0.0151 * avgmu + -0.00018 * avgmu * avgmu ;
746  else unc = 0.0145 + -0.0003 * avgmu + 0.00002 * avgmu * avgmu ;
747  }else if(jet_pt<60){
748  if(jet_jvt<0.11) unc = 0.0051 + 0.0113 * avgmu + -0.00008 * avgmu * avgmu ;
749  else if(jet_jvt<0.25) unc = -0.1024 + 0.0109 * avgmu + -0.00006 * avgmu * avgmu ;
750  else if(jet_jvt<0.85) unc = 1.2491 + -0.0501 * avgmu + 0.00052 * avgmu * avgmu ;
751  else unc = 0.0267 + -0.0014 * avgmu + 0.00003 * avgmu * avgmu ;
752  }else if(jet_pt<100){
753  unc = 0.8951 -2.4995 * jet_jvt + 1.63229 * jet_jvt * jet_jvt;
754  }else if(jet_pt<150){
755  unc = 0.9998 -1.7319 * jet_jvt + 0.72680 * jet_jvt * jet_jvt;
756  }
757  }else if(std::abs(jet_eta)<2.7){
758  if(jet_pt<30){
759  if(jet_jvt<0.11) unc = 0.3001 + 0.0054 * avgmu -0.00004 * avgmu * avgmu ;
760  else if(jet_jvt<0.25) unc = 0.0663 + 0.0198 * avgmu -0.00013 * avgmu * avgmu ;
761  else if(jet_jvt<0.85) unc = -0.0842 + 0.0163 * avgmu -0.00008 * avgmu * avgmu ;
762  else if(jet_jvt<0.95) unc = -0.0219 + 0.0080 * avgmu + 0.00003 * avgmu * avgmu;
763  else unc = 0.0461 -0.0003 * avgmu + 0.00012 * avgmu * avgmu ;
764  }else if(jet_pt<40){
765  if(jet_jvt<0.11) unc = 0.1885 + 0.0083 * avgmu -0.00006 * avgmu * avgmu ;
766  else if(jet_jvt<0.25) unc = -0.0286 + 0.0150 * avgmu -0.00007 * avgmu * avgmu;
767  else if(jet_jvt<0.85) unc = 0.0152 + 0.0028 * avgmu + 0.00005 * avgmu * avgmu;
768  else if(jet_jvt<0.95) unc = 0.1815 -0.0076 * avgmu + 0.00018 * avgmu * avgmu ;
769  else unc = 0.0192 -0.0003 * avgmu + 0.00007 * avgmu * avgmu ;
770  }else if(jet_pt<50){
771  if(jet_jvt<0.11) unc = 0.1257 + 0.0074 * avgmu -0.00004 * avgmu * avgmu ;
772  else if(jet_jvt<0.25) unc = -0.0276 + 0.0080 * avgmu + 0.00000 * avgmu * avgmu;
773  else if(jet_jvt<0.85) unc = 0.1403 -0.0051 * avgmu + 0.00009 * avgmu * avgmu ;
774  else if(jet_jvt<0.95) unc = 0.2078 -0.0101 * avgmu + 0.00017 * avgmu * avgmu ;
775  else unc = 0.2597 -0.0132 * avgmu + 0.00020 * avgmu * avgmu ;
776  }else if(jet_pt<60){
777  if(jet_jvt<0.11) unc = 0.1111 + 0.0045 * avgmu -0.00000 * avgmu * avgmu ;
778  else if(jet_jvt<0.25) unc = 0.0975 -0.0011 * avgmu + 0.00008 * avgmu * avgmu ;
779  else if(jet_jvt<0.85) unc = 0.0920 -0.0053 * avgmu + 0.00013 * avgmu * avgmu ;
780  else unc = -0.0071 + 0.0016 * avgmu -0.00001 * avgmu * avgmu;
781  }else if(jet_pt<100){
782  unc = 0.4660 -1.2116 * jet_jvt + 0.78807 * jet_jvt * jet_jvt;
783  }else if(jet_pt<150){
784  unc = 0.2254 -0.5476 * jet_jvt + 0.32617 * jet_jvt * jet_jvt;
785  }
786  }// end eta 2.7
787  else{//forward jets
788  float fjvt = jet_fjvt>0.6 ? 0.6 : jet_fjvt; // the pileup more or less plateaus at 0.6
789  if(jet_pt<30) unc = 0.5106 + 1.2566 * fjvt -1.15060 * fjvt * fjvt;
790  else if(jet_pt<40) unc = 0.2972 + 1.9418 * fjvt -1.82694 * fjvt * fjvt;
791  else if(jet_pt<50) unc = 0.1543 + 1.9864 * fjvt -1.48429 * fjvt * fjvt;
792  else if(jet_pt<60) unc = 0.1050 + 1.3196 * fjvt + 0.03554 * fjvt * fjvt;
793  else if(jet_pt<120) unc = 0.0400 + 0.5653 * fjvt + 1.96323 * fjvt * fjvt;
794  // max of 0.9 seems reasonable
795  if(jet_fjvt>0.6) unc = 0.9;
796  }
797  // end emtopo
798  // Coefficients from Badr-eddine Ngair <badr-eddine.ngair@cern.ch>
799  // Pile-UP (resolution) estimatetd using Z->ee Events using exclusive jet_pt binning using RUN3 samples
800  }else{//p-flow inputs
801  if(std::abs(jet_eta)<2.4){
802  if(jet_pt<30){
803  if(jet_jvt<0.11) unc = 0.524466 + 0.00750057 * avgmu -4.73422e-05 * avgmu * avgmu ;
804  else if(jet_jvt<0.25) unc = 4.17584e-01 + 1.00112e-02 * avgmu -7.43546e-05 * avgmu * avgmu ;
805  else if(jet_jvt<0.85) unc = 2.12625e-01 + 1.03484e-02 * avgmu -5.68063e-05 * avgmu * avgmu;
806  else if(jet_jvt<0.95) unc = 1.08396e-01 + 1.04273e-02 * avgmu -5.00299e-05 * avgmu * avgmu;
807  else unc = 1.26304e-03 +2.10385e-04 * avgmu + 1.10086e-06 * avgmu * avgmu ;
808  }else if(jet_pt<40){
809  if(jet_jvt<0.11) unc = 3.78090e-01 + 8.83535e-03 * avgmu -5.38873e-05* avgmu * avgmu;
810  else if(jet_jvt<0.25) unc = 2.67244e-01+ 9.81193e-03* avgmu -5.87765e-05 * avgmu * avgmu;
811  else if(jet_jvt<0.85) unc = 9.60892e-02 +8.11069e-03 * avgmu -3.73101e-05 * avgmu * avgmu ;
812  else if(jet_jvt<0.95) unc = 5.16235e-02 +6.27371e-03 * avgmu -1.95433e-05 * avgmu * avgmu ;
813  else unc = -2.74714e-03 +2.45273e-04* avgmu -1.44731e-06* avgmu * avgmu ;
814  }else if(jet_pt<50){
815  if(jet_jvt<0.11) unc = 2.44953e-01 + 1.23246e-02 * avgmu -8.48696e-05 * avgmu * avgmu;
816  else if(jet_jvt<0.25) unc = 1.78141e-01 + 1.09451e-02 * avgmu -6.90796e-05 * avgmu * avgmu;
817  else if(jet_jvt<0.85) unc = 9.60998e-02+6.21945e-03* avgmu -2.76203e-05* avgmu * avgmu ;
818  else if(jet_jvt<0.95) unc = 5.79210e-02+ 4.49780e-03 * avgmu + -1.15125e-05 * avgmu * avgmu ;
819  else unc = -2.96644e-03 +2.27707e-04 * avgmu -1.86712e-06 * avgmu * avgmu ;
820  }else if(jet_pt<60){
821  if(jet_jvt<0.11) unc = 1.97017e-01 + 1.34089e-02 * avgmu -9.18923e-05 * avgmu * avgmu ;
822  else if(jet_jvt<0.25) unc = 1.27602e-01 + 1.12287e-02 * avgmu -6.62192e-05 * avgmu * avgmu ;
823  else if(jet_jvt<0.85) unc = 6.94905e-02 + 6.27784e-03 * avgmu -3.07298e-05 * avgmu * avgmu;
824  else if(jet_jvt<0.95) unc = 3.58417e-02 +4.62268e-03 * avgmu -2.12417e-05 * avgmu * avgmu ;
825  else unc = 1.35616e-03 + 5.46723e-06* avgmu + 1.92327e-07 * avgmu * avgmu;
826  }else if(jet_pt<100){
827  unc = 6.19009e-01 -8.96042e-01 * jet_jvt + 2.89066e-01 * jet_jvt * jet_jvt;
828  }else if(jet_pt<150){
829  unc = 6.18350e-01 -8.97327e-01 * jet_jvt + 2.90998e-01 * jet_jvt * jet_jvt;
830  }
831  }else if(std::abs(jet_eta)<2.6){
832  if(jet_pt<30){
833  if(jet_jvt<0.11) unc = 5.06496e-01 + 8.21123e-03 * avgmu -5.17501e-05 * avgmu * avgmu;
834  else if(jet_jvt<0.25) unc = 4.26616e-01 + 9.25936e-03 * avgmu -5.68847e-05 * avgmu * avgmu;
835  else if(jet_jvt<0.85) unc = 2.03333e-01 + 1.11951e-02 * avgmu-6.09233e-05 * avgmu * avgmu ;
836  else if(jet_jvt<0.95) unc = 1.03167e-01 + 1.13444e-02 * avgmu -5.43274e-05 * avgmu * avgmu;
837  else unc = 1.51480e-03 + 2.08394e-04 * avgmu + 1.39579e-06 * avgmu * avgmu;
838  }else if(jet_pt<40){
839  if(jet_jvt<0.11) unc = 3.40612e-01 + 9.94199e-03 * avgmu + -5.93760e-05* avgmu * avgmu ;
840  else if(jet_jvt<0.25) unc = 2.43360e-01 + 1.05579e-02* avgmu + -6.05403e-05* avgmu * avgmu ;
841  else if(jet_jvt<0.85) unc = 8.34364e-02 + 8.76364e-03 * avgmu -3.64035e-05 * avgmu * avgmu ;
842  else if(jet_jvt<0.95) unc = 4.40362e-02 + 6.92580e-03 * avgmu -1.79853e-05 * avgmu * avgmu ;
843  else unc = -2.68670e-03 + 2.50861e-04 * avgmu + -1.46410e-06* avgmu * avgmu ;
844  }else if(jet_pt<50){
845  if(jet_jvt<0.11) unc = 2.36561e-01 + 1.14078e-02 * avgmu +-7.10025e-05 * avgmu * avgmu ;
846  else if(jet_jvt<0.25) unc = 1.86653e-01 +9.61140e-03 * avgmu +-5.15356e-05 * avgmu * avgmu ;
847  else if(jet_jvt<0.85) unc = 9.37026e-02 +5.93028e-03 * avgmu +-2.02571e-05 * avgmu * avgmu ;
848  else if(jet_jvt<0.95) unc = 5.79210e-02+ 4.49780e-03 * avgmu + -1.15125e-05 * avgmu * avgmu ;
849  else unc = -3.02487e-03 + 2.31337e-04* avgmu + -1.85225e-06 * avgmu * avgmu ;
850  }else if(jet_pt<60){
851  if(jet_jvt<0.11) unc =1.75215e-01+ 1.21805e-02 * avgmu + -7.48846e-05 * avgmu * avgmu ;
852  else if(jet_jvt<0.25) unc = 1.26276e-01+ 9.80117e-03 * avgmu + -4.99913e-05 * avgmu * avgmu ;
853  else if(jet_jvt<0.85) unc = 7.91422e-02 + 5.26009e-03 * avgmu +-1.87388e-05 * avgmu * avgmu ;
854  else if(jet_jvt<0.95) unc = 4.39136e-02+ 4.09435e-03* avgmu +-1.35926e-05 * avgmu * avgmu ;
855  else unc = 1.21410e-03 + 1.14188e-05 * avgmu + 1.53654e-07 * avgmu * avgmu ;
856  }else if( jet_pt<100){
857  unc = 6.44179e-01 -9.20194e-01* jet_jvt + 2.89686e-01 * jet_jvt * jet_jvt;
858  }else if(jet_pt<150){
859  unc = 6.43423e-01 -9.21407e-01 * jet_jvt + 2.91648e-01 * jet_jvt * jet_jvt;
860  }
861  }else if(std::abs(jet_eta)<2.7){
862  if(jet_pt<30){
863  if(jet_jvt<0.11) unc = 4.76243e-01 + 9.22046e-03 * avgmu -5.88765e-05 * avgmu * avgmu;
864  else if(jet_jvt<0.25) unc = 4.07406e-01+ 1.01167e-02 * avgmu -6.30429e-05 * avgmu * avgmu;
865  else if(jet_jvt<0.85) unc = 2.01324e-01+ 1.20631e-02 * avgmu -6.75582e-05 * avgmu * avgmu;
866  else if(jet_jvt<0.95) unc = 1.03815e-01 + 1.24007e-02 * avgmu -6.26892e-05 * avgmu * avgmu;
867  else unc = 1.63714e-03 +2.00682e-04 * avgmu + 1.53621e-06 * avgmu * avgmu;
868  }else if(jet_pt<40){
869  if(jet_jvt<0.11) unc = 2.89505e-01 + 1.11643e-02 * avgmu -6.45475e-05* avgmu * avgmu;
870  else if(jet_jvt<0.25) unc = 2.15968e-01 + 1.14451e-02* avgmu -6.32545e-05 * avgmu * avgmu;
871  else if(jet_jvt<0.85) unc = 7.92319e-02 +9.66239e-03* avgmu -3.81872e-05 * avgmu * avgmu ;
872  else if(jet_jvt<0.95) unc = 4.25501e-02 +7.90022e-03 * avgmu -1.93561e-05 * avgmu * avgmu;
873  else unc = -2.68089e-03 +2.50117e-04 * avgmu -1.43591e-06 * avgmu * avgmu ;
874  }else if(jet_pt<50){
875  if(jet_jvt<0.11) unc = 1.66062e-01+ 1.21029e-02 * avgmu -7.00743e-05 * avgmu * avgmu;
876  else if(jet_jvt<0.25) unc = 1.36874e-01+ 1.03543e-02 * avgmu -5.13482e-05 * avgmu * avgmu;
877  else if(jet_jvt<0.85) unc = 7.24015e-02 +6.72611e-03 * avgmu -1.98316e-05 * avgmu * avgmu;
878  else if(jet_jvt<0.95) unc = 4.84508e-02 +5.10548e-03* avgmu -8.65067e-06 * avgmu * avgmu;
879  else unc = -3.02710e-03 +2.31422e-04* avgmu -1.84795e-06 * avgmu * avgmu;
880  }else if(jet_pt<60){
881  if(jet_jvt<0.11) unc =1.33626e-01 + 1.02813e-02 * avgmu -4.87698e-05 * avgmu * avgmu;
882  else if(jet_jvt<0.25) unc = 1.06724e-01 + 8.45131e-03 * avgmu -3.26833e-05 * avgmu * avgmu;
883  else if(jet_jvt<0.85) unc = 7.47468e-02 +4.85387e-03 * avgmu -1.01430e-05* avgmu * avgmu;
884  else if(jet_jvt<0.95) unc = 4.57521e-02 + 3.86782e-03 * avgmu -6.38948e-06 * avgmu * avgmu;
885  else unc = 1.20495e-03 +1.18941e-05* avgmu +1.47846e-07 * avgmu * avgmu;
886  }else if( jet_pt<100){
887  unc = 6.59079e-01 -9.29754e-01 * jet_jvt + 2.83653e-01 * jet_jvt * jet_jvt;
888  }else if(jet_pt<150){
889  unc = 6.58295e-01 -9.31032e-01 * jet_jvt + 2.85724e-01 * jet_jvt * jet_jvt;
890  }
891  }// end eta 2.7
892  else{//forward jets
893  float fjvt = jet_fjvt>0.6 ? 0.6 : jet_fjvt; // the pileup more or less plateaus at 0.6
894  if(jet_pt<30) unc = 0.605329 + 0.625734 * fjvt -0.42484 * fjvt * fjvt;
895  else if(jet_pt<40) unc = 0.409696 + 1.00173 * fjvt -0.609179 * fjvt * fjvt;
896  else if(jet_pt<50) unc = 0.173755 + 1.48847 * fjvt -0.803771 * fjvt * fjvt;
897  else if(jet_pt<60) unc = 0.0140303 + 1.79909 * fjvt -0.889274 * fjvt * fjvt;
898  else if(jet_pt<120) unc = -0.0828333 + 1.81167 * fjvt -0.716881 * fjvt * fjvt;
899  // max of 0.9 seems reasonable
900  if(jet_fjvt>0.6) unc = 0.9;
901  }
902  }// end pflow
903 
904  unc = std::min(unc, 1.0);
905  unc = std::max(unc, 0.0);
906 
907  return unc;
908  }

◆ GetRho()

double met::METSignificance::GetRho ( ) const
inlinevirtual

Implements IMETSignificance.

Definition at line 77 of file METSignificance.h.

77 { return m_rho; }

◆ GetSigDirectional()

double met::METSignificance::GetSigDirectional ( ) const
inlinevirtual

Implements IMETSignificance.

Definition at line 76 of file METSignificance.h.

76 { if(m_VarL>0.0) return m_met/std::sqrt(m_VarL); return -1.0; }

◆ GetSignificance()

double met::METSignificance::GetSignificance ( ) const
inlinevirtual

Implements IMETSignificance.

Definition at line 75 of file METSignificance.h.

75 { if(m_significance>0.0) return std::sqrt(m_significance); return -1.0; }

◆ GetTermVarL()

double met::METSignificance::GetTermVarL ( const int  term) const
inlinevirtual

Implements IMETSignificance.

Definition at line 80 of file METSignificance.h.

80 { if(m_term_VarL.find(term)!=m_term_VarL.end()) return m_term_VarL.find(term)->second; return -1.0e3; }

◆ GetTermVarT()

double met::METSignificance::GetTermVarT ( const int  term) const
inlinevirtual

Implements IMETSignificance.

Definition at line 81 of file METSignificance.h.

81 { if(m_term_VarT.find(term)!=m_term_VarT.end()) return m_term_VarT.find(term)->second; return -1.0e3; }

◆ GetVarL()

double met::METSignificance::GetVarL ( ) const
inlinevirtual

Implements IMETSignificance.

Definition at line 78 of file METSignificance.h.

78 { return m_VarL; }

◆ GetVarT()

double met::METSignificance::GetVarT ( ) const
inlinevirtual

Implements IMETSignificance.

Definition at line 79 of file METSignificance.h.

79 { return m_VarT; }

◆ initialize()

StatusCode met::METSignificance::initialize ( )
virtual

Dummy implementation of the initialisation function.

It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...

Reimplemented from asg::AsgTool.

Definition at line 107 of file METSignificance.cxx.

107  {
108 
109  ATH_MSG_INFO ("Initializing " << name() << "...");
110  ATH_MSG_INFO("Set up JER tools");
111  if(m_JetCollection == "AntiKt4EMTopoJets"){
112  ATH_MSG_WARNING(" tool wasn't updated for EMTopo jets so far and is not supported.");
113  }
114  // Phi resolution
116  m_file = TFile::Open(configpath.c_str());
117  if(m_file){
118  m_phi_reso_pt20 = static_cast<TH2F *>(m_file->Get("phi_reso_pt20"));
119  if(!m_phi_reso_pt20) ATH_MSG_ERROR("PU Jet Uncertainty Histogram not valid");
120  m_phi_reso_pt50 = static_cast<TH2F *>(m_file->Get("phi_reso_pt50"));
121  if(!m_phi_reso_pt50) ATH_MSG_ERROR("PU Jet Uncertainty Histogram not valid");
122  m_phi_reso_pt100 = static_cast<TH2F *>(m_file->Get("phi_reso_pt100"));
123  if(!m_phi_reso_pt100) ATH_MSG_ERROR("PU Jet Uncertainty Histogram not valid");
124  }
125  else{
126  ATH_MSG_ERROR("PU Jet Uncertainty TFile is not valid: " << configpath);
127  return StatusCode::FAILURE;
128  }
129 
130  std::string toolName;
131  std::string jetcoll = "AntiKt4EMTopoJets";
132  toolName = "JetCalibrationTool/jetCalibTool_"+m_JetCollection;
133  ATH_MSG_INFO("Set up jet resolution tool");
134  if (m_jetCalibTool.empty()){
135 
136  asg::AsgToolConfig toolConfig (toolName);
137  // FIXME: it would be better to configure this via properties
138  std::string config = "JES_data2017_2016_2015_Recommendation_Aug2018_rel21.config";
139  std::string calibSeq = "JetArea_Residual_EtaJES_GSC_Smear";
140  std::string calibArea = "00-04-81";
141  if(m_JetCollection=="AntiKt4EMPFlow"){
142  config = "JES_data2017_2016_2015_Recommendation_PFlow_Aug2018_rel21.config";
143  calibSeq = "JetArea_Residual_EtaJES_GSC_Smear";
144  calibArea = "00-04-81";
145  }
146 
147  ANA_CHECK( toolConfig.setProperty("JetCollection",m_JetCollection) );
148  ANA_CHECK( toolConfig.setProperty("ConfigFile",config) );
149  ANA_CHECK( toolConfig.setProperty("CalibSequence",calibSeq) );
150  ANA_CHECK( toolConfig.setProperty("CalibArea",calibArea) );
151  ANA_CHECK( toolConfig.setProperty("IsData",false) ); // configure for MC due to technical reasons. Both data and MC smearing are available with this setting.
152  ANA_CHECK( toolConfig.makePrivateTool (m_jetCalibTool) );
153  }
154  ANA_CHECK( m_jetCalibTool.retrieve() );
155 
156  ATH_MSG_INFO("Set up MuonCalibrationAndSmearing tools");
157  toolName = "MuonCalibrationAndSmearingTool";
158  if (m_muonCalibrationAndSmearingTool.empty()) {
159  ATH_MSG_WARNING("Setup the muon calibration tool with calib mode 1. Please consider to configure the tool via the 'MuonCalibTool' property.");
160  asg::AsgToolConfig toolConfig ("CP::MuonCalibTool/METSigAutoConf_"+toolName);
161  ATH_CHECK(toolConfig.setProperty("calibMode", 1));
162  ATH_CHECK(toolConfig.makePrivateTool(m_muonCalibrationAndSmearingTool));
163  }
165 
166  ATH_MSG_DEBUG( "Initialising EgcalibTool " );
167  toolName = "EgammaCalibrationAndSmearingTool";
168  if (m_egammaCalibTool.empty()){
169  asg::AsgToolConfig toolConfig ("CP::EgammaCalibrationAndSmearingTool/METSigAutoConf_" + toolName);
170  ATH_CHECK(toolConfig.setProperty("ESModel", "es2017_R21_v0"));
171  ATH_CHECK(toolConfig.setProperty("decorrelationModel", "1NP_v1"));
172  if(m_isAFII) ATH_CHECK(toolConfig.setProperty("useFastSim", 1));
173  else ATH_CHECK(toolConfig.setProperty("useFastSim", 0));
174  ATH_CHECK (toolConfig.makePrivateTool (m_egammaCalibTool));
175  }
176  ATH_CHECK( m_egammaCalibTool.retrieve() );
177 
178  toolName = "TauPerfTool";
179  if (m_tauCombinedTES.empty()){
180  asg::AsgToolConfig toolConfig ("TauCombinedTES/METSigAutoConf_" + toolName);
181  ATH_CHECK( toolConfig.setProperty("WeightFileName", "CombinedTES_R22_Round2.5_v2.root") );
182  ATH_CHECK( toolConfig.setProperty("useMvaResolution", true) );
183  ATH_CHECK( toolConfig.makePrivateTool(m_tauCombinedTES) );
184  }
185  ATH_CHECK( m_tauCombinedTES.retrieve() );
186 
187  return StatusCode::SUCCESS;
188  }

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

◆ InvertMatrix()

void met::METSignificance::InvertMatrix ( double(&)  mat[2][2],
double(&)  m[2][2] 
)
private

Definition at line 975 of file METSignificance.cxx.

975  {
976 
977  // determinant
978  double det = mat[0][0]*mat[1][1]-mat[0][1]*mat[1][0];
979 
980  m[0][0]=0.0;
981  m[0][1]=0.0;
982  m[1][0]=0.0;
983  m[1][1]=0.0;
984 
985  if(det==0.0) return;
986 
987  m[0][0]= 1.0/det*(mat[1][1]);
988  m[1][0]=-1.0/det*(mat[1][0]);
989  m[0][1]=-1.0/det*(mat[0][1]);
990  m[1][1]= 1.0/det*(mat[0][0]);
991  }

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

◆ RotateToPhi()

StatusCode met::METSignificance::RotateToPhi ( float  phi)
virtual

Implements IMETSignificance.

Definition at line 381 of file METSignificance.cxx.

381  {
382 
383  // Rotation (components)
385 
386  if( m_VarL != 0 ){
388  m_rho = m_CvLT / std::sqrt( m_VarL * m_VarT ) ;
389  }
390  ATH_MSG_DEBUG(" Significance (squared) at new phi: " << m_significance
391  << " rho: " << GetRho()
392  << " MET: " << m_met
393  << " sigmaL: " << GetVarL()
394  << " sigmaT: " << GetVarT() );
395 
396  return StatusCode::SUCCESS;
397  }

◆ RotateXY()

void met::METSignificance::RotateXY ( const double(&)  mat[2][2],
double(&)  mat_new[2][2],
double  phi 
)
private

Definition at line 1000 of file METSignificance.cxx.

1000  {
1001 
1002  double c = std::cos(phi);
1003  double s = std::sin(phi);
1004  double cc = c*c;
1005  double ss = s*s;
1006  double cs = c*s;
1007 
1008  double V11 = mat[0][0]*cc + mat[1][1]*ss - cs*(mat[1][0] + mat[0][1]);
1009  double V12 = mat[0][1]*cc - mat[1][0]*ss + cs*(mat[0][0] - mat[1][1]);
1010  double V21 = mat[1][0]*cc - mat[0][1]*ss + cs*(mat[0][0] - mat[1][1]);
1011  double V22 = mat[0][0]*ss + mat[1][1]*cc + cs*(mat[1][0] + mat[0][1]);
1012 
1013  mat_new[0][0]=V11;
1014  mat_new[0][1]=V12;
1015  mat_new[1][0]=V21;
1016  mat_new[1][1]=V22;
1017  }

◆ SetLambda()

StatusCode met::METSignificance::SetLambda ( const float  px,
const float  py,
const bool  GeV = true 
)
virtual

Implements IMETSignificance.

Definition at line 399 of file METSignificance.cxx.

399  {
400 
401  // compute the new direction
402  double GeVConv = GeV ? 1.0 : m_GeV;
403  m_lamda_vect.SetXYZ(px/GeVConv, py/GeVConv, 0.0);
405  const double met_m_lamda = m_lamda_vect.Pt();
406 
407  // Rotation (components)
409 
410  if( m_VarL != 0 ){
412  m_rho = m_CvLT / std::sqrt( m_VarL * m_VarT ) ;
413  }
414  ATH_MSG_DEBUG(" Significance (squared) at new phi: " << m_significance
415  << " rho: " << GetRho()
416  << " MET: " << m_met
417  << " sigmaL: " << GetVarL()
418  << " sigmaT: " << GetVarT() );
419 
420  return StatusCode::SUCCESS;
421  }

◆ Significance_LT()

double met::METSignificance::Significance_LT ( double  Numerator,
double  var_parall,
double  var_perpen,
double  cov 
)
private

Definition at line 958 of file METSignificance.cxx.

958  {
959 
960  Double_t rho = cov / std::sqrt( var_parall * var_perpen ) ;
961  Double_t Significance = 0;
962  if (std::abs( rho ) >= 0.9 ){ //Cov Max not invertible -> Significance diverges
963  ATH_MSG_VERBOSE("rho is large: " << rho);
964  Significance = std::pow( Numerator - m_scalarBias , 2 ) / ( var_parall ) ;
965  }
966  else
967  Significance = std::pow( Numerator - m_scalarBias , 2 ) / ( var_parall * ( 1 - std::pow(rho,2) ) ) ;
968 
969  if( std::abs(Significance) >= 10e+15)
970  ATH_MSG_WARNING("warning -->"<< Significance);
971 
972  return Significance;
973  }

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

◆ Var_Ptsoft()

double met::METSignificance::Var_Ptsoft ( const double  PtSoft)
private

Definition at line 1040 of file METSignificance.cxx.

1040  {
1041  if (PtSoft<45.) return 40. + 2*PtSoft + 0.1*std::pow(PtSoft,2);
1042  else return 40. + 2*45 + 0.1*std::pow(45,2);
1043  }

◆ varianceMET()

StatusCode met::METSignificance::varianceMET ( xAOD::MissingETContainer metCont,
float  avgmu,
const std::string &  jetTermName,
const std::string &  softTermName,
const std::string &  totalMETName 
)
virtual

Implements IMETSignificance.

Definition at line 201 of file METSignificance.cxx.

201  {
202 
203  // reset variables
204  m_VarL = 0.0;
205  m_VarT = 0.0;
206  m_CvLT = 0.0;
207 
208  int metTerm = 0;
209  double particle_sum[2][2] = {{0.0,0.0}, {0.0,0.0}};
210  m_metphi = 0.0; //Angle for rotation of the cov matrix
211  m_met = -1.0; // Numerator
212  m_metsoft = 0.0;
213  m_metsoftphi = 0.0;
214  m_sumet=-1.0;
215  m_ht=0.0;
216  m_term_VarL.clear();
217  m_term_VarT.clear();
218  m_term_CvLT.clear();
219 
220  unsigned nIterSoft=0;
221  double softSumET=0.0;
222 
223  // first fill the total MET
224  if(metCont->find(totalMETName)!=metCont->end()){
225  const auto &tot_met = static_cast<xAOD::MissingET*>(*(metCont->find(totalMETName)));
226  if(!MissingETBase::Source::isTotalTerm(tot_met->source())){
227  ATH_MSG_ERROR("NOT the total MET with name:" <<totalMETName);
228  return StatusCode::SUCCESS;
229  }
230  m_met = tot_met->met()/m_GeV;
231  m_metx = tot_met->mpx()/m_GeV;
232  m_mety = tot_met->mpy()/m_GeV;
233  m_metphi = tot_met->phi();
234  m_sumet = tot_met->sumet()/m_GeV;
235  m_ht = m_sumet;
236  ATH_MSG_VERBOSE("total MET: " << m_met << " phi: " << m_metphi << " name: " << tot_met->name());
237  }
238  else{
239  ATH_MSG_ERROR("Could not find the total MET with name:" <<totalMETName);
240  return StatusCode::SUCCESS;
241  }
242  m_met_vect.SetXYZ(m_metx, m_mety, 0);
243 
244  // Fill the remaining terms
245  for(const auto met : *metCont) {
246 
247  // skip the invisible and total MET
249  ATH_MSG_VERBOSE("Total: " << met->name() << " val: " << met->met());
250  continue;
251  }
252  if(met->source()==invisSource) continue;
253 
254  // Soft term collection
255  if(MissingETBase::Source::isSoftTerm(met->source())){
256 
258  ATH_MSG_VERBOSE("Soft Name: " << met->name());
259  // make sure the container name matches
260  if(met->name()!=softTermName || nIterSoft>0){
261  if(nIterSoft>0) ATH_MSG_ERROR("Found multiple soft terms with the name:" <<softTermName << ". Your MET configuration is wrong!!!");
262  continue;
263  }
264  ++nIterSoft;
265  softSumET=(met->sumet()/m_GeV);
266 
267  AddSoftTerm(met, m_met_vect, particle_sum);
268  m_metsoft = met->met()/m_GeV;
269  m_metsoftphi = met->phi();
270  metTerm = 2; // this is actually filled in AddSoftTerm
271  // done with the soft term. go to the next term.
272  continue;
273  }
274  ATH_MSG_VERBOSE("Add MET term " << met->name() );
275  for(const auto& el : acc_constitObjLinks(*met)) {
276  const xAOD::IParticle* obj(*el);
277  float pt_reso=0.0, phi_reso=0.0;
278  if(!obj){
279  ATH_MSG_ERROR("Particle pointer is not valid. This will likely result in a crash " << obj);
280  return StatusCode::FAILURE;
281  }
282  ATH_MSG_VERBOSE("pT: " << obj->pt() << " type: " << obj->type() << " truth: " << (obj->type()==xAOD::Type::TruthParticle));
283  if(obj->type()==xAOD::Type::Muon || (obj->type()==xAOD::Type::TruthParticle && std::abs(static_cast<const xAOD::TruthParticle*>(obj)->pdgId())==13)){
284  ATH_CHECK(AddMuon(obj, pt_reso, phi_reso, avgmu));
285  metTerm=4;
286  }
287  else if(obj->type()==xAOD::Type::Jet){
288  // make sure the container name matches
289  if(met->name()!=jetTermName) continue;
290  ATH_CHECK(AddJet(obj, pt_reso, phi_reso, avgmu));
291  metTerm=1;
292  }
293  else if(obj->type()==xAOD::Type::Electron || (obj->type()==xAOD::Type::TruthParticle && std::abs(static_cast<const xAOD::TruthParticle*>(obj)->pdgId())==11)){
294  ATH_CHECK(AddElectron(obj, pt_reso, phi_reso, avgmu));
295  metTerm=3;
296  }
297  else if(obj->type()==xAOD::Type::Photon || (obj->type()==xAOD::Type::TruthParticle && std::abs(static_cast<const xAOD::TruthParticle*>(obj)->pdgId())==22)){
298  ATH_CHECK(AddPhoton(obj, pt_reso, phi_reso));
299  metTerm=5;
300  }
301  else if(obj->type()==xAOD::Type::Tau || (obj->type()==xAOD::Type::TruthParticle && std::abs(static_cast<const xAOD::TruthParticle*>(obj)->pdgId())==15)){
302  AddTau(obj, pt_reso, phi_reso);
303  metTerm=6;
304  }
305 
306  // compute NEW
307  double particle_u[2][2] = {{pt_reso*pt_reso*obj->pt()*obj->pt()/m_GeV/m_GeV,0.0},
308  {0.0,phi_reso*phi_reso/m_GeV/m_GeV}};
309  double particle_u_rot[2][2] = {{pt_reso*pt_reso*obj->pt()*obj->pt()/m_GeV/m_GeV,0.0},
310  {0.0,phi_reso*phi_reso/m_GeV/m_GeV}};
311  RotateXY(particle_u, particle_u_rot,m_met_vect.DeltaPhi(obj->p4().Vect()));
312  m_VarL+=particle_u_rot[0][0];
313  m_VarT+=particle_u_rot[1][1];
314  m_CvLT+=particle_u_rot[0][1];
315 
316  // Save the resolutions separated for each object type
317  AddResoMap(particle_u_rot[0][0],
318  particle_u_rot[1][1],
319  particle_u_rot[0][1],
320  metTerm);
321 
322  RotateXY (particle_u, particle_u_rot, obj->p4().Phi()); // positive phi rotation
323  AddMatrix(particle_sum, particle_u_rot, particle_sum);
324  // END compute NEW
325 
326  ATH_MSG_VERBOSE("Resolution: " << pt_reso << " phi reso: " << phi_reso );
327  }
328  }
329 
330  // setting the MET directed variables for later phi rotations if requested
334 
335  if( m_VarL != 0 ){
336 
337  if(m_applyBias){
338  TVector3 met_vect = m_met_vect;
339  TVector3 soft_vect = m_soft_vect;
340 
341  // should be done to reset the phi as well...
343  Double_t Bias_TST = BiasPtSoftdir(m_metsoft);
344  Double_t MEx = m_met * std::cos(m_metphi) - Bias_TST * std::cos(m_metsoftphi);
345  Double_t MEy = m_met * std::sin(m_metphi) - Bias_TST * std::sin(m_metsoftphi);
346  met_vect.SetXYZ(MEx,MEy,0.0);
347  }
349  m_soft_vect.SetPtEtaPhi(m_metsoft, 0.0, m_metsoftphi);
351  Double_t PtSoftparaPH = m_pthard_vect.Mag()>0.0 ? (m_soft_vect.Dot(m_pthard_vect))/m_pthard_vect.Mag() : 0.0;
352  Double_t Bias_pthard = Bias_PtSoftParall(PtSoftparaPH);
353  Double_t MEx = m_met * std::cos(m_metphi) - Bias_pthard * std::cos(m_metsoftphi);
354  Double_t MEy = m_met * std::sin(m_metphi) - Bias_pthard * std::sin(m_metsoftphi);
355  met_vect.SetXYZ(MEx,MEy,0.0);
356  }
357  // Rotate & compute
358  ATH_CHECK(RotateToPhi(met_vect.Phi()));
359  m_significance = Significance_LT(met_vect.Pt(), m_VarL, m_VarT, m_CvLT);
360  m_rho = m_CvLT / std::sqrt( m_VarL * m_VarT ) ;
361  }
362  else{
363  // standard calculation
365  m_rho = m_CvLT / std::sqrt( m_VarL * m_VarT ) ;
366  }
367  m_ht-=softSumET;
368  ATH_MSG_VERBOSE(" Significance (squared): " << m_significance << " rho: " << GetRho()
369  << " MET: " << m_met << " phi: " << m_metphi << " SUMET: " << m_sumet << " HT: " << m_ht << " sigmaL: " << GetVarL()
370  << " sigmaT: " << GetVarT() << " MET/sqrt(SumEt): " << GetMETOverSqrtSumET()
371  << " MET/sqrt(HT): " << GetMETOverSqrtHT()
372  << " sqrt(signif): " << GetSignificance()
373  << " sqrt(signifDirectional): " << GetSigDirectional());
374  }
375  else
376  ATH_MSG_DEBUG("Var_L is 0");
377 
378  return StatusCode::SUCCESS;
379  }

◆ VarparPtSoftdir()

double met::METSignificance::VarparPtSoftdir ( const double  PtSoft,
const double  SoftSumet 
)
private

Definition at line 1028 of file METSignificance.cxx.

1028  {
1029  if (SoftSumet<25){
1030  if (PtSoft<50.) return 41.9+3.8*PtSoft+0.1*std::pow(PtSoft,2)-12.7+ 1.39*SoftSumet-0.03*std::pow(SoftSumet,2);
1031  else return 41.9+3.8*50.+0.1*std::pow(50.,2)-12.7+ 1.39*SoftSumet-0.03*std::pow(SoftSumet,2);
1032  }
1033  else{
1034  if (PtSoft<50.) return 41.9+3.8*PtSoft+0.1*std::pow(PtSoft,2);
1035  else return (40.5614)+(4.10965)*50.+(0.0955044)*std::pow(50.,2);
1036  }
1037  }

Member Data Documentation

◆ m_applyBias

bool met::METSignificance::m_applyBias
private

Definition at line 134 of file METSignificance.h.

◆ m_configJetPhiResoFile

std::string met::METSignificance::m_configJetPhiResoFile
private

Definition at line 176 of file METSignificance.h.

◆ m_configPrefix

std::string met::METSignificance::m_configPrefix
private

Definition at line 175 of file METSignificance.h.

◆ m_CvLT

double met::METSignificance::m_CvLT
private

Definition at line 150 of file METSignificance.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_doPhiReso

bool met::METSignificance::m_doPhiReso
private

Definition at line 133 of file METSignificance.h.

◆ m_egammaCalibTool

ToolHandle<CP::IEgammaCalibrationAndSmearingTool> met::METSignificance::m_egammaCalibTool {this, "egammaCalibTool", "", "the IEgammaCalibrationAndSmearingTool we use"}
private

Definition at line 90 of file METSignificance.h.

◆ m_EMuResoAux

std::string met::METSignificance::m_EMuResoAux
private

Definition at line 178 of file METSignificance.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_file

TFile* met::METSignificance::m_file
private

Definition at line 170 of file METSignificance.h.

◆ m_GeV

double met::METSignificance::m_GeV
private

Definition at line 123 of file METSignificance.h.

◆ m_ht

double met::METSignificance::m_ht
private

Definition at line 166 of file METSignificance.h.

◆ m_isAFII

bool met::METSignificance::m_isAFII
private

Definition at line 139 of file METSignificance.h.

◆ m_isDataJet

bool met::METSignificance::m_isDataJet
private

Definition at line 137 of file METSignificance.h.

◆ m_isDataMuon

bool met::METSignificance::m_isDataMuon
private

Definition at line 138 of file METSignificance.h.

◆ m_jerForEMu

bool met::METSignificance::m_jerForEMu
private

Definition at line 135 of file METSignificance.h.

◆ m_jetCalibTool

ToolHandle<IJetCalibrationTool> met::METSignificance::m_jetCalibTool {this, "jetCalibTool", "", "the IJetCalibrationTool we use"}
private

Definition at line 88 of file METSignificance.h.

◆ m_JetCollection

std::string met::METSignificance::m_JetCollection
private

Definition at line 179 of file METSignificance.h.

◆ m_jetEtaThr

float met::METSignificance::m_jetEtaThr
private

Definition at line 143 of file METSignificance.h.

◆ m_jetPtThr

float met::METSignificance::m_jetPtThr
private

Definition at line 142 of file METSignificance.h.

◆ m_JetResoAux

std::string met::METSignificance::m_JetResoAux
private

Definition at line 177 of file METSignificance.h.

◆ m_lamda_vect

TVector3 met::METSignificance::m_lamda_vect
private

Definition at line 128 of file METSignificance.h.

◆ m_met

double met::METSignificance::m_met
private

Definition at line 160 of file METSignificance.h.

◆ m_met_CvLT

double met::METSignificance::m_met_CvLT
private

Definition at line 154 of file METSignificance.h.

◆ m_met_VarL

double met::METSignificance::m_met_VarL
private

Definition at line 152 of file METSignificance.h.

◆ m_met_VarT

double met::METSignificance::m_met_VarT
private

Definition at line 153 of file METSignificance.h.

◆ m_met_vect

TVector3 met::METSignificance::m_met_vect
private

Definition at line 125 of file METSignificance.h.

◆ m_metphi

double met::METSignificance::m_metphi
private

Definition at line 163 of file METSignificance.h.

◆ m_metsoft

double met::METSignificance::m_metsoft
private

Definition at line 164 of file METSignificance.h.

◆ m_metsoftphi

double met::METSignificance::m_metsoftphi
private

Definition at line 165 of file METSignificance.h.

◆ m_metx

double met::METSignificance::m_metx
private

Definition at line 161 of file METSignificance.h.

◆ m_mety

double met::METSignificance::m_mety
private

Definition at line 162 of file METSignificance.h.

◆ m_muonCalibrationAndSmearingTool

ToolHandle<CP::IMuonCalibrationAndSmearingTool> met::METSignificance::m_muonCalibrationAndSmearingTool {this, "MuonCalibTool", "", "the IMuonCalibrationAndSmearingTool we use"}
private

Definition at line 89 of file METSignificance.h.

◆ m_phi_reso_pt100

TH2F* met::METSignificance::m_phi_reso_pt100
private

Definition at line 173 of file METSignificance.h.

◆ m_phi_reso_pt20

TH2F* met::METSignificance::m_phi_reso_pt20
private

Definition at line 171 of file METSignificance.h.

◆ m_phi_reso_pt50

TH2F* met::METSignificance::m_phi_reso_pt50
private

Definition at line 172 of file METSignificance.h.

◆ m_pthard_vect

TVector3 met::METSignificance::m_pthard_vect
private

Definition at line 127 of file METSignificance.h.

◆ m_rho

double met::METSignificance::m_rho
private

Definition at line 147 of file METSignificance.h.

◆ m_scalarBias

double met::METSignificance::m_scalarBias
private

Definition at line 145 of file METSignificance.h.

◆ m_significance

double met::METSignificance::m_significance
private

Definition at line 146 of file METSignificance.h.

◆ m_soft_vect

TVector3 met::METSignificance::m_soft_vect
private

Definition at line 126 of file METSignificance.h.

◆ m_softTermParam

int met::METSignificance::m_softTermParam
private

Definition at line 130 of file METSignificance.h.

◆ m_softTermReso

double met::METSignificance::m_softTermReso
private

Definition at line 131 of file METSignificance.h.

◆ m_sumet

double met::METSignificance::m_sumet
private

Definition at line 167 of file METSignificance.h.

◆ m_tauCombinedTES

ToolHandle<ITauToolBase> met::METSignificance::m_tauCombinedTES {this, "tauCombinedTES", "", "the TauCombinedTES tool we use"}
private

Definition at line 91 of file METSignificance.h.

◆ m_term_CvLT

std::map<int, double> met::METSignificance::m_term_CvLT
private

Definition at line 158 of file METSignificance.h.

◆ m_term_VarL

std::map<int, double> met::METSignificance::m_term_VarL
private

Definition at line 156 of file METSignificance.h.

◆ m_term_VarT

std::map<int, double> met::METSignificance::m_term_VarT
private

Definition at line 157 of file METSignificance.h.

◆ m_treatPUJets

bool met::METSignificance::m_treatPUJets
private

Definition at line 132 of file METSignificance.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_VarL

double met::METSignificance::m_VarL
private

Definition at line 148 of file METSignificance.h.

◆ m_VarT

double met::METSignificance::m_VarT
private

Definition at line 149 of file METSignificance.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
met::METSignificance::m_jerForEMu
bool m_jerForEMu
Definition: METSignificance.h:135
met::METSignificance::m_pthard_vect
TVector3 m_pthard_vect
Definition: METSignificance.h:127
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
TrigJetMonitorAlgorithm.jetcoll
jetcoll
Definition: TrigJetMonitorAlgorithm.py:1306
met::METSignificance::VarparPtSoftdir
double VarparPtSoftdir(const double PtSoft, const double SoftSumet)
Definition: METSignificance.cxx:1028
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
met::METSignificance::m_jetEtaThr
float m_jetEtaThr
Definition: METSignificance.h:143
met::METSignificance::m_lamda_vect
TVector3 m_lamda_vect
Definition: METSignificance.h:128
met::METSignificance::m_VarL
double m_VarL
Definition: METSignificance.h:148
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
met::METSignificance::AddResoMap
void AddResoMap(const double varL, const double varT, const double CvTV, const int term)
Definition: METSignificance.cxx:1055
met::METSignificance::Bias_PtSoftParall
double Bias_PtSoftParall(const double PtSoft_Parall)
Definition: METSignificance.cxx:1046
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
met::METSignificance::m_met
double m_met
Definition: METSignificance.h:160
met::METSignificance::RotateXY
void RotateXY(const double(&mat)[2][2], double(&mat_new)[2][2], double phi)
Definition: METSignificance.cxx:1000
MissingETBase::Source::hasPattern
static bool hasPattern(E bits, F mask)
Generic check for given pattern.
Definition: MissingETBase.h:382
test_pyathena.px
px
Definition: test_pyathena.py:18
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
xAOD::MissingET_v1::sumet
float sumet() const
Returns.
TRTCalib_Extractor.det
det
Definition: TRTCalib_Extractor.py:36
met::METSignificance::m_configJetPhiResoFile
std::string m_configJetPhiResoFile
Definition: METSignificance.h:176
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
met::METSignificance::m_configPrefix
std::string m_configPrefix
Definition: METSignificance.h:175
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:55
met::METSignificance::m_GeV
double m_GeV
Definition: METSignificance.h:123
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
xAOD::MissingET_v1::phi
float phi() const
Returns .
TauCombinedTES
Definition: TauCombinedTES.h:19
met::ResoSoft
@ ResoSoft
Definition: IMETSignificance.h:34
met::METSignificance::m_JetResoAux
std::string m_JetResoAux
Definition: METSignificance.h:177
met::METSignificance::m_jetCalibTool
ToolHandle< IJetCalibrationTool > m_jetCalibTool
Definition: METSignificance.h:88
MissingETBase::Source::isTotalTerm
static bool isTotalTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
Definition: MissingETBase.h:405
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
met::METSignificance::m_metphi
double m_metphi
Definition: METSignificance.h:163
met::METSignificance::m_treatPUJets
bool m_treatPUJets
Definition: METSignificance.h:132
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
met::METSignificance::m_term_CvLT
std::map< int, double > m_term_CvLT
Definition: METSignificance.h:158
met::METSignificance::AddMuon
StatusCode AddMuon(const xAOD::IParticle *obj, float &pt_reso, float &phi_reso, float avgmu)
Definition: METSignificance.cxx:424
met::METSignificance::m_muonCalibrationAndSmearingTool
ToolHandle< CP::IMuonCalibrationAndSmearingTool > m_muonCalibrationAndSmearingTool
Definition: METSignificance.h:89
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
met::METSignificance::m_significance
double m_significance
Definition: METSignificance.h:146
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
met::METSignificance::GetPUProb
double GetPUProb(double jet_eta, double jet_phi, double jet_pt, double jet_jvt, double jet_fjvt, float avgmu)
Definition: METSignificance.cxx:690
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
met::METSignificance::m_mety
double m_mety
Definition: METSignificance.h:162
met::METSignificance::GetVarT
double GetVarT() const
Definition: METSignificance.h:79
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
met::METSignificance::m_CvLT
double m_CvLT
Definition: METSignificance.h:150
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
met::METSignificance::m_ht
double m_ht
Definition: METSignificance.h:166
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
met::METSignificance::m_met_VarT
double m_met_VarT
Definition: METSignificance.h:153
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
met::METSignificance::m_metsoft
double m_metsoft
Definition: METSignificance.h:164
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
Monitored::X
@ X
Definition: HistogramFillerUtils.h:24
met::METSignificance::m_softTermParam
int m_softTermParam
Definition: METSignificance.h:130
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
met::METSignificance::AddPhoton
StatusCode AddPhoton(const xAOD::IParticle *obj, float &pt_reso, float &phi_reso)
Definition: METSignificance.cxx:507
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
met::METSignificance::CovMatrixRotation
std::tuple< double, double, double > CovMatrixRotation(double var_x, double var_y, double cv_xy, double Phi)
Definition: METSignificance.cxx:950
met::METSignificance::m_met_vect
TVector3 m_met_vect
Definition: METSignificance.h:125
xAOD::MissingETContainer_v1::find
const_iterator find(const std::string &name) const
Find non-modifiable MET object by name.
Definition: MissingETContainer_v1.cxx:52
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition: AsgTool.cxx:58
met::METSignificance::GetPhiUnc
double GetPhiUnc(double jet_eta, double jet_phi, double jet_pt)
Definition: METSignificance.cxx:910
met
Definition: IMETSignificance.h:24
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
asg::AsgToolConfig
an object that can create a AsgTool
Definition: AsgToolConfig.h:22
met::METSignificance::m_rho
double m_rho
Definition: METSignificance.h:147
met::METSignificance::GetVarL
double GetVarL() const
Definition: METSignificance.h:78
met::METSignificance::m_metsoftphi
double m_metsoftphi
Definition: METSignificance.h:165
met::METSignificance::m_tauCombinedTES
ToolHandle< ITauToolBase > m_tauCombinedTES
Definition: METSignificance.h:91
met::METSignificance::Significance_LT
double Significance_LT(double Numerator, double var_parall, double var_perpen, double cov)
Definition: METSignificance.cxx:958
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
met::METSignificance::m_phi_reso_pt20
TH2F * m_phi_reso_pt20
Definition: METSignificance.h:171
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
met::METSignificance::BiasPtSoftdir
double BiasPtSoftdir(const double PtSoft)
Parameterization with PtSoft Direction //.
Definition: METSignificance.cxx:1021
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
met::Random
@ Random
Definition: IMETSignificance.h:27
xAOD::TruthParticle
TruthParticle_v1 TruthParticle
Typedef to implementation.
Definition: Event/xAOD/xAODTruth/xAODTruth/TruthParticle.h:15
met::METSignificance::m_EMuResoAux
std::string m_EMuResoAux
Definition: METSignificance.h:178
met::PthardParam
@ PthardParam
Definition: IMETSignificance.h:28
xAOD::MissingET_v1
Principal data object for Missing ET.
Definition: MissingET_v1.h:25
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
xAOD::MissingET_v1::mpx
float mpx() const
Returns .
python.xAODType.dummy
dummy
Definition: xAODType.py:4
met::TSTParam
@ TSTParam
Definition: IMETSignificance.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
met::METSignificance::m_applyBias
bool m_applyBias
Definition: METSignificance.h:134
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::MissingET_v1::name
const std::string & name() const
Identifier getters.
met::METSignificance::GetSigDirectional
double GetSigDirectional() const
Definition: METSignificance.h:76
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
met::METSignificance::m_phi_reso_pt100
TH2F * m_phi_reso_pt100
Definition: METSignificance.h:173
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Monitored::Y
@ Y
Definition: HistogramFillerUtils.h:24
Amg::py
@ py
Definition: GeoPrimitives.h:39
met::METSignificance::AddTau
void AddTau(const xAOD::IParticle *obj, float &pt_reso, float &phi_reso)
Definition: METSignificance.cxx:574
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
met::METSignificance::AddJet
StatusCode AddJet(const xAOD::IParticle *obj, float &pt_reso, float &phi_reso, float &avgmu)
Definition: METSignificance.cxx:523
met::METSignificance::m_metx
double m_metx
Definition: METSignificance.h:161
met::METSignificance::AddSoftTerm
void AddSoftTerm(const xAOD::MissingET *soft, const TVector3 &met_vect, double(&particle_sum)[2][2])
Definition: METSignificance.cxx:595
met::METSignificance::m_soft_vect
TVector3 m_soft_vect
Definition: METSignificance.h:126
xAOD::Electron_v1
Definition: Electron_v1.h:34
met::METSignificance::Var_Ptsoft
double Var_Ptsoft(const double PtSoft)
Definition: METSignificance.cxx:1040
met::METSignificance::GetRho
double GetRho() const
Definition: METSignificance.h:77
met::METSignificance::m_met_CvLT
double m_met_CvLT
Definition: METSignificance.h:154
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
Muon
struct TBPatternUnitContext Muon
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
MissingETBase::Source::Signal::Track
@ Track
Indicator for MET contribution from reconstructed charged particle tracks.
a
TList * a
Definition: liststreamerinfos.cxx:10
h
met::METSignificance::m_scalarBias
double m_scalarBias
Definition: METSignificance.h:145
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
met::METSignificance::m_phi_reso_pt50
TH2F * m_phi_reso_pt50
Definition: METSignificance.h:172
met::METSignificance::m_isDataMuon
bool m_isDataMuon
Definition: METSignificance.h:138
met::METSignificance::AddMatrix
void AddMatrix(double(&X)[2][2], double(&Y)[2][2], double(&mat_new)[2][2])
Definition: METSignificance.cxx:993
met::METSignificance::m_egammaCalibTool
ToolHandle< CP::IEgammaCalibrationAndSmearingTool > m_egammaCalibTool
Definition: METSignificance.h:90
met::METSignificance::m_isAFII
bool m_isAFII
Definition: METSignificance.h:139
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
met::METSignificance::m_met_VarL
double m_met_VarL
Definition: METSignificance.h:152
met::METSignificance::m_term_VarL
std::map< int, double > m_term_VarL
Definition: METSignificance.h:156
xAOD::get_eta_calo
float get_eta_calo(const xAOD::CaloCluster &cluster, int author, bool do_throw=false)
Definition: EgammaCalibrationAndSmearingTool.h:64
met::METSignificance::m_doPhiReso
bool m_doPhiReso
Definition: METSignificance.h:133
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
met::METSignificance::m_jetPtThr
float m_jetPtThr
Definition: METSignificance.h:142
met::METSignificance::m_sumet
double m_sumet
Definition: METSignificance.h:167
xAODType::Tau
@ Tau
The object is a tau (jet)
Definition: ObjectType.h:49
met::METSignificance::GetSignificance
double GetSignificance() const
Definition: METSignificance.h:75
Trk::jet_phi
@ jet_phi
Definition: JetVtxParamDefs.h:28
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
PATCore::ParticleType::Electron
@ Electron
Definition: PATCoreEnums.h:40
met::METSignificance::m_JetCollection
std::string m_JetCollection
Definition: METSignificance.h:179
met::METSignificance::GetMETOverSqrtHT
double GetMETOverSqrtHT() const
Definition: METSignificance.h:74
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
met::METSignificance::m_softTermReso
double m_softTermReso
Definition: METSignificance.h:131
met::METSignificance::RotateToPhi
StatusCode RotateToPhi(float phi)
Definition: METSignificance.cxx:381
met::METSignificance::AddElectron
StatusCode AddElectron(const xAOD::IParticle *obj, float &pt_reso, float &phi_reso, float avgmu)
Definition: METSignificance.cxx:476
xAOD::TruthParticle_v1::pdgId
int pdgId() const
PDG ID code.
met::METSignificance::getEtaBin
static unsigned int getEtaBin(double jet_eta)
Definition: METSignificance.cxx:929
xAOD::MissingET_v1::mpy
float mpy() const
Returns .
met::METSignificance::m_term_VarT
std::map< int, double > m_term_VarT
Definition: METSignificance.h:157
python.PyAthena.obj
obj
Definition: PyAthena.py:132
SG::DataProxy
Definition: DataProxy.h:45
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
MissingETBase::Source::isSoftTerm
static bool isSoftTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
Definition: MissingETBase.h:403
python.compressB64.c
def c
Definition: compressB64.py:93
met::METSignificance::m_file
TFile * m_file
Definition: METSignificance.h:170
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition: Event/xAOD/xAODJet/xAODJet/Jet.h:17
xAOD::MissingET_v1::met
float met() const
Returns .
fitman.rho
rho
Definition: fitman.py:532
fitman.k
k
Definition: fitman.py:528
python.handimod.cc
int cc
Definition: handimod.py:523
met::METSignificance::GetMETOverSqrtSumET
double GetMETOverSqrtSumET() const
Definition: METSignificance.h:73
met::METSignificance::m_VarT
double m_VarT
Definition: METSignificance.h:149
met::METSignificance::m_isDataJet
bool m_isDataJet
Definition: METSignificance.h:137