#include <ResidualOffsetCorrection.h>
|
| ResidualOffsetCorrection () |
|
| ResidualOffsetCorrection (const std::string &name, TEnv *config, TString jetAlgo, TString calibAreaTag, bool isData, bool dev) |
|
virtual | ~ResidualOffsetCorrection () |
|
virtual StatusCode | initialize () |
|
double | GetResidualOffset (double abseta, double mu, double NPV, int nJet, bool MuOnly, bool NOnly) const |
|
void | setLevel (MSG::Level lvl) |
| Change the current logging level. More...
|
|
|
static constexpr float | m_GeV = 1000 |
|
Definition at line 26 of file ResidualOffsetCorrection.h.
◆ ResidualOffsetCorrection() [1/2]
ResidualOffsetCorrection::ResidualOffsetCorrection |
( |
| ) |
|
◆ ResidualOffsetCorrection() [2/2]
ResidualOffsetCorrection::ResidualOffsetCorrection |
( |
const std::string & |
name, |
|
|
TEnv * |
config, |
|
|
TString |
jetAlgo, |
|
|
TString |
calibAreaTag, |
|
|
bool |
isData, |
|
|
bool |
dev |
|
) |
| |
◆ ~ResidualOffsetCorrection()
ResidualOffsetCorrection::~ResidualOffsetCorrection |
( |
| ) |
|
|
virtual |
◆ GetNPVBeamspotCorrection()
double ResidualOffsetCorrection::GetNPVBeamspotCorrection |
( |
double |
NPV | ) |
const |
|
private |
◆ GetResidualOffset()
double ResidualOffsetCorrection::GetResidualOffset |
( |
double |
abseta, |
|
|
double |
mu, |
|
|
double |
NPV, |
|
|
int |
nJet, |
|
|
bool |
MuOnly, |
|
|
bool |
NOnly |
|
) |
| const |
◆ GetResidualOffsetET()
double ResidualOffsetCorrection::GetResidualOffsetET |
( |
double |
abseta, |
|
|
double |
mu, |
|
|
double |
NPV, |
|
|
int |
nJet, |
|
|
bool |
MuOnly, |
|
|
bool |
NOnly, |
|
|
const std::vector< double > & |
OffsetMu, |
|
|
const std::vector< double > & |
OffsetNPV, |
|
|
const std::vector< double > & |
OffsetNjet, |
|
|
const TAxis * |
OffsetBins |
|
) |
| const |
|
private |
Definition at line 124 of file ResidualOffsetCorrection.cxx.
137 double alpha,
beta, etaEdge;
138 if(!MuOnly){
beta = OffsetNjet[0];
141 }
else { alpha = 0; }
144 for (;
bin<=OffsetBins->GetNbins();++
bin) {
145 etaEdge = OffsetBins->GetBinLowEdge(
bin);
146 const double width=OffsetBins->GetBinWidth(
bin);
147 if (abseta<etaEdge+
width)
break;
151 if(!NOnly) alpha +=
OffsetMu[
bin]*(abseta-etaEdge);
152 if(!MuOnly)
beta += OffsetNjet[
bin]*(abseta-etaEdge);
158 double alpha,
beta, etaEdge;
162 }
else { alpha = 0; }
165 for (;
bin<=OffsetBins->GetNbins();++
bin) {
166 etaEdge = OffsetBins->GetBinLowEdge(
bin);
167 const double width=OffsetBins->GetBinWidth(
bin);
168 if (abseta<etaEdge+
width)
break;
172 if(!NOnly) alpha +=
OffsetMu[
bin]*(abseta-etaEdge);
◆ initialize()
StatusCode ResidualOffsetCorrection::initialize |
( |
| ) |
|
|
virtual |
Definition at line 34 of file ResidualOffsetCorrection.cxx.
42 bool doMuOnly =
m_config->GetValue(
"ApplyOnlyMuResidual",
false);
43 bool doNPVOnly =
m_config->GetValue(
"ApplyOnlyNPVResidual",
false);
44 bool doNJetOnly =
m_config->GetValue(
"ApplyOnlyNJetResidual",
false);
48 if (
m_mu_ref==-99 && !doNPVOnly && !doNJetOnly) {
49 ATH_MSG_FATAL(
"OffsetCorrection.DefaultMuRef not specified.");
50 return StatusCode::FAILURE;
54 ATH_MSG_FATAL(
"OffsetCorrection.DefaultNPVRef not specified.");
55 return StatusCode::FAILURE;
59 ATH_MSG_FATAL(
"OffsetCorrection.DefaultNPVRef not specified.");
60 return StatusCode::FAILURE;
64 ATH_MSG_FATAL(
"OffsetCorrection.DefaultNjetRef not specified.");
65 return StatusCode::FAILURE;
69 TString ResidualOffsetCalibFile =
m_config->GetValue(
"ResidualOffset.CalibFile",
"");
71 ResidualOffsetCalibFile.Remove(0,33);
72 ResidualOffsetCalibFile.Insert(0,
"JetCalibTools/");
76 m_config->ReadFile(calibFile, kEnvLocal);
78 TString offsetName =
m_config->GetValue(
"ResidualOffsetCorrection.Name",
"");
80 ATH_MSG_INFO(
"Reading residual jet-area pile-up correction factors from: " << calibFile);
87 if (offsetEtaBins.size()<3) {
ATH_MSG_FATAL(offsetName <<
".AbsEtaBins not specified");
return StatusCode::FAILURE; }
90 if(!doNPVOnly && !doNJetOnly){
94 return StatusCode::FAILURE;
101 return StatusCode::FAILURE;
103 }
else if(!doMuOnly){
107 return StatusCode::FAILURE;
111 ATH_MSG_INFO(
"\n NPV beamspot correction will be applied.");
115 return StatusCode::SUCCESS;
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ msg() [1/2]
MsgStream & asg::AsgMessaging::msg |
( |
| ) |
const |
|
inherited |
The standard message stream.
- Returns
- A reference to the default message stream of this object.
Definition at line 49 of file AsgMessaging.cxx.
50 #ifndef XAOD_STANDALONE
52 #else // not XAOD_STANDALONE
54 #endif // not XAOD_STANDALONE
◆ msg() [2/2]
MsgStream & asg::AsgMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inherited |
The standard message stream.
- Parameters
-
lvl | The message level to set the stream to |
- Returns
- A reference to the default message stream, set to level "lvl"
Definition at line 57 of file AsgMessaging.cxx.
58 #ifndef XAOD_STANDALONE
60 #else // not XAOD_STANDALONE
63 #endif // not XAOD_STANDALONE
◆ msgLvl()
bool asg::AsgMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inherited |
Test the output level of the object.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicting if messages at given level will be printed
-
true
If messages at level "lvl" will be printed
Definition at line 41 of file AsgMessaging.cxx.
42 #ifndef XAOD_STANDALONE
43 return ::AthMessaging::msgLvl( lvl );
44 #else // not XAOD_STANDALONE
45 return m_msg.msgLevel( lvl );
46 #endif // not XAOD_STANDALONE
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_applyNPVBeamspotCorrection
bool ResidualOffsetCorrection::m_applyNPVBeamspotCorrection {} |
|
private |
◆ m_calibAreaTag
TString ResidualOffsetCorrection::m_calibAreaTag |
|
private |
◆ m_config
TEnv* ResidualOffsetCorrection::m_config {} |
|
private |
◆ m_dev
bool ResidualOffsetCorrection::m_dev {} |
|
private |
◆ m_GeV
constexpr float ResidualOffsetCorrection::m_GeV = 1000 |
|
staticconstexprprivate |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_isData
bool ResidualOffsetCorrection::m_isData {} |
|
private |
◆ m_jetAlgo
TString ResidualOffsetCorrection::m_jetAlgo |
|
private |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_mu_ref
double ResidualOffsetCorrection::m_mu_ref {} |
|
private |
◆ m_muSF
double ResidualOffsetCorrection::m_muSF {} |
|
private |
◆ m_nJet_ref
double ResidualOffsetCorrection::m_nJet_ref {} |
|
private |
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_NPV_ref
double ResidualOffsetCorrection::m_NPV_ref {} |
|
private |
◆ m_npvBeamspotCorr
◆ m_resOffsetBins
TAxis* ResidualOffsetCorrection::m_resOffsetBins {} |
|
private |
◆ m_resOffsetDesc
TString ResidualOffsetCorrection::m_resOffsetDesc |
|
private |
◆ m_resOffsetMu
std::vector<double> ResidualOffsetCorrection::m_resOffsetMu |
|
private |
◆ m_resOffsetNjet
std::vector<double> ResidualOffsetCorrection::m_resOffsetNjet |
|
private |
◆ m_resOffsetNPV
std::vector<double> ResidualOffsetCorrection::m_resOffsetNPV |
|
private |
◆ m_useNjet
bool ResidualOffsetCorrection::m_useNjet {} |
|
private |
The documentation for this class was generated from the following files:
double GetResidualOffsetET(double abseta, double mu, double NPV, int nJet, bool MuOnly, bool NOnly, const std::vector< double > &OffsetMu, const std::vector< double > &OffsetNPV, const std::vector< double > &OffsetNjet, const TAxis *OffsetBins) const