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
 
TH2Fm_phi_reso_pt20
 
TH2Fm_phi_reso_pt50
 
TH2Fm_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_metphi(0.0),
71  m_ht(0.0),
72  m_sumet(0.0),
73  m_file(nullptr),
74  m_phi_reso_pt20(nullptr),
75  m_phi_reso_pt50(nullptr),
76  m_phi_reso_pt100(nullptr)
77  {
78  declareProperty("SoftTermParam", m_softTermParam = met::Random );
79  declareProperty("SoftTermReso", m_softTermReso = 10.0 );
80  declareProperty("TreatPUJets", m_treatPUJets = true );
81  declareProperty("DoPhiReso", m_doPhiReso = false );
82  declareProperty("ApplyBias", m_applyBias = false );
83  declareProperty("DoJerForEMu", m_jerForEMu = false ); // run jet resolution for all electrons and muons
84  declareProperty("ScalarBias", m_scalarBias = 0.0 );
85  declareProperty("JetPtThr", m_jetPtThr = -1.0 );
86  declareProperty("JetEtaThr", m_jetEtaThr = -1.0 );
87  declareProperty("ConfigPrefix", m_configPrefix = "METUtilities/data17_13TeV/metsig_Aug15/");
88  declareProperty("ConfigJetPhiResoFile", m_configJetPhiResoFile = "jet_unc.root" );
89  declareProperty("JetResoAux", m_JetResoAux = "" ); // relative pT resolution in addition to normal JES
90  declareProperty("EMuResoAux", m_EMuResoAux = "" ); // aux string sets a bool for the leptons to run the jet resolation
91  declareProperty("JetCollection", m_JetCollection = "AntiKt4EMPFlow" );
92 
93  // properties to delete eventually
94  declareProperty("IsDataJet", m_isDataJet = false );
95  declareProperty("IsDataMuon", m_isDataMuon = false );
96  declareProperty("IsAFII", m_isAFII = false );
97 
98  m_file = nullptr;
99  }

◆ ~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 470 of file METSignificance.cxx.

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

◆ AddJet()

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

Definition at line 517 of file METSignificance.cxx.

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

◆ AddMatrix()

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

Definition at line 982 of file METSignificance.cxx.

982  {
983  mat_new[0][0]=X[0][0]+Y[0][0];
984  mat_new[0][1]=X[0][1]+Y[0][1];
985  mat_new[1][0]=X[1][0]+Y[1][0];
986  mat_new[1][1]=X[1][1]+Y[1][1];
987  }

◆ AddMuon()

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

Definition at line 418 of file METSignificance.cxx.

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

◆ AddPhoton()

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

Definition at line 501 of file METSignificance.cxx.

501  {
502 
503  if(obj->type()==xAOD::Type::TruthParticle){
504  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
505  if(m_doPhiReso) phi_reso = obj->pt()*0.004;
506  }
507  else{
508  const xAOD::Egamma* pho(static_cast<const xAOD::Egamma*>(obj));
509  pt_reso=m_egammaCalibTool->getResolution(*pho);
510  if(m_doPhiReso) phi_reso = pho->pt()*0.004;
511  ATH_MSG_VERBOSE("pho: " << pt_reso << " " << pho->pt() << " " << pho->p4().Eta() << " " << pho->p4().Phi());
512  }
513  return StatusCode::SUCCESS;
514  }

◆ AddResoMap()

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

Definition at line 1044 of file METSignificance.cxx.

1044  {
1045 
1046  m_term_VarL[term] += varL;
1047  m_term_VarT[term] += varT;
1048  m_term_CvLT[term] += CvLT;
1049 
1050  }

◆ AddSoftTerm()

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

Definition at line 589 of file METSignificance.cxx.

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

◆ AddTau()

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

Definition at line 568 of file METSignificance.cxx.

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

◆ Bias_PtSoftParall()

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

Definition at line 1035 of file METSignificance.cxx.

1036  {
1037  if (-60.<=PtSoft_Parall && PtSoft_Parall<0.) return -8. -0.4*PtSoft_Parall;
1038  if (-60.>PtSoft_Parall) return -8. -0.4 * (-60.);
1039  if( PtSoft_Parall>=0. && PtSoft_Parall<60.) return -8. -PtSoft_Parall;
1040  if(PtSoft_Parall>60.) return -8. -60.;
1041  return 0.0;
1042  }

◆ BiasPtSoftdir()

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

Parameterization with PtSoft Direction //.

Definition at line 1010 of file METSignificance.cxx.

1010  {
1011  if (PtSoft<60.) return (0.145)+(-0.45)*PtSoft;
1012  else return (0.145)+(-0.45)*(60.);
1013  }

◆ CovMatrixRotation()

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

Definition at line 939 of file METSignificance.cxx.

939  {
940  // Covariance matrix parallel and transverse to the Phi direction
941  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;
942  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;
943  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
944  return std::make_tuple( V11, V22, V12);
945  }

◆ 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 184 of file METSignificance.cxx.

184  {
185 
186  ATH_MSG_INFO ("Finalizing " << name() << "...");
187  delete m_phi_reso_pt20;
188  delete m_phi_reso_pt50;
189  delete m_phi_reso_pt100;
190 
191  return StatusCode::SUCCESS;
192  }

◆ getEtaBin()

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

Definition at line 918 of file METSignificance.cxx.

918  {
919  // For the phi uncertainty lookup
920  if(-4.5<jet_eta && -3.8>=jet_eta) return 1;
921  else if(-3.8<jet_eta && -3.5>=jet_eta) return 2;
922  else if(-3.5<jet_eta && -3.0>=jet_eta) return 3;
923  else if(-3.0<jet_eta && -2.7>=jet_eta) return 4;
924  else if(-2.7<jet_eta && -2.4>=jet_eta) return 5;
925  else if(-2.4<jet_eta && -1.5>=jet_eta) return 6;
926  else if(-1.5<jet_eta && -0.5>=jet_eta) return 7;
927  else if(-0.5<jet_eta && 0.0>=jet_eta) return 8;
928  else if(0.0<jet_eta && 0.5>=jet_eta) return 9;
929  else if(0.5<jet_eta && 1.5>=jet_eta) return 10;
930  else if(1.5<jet_eta && 2.4>=jet_eta) return 11;
931  else if(2.4<jet_eta && 2.7>=jet_eta) return 12;
932  else if(2.7<jet_eta && 3.0>=jet_eta) return 13;
933  else if(3.0<jet_eta && 3.5>=jet_eta) return 14;
934  else if(3.5<jet_eta && 3.8>=jet_eta) return 15;
935  else if(3.8<jet_eta ) return 16;
936  return 0;
937  }

◆ 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 899 of file METSignificance.cxx.

899  {
900 
901  unsigned int xbin = getEtaBin(jet_eta);
902  unsigned int ybin = jet_phi>0.0 ? int(jet_phi/0.4)+9 : int(jet_phi/0.4)+8;
903 
904  // Stored as bin content = Mean, error = RMS, we want to use the RMS.
906  ATH_MSG_ERROR("Jet Phi Resolution histograms are invalid.");
907  return 0.0;
908  }
909 
910  // Collect the phi resolution
911  if(jet_pt<50.0)
912  return m_phi_reso_pt20->GetBinError(xbin, ybin);
913  else if(jet_pt<100.0)
914  return m_phi_reso_pt50->GetBinError(xbin, ybin);
915  return m_phi_reso_pt100->GetBinError(xbin, ybin);
916  }

◆ 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 684 of file METSignificance.cxx.

687  {
688 
689  double unc=0.0;
690 
691  // Coefficients from Doug Schaefer <schae@cern.ch> and the MET subgroup
692  if(m_JetCollection == "AntiKt4EMTopoJets"){
693  if(std::abs(jet_eta)<2.4){
694  if(jet_pt<30){
695  if(jet_jvt<0.11) unc = 1;
696  else if(jet_jvt<0.25) unc = 0.0730 + 0.0024 * avgmu + 0.00001 * avgmu * avgmu;
697  else if(jet_jvt<0.85) unc = 0.0995 + 0.0031 * avgmu + 0.00005 * avgmu * avgmu;
698  else if(jet_jvt<0.95) unc = 0.0311 + 0.0025 * avgmu + 0.00005 * avgmu * avgmu;
699  else unc = 0.0308 -0.0010 * avgmu + 0.00006 * avgmu * avgmu ;
700  }else if(jet_pt<40){
701  if(jet_jvt<0.11) unc = 1.;
702  else if(jet_jvt<0.25) unc = 1.;
703  else if(jet_jvt<0.85) unc = -0.0188 + 0.0039 * avgmu + 0.00002 * avgmu * avgmu;
704  else if(jet_jvt<0.95) unc = 0.0252 -0.0009 * avgmu + 0.00006 * avgmu * avgmu ;
705  else unc = 0.0085 -0.0003 * avgmu + 0.00002 * avgmu * avgmu ;
706  }else if(jet_pt<50){
707  if(jet_jvt<0.11) unc = 1;
708  else if(jet_jvt<0.25) unc = 0.0345 -0.0006 * avgmu + 0.00004 * avgmu * avgmu ;
709  else if(jet_jvt<0.85) unc = 0.1078 -0.0051 * avgmu + 0.00011 * avgmu * avgmu ;
710  else if(jet_jvt<0.95) unc = -0.0026 + 0.0005 * avgmu + 0.00002 * avgmu * avgmu;
711  else unc = 0.0090 -0.0004 * avgmu + 0.00001 * avgmu * avgmu ;
712  }else if(jet_pt<60){
713  if(jet_jvt<0.11) unc = 1;
714  else if(jet_jvt<0.25) unc = -0.0321 + 0.0030 * avgmu -0.00002 * avgmu * avgmu;
715  else if(jet_jvt<0.85) unc = 0.0260 -0.0007 * avgmu + 0.00003 * avgmu * avgmu ;
716  else unc = -0.0040 + 0.0003 * avgmu;
717  }else if(jet_pt<100){
718  unc = 0.9492 -2.0757 * jet_jvt + 1.13328 * jet_jvt * jet_jvt;
719  }else if(jet_pt<150){
720  unc = 0.7888 -1.8372 * jet_jvt + 1.05539 * jet_jvt * jet_jvt;
721  }
722  }else if(std::abs(jet_eta)<2.6){
723  if(jet_pt<30){
724  if(jet_jvt<0.11) unc = 0.2633 + 0.0091 * avgmu + -0.00009 * avgmu * avgmu;
725  else if(jet_jvt<0.25) unc = 0.1841 + 0.0144 * avgmu + -0.00008 * avgmu * avgmu;
726  else if(jet_jvt<0.85) unc = 0.1401 + 0.0048 * avgmu + 0.00006 * avgmu * avgmu ;
727  else if(jet_jvt<0.95) unc = -0.0118 + 0.0076 * avgmu + 0.00003 * avgmu * avgmu;
728  else unc = 0.0534 + -0.0011 * avgmu + 0.00010 * avgmu * avgmu;
729  }else if(jet_pt<40){
730  if(jet_jvt<0.11) unc = 0.1497 + 0.0133 * avgmu + -0.00015 * avgmu * avgmu ;
731  else if(jet_jvt<0.25) unc = -0.2260 + 0.0276 * avgmu + -0.00021 * avgmu * avgmu ;
732  else if(jet_jvt<0.85) unc = 0.2743 + -0.0093 * avgmu + 0.00022 * avgmu * avgmu ;
733  else if(jet_jvt<0.95) unc = 0.0604 + 0.0006 * avgmu + 0.00006 * avgmu * avgmu ;
734  else unc = 0.0478 + -0.0009 * avgmu + 0.00004 * avgmu * avgmu ;
735  }else if(jet_pt<50){
736  if(jet_jvt<0.11) unc = -0.2187 + 0.0317 * avgmu + -0.00037 * avgmu * avgmu ;
737  else if(jet_jvt<0.25) unc = 0.0964 + 0.0053 * avgmu + 0.00002 * avgmu * avgmu ;
738  else if(jet_jvt<0.85) unc = 1.1730 + -0.0624 * avgmu + 0.00088 * avgmu * avgmu ;
739  else if(jet_jvt<0.95) unc = -0.2011 + 0.0151 * avgmu + -0.00018 * avgmu * avgmu ;
740  else unc = 0.0145 + -0.0003 * avgmu + 0.00002 * avgmu * avgmu ;
741  }else if(jet_pt<60){
742  if(jet_jvt<0.11) unc = 0.0051 + 0.0113 * avgmu + -0.00008 * avgmu * avgmu ;
743  else if(jet_jvt<0.25) unc = -0.1024 + 0.0109 * avgmu + -0.00006 * avgmu * avgmu ;
744  else if(jet_jvt<0.85) unc = 1.2491 + -0.0501 * avgmu + 0.00052 * avgmu * avgmu ;
745  else unc = 0.0267 + -0.0014 * avgmu + 0.00003 * avgmu * avgmu ;
746  }else if(jet_pt<100){
747  unc = 0.8951 -2.4995 * jet_jvt + 1.63229 * jet_jvt * jet_jvt;
748  }else if(jet_pt<150){
749  unc = 0.9998 -1.7319 * jet_jvt + 0.72680 * jet_jvt * jet_jvt;
750  }
751  }else if(std::abs(jet_eta)<2.7){
752  if(jet_pt<30){
753  if(jet_jvt<0.11) unc = 0.3001 + 0.0054 * avgmu -0.00004 * avgmu * avgmu ;
754  else if(jet_jvt<0.25) unc = 0.0663 + 0.0198 * avgmu -0.00013 * avgmu * avgmu ;
755  else if(jet_jvt<0.85) unc = -0.0842 + 0.0163 * avgmu -0.00008 * avgmu * avgmu ;
756  else if(jet_jvt<0.95) unc = -0.0219 + 0.0080 * avgmu + 0.00003 * avgmu * avgmu;
757  else unc = 0.0461 -0.0003 * avgmu + 0.00012 * avgmu * avgmu ;
758  }else if(jet_pt<40){
759  if(jet_jvt<0.11) unc = 0.1885 + 0.0083 * avgmu -0.00006 * avgmu * avgmu ;
760  else if(jet_jvt<0.25) unc = -0.0286 + 0.0150 * avgmu -0.00007 * avgmu * avgmu;
761  else if(jet_jvt<0.85) unc = 0.0152 + 0.0028 * avgmu + 0.00005 * avgmu * avgmu;
762  else if(jet_jvt<0.95) unc = 0.1815 -0.0076 * avgmu + 0.00018 * avgmu * avgmu ;
763  else unc = 0.0192 -0.0003 * avgmu + 0.00007 * avgmu * avgmu ;
764  }else if(jet_pt<50){
765  if(jet_jvt<0.11) unc = 0.1257 + 0.0074 * avgmu -0.00004 * avgmu * avgmu ;
766  else if(jet_jvt<0.25) unc = -0.0276 + 0.0080 * avgmu + 0.00000 * avgmu * avgmu;
767  else if(jet_jvt<0.85) unc = 0.1403 -0.0051 * avgmu + 0.00009 * avgmu * avgmu ;
768  else if(jet_jvt<0.95) unc = 0.2078 -0.0101 * avgmu + 0.00017 * avgmu * avgmu ;
769  else unc = 0.2597 -0.0132 * avgmu + 0.00020 * avgmu * avgmu ;
770  }else if(jet_pt<60){
771  if(jet_jvt<0.11) unc = 0.1111 + 0.0045 * avgmu -0.00000 * avgmu * avgmu ;
772  else if(jet_jvt<0.25) unc = 0.0975 -0.0011 * avgmu + 0.00008 * avgmu * avgmu ;
773  else if(jet_jvt<0.85) unc = 0.0920 -0.0053 * avgmu + 0.00013 * avgmu * avgmu ;
774  else unc = -0.0071 + 0.0016 * avgmu -0.00001 * avgmu * avgmu;
775  }else if(jet_pt<100){
776  unc = 0.4660 -1.2116 * jet_jvt + 0.78807 * jet_jvt * jet_jvt;
777  }else if(jet_pt<150){
778  unc = 0.2254 -0.5476 * jet_jvt + 0.32617 * jet_jvt * jet_jvt;
779  }
780  }// end eta 2.7
781  else{//forward jets
782  float fjvt = jet_fjvt>0.6 ? 0.6 : jet_fjvt; // the pileup more or less plateaus at 0.6
783  if(jet_pt<30) unc = 0.5106 + 1.2566 * fjvt -1.15060 * fjvt * fjvt;
784  else if(jet_pt<40) unc = 0.2972 + 1.9418 * fjvt -1.82694 * fjvt * fjvt;
785  else if(jet_pt<50) unc = 0.1543 + 1.9864 * fjvt -1.48429 * fjvt * fjvt;
786  else if(jet_pt<60) unc = 0.1050 + 1.3196 * fjvt + 0.03554 * fjvt * fjvt;
787  else if(jet_pt<120) unc = 0.0400 + 0.5653 * fjvt + 1.96323 * fjvt * fjvt;
788  // max of 0.9 seems reasonable
789  if(jet_fjvt>0.6) unc = 0.9;
790  }
791  // end emtopo
792  }else{//p-flow inputs
793  if(std::abs(jet_eta)<2.4){
794  if(jet_pt<30){
795  if(jet_jvt<0.11) unc = 1;
796  else if(jet_jvt<0.25) unc = 0.2494 + 0.0076 * avgmu -0.00001 * avgmu * avgmu ;
797  else if(jet_jvt<0.85) unc = 0.0626 + 0.0037 * avgmu + 0.00004 * avgmu * avgmu;
798  else if(jet_jvt<0.95) unc = 0.0192 + 0.0017 * avgmu + 0.00005 * avgmu * avgmu;
799  else unc = 0.0147 -0.0003 * avgmu + 0.00004 * avgmu * avgmu ;
800  }else if(jet_pt<40){
801  if(jet_jvt<0.11) unc = 1;
802  else if(jet_jvt<0.25) unc = 0.1979 + 0.0034 * avgmu + 0.00003 * avgmu * avgmu;
803  else if(jet_jvt<0.85) unc = 0.0731 -0.0022 * avgmu + 0.00009 * avgmu * avgmu ;
804  else if(jet_jvt<0.95) unc = 0.0281 -0.0012 * avgmu + 0.00006 * avgmu * avgmu ;
805  else unc = 0.0086 -0.0003 * avgmu + 0.00002 * avgmu * avgmu ;
806  }else if(jet_pt<50){
807  if(jet_jvt<0.11) unc = 1;
808  else if(jet_jvt<0.25) unc = 0.2242 -0.0010 * avgmu + 0.00006 * avgmu * avgmu ;
809  else if(jet_jvt<0.85) unc = 0.0568 -0.0019 * avgmu + 0.00006 * avgmu * avgmu ;
810  else if(jet_jvt<0.95) unc = -0.0050 + 0.0008 * avgmu + 0.00001 * avgmu * avgmu;
811  else unc = 0.0037 -0.0000 * avgmu + 0.00000 * avgmu * avgmu ;
812  }else if(jet_pt<60){
813  if(jet_jvt<0.11) unc = 1;
814  else if(jet_jvt<0.25) unc = 0.0027 + 0.0058 * avgmu -0.00001 * avgmu * avgmu ;
815  else if(jet_jvt<0.85) unc = -0.0143 + 0.0008 * avgmu + 0.00001 * avgmu * avgmu;
816  else unc = -0.0012 + 0.0001 * avgmu + 0.00000 * avgmu * avgmu;
817  }else if(jet_pt<100){
818  unc = 0.8558 -1.8519 * jet_jvt + 1.00208 * jet_jvt * jet_jvt;
819  }else if(jet_pt<150){
820  unc = 0.6474 -1.4491 * jet_jvt + 0.80591 * jet_jvt * jet_jvt;
821  }
822  }else if(std::abs(jet_eta)<2.6){
823  if(jet_pt<30){
824  if(jet_jvt<0.11) unc = 0.2633 + 0.0091 * avgmu + -0.00009 * avgmu * avgmu;
825  else if(jet_jvt<0.25) unc = 0.1841 + 0.0144 * avgmu + -0.00008 * avgmu * avgmu;
826  else if(jet_jvt<0.85) unc = 0.1401 + 0.0048 * avgmu + 0.00006 * avgmu * avgmu ;
827  else if(jet_jvt<0.95) unc = -0.0118 + 0.0076 * avgmu + 0.00003 * avgmu * avgmu;
828  else unc = 0.0534 + -0.0011 * avgmu + 0.00010 * avgmu * avgmu;
829  }else if(jet_pt<40){
830  if(jet_jvt<0.11) unc = 0.1497 + 0.0133 * avgmu + -0.00015 * avgmu * avgmu ;
831  else if(jet_jvt<0.25) unc = -0.2260 + 0.0276 * avgmu + -0.00021 * avgmu * avgmu ;
832  else if(jet_jvt<0.85) unc = 0.2743 + -0.0093 * avgmu + 0.00022 * avgmu * avgmu ;
833  else if(jet_jvt<0.95) unc = 0.0604 + 0.0006 * avgmu + 0.00006 * avgmu * avgmu ;
834  else unc = 0.0478 + -0.0009 * avgmu + 0.00004 * avgmu * avgmu ;
835  }else if(jet_pt<50){
836  if(jet_jvt<0.11) unc = -0.2187 + 0.0317 * avgmu + -0.00037 * avgmu * avgmu ;
837  else if(jet_jvt<0.25) unc = 0.0964 + 0.0053 * avgmu + 0.00002 * avgmu * avgmu ;
838  else if(jet_jvt<0.85) unc = 1.1730 + -0.0624 * avgmu + 0.00088 * avgmu * avgmu ;
839  else if(jet_jvt<0.95) unc = -0.2011 + 0.0151 * avgmu + -0.00018 * avgmu * avgmu ;
840  else unc = 0.0145 + -0.0003 * avgmu + 0.00002 * avgmu * avgmu ;
841  }else if(jet_pt<60){
842  if(jet_jvt<0.11) unc = 0.0051 + 0.0113 * avgmu + -0.00008 * avgmu * avgmu ;
843  else if(jet_jvt<0.25) unc = -0.1024 + 0.0109 * avgmu + -0.00006 * avgmu * avgmu ;
844  else if(jet_jvt<0.85) unc = 1.2491 + -0.0501 * avgmu + 0.00052 * avgmu * avgmu ;
845  else unc = 0.0267 + -0.0014 * avgmu + 0.00003 * avgmu * avgmu ;
846  }else if(jet_pt<100){
847  unc = 0.8802 -1.6233 * jet_jvt + 0.74604 * jet_jvt * jet_jvt;
848  }else if(jet_pt<150){
849  unc = 0.9762 -2.4160 * jet_jvt + 1.45763 * jet_jvt * jet_jvt;
850  }
851  }else if(std::abs(jet_eta)<2.7){
852  if(jet_pt<30){
853  if(jet_jvt<0.11) unc = 0.2877 + 0.0056 * avgmu -0.00004 * avgmu * avgmu;
854  else if(jet_jvt<0.25) unc = 0.0353 + 0.0196 * avgmu -0.00012 * avgmu * avgmu;
855  else if(jet_jvt<0.85) unc = -0.1616 + 0.0188 * avgmu -0.00009 * avgmu * avgmu;
856  else if(jet_jvt<0.95) unc = 0.0373 + 0.0048 * avgmu + 0.00006 * avgmu * avgmu;
857  else unc = 0.0666 -0.0007 * avgmu + 0.00013 * avgmu * avgmu;
858  }else if(jet_pt<40){
859  if(jet_jvt<0.11) unc = 0.1331 + 0.0098 * avgmu -0.00007 * avgmu * avgmu;
860  else if(jet_jvt<0.25) unc = 0.0570 + 0.0096 * avgmu -0.00000 * avgmu * avgmu;
861  else if(jet_jvt<0.85) unc = 0.2338 -0.0094 * avgmu + 0.00019 * avgmu * avgmu;
862  else if(jet_jvt<0.95) unc = 0.2930 -0.0127 * avgmu + 0.00023 * avgmu * avgmu;
863  else unc = 0.0152 -0.0003 * avgmu + 0.00007 * avgmu * avgmu;
864  }else if(jet_pt<50){
865  if(jet_jvt<0.11) unc = 0.1582 + 0.0060 * avgmu -0.00003 * avgmu * avgmu;
866  else if(jet_jvt<0.25) unc = -0.0079 + 0.0057 * avgmu + 0.00003 * avgmu * avgmu;
867  else if(jet_jvt<0.85) unc = 0.1865 -0.0081 * avgmu + 0.00013 * avgmu * avgmu;
868  else if(jet_jvt<0.95) unc = 0.9103 -0.0405 * avgmu + 0.00049 * avgmu * avgmu;
869  else unc = 0.1183 -0.0048 * avgmu + 0.00009 * avgmu * avgmu;
870  }else if(jet_pt<60){
871  if(jet_jvt<0.11) unc = 0.0859 + 0.0047 * avgmu -0.00000 * avgmu * avgmu;
872  else if(jet_jvt<0.25) unc = 0.0249 + 0.0027 * avgmu + 0.00004 * avgmu * avgmu;
873  else if(jet_jvt<0.85) unc = 0.1865 -0.0087 * avgmu + 0.00012 * avgmu * avgmu;
874  else unc = 0.2069 -0.0087 * avgmu + 0.00011 * avgmu * avgmu;
875  }else if(jet_pt<100){
876  unc = 0.4281 -1.1109 * jet_jvt + 0.71551 * jet_jvt * jet_jvt;
877  }else if(jet_pt<150){
878  unc = 0.2033 -0.5162 * jet_jvt + 0.33810 * jet_jvt * jet_jvt;
879  }
880  }// end eta 2.7
881  else{//forward jets
882  float fjvt = jet_fjvt>0.6 ? 0.6 : jet_fjvt; // the pileup more or less plateaus at 0.6
883  if(jet_pt<30) unc = 0.5295 + 1.2467 * fjvt -1.13946 * fjvt * fjvt;
884  else if(jet_pt<40) unc = 0.3118 + 1.9951 * fjvt -1.86882 * fjvt * fjvt;
885  else if(jet_pt<50) unc = 0.1347 + 2.3884 * fjvt -1.96891 * fjvt * fjvt;
886  else if(jet_pt<60) unc = 0.0872 + 1.5718 * fjvt + 0.02135 * fjvt * fjvt;
887  else if(jet_pt<120) unc = 0.0303 + 0.8560 * fjvt + 1.89537 * fjvt * fjvt;
888  // max of 0.9 seems reasonable
889  if(jet_fjvt>0.6) unc = 0.9;
890  }
891  }// end pflow
892 
893  unc = std::min(unc, 1.0);
894  unc = std::max(unc, 0.0);
895 
896  return unc;
897  }

◆ 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 103 of file METSignificance.cxx.

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

◆ 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 964 of file METSignificance.cxx.

964  {
965 
966  // determinant
967  double det = mat[0][0]*mat[1][1]-mat[0][1]*mat[1][0];
968 
969  m[0][0]=0.0;
970  m[0][1]=0.0;
971  m[1][0]=0.0;
972  m[1][1]=0.0;
973 
974  if(det==0.0) return;
975 
976  m[0][0]= 1.0/det*(mat[1][1]);
977  m[1][0]=-1.0/det*(mat[1][0]);
978  m[0][1]=-1.0/det*(mat[0][1]);
979  m[1][1]= 1.0/det*(mat[0][0]);
980  }

◆ 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 375 of file METSignificance.cxx.

375  {
376 
377  // Rotation (components)
379 
380  if( m_VarL != 0 ){
382  m_rho = m_CvLT / std::sqrt( m_VarL * m_VarT ) ;
383  }
384  ATH_MSG_DEBUG(" Significance (squared) at new phi: " << m_significance
385  << " rho: " << GetRho()
386  << " MET: " << m_met
387  << " sigmaL: " << GetVarL()
388  << " sigmaT: " << GetVarT() );
389 
390  return StatusCode::SUCCESS;
391  }

◆ RotateXY()

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

Definition at line 989 of file METSignificance.cxx.

989  {
990 
991  double c = std::cos(phi);
992  double s = std::sin(phi);
993  double cc = c*c;
994  double ss = s*s;
995  double cs = c*s;
996 
997  double V11 = mat[0][0]*cc + mat[1][1]*ss - cs*(mat[1][0] + mat[0][1]);
998  double V12 = mat[0][1]*cc - mat[1][0]*ss + cs*(mat[0][0] - mat[1][1]);
999  double V21 = mat[1][0]*cc - mat[0][1]*ss + cs*(mat[0][0] - mat[1][1]);
1000  double V22 = mat[0][0]*ss + mat[1][1]*cc + cs*(mat[1][0] + mat[0][1]);
1001 
1002  mat_new[0][0]=V11;
1003  mat_new[0][1]=V12;
1004  mat_new[1][0]=V21;
1005  mat_new[1][1]=V22;
1006  }

◆ SetLambda()

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

Implements IMETSignificance.

Definition at line 393 of file METSignificance.cxx.

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

◆ Significance_LT()

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

Definition at line 947 of file METSignificance.cxx.

947  {
948 
949  Double_t rho = cov / std::sqrt( var_parall * var_perpen ) ;
950  Double_t Significance = 0;
951  if (std::abs( rho ) >= 0.9 ){ //Cov Max not invertible -> Significance diverges
952  ATH_MSG_VERBOSE("rho is large: " << rho);
953  Significance = std::pow( Numerator - m_scalarBias , 2 ) / ( var_parall ) ;
954  }
955  else
956  Significance = std::pow( Numerator - m_scalarBias , 2 ) / ( var_parall * ( 1 - std::pow(rho,2) ) ) ;
957 
958  if( std::abs(Significance) >= 10e+15)
959  ATH_MSG_WARNING("warning -->"<< Significance);
960 
961  return Significance;
962  }

◆ 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 1029 of file METSignificance.cxx.

1029  {
1030  if (PtSoft<45.) return 40. + 2*PtSoft + 0.1*std::pow(PtSoft,2);
1031  else return 40. + 2*45 + 0.1*std::pow(45,2);
1032  }

◆ 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 195 of file METSignificance.cxx.

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

◆ VarparPtSoftdir()

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

Definition at line 1017 of file METSignificance.cxx.

1017  {
1018  if (SoftSumet<25){
1019  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);
1020  else return 41.9+3.8*50.+0.1*std::pow(50.,2)-12.7+ 1.39*SoftSumet-0.03*std::pow(SoftSumet,2);
1021  }
1022  else{
1023  if (PtSoft<50.) return 41.9+3.8*PtSoft+0.1*std::pow(PtSoft,2);
1024  else return (40.5614)+(4.10965)*50.+(0.0955044)*std::pow(50.,2);
1025  }
1026  }

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
TrigJetMonitorAlgorithm.jetcoll
jetcoll
Definition: TrigJetMonitorAlgorithm.py:1161
met::METSignificance::VarparPtSoftdir
double VarparPtSoftdir(const double PtSoft, const double SoftSumet)
Definition: METSignificance.cxx:1017
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
met::METSignificance::AddResoMap
void AddResoMap(const double varL, const double varT, const double CvTV, const int term)
Definition: METSignificance.cxx:1044
met::METSignificance::Bias_PtSoftParall
double Bias_PtSoftParall(const double PtSoft_Parall)
Definition: METSignificance.cxx:1035
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:989
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
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
max
#define max(a, b)
Definition: cfImp.cxx:41
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TH2F
Definition: rootspy.cxx:420
xAOD::MissingET_v1::sumet
float sumet() const
Returns.
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
met::METSignificance::m_configPrefix
std::string m_configPrefix
Definition: METSignificance.h:175
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:53
met::METSignificance::m_GeV
double m_GeV
Definition: METSignificance.h:123
xAOD::MissingET_v1::phi
float phi() const
Returns .
TauCombinedTES
Definition: TauCombinedTES.h:19
met::ResoSoft
@ ResoSoft
Definition: IMETSignificance.h:34
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
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:418
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:684
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:54
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
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:40
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:501
met::METSignificance::CovMatrixRotation
std::tuple< double, double, double > CovMatrixRotation(double var_x, double var_y, double cv_xy, double Phi)
Definition: METSignificance.cxx:939
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:899
met
Definition: IMETSignificance.h:24
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:947
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:41
met::METSignificance::BiasPtSoftdir
double BiasPtSoftdir(const double PtSoft)
Parameterization with PtSoft Direction //.
Definition: METSignificance.cxx:1010
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
WritePulseShapeToCool.det
det
Definition: WritePulseShapeToCool.py:204
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
min
#define min(a, b)
Definition: cfImp.cxx:40
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:568
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
met::METSignificance::AddJet
StatusCode AddJet(const xAOD::IParticle *obj, float &pt_reso, float &phi_reso, float &avgmu)
Definition: METSignificance.cxx:517
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:589
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:1029
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.
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
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:982
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:57
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:616
met::METSignificance::m_jetPtThr
float m_jetPtThr
Definition: METSignificance.h:142
met::METSignificance::m_sumet
double m_sumet
Definition: METSignificance.h:167
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
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:790
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:375
met::METSignificance::AddElectron
StatusCode AddElectron(const xAOD::IParticle *obj, float &pt_reso, float &phi_reso, float avgmu)
Definition: METSignificance.cxx:470
xAOD::TruthParticle_v1::pdgId
int pdgId() const
PDG ID code.
met::METSignificance::getEtaBin
static unsigned int getEtaBin(double jet_eta)
Definition: METSignificance.cxx:918
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:135
SG::DataProxy
Definition: DataProxy.h:44
MissingETBase::Source::isSoftTerm
static bool isSoftTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
Definition: MissingETBase.h:403
GeV
#define GeV
Definition: CaloTransverseBalanceVecMon.cxx:30
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