ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
EtaMassJESCalibStep Class Reference

#include <JESCalibStep.h>

Inheritance diagram for EtaMassJESCalibStep:
Collaboration diagram for EtaMassJESCalibStep:

Public Member Functions

 EtaMassJESCalibStep (const std::string &name="EtaMassJESCalibStep")
 
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function. More...
 
virtual StatusCode calibrate (xAOD::JetContainer &) const override
 Apply calibration to a jet container. More...
 
virtual void print () const
 Print the state of the tool. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 
virtual StatusCode getNominalResolutionData (const xAOD::Jet &, const JetHelper::JetContext &, double &) const
 
virtual StatusCode getNominalResolutionMC (const xAOD::Jet &, const JetHelper::JetContext &, double &) 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

double getLogPolN (const double *factors, double x) const
 
double getLogPolNSlope (const double *factors, double x) const
 
int getEtaBin (double eta_det) const
 
bool readMCJESFromText ()
 
bool readMCJESFromHists ()
 
void loadSplineHists (const std::string &fileName, const std::string &etajes_name)
 
double getJES (const double X, const double Y=0, const double Emax=-1) const
 return MCJES calibration factor More...
 
double getEtaCorr (double X, double Y=0) const
 return Eta correction More...
 
double getEmaxJES (const double Y) const
 return Emax More...
 
double getLowPtJES (double E_uncorr, double eta_det) const
 deal with low pt jets More...
 
double getSplineCorr (const int etaBin, double E) const
 
double getSplineSlope (const int ieta, const double minE) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

Gaudi::Property< std::string > m_constantFileName { this, "CalibConstantFile", "/afs/cern.ch/work/s/stapiaar/JetDev4/athena/JetToolHelpers/data/file_JES.config", "text file containing constants" }
 name of the text file More...
 
Gaudi::Property< std::string > m_jetAlgo { this, "JetAlgo", "AntiKt4EMPFlow", "jet collection" }
 jet collection to be calibrated More...
 
Gaudi::Property< float > m_minPt_JES = {this, "MinPtForETAJES",15, "min pT"}
 
Gaudi::Property< bool > m_freezeJESatHighE = {this, "FreezeJEScorrectionatHighE",false, " freeze at high e"}
 
Gaudi::Property< float > m_lowPtExtrap = {this, "LowPtJESExtrapolationMethod", 0, " low pt etrap"}
 
Gaudi::Property< float > m_lowPtMinR = {this, "LowPtJESExtrapolationMinimumResponse", 0.25, " low pt etrap min"}
 
Gaudi::Property< float > m_minPt_EtaCorr = {this, "MinPtForEtaCorr" ,8. , ""}
 
Gaudi::Property< float > m_maxE_EtaCorr = {this, "MaxEForEtaCorr" ,2500. , ""}
 
Gaudi::Property< std::string > m_histoFileName { this, "HistoFile", "none", "root file containing histos for spline calib" }
 
Gaudi::Property< bool > m_useSpline = {this, "UseSpline",false, " use spline"}
 
ToolHandle< JetHelper::IVarToolm_vartoolE {this, "VarToolE", "VarTool", "InputVariable instance E (or pT?)" }
 
ToolHandle< JetHelper::IVarToolm_vartoolEta {this, "VarToolEta", "VarTool", "InputVariable instance eta (or rapididty?)" }
 interface for xAOD::jet variable to be defined by user, this must correspond to jet Eta in currect version of jet calibration files More...
 
unsigned int m_nPar {}
 
double m_JESFactors [s_nEtaBins][s_nParMax] {}
 
double m_etaCorrFactors [s_nEtaBins][s_nParMax] {}
 
double m_energyFreezeJES [s_nEtaBins] {}
 
double m_JES_MinPt_Slopes [s_nEtaBins] ={}
 
double m_JES_MinPt_E [s_nEtaBins] ={}
 
double m_JES_MinPt_R [s_nEtaBins] ={}
 
TAxis * m_etaBinAxis {}
 
std::vector< std::unique_ptr< TH1 > > m_etajesFactors
 
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
 

Static Private Attributes

static const unsigned int s_nEtaBins = 90
 
static const unsigned int s_nParMax = 9
 

Detailed Description

Definition at line 31 of file JESCalibStep.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

◆ EtaMassJESCalibStep()

EtaMassJESCalibStep::EtaMassJESCalibStep ( const std::string &  name = "EtaMassJESCalibStep")

Definition at line 19 of file JESCalibStep.cxx.

20  : asg::AsgTool( name ){ }

Member Function Documentation

◆ calibrate()

StatusCode EtaMassJESCalibStep::calibrate ( xAOD::JetContainer jets) const
overridevirtual

Apply calibration to a jet container.

Implements IJetCalibStep.

Definition at line 44 of file JESCalibStep.cxx.

44  {
45  ATH_MSG_DEBUG("Calibrating jet collection.");
46 
47 
48  // Change this to EtaMassJES? Or only if Mass is applied?
49  const xAOD::JetAttributeAccessor::AccessorWrapper<xAOD::JetFourMom_t> jesScaleMomAcc("JetEtaJESScaleMomentum");
50 
51  for(xAOD::Jet* jet: jets){
52 
53  const xAOD::JetFourMom_t jetStartP4 = jet->jetP4();
54 
55  // Extract the maximum energy, and store in the context
57  double varE {m_vartoolE->getValue(*jet,jc)};
58  double varEta {m_vartoolEta->getValue(*jet,jc)};
59  double Emax = getEmaxJES(varEta);
60 
61  // Extract JES from the text handling tool
62  double jesCorrection = getJES(varE, varEta, Emax);
63  int ieta=getEtaBin(varEta);
64 
65 
66  xAOD::JetFourMom_t calibP4 = jetStartP4 * jesCorrection;
67 
68 
69  const float etaCorr = calibP4.eta() + getEtaCorr(jesCorrection*varE, varEta) ; //m_textTool_Eta->getValue(*jet, jc);
70  ATH_MSG_DEBUG("eta = "<<etaCorr);
71 
72  // Apply the eta correction, use TLV from ROOT to do some math for us
73  TLorentzVector TLVjet;
74  TLVjet.SetPtEtaPhiM( calibP4.P()/cosh(etaCorr), etaCorr, calibP4.phi(), calibP4.M() );
75  calibP4.SetPxPyPzE( TLVjet.Px(), TLVjet.Py(), TLVjet.Pz(), TLVjet.E() );
76  ATH_MSG_DEBUG("JES = "<<jesCorrection << " e="<<varE << " eta="<<jetStartP4.Eta()<< " ieta="<< ieta << " post_pt= ="<< calibP4.Pt() << " etaCorr="<< etaCorr);
77 
78  // Set the decorations of this scale
79  jesScaleMomAcc.setAttribute(*jet, calibP4);
80  jet->setJetP4(calibP4);
81  }
82 
83  return StatusCode::SUCCESS;
84 }

◆ 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

◆ getEmaxJES()

double EtaMassJESCalibStep::getEmaxJES ( const double  Y) const
private

return Emax

Definition at line 282 of file JESCalibStep.cxx.

283 {
284  int binEta = getEtaBin(Y);
285  double emaxJES = m_energyFreezeJES[binEta];
286 
287  return emaxJES;
288 }

◆ getEtaBin()

int EtaMassJESCalibStep::getEtaBin ( double  eta_det) const
private

Definition at line 300 of file JESCalibStep.cxx.

301 {
302  int bin = std::as_const(m_etaBinAxis)->FindBin(eta_det);
303  if (bin<=0) return 0;
304  if (bin>m_etaBinAxis->GetNbins()) return bin-2; // overflow
305  return bin-1;
306 }

◆ getEtaCorr()

double EtaMassJESCalibStep::getEtaCorr ( double  X,
double  Y = 0 
) const
private

return Eta correction

Definition at line 268 of file JESCalibStep.cxx.

269 {
270  int binEta = getEtaBin(Y);
271  const double *factors = m_etaCorrFactors[binEta];
272 
273  if ( X < m_minPt_EtaCorr*cosh(Y) )
274  X = m_minPt_EtaCorr*cosh(Y);
276 
277  double eta_corr = getLogPolN(factors,X);
278 
279  return -eta_corr;
280 }

◆ getJES()

double EtaMassJESCalibStep::getJES ( const double  X,
const double  Y = 0,
const double  Emax = -1 
) const
private

return MCJES calibration factor

Definition at line 215 of file JESCalibStep.cxx.

216 {
217 
218  if ( X/cosh(Y) < m_minPt_JES ) { // WARNING !! Won't work if X is actually pT
219  double R = getLowPtJES(X,Y);
220  return 1.0/R;
221  }
222 
223  double JES_R;
224  int binEta = getEtaBin(Y);
225  const double *factors = m_JESFactors[binEta];
226 
227 
228  double E = X;
229  if( m_freezeJESatHighE && (E>Emax) && (Emax!=-1)) {
230  E = Emax;
231  }
232 
233  double R = 1.;
234 
235  if(m_useSpline){
236  R = getSplineCorr(binEta, E);
237  return 1.0/R;
238  } else {
239  R = getLogPolN(factors,E);
240  }
241 
242  JES_R = 1/R;
243 
244  return JES_R;
245 }

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

◆ getLogPolN()

double EtaMassJESCalibStep::getLogPolN ( const double *  factors,
double  x 
) const
private

Definition at line 290 of file JESCalibStep.cxx.

291 {
292  double y=0;
293  for ( uint i=0; i<m_nPar; ++i )
294  y += factors[i]*TMath::Power(log(x),Int_t(i));
295  return y;
296 }

◆ getLogPolNSlope()

double EtaMassJESCalibStep::getLogPolNSlope ( const double *  factors,
double  x 
) const
private

Definition at line 308 of file JESCalibStep.cxx.

308  {
309  double y=0;
310  const double inv_x = 1. / x;
311  for ( uint i=0; i<m_nPar; ++i )
312  y += i*factors[i]*TMath::Power(log(x),Int_t(i-1))*inv_x;
313  return y;
314 }

◆ getLowPtJES()

double EtaMassJESCalibStep::getLowPtJES ( double  E_uncorr,
double  eta_det 
) const
private

deal with low pt jets

Definition at line 248 of file JESCalibStep.cxx.

248  {
249  int ieta = getEtaBin(eta_det);
250  double R=1;
251  // This correspond to m_lowPtExtrap == 0 in the old EtaJESCorrection tool. Not supporting other cases yet.
252  if (m_lowPtExtrap == 0) {
253  const double *factors = m_JESFactors[ieta];
254  double E = m_minPt_JES*cosh(eta_det);
255  R= getLogPolN(factors,E);
256  } if (m_lowPtExtrap == 1) {
257  double Ecutoff = m_JES_MinPt_E[ieta];
258  double Rcutoff = m_JES_MinPt_R[ieta];
259  double slope = m_JES_MinPt_Slopes[ieta];
260  R = slope*(E_uncorr-Ecutoff)+Rcutoff;
261  }
262  else ATH_MSG_WARNING("Incorrect specification of low Pt JES extrapolation, please check the value of the LowPtJESExtrapolationMethod config flag.");
263 
264  return R;
265 }

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

◆ getNominalResolutionData()

virtual StatusCode IJetCalibStep::getNominalResolutionData ( const xAOD::Jet ,
const JetHelper::JetContext ,
double &   
) const
inlinevirtualinherited

Reimplemented in SmearingCalibStep.

Definition at line 38 of file IJetCalibStep.h.

38 { return StatusCode::FAILURE; }

◆ getNominalResolutionMC()

virtual StatusCode IJetCalibStep::getNominalResolutionMC ( const xAOD::Jet ,
const JetHelper::JetContext ,
double &   
) const
inlinevirtualinherited

Reimplemented in SmearingCalibStep.

Definition at line 39 of file IJetCalibStep.h.

39 { return StatusCode::FAILURE; }

◆ getProperty()

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

Get one of the tool's properties.

◆ getSplineCorr()

double EtaMassJESCalibStep::getSplineCorr ( const int  etaBin,
double  E 
) const
private

Definition at line 350 of file JESCalibStep.cxx.

350  {
351  double R = m_etajesFactors[ etaBin ]->Interpolate(E);
352  return R;
353 }

◆ getSplineSlope()

double EtaMassJESCalibStep::getSplineSlope ( const int  ieta,
const double  minE 
) const
private

Definition at line 337 of file JESCalibStep.cxx.

337  {
338  // Don't want to use interpolation here, so instead just use the values at the bin centers near the cutoff
339  int minBin = m_etajesFactors[ieta]->FindBin(minE);
340 
341  double rFirst = m_etajesFactors[ ieta ]->GetBinContent(minBin);
342  double rSecond = m_etajesFactors[ ieta ]->GetBinContent(minBin+1);
343  double binWidth = m_etajesFactors[ ieta ]->GetBinCenter(minBin+1) - m_etajesFactors[ ieta ]->GetBinCenter(minBin);
344  double slope = (rSecond - rFirst) / binWidth;
345 
346  return slope;
347 }

◆ initialize()

StatusCode EtaMassJESCalibStep::initialize ( )
overridevirtual

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 23 of file JESCalibStep.cxx.

23  {
24  ATH_MSG_DEBUG ("Initializing " << name() << " Use spline="<<m_useSpline);
25 
26  if(! m_useSpline){
27  if(!readMCJESFromText()) {
28  ATH_MSG_ERROR("Problem when reading constant file : "<< m_constantFileName);
29  return StatusCode::FAILURE;
30  }
31  } else { // use spline
32  if(!readMCJESFromHists()) {
33  ATH_MSG_ERROR("Problem when reading constant file : "<< m_histoFileName);
34  return StatusCode::FAILURE;
35  }
36  }
37 
38  ATH_CHECK( m_vartoolE.retrieve() );
39  ATH_CHECK( m_vartoolEta.retrieve() );
40 
41  return StatusCode::SUCCESS;
42 }

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

◆ loadSplineHists()

void EtaMassJESCalibStep::loadSplineHists ( const std::string &  fileName,
const std::string &  etajes_name 
)
private

Definition at line 317 of file JESCalibStep.cxx.

318 {
319  std::unique_ptr<TFile> tmpF(TFile::Open( fileName.c_str() ));
320  TList *etajes_l = static_cast<TList*>( tmpF->Get(etajes_name.c_str()));
321 
322  m_etajesFactors.resize( etajes_l->GetSize() );
323  if(etajes_l->GetSize() != m_etaBinAxis->GetNbins()+1){
324  ATH_MSG_WARNING("Do not have the correct number of eta bins for " << fileName << "\t" << etajes_name << "\t" << etajes_l->GetSize() );
325  }
326 
327  for(int i=0 ; i<m_etaBinAxis->GetNbins(); i++){
328  auto *pTH1 = dynamic_cast<TH1*>(etajes_l->At(i));
329  if (not pTH1) continue;
330  m_etajesFactors[i].reset(pTH1);
331  m_etajesFactors[i]->SetDirectory(nullptr);
332  }
333  tmpF->Close();
334 }

◆ 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

◆ readMCJESFromHists()

bool EtaMassJESCalibStep::readMCJESFromHists ( )
private

Definition at line 155 of file JESCalibStep.cxx.

156 {
157  // Open the input file
158  std::string local_path=static_cast<std::string> (m_constantFileName);
160 
161  TEnv config(fileName.c_str());
162  if(fileName=="") return false;
163 
164  std::string jetAlgo=static_cast<std::string> (m_jetAlgo);
165 
166  std::vector<double> etaBins = VectorizeD(config.GetValue("JES.EtaBins","")," ");
167  if (etaBins.size()==0){ // default binning
168  for (int i=0;i<=90; i++)
169  etaBins.push_back(0.1*i-4.5);
170  }
171 
172  ATH_MSG_DEBUG("Number eta bins: " << etaBins.size());
173 
174  m_etaBinAxis = new TAxis(etaBins.size()-1,&etaBins[0]);// this is to search for eta bin
175 
176  std::string calibHistFile = PathResolverFindCalibFile(m_histoFileName);
177  loadSplineHists(calibHistFile, "etaJes");
178 
179  //Protections for high order extrapolation methods at low Et (Et < _minPt_JES)
180  if(m_lowPtExtrap != 1) {
181  ATH_MSG_ERROR("Only linear extrapolations are supported for p-splines currently. Please change the config file to reflect this");
182  return false;
183  }
184 
185  for (uint ieta=0;ieta<etaBins.size()-1;++ieta) {
186  //Calculate the slope of the response curve at the minPt for each eta bin
187  //Used in the GetLowPtJES method when Pt < minPt
188  double Ecutoff= m_minPt_JES*cosh(etaBins[ieta]);
189  const double Rcutoff = getSplineCorr(ieta, Ecutoff);
190  const double Slope = getSplineSlope(ieta, Ecutoff);
191  if(Slope > Rcutoff/Ecutoff) ATH_MSG_WARNING("Slope of calibration curve at minimum ET is too steep for the JES factors of etabin " << ieta << ", eta = " << etaBins[ieta] );
192 
193  m_JES_MinPt_E[ieta] = Ecutoff;
194  m_JES_MinPt_R[ieta] = Rcutoff;
195  m_JES_MinPt_Slopes[ieta] = Slope;
196 
197  TString key=Form("EmaxJES.%s_Bin%d",jetAlgo.c_str(),ieta);
198  ATH_MSG_VERBOSE("reading: " << key << " = "<< config.GetValue(key,""));
199  std::vector<double> params = VectorizeD(config.GetValue(key,"")," ");
200  m_energyFreezeJES[ieta] = params[0];
201 
202  key=Form("EtaCorr.%s_Bin%d",jetAlgo.c_str(),ieta);
203  ATH_MSG_VERBOSE("reading: " << key << " = "<< config.GetValue(key,""));
204  params = VectorizeD(config.GetValue(key,"")," ");
205  m_nPar = params.size();
206  ATH_MSG_VERBOSE("Number of parameters: " << m_nPar);
207  for (uint ipar=0;ipar<m_nPar;++ipar) m_etaCorrFactors[ieta][ipar] = params[ipar];
208 
209 
210  }
211  return true;
212 }

◆ readMCJESFromText()

bool EtaMassJESCalibStep::readMCJESFromText ( )
private

Definition at line 87 of file JESCalibStep.cxx.

88 {
89  // Open the input file
90  std::string local_path=static_cast<std::string> (m_constantFileName);
92  if(fileName=="") return false;
93 
94  TEnv config(fileName.c_str());
95 
96  std::string jetAlgo=static_cast<std::string> (m_jetAlgo);
97 
98  std::vector<double> etaBins = VectorizeD(config.GetValue("JES.EtaBins","")," ");
99  if (etaBins.size()==0){ // default binning
100  for (int i=0;i<=90; i++)
101  etaBins.push_back(0.1*i-4.5);
102  }
103 
104  ATH_MSG_DEBUG("Number eta bins: " << etaBins.size());
105 
106  m_etaBinAxis = new TAxis(etaBins.size()-1,&etaBins[0]);// this is to search for eta bin
107 
108  for (uint ieta=0; ieta<etaBins.size()-1; ++ieta)
109  {
110  TString key=Form("JES.%s_Bin%d",jetAlgo.c_str(),ieta);
111  ATH_MSG_VERBOSE("reading: " << key << " = "<< config.GetValue(key,""));
112  std::vector<double> params = VectorizeD(config.GetValue(key,"")," ");
113  m_nPar = params.size();
114  ATH_MSG_VERBOSE("Number of parameters: " << m_nPar);
115  for (uint ipar=0;ipar<m_nPar;++ipar) m_JESFactors[ieta][ipar] = params[ipar];
116  if(m_lowPtExtrap > 0) {
117  //Calculate the slope of the response curve at the minPt for each eta bin
118  //Used in the GetLowPtJES method when Pt < minPt
119  const double *factors = m_JESFactors[ieta];
120  double Ecutoff = m_minPt_JES*cosh(etaBins[ieta]);
121  const double Rcutoff = getLogPolN(factors,Ecutoff);
122  const double Slope = getLogPolNSlope(factors,Ecutoff);
123  if(Slope > Rcutoff/Ecutoff) ATH_MSG_FATAL("Slope of calibration curve at minimum ET is too steep for the JES factors of etabin " << ieta << ", eta = " << etaBins[ieta] );
124 
125  m_JES_MinPt_E[ieta] = Ecutoff;
126  m_JES_MinPt_R[ieta] = Rcutoff;
127  m_JES_MinPt_Slopes[ieta] = Slope;
128 
129  //Calculate the parameters for a 2nd order polynomial extension to the calibration curve below minimum ET
130  //Used in the GetLowPtJES method when Pt < minPt
131  if(m_lowPtExtrap == 2) {
132  ATH_MSG_ERROR("LowPtJESExtrapolationMethod==2 not supported yet");
133  return false;
134  }
135  }
136 
137 
138  key=Form("EtaCorr.%s_Bin%d",jetAlgo.c_str(),ieta);
139  ATH_MSG_VERBOSE("reading: " << key << " = "<< config.GetValue(key,""));
140  params = VectorizeD(config.GetValue(key,"")," ");
141  m_nPar = params.size();
142  ATH_MSG_VERBOSE("Number of parameters: " << m_nPar);
143  for (uint ipar=0;ipar<m_nPar;++ipar) m_etaCorrFactors[ieta][ipar] = params[ipar];
144 
145  key=Form("EmaxJES.%s_Bin%d",jetAlgo.c_str(),ieta);
146  ATH_MSG_VERBOSE("reading: " << key << " = "<< config.GetValue(key,""));
147  params = VectorizeD(config.GetValue(key,"")," ");
148  m_energyFreezeJES[ieta] = params[0];
149  }
150  return true;
151 }

◆ renounce()

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

Definition at line 380 of file AthCommonDataStore.h.

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

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

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

Perform system initialization for an algorithm.

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

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

◆ sysStart()

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

Handle START transition.

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

◆ updateVHKA()

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

Definition at line 308 of file AthCommonDataStore.h.

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

Member Data Documentation

◆ m_constantFileName

Gaudi::Property< std::string > EtaMassJESCalibStep::m_constantFileName { this, "CalibConstantFile", "/afs/cern.ch/work/s/stapiaar/JetDev4/athena/JetToolHelpers/data/file_JES.config", "text file containing constants" }
private

name of the text file

Definition at line 65 of file JESCalibStep.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_energyFreezeJES

double EtaMassJESCalibStep::m_energyFreezeJES[s_nEtaBins] {}
private

Definition at line 90 of file JESCalibStep.h.

◆ m_etaBinAxis

TAxis* EtaMassJESCalibStep::m_etaBinAxis {}
private

Definition at line 96 of file JESCalibStep.h.

◆ m_etaCorrFactors

double EtaMassJESCalibStep::m_etaCorrFactors[s_nEtaBins][s_nParMax] {}
private

Definition at line 89 of file JESCalibStep.h.

◆ m_etajesFactors

std::vector<std::unique_ptr<TH1> > EtaMassJESCalibStep::m_etajesFactors
private

Definition at line 98 of file JESCalibStep.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_freezeJESatHighE

Gaudi::Property< bool > EtaMassJESCalibStep::m_freezeJESatHighE = {this, "FreezeJEScorrectionatHighE",false, " freeze at high e"}
private

Definition at line 69 of file JESCalibStep.h.

◆ m_histoFileName

Gaudi::Property< std::string > EtaMassJESCalibStep::m_histoFileName { this, "HistoFile", "none", "root file containing histos for spline calib" }
private

Definition at line 76 of file JESCalibStep.h.

◆ m_JES_MinPt_E

double EtaMassJESCalibStep::m_JES_MinPt_E[s_nEtaBins] ={}
private

Definition at line 92 of file JESCalibStep.h.

◆ m_JES_MinPt_R

double EtaMassJESCalibStep::m_JES_MinPt_R[s_nEtaBins] ={}
private

Definition at line 93 of file JESCalibStep.h.

◆ m_JES_MinPt_Slopes

double EtaMassJESCalibStep::m_JES_MinPt_Slopes[s_nEtaBins] ={}
private

Definition at line 91 of file JESCalibStep.h.

◆ m_JESFactors

double EtaMassJESCalibStep::m_JESFactors[s_nEtaBins][s_nParMax] {}
private

Definition at line 88 of file JESCalibStep.h.

◆ m_jetAlgo

Gaudi::Property< std::string > EtaMassJESCalibStep::m_jetAlgo { this, "JetAlgo", "AntiKt4EMPFlow", "jet collection" }
private

jet collection to be calibrated

Definition at line 67 of file JESCalibStep.h.

◆ m_lowPtExtrap

Gaudi::Property< float > EtaMassJESCalibStep::m_lowPtExtrap = {this, "LowPtJESExtrapolationMethod", 0, " low pt etrap"}
private

Definition at line 70 of file JESCalibStep.h.

◆ m_lowPtMinR

Gaudi::Property< float > EtaMassJESCalibStep::m_lowPtMinR = {this, "LowPtJESExtrapolationMinimumResponse", 0.25, " low pt etrap min"}
private

Definition at line 71 of file JESCalibStep.h.

◆ m_maxE_EtaCorr

Gaudi::Property< float > EtaMassJESCalibStep::m_maxE_EtaCorr = {this, "MaxEForEtaCorr" ,2500. , ""}
private

Definition at line 74 of file JESCalibStep.h.

◆ m_minPt_EtaCorr

Gaudi::Property< float > EtaMassJESCalibStep::m_minPt_EtaCorr = {this, "MinPtForEtaCorr" ,8. , ""}
private

Definition at line 73 of file JESCalibStep.h.

◆ m_minPt_JES

Gaudi::Property< float > EtaMassJESCalibStep::m_minPt_JES = {this, "MinPtForETAJES",15, "min pT"}
private

Definition at line 68 of file JESCalibStep.h.

◆ m_nPar

unsigned int EtaMassJESCalibStep::m_nPar {}
private

Definition at line 85 of file JESCalibStep.h.

◆ m_useSpline

Gaudi::Property< bool > EtaMassJESCalibStep::m_useSpline = {this, "UseSpline",false, " use spline"}
private

Definition at line 77 of file JESCalibStep.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vartoolE

ToolHandle<JetHelper::IVarTool> EtaMassJESCalibStep::m_vartoolE {this, "VarToolE", "VarTool", "InputVariable instance E (or pT?)" }
private

Definition at line 80 of file JESCalibStep.h.

◆ m_vartoolEta

ToolHandle<JetHelper::IVarTool> EtaMassJESCalibStep::m_vartoolEta {this, "VarToolEta", "VarTool", "InputVariable instance eta (or rapididty?)" }
private

interface for xAOD::jet variable to be defined by user, this must correspond to jet Eta in currect version of jet calibration files

Definition at line 82 of file JESCalibStep.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ s_nEtaBins

const unsigned int EtaMassJESCalibStep::s_nEtaBins = 90
staticprivate

Definition at line 86 of file JESCalibStep.h.

◆ s_nParMax

const unsigned int EtaMassJESCalibStep::s_nParMax = 9
staticprivate

Definition at line 87 of file JESCalibStep.h.


The documentation for this class was generated from the following files:
EtaMassJESCalibStep::m_etaBinAxis
TAxis * m_etaBinAxis
Definition: JESCalibStep.h:96
EtaMassJESCalibStep::getEtaBin
int getEtaBin(double eta_det) const
Definition: JESCalibStep.cxx:300
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:395
EtaMassJESCalibStep::m_nPar
unsigned int m_nPar
Definition: JESCalibStep.h:85
EtaMassJESCalibStep::m_JES_MinPt_R
double m_JES_MinPt_R[s_nEtaBins]
Definition: JESCalibStep.h:93
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
JetHelper::JetContext
Class JetContext Designed to read AOD information related to the event, N vertices,...
Definition: JetContext.h:24
EtaMassJESCalibStep::m_etaCorrFactors
double m_etaCorrFactors[s_nEtaBins][s_nParMax]
Definition: JESCalibStep.h:89
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
python.base_data.config
config
Definition: base_data.py:21
ConvertOldUJHistosToNewHistos.etaBins
list etaBins
Definition: ConvertOldUJHistosToNewHistos.py:145
EtaMassJESCalibStep::m_energyFreezeJES
double m_energyFreezeJES[s_nEtaBins]
Definition: JESCalibStep.h:90
bin
Definition: BinsDiffFromStripMedian.h:43
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
defineDB.jets
jets
Definition: JetTagCalibration/share/defineDB.py:24
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
EtaMassJESCalibStep::getLowPtJES
double getLowPtJES(double E_uncorr, double eta_det) const
deal with low pt jets
Definition: JESCalibStep.cxx:248
EtaMassJESCalibStep::getEtaCorr
double getEtaCorr(double X, double Y=0) const
return Eta correction
Definition: JESCalibStep.cxx:268
Trk::binEta
@ binEta
Definition: BinningType.h:54
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
x
#define x
binWidth
void binWidth(TH1 *h)
Definition: listroot.cxx:80
EtaMassJESCalibStep::m_jetAlgo
Gaudi::Property< std::string > m_jetAlgo
jet collection to be calibrated
Definition: JESCalibStep.h:67
EtaMassJESCalibStep::m_lowPtExtrap
Gaudi::Property< float > m_lowPtExtrap
Definition: JESCalibStep.h:70
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
Monitored::X
@ X
Definition: HistogramFillerUtils.h:24
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
EtaMassJESCalibStep::m_JESFactors
double m_JESFactors[s_nEtaBins][s_nParMax]
Definition: JESCalibStep.h:88
EtaMassJESCalibStep::loadSplineHists
void loadSplineHists(const std::string &fileName, const std::string &etajes_name)
Definition: JESCalibStep.cxx:317
EtaMassJESCalibStep::getSplineCorr
double getSplineCorr(const int etaBin, double E) const
Definition: JESCalibStep.cxx:350
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
EtaMassJESCalibStep::m_JES_MinPt_E
double m_JES_MinPt_E[s_nEtaBins]
Definition: JESCalibStep.h:92
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
xAOD::etaBin
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap etaBin
Definition: L2StandAloneMuon_v1.cxx:148
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
EtaMassJESCalibStep::getJES
double getJES(const double X, const double Y=0, const double Emax=-1) const
return MCJES calibration factor
Definition: JESCalibStep.cxx:215
EtaMassJESCalibStep::getLogPolNSlope
double getLogPolNSlope(const double *factors, double x) const
Definition: JESCalibStep.cxx:308
EtaMassJESCalibStep::m_JES_MinPt_Slopes
double m_JES_MinPt_Slopes[s_nEtaBins]
Definition: JESCalibStep.h:91
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
python.xAODType.dummy
dummy
Definition: xAODType.py:4
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
EtaMassJESCalibStep::m_minPt_JES
Gaudi::Property< float > m_minPt_JES
Definition: JESCalibStep.h:68
EtaMassJESCalibStep::m_vartoolEta
ToolHandle< JetHelper::IVarTool > m_vartoolEta
interface for xAOD::jet variable to be defined by user, this must correspond to jet Eta in currect ve...
Definition: JESCalibStep.h:82
AnalysisUtils::Delta::R
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
Definition: AnalysisMisc.h:49
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
EtaMassJESCalibStep::m_maxE_EtaCorr
Gaudi::Property< float > m_maxE_EtaCorr
Definition: JESCalibStep.h:74
EtaMassJESCalibStep::readMCJESFromHists
bool readMCJESFromHists()
Definition: JESCalibStep.cxx:155
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Monitored::Y
@ Y
Definition: HistogramFillerUtils.h:24
EtaMassJESCalibStep::m_vartoolE
ToolHandle< JetHelper::IVarTool > m_vartoolE
Definition: JESCalibStep.h:80
xAOD::JetFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition: JetTypes.h:17
EtaMassJESCalibStep::getLogPolN
double getLogPolN(const double *factors, double x) const
Definition: JESCalibStep.cxx:290
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
EtaMassJESCalibStep::readMCJESFromText
bool readMCJESFromText()
Definition: JESCalibStep.cxx:87
EtaMassJESCalibStep::m_minPt_EtaCorr
Gaudi::Property< float > m_minPt_EtaCorr
Definition: JESCalibStep.h:73
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
EtaMassJESCalibStep::m_histoFileName
Gaudi::Property< std::string > m_histoFileName
Definition: JESCalibStep.h:76
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
h
GlobalVariables.Emax
Emax
Definition: GlobalVariables.py:185
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::JetAttributeAccessor::AccessorWrapper< xAOD::JetFourMom_t >
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
EtaMassJESCalibStep::m_useSpline
Gaudi::Property< bool > m_useSpline
Definition: JESCalibStep.h:77
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
EtaMassJESCalibStep::getEmaxJES
double getEmaxJES(const double Y) const
return Emax
Definition: JESCalibStep.cxx:282
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
JetCalibUtils::VectorizeD
VecD VectorizeD(const TString &str, const TString &sep=" ")
Definition: JetCalibUtils.cxx:25
jobOptions.fileName
fileName
Definition: jobOptions.SuperChic_ALP2.py:39
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
SG::DataProxy
Definition: DataProxy.h:45
EtaMassJESCalibStep::getSplineSlope
double getSplineSlope(const int ieta, const double minE) const
Definition: JESCalibStep.cxx:337
EtaMassJESCalibStep::m_constantFileName
Gaudi::Property< std::string > m_constantFileName
name of the text file
Definition: JESCalibStep.h:65
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
EtaMassJESCalibStep::m_etajesFactors
std::vector< std::unique_ptr< TH1 > > m_etajesFactors
Definition: JESCalibStep.h:98
fitman.k
k
Definition: fitman.py:528
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
EtaMassJESCalibStep::m_freezeJESatHighE
Gaudi::Property< bool > m_freezeJESatHighE
Definition: JESCalibStep.h:69