ATLAS Offline Software
Loading...
Searching...
No Matches
MissingMassTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Asg wrapper around the MissingMassCalculator
6// author Quentin Buat <quentin.buat@no.spam.cern.ch>
7#ifndef DITAUMASSTOOLS_MISSINGMASSTOOL_H
8#define DITAUMASSTOOLS_MISSINGMASSTOOL_H
9
10// Framework include(s):
11#include "AsgTools/AsgTool.h"
13
14//Local include(s):
18
19#include <string>
20
21namespace DiTauMassTools{
22 using ROOT::Math::PtEtaPhiMVector;
23 using ROOT::Math::VectorUtil::Phi_mpi_pi;
24
25class MissingMassTool : virtual public IMissingMassTool, virtual public asg::AsgTool
26{
27
30
31 public:
32
34 MissingMassTool(const std::string& name);
36 MissingMassTool(const MissingMassTool& other);
37
39 virtual ~MissingMassTool() { };
40
42 virtual StatusCode initialize();
43
45 virtual StatusCode finalize();
46
47
48 // generic method
49 virtual CP::CorrectionCode apply (const xAOD::EventInfo& ei,
52 const xAOD::MissingET* met,
53 const int & njets);
54
55 virtual void calculate(const xAOD::EventInfo & ei,
56 const PtEtaPhiMVector & vis_tau1,
57 const PtEtaPhiMVector & vis_tau2,
58 const int & tau1_decay_type,
59 const int & tau2_decay_type,
60 const xAOD::MissingET & met,
61 const int & njets){
62 ignore(ei); ignore(vis_tau1); ignore(vis_tau2);
63 ignore(tau1_decay_type); ignore(tau2_decay_type);
64 ignore(met); ignore(njets);}
65
66 virtual MissingMassCalculator* get() {return m_MMC;}
67 virtual double GetFitStatus(int method) {(void) method; return m_MMC->OutputInfo.GetFitStatus();}
68 virtual double GetFittedMass(int method) {return m_MMC->OutputInfo.GetFittedMass(method);}
69 virtual double GetFittedMassErrorUp(int method) {return m_MMC->OutputInfo.GetFittedMassErrorUp(method);}
70 virtual double GetFittedMassErrorLow(int method) {return m_MMC->OutputInfo.GetFittedMassErrorLow(method);}
71 virtual PtEtaPhiMVector GetResonanceVec(int method) {return m_MMC->OutputInfo.GetResonanceVec(method);}
72 virtual XYVector GetFittedMetVec(int method) {return m_MMC->OutputInfo.GetFittedMetVec(method);}
73 virtual PtEtaPhiMVector GetNeutrino4vec(int method, int index) {return m_MMC->OutputInfo.GetNeutrino4vec(method, index);}
74 virtual PtEtaPhiMVector GetTau4vec(int method, int index) {return m_MMC->OutputInfo.GetTau4vec(method, index);}
75 virtual int GetNNoSol() {return m_MMC->GetNNoSol();}
76 virtual int GetNMetroReject() {return m_MMC->GetNMetroReject();}
77 virtual int GetNSol() {return m_MMC->GetNSol();}
78
79 private:
80
82
83 Gaudi::Property<bool> m_decorate{this, "Decorate", false};
84 Gaudi::Property<bool> m_float_stop{this, "FloatStoppingCrit", true, "Applying Floating Stopping Criterion to speed up MMC"};
85 Gaudi::Property<int> m_float_stop_miniter{this, "FloatStoppingCritMinIter", 10000, "Minimum number of iteration to apply Floating Stopping Criterion"};
86 Gaudi::Property<int> m_float_stop_checkfreq{this, "FloatStoppingCritCheckFreq", 1000, "Number of events frequency for Floating Stopping Criterion to be applied after minimum number of iteration"};
87 Gaudi::Property<double> m_float_stop_comp{this, "FloatStoppingCritCheckComp", 0.05, "Percentage to assess the sigma compatibilities in the Floating Stopping Criterion"};
88 Gaudi::Property<std::string> m_calib_set{this, "CalibSet", "2024"}; // Change to "2019" if the old MMC version is to be used.
89 // default negative. Only set parameter if positive
90 // so that the default are in MissingMassCalculator code
91 Gaudi::Property<double> m_n_sigma_met{this, "NsigmaMET", -1};
92 Gaudi::Property<int> m_tail_cleanup{this, "UseTailCleanup", -1};
93 Gaudi::Property<int> m_use_verbose{this, "UseVerbose", -1};
94 Gaudi::Property<int> m_niter_fit_2{this, "NiterFit2", -1};
95 Gaudi::Property<int> m_niter_fit_3{this, "NiterFit3", -1};
96 Gaudi::Property<int> m_use_tau_probability{this, "UseTauProbability", -1};
97 Gaudi::Property<bool> m_use_mnu_probability{this, "UseMnuProbability", false};
98 Gaudi::Property<int> m_use_defaults{this, "UseDefaults", -1};
99 Gaudi::Property<int> m_use_efficiency_recovery{this, "UseEfficiencyRecovery", -1};
100 Gaudi::Property<bool> m_use_met_param_dphiLL{this, "UseMETDphiLL", false};
101 Gaudi::Property<std::string> m_param_file_path{this, "ParamFilePath", "MMC_params_v051224_angle_noLikelihoodFit.root"}; // // Available parameterization files: MMC_params_v051224_angle_noLikelihoodFit.root and MMC_params_v051224_angle_likelihoodFit.root. More details on the differences between these two options can be found in the slides https://indico.cern.ch/event/1487242/contributions/6269201/attachments/2989313/5265428/HbbHtautau_MMCstudies_statusReport_181224_v2.pdf . Use MMC_params_v1_fixed.root for 2019 CalibSet
102 Gaudi::Property<double> m_beam_energy{this, "BeamEnergy", 6500.0};
103 Gaudi::Property<bool> m_lfv_leplep_refit{this, "LFVLeplepRefit", true};
104 Gaudi::Property<bool> m_save_llh_histo{this, "SaveLlhHisto", false};
105
106};
107} // namespace DiTauMassTools
108
109#endif
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Return value from object correction CP tools.
Gaudi::Property< double > m_n_sigma_met
virtual CP::CorrectionCode apply(const xAOD::EventInfo &ei, const xAOD::IParticle *part1, const xAOD::IParticle *part2, const xAOD::MissingET *met, const int &njets)
virtual double GetFitStatus(int method)
virtual ~MissingMassTool()
virtual destructor
virtual PtEtaPhiMVector GetNeutrino4vec(int method, int index)
virtual void calculate(const xAOD::EventInfo &ei, const PtEtaPhiMVector &vis_tau1, const PtEtaPhiMVector &vis_tau2, const int &tau1_decay_type, const int &tau2_decay_type, const xAOD::MissingET &met, const int &njets)
Gaudi::Property< int > m_use_verbose
MissingMassCalculator * m_MMC
Gaudi::Property< bool > m_use_mnu_probability
Gaudi::Property< int > m_tail_cleanup
Gaudi::Property< int > m_float_stop_miniter
Gaudi::Property< double > m_float_stop_comp
Gaudi::Property< int > m_niter_fit_2
virtual MissingMassCalculator * get()
virtual double GetFittedMassErrorLow(int method)
virtual StatusCode finalize()
Initialize the tool.
Gaudi::Property< bool > m_float_stop
virtual StatusCode initialize()
Initialize the tool.
Gaudi::Property< bool > m_lfv_leplep_refit
Gaudi::Property< int > m_use_efficiency_recovery
virtual double GetFittedMassErrorUp(int method)
virtual double GetFittedMass(int method)
Gaudi::Property< double > m_beam_energy
MissingMassTool(const std::string &name)
Proper constructor for Athena.
virtual PtEtaPhiMVector GetTau4vec(int method, int index)
Gaudi::Property< int > m_use_tau_probability
Gaudi::Property< bool > m_save_llh_histo
Gaudi::Property< std::string > m_param_file_path
Gaudi::Property< bool > m_use_met_param_dphiLL
virtual PtEtaPhiMVector GetResonanceVec(int method)
Gaudi::Property< bool > m_decorate
Gaudi::Property< int > m_float_stop_checkfreq
virtual XYVector GetFittedMetVec(int method)
Gaudi::Property< int > m_use_defaults
Gaudi::Property< std::string > m_calib_set
Gaudi::Property< int > m_niter_fit_3
ROOT::Math::PtEtaPhiMVector PtEtaPhiMVector
ROOT::Math::XYVector XYVector
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
Class providing the definition of the 4-vector interface.
Definition index.py:1
Definition part1.py:1
Definition part2.py:1
EventInfo_v1 EventInfo
Definition of the latest event info version.
MissingET_v1 MissingET
Version control by type defintion.