ATLAS Offline Software
Loading...
Searching...
No Matches
GlobalSequentialCorrection Class Reference

#include <GlobalSequentialCorrection.h>

Inheritance diagram for GlobalSequentialCorrection:
Collaboration diagram for GlobalSequentialCorrection:

Public Types

typedef std::vector< std::unique_ptr< const TH2 > > VecTH2
typedef std::vector< double > VecD
typedef std::vector< TString > StrV
typedef unsigned int uint

Public Member Functions

 GlobalSequentialCorrection ()
 GlobalSequentialCorrection (const std::string &name, TEnv *config, TString jetAlgo, const std::string &depth, TString calibAreaTag, bool useOriginVertex, bool dev)
virtual StatusCode initialize () override
virtual StatusCode calibrate (xAOD::Jet &jet, JetEventInfo &) const override
virtual void setUnitsGeV (bool useGeV)
virtual StatusCode getNominalResolutionData (const xAOD::Jet &, double &) const
virtual StatusCode getNominalResolutionMC (const xAOD::Jet &, double &) const
void setLevel (MSG::Level lvl)
 Change the current logging level.
Functions providing the same interface as AthMessaging
bool msgLvl (const MSG::Level lvl) const
 Test the output level of the object.
MsgStream & msg () const
 The standard message stream.
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream.

Protected Member Functions

virtual StatusCode setStartP4 (xAOD::Jet &jet) const

Protected Attributes

double m_GeV
std::string m_jetStartScale
std::string m_name

Private Types

enum  m_GSCSeq {
  ApplyChargedFraction = 1 , ApplyTile0 = 2 , ApplyEM3 = 4 , ApplynTrk = 8 ,
  ApplytrackWIDTH = 16 , ApplyPunchThrough = 32 , ApplyN90Constituents = 64 , ApplyTileGap3 = 128 ,
  ApplycaloWIDTH = 256
}

Private Member Functions

double getTrackWIDTHResponse (double pT, uint etabin, double trackWIDTH) const
double getNTrkResponse (double pT, uint etabin, double nTrk) const
double getTile0Response (double pT, uint etabin, double Tile0) const
double getEM3Response (double pT, uint etabin, double EM3) const
double getChargedFractionResponse (double pT, uint etabin, double ChargedFraction) const
double getPunchThroughResponse (double E, double eta_det, int Nsegments) const
double getCaloWIDTHResponse (double pT, uint etabin, double caloWIDTH) const
double getN90ConstituentsResponse (double pT, uint etabin, double N90Constituents) const
double getTileGap3Response (double pT, uint etabin, double TileGap3) const
double getGSCCorrection (xAOD::JetFourMom_t jetP4, double eta, double trackWIDTH, double nTrk, double Tile0, double EM3, int Nsegments, double ChargedFraction, double caloWIDTH, double N90Constituents, double TileGap3) const
double getJetPropertyMax (TString jetPropName, unsigned int etabin)
void setPunchThroughEtaBins (const VecD &etabins)
void setPunchThroughMinPt (double minPt)
double readPtJetPropertyHisto (double pT, double jetProperty, const TH2 &respFactors) const
void initMessaging () const
 Initialize our message level and MessageSvc.

Private Attributes

TEnv * m_config
TString m_jetAlgo
TString m_depthString
TString m_calibAreaTag
bool m_dev
VecTH2 m_respFactorsEM3
VecTH2 m_respFactorsnTrk
VecTH2 m_respFactorstrackWIDTH
VecTH2 m_respFactorsTile0
VecTH2 m_respFactorsPunchThrough
VecTH2 m_respFactorsChargedFraction
VecTH2 m_respFactorsN90Constituents
VecTH2 m_respFactorscaloWIDTH
VecTH2 m_respFactorsTileGap3
double m_binSize
uint m_depth
uint m_trackWIDTHMaxEtaBin
uint m_nTrkMaxEtaBin
uint m_Tile0MaxEtaBin
uint m_EM3MaxEtaBin
uint m_chargedFractionMaxEtaBin
uint m_caloWIDTHMaxEtaBin
uint m_N90ConstituentsMaxEtaBin
uint m_TileGap3MaxEtaBin
VecD m_punchThroughEtaBins
double m_punchThroughMinPt
bool m_turnOffTrackCorrections {false}
bool m_PFlow {false}
bool m_caloBased {false}
bool m_pTResponseRequirementOff {false}
bool m_nTrkwTrk_4PFlow {false}
double m_turnOffStartingpT {1200.}
double m_turnOffEndpT {2000}
bool m_useOriginVertex {false}
std::string m_nm
 Message source name.
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels)
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer.
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level.
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging)

Detailed Description

Definition at line 22 of file GlobalSequentialCorrection.h.

Member Typedef Documentation

◆ StrV

typedef std::vector<TString> GlobalSequentialCorrection::StrV

Definition at line 30 of file GlobalSequentialCorrection.h.

◆ uint

typedef unsigned int GlobalSequentialCorrection::uint

Definition at line 31 of file GlobalSequentialCorrection.h.

◆ VecD

typedef std::vector<double> GlobalSequentialCorrection::VecD

Definition at line 29 of file GlobalSequentialCorrection.h.

◆ VecTH2

typedef std::vector<std::unique_ptr<const TH2> > GlobalSequentialCorrection::VecTH2

Definition at line 28 of file GlobalSequentialCorrection.h.

Member Enumeration Documentation

◆ m_GSCSeq

Constructor & Destructor Documentation

◆ GlobalSequentialCorrection() [1/2]

GlobalSequentialCorrection::GlobalSequentialCorrection ( )

Definition at line 34 of file GlobalSequentialCorrection.cxx.

36 m_config(nullptr), m_jetAlgo(""), m_depthString("auto"), m_calibAreaTag(""), m_dev(false),
37 m_binSize(0.1), m_depth(0),
40
41{ }
JetCalibrationStep(const char *name="JetCalibrationStep")

◆ GlobalSequentialCorrection() [2/2]

GlobalSequentialCorrection::GlobalSequentialCorrection ( const std::string & name,
TEnv * config,
TString jetAlgo,
const std::string & depth,
TString calibAreaTag,
bool useOriginVertex,
bool dev )

Definition at line 43 of file GlobalSequentialCorrection.cxx.

45 m_config(config), m_jetAlgo(std::move(jetAlgo)), m_depthString(depth), m_calibAreaTag(std::move(calibAreaTag)), m_dev(dev),
46 m_binSize(0.1), m_depth(0),
49
50{ }
std::string depth
tag string for intendation
Definition fastadd.cxx:46

Member Function Documentation

◆ calibrate()

StatusCode GlobalSequentialCorrection::calibrate ( xAOD::Jet & jet,
JetEventInfo & jetEventInfo ) const
overridevirtual

Implements JetCalibrationStep.

Definition at line 436 of file GlobalSequentialCorrection.cxx.

436 {
437
438 //vector<float> that holds the fractional energy deposited by the jet in different layers of the calorimetery
439 /* Map of the entries in the vector to different layers of the calorimeter
440 Retrieved on July 14th 2014 from https://twiki.cern.ch/twiki/bin/view/AtlasProtected/Run2JetMoments
441 If July 14th 2014 was awhile ago, it might be worth double checking this is still valid...
442
443 Layer Index
444 LAr barrel
445 PreSamplerB 0
446 EMB1 1
447 EMB2 2
448 EMB3 3
449 LAr EM endcap
450 PreSamplerE 4
451 EME1 5
452 EME2 6
453 EME3 7
454 Hadronic endcap
455 HEC0 8
456 HEC1 9
457 HEC2 10
458 HEC3 11
459 Tile barrel
460 TileBar0 12
461 TileBar1 13
462 TileBar2 14
463 Tile gap (ITC & scint)
464 TileGap1 15
465 TileGap2 16
466 TileGap3 17
467 Tile extended barrel
468 TileExt0 18
469 TileExt1 19
470 TileExt2 20
471 Forward EM endcap
472 FCAL0 21
473 FCAL1 22
474 FCAL2 23
475 Mini FCAL
476 MINIFCAL0 24
477 MINIFCAL1 25
478 MINIFCAL2 26
479 MINIFCAL3 27
480 */
481
482 std::vector<float> samplingFrac = jet.getAttribute<std::vector<float> >("EnergyPerSampling");
483 //vector<int> that holds the number of tracks with pT > 1 GeV for different primary vertices
484 std::vector<int> nTrk;
485 if(m_depth & ApplynTrk){
486 if( !jet.getAttribute<std::vector<int> >("NumTrkPt1000",nTrk) ) {
487 ATH_MSG_ERROR("Failed to retrieve NumTrkPt1000!");
488 return StatusCode::FAILURE;
489 }
490 }
491 //vector<float> that holds the trackWIDTH variable calculated with tracks of pT > 1 GeV for different primary vertices
492 std::vector<float> trackWIDTH;
494 if( !jet.getAttribute<std::vector<float> >("TrackWidthPt1000",trackWIDTH) ) {
495 ATH_MSG_ERROR("Failed to retrieve TrackWidthPt1000!");
496 return StatusCode::FAILURE;
497 }
498 }
499 //Nsegments number of ghost associated muon segments behind each jet
500 int Nsegments = 0;
502 static const SG::ConstAccessor<int> GhostMuonSegmentCountAcc ("GhostMuonSegmentCount");
503 if( GhostMuonSegmentCountAcc.isAvailable(jet) ) {
504 Nsegments = GhostMuonSegmentCountAcc(jet);
505 } else {
506 ATH_MSG_WARNING("GhostMuonSegmentCount is not available, Nsegments=0 will be used, so NO PunchThrough Correction will be applied!");
507 }
508 }
509
510 xAOD::JetFourMom_t jetconstitP4 = jet.getAttribute<xAOD::JetFourMom_t>("JetConstitScaleMomentum");
511
512 //Entry 0 of the ChargedFraction, nTrk, and trackWIDTH vectors should correspond to PV0
513 //other entries are for other primary vertices in the event
514 //Check what index the user wants just in case (default to PVIndex, which is typically PV0)
515 int PVindex = jetEventInfo.PVIndex();
516
518 // Retrieve the vertex the jet was reconstructed with respect to
519 PVindex = jet.getAssociatedObject<xAOD::Vertex>("OriginVertex")->index();
520 }
521
522 double ChargedFraction = 0;
523 if( m_PFlow ) ChargedFraction = (jet.getAttribute<std::vector<float> >("SumPtChargedPFOPt500"))[PVindex]/jetconstitP4.Pt();
524
525 xAOD::JetFourMom_t jetStartP4;
526 ATH_CHECK( setStartP4(jet) );
527 jetStartP4 = jet.jetP4();
528
529 float jetE_constitscale = jetconstitP4.e();
530 float detectorEta = jet.getAttribute<float>("DetectorEta");
531
532 int nTrkPVX = (m_depth & ApplynTrk) ? nTrk[PVindex] : 0;
533 float trackWIDTHPVX = (m_depth & ApplytrackWIDTH) ? trackWIDTH[PVindex] : 0;
534 //EM3 and Tile0 fraction calculations
535 //EM3 = (EMB3+EME3)/energy, Tile0 = (TileBar0+TileExt0)/energy
536 //Check the map above to make sure the correct entries of samplingFrac are being used
537 float EM3 = (samplingFrac[3]+samplingFrac[7])/jetE_constitscale;
538 float Tile0 = (samplingFrac[12]+samplingFrac[18])/jetE_constitscale;
539
540 double N90Constituents = 0;
541 double caloWIDTH = 0;
542 float TG3 = 0;
543 if (m_caloBased) {
545 //numConstituents = jet.numConstituents();
546 N90Constituents = jet.getAttribute<float>("N90Constituents");
547 }
548 if (m_depth & ApplycaloWIDTH) {
549 caloWIDTH = jet.getAttribute<double>("Width");
550 }
551 if (m_depth & ApplyTileGap3) {
552 //TileGap3 at index 17 of samplingFrac, see map above
553 TG3 = (samplingFrac[17])/jetE_constitscale;
554 }
555 }
556
557 xAOD::JetFourMom_t calibP4 = jetStartP4*getGSCCorrection( jetStartP4, fabs(detectorEta), trackWIDTHPVX, nTrkPVX, Tile0, EM3, Nsegments, ChargedFraction, caloWIDTH, N90Constituents, TG3);
558
559 //Transfer calibrated jet properties to the Jet object
560 jet.setAttribute<xAOD::JetFourMom_t>("JetGSCScaleMomentum",calibP4);
561 jet.setJetP4( calibP4 );
562
563 return StatusCode::SUCCESS;
564
565}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
double getGSCCorrection(xAOD::JetFourMom_t jetP4, double eta, double trackWIDTH, double nTrk, double Tile0, double EM3, int Nsegments, double ChargedFraction, double caloWIDTH, double N90Constituents, double TileGap3) const
virtual StatusCode setStartP4(xAOD::Jet &jet) const
void setAttribute(const std::string &name, const T &v)
void setJetP4(const JetFourMom_t &p4)
Definition Jet_v1.cxx:171
bool getAttribute(AttributeID type, T &value) const
Retrieve attribute moment by enum.
JetFourMom_t jetP4() const
The full 4-momentum of the particle : internal jet type.
Definition Jet_v1.cxx:76
const T * getAssociatedObject(const std::string &name) const
get a single associated object this compact form throws an exception if the object is not existing
str index
Definition DeMoScan.py:362
Vertex_v1 Vertex
Define the latest version of the vertex class.
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition JetTypes.h:17

◆ getCaloWIDTHResponse()

double GlobalSequentialCorrection::getCaloWIDTHResponse ( double pT,
uint etabin,
double caloWIDTH ) const
private

Definition at line 374 of file GlobalSequentialCorrection.cxx.

374 {
375 if (caloWIDTH<=0) return 1;
376 if ( etabin >= m_respFactorscaloWIDTH.size() ) return 1.;
377 double caloWIDTHResponse = readPtJetPropertyHisto(pT, caloWIDTH, *m_respFactorscaloWIDTH[etabin]);
378 return caloWIDTHResponse;
379}
double readPtJetPropertyHisto(double pT, double jetProperty, const TH2 &respFactors) const

◆ getChargedFractionResponse()

double GlobalSequentialCorrection::getChargedFractionResponse ( double pT,
uint etabin,
double ChargedFraction ) const
private

Definition at line 348 of file GlobalSequentialCorrection.cxx.

348 {
349 if (ChargedFraction<=0) return 1; //ChargedFraction < 0 is unphysical, ChargedFraction = 0 is a special case, so we return 1 for ChargedFraction <= 0
350 if ( etabin >= m_respFactorsChargedFraction.size() ) return 1.;
351 double ChargedFractionResponse = readPtJetPropertyHisto(pT, ChargedFraction, *m_respFactorsChargedFraction[etabin]);
352 return ChargedFractionResponse;
353}

◆ getEM3Response()

double GlobalSequentialCorrection::getEM3Response ( double pT,
uint etabin,
double EM3 ) const
private

Definition at line 341 of file GlobalSequentialCorrection.cxx.

341 {
342 if (EM3<=0) return 1; //EM3 < 0 is unphysical, EM3 = 0 is a special case, so we return 1 for EM3 <= 0
343 if ( etabin >= m_respFactorsEM3.size() ) return 1.;
344 double EM3Response = readPtJetPropertyHisto(pT, EM3, *m_respFactorsEM3[etabin]);
345 return EM3Response;
346}

◆ getGSCCorrection()

double GlobalSequentialCorrection::getGSCCorrection ( xAOD::JetFourMom_t jetP4,
double eta,
double trackWIDTH,
double nTrk,
double Tile0,
double EM3,
int Nsegments,
double ChargedFraction,
double caloWIDTH,
double N90Constituents,
double TileGap3 ) const
private

Definition at line 395 of file GlobalSequentialCorrection.cxx.

396 {
397 //eta bins have size m_binSize=0.1 and are numbered sequentially from 0, so |eta|=2.4 is in eta bin #24
398 int etabin = eta/m_binSize;
399 double Corr=1;
400 //Using bit sequence check to determine which GS corrections to apply.
401 if( !m_PFlow && !m_caloBased ){
402 if (m_depth & ApplyTile0) Corr*=1./getTile0Response(jetP4.pt()/m_GeV, etabin, Tile0);
403 if (m_depth & ApplyEM3) Corr*=1./getEM3Response(jetP4.pt()/m_GeV*Corr, etabin, EM3);
404 if (m_depth & ApplynTrk) Corr*=1./getNTrkResponse(jetP4.pt()/m_GeV*Corr, etabin, nTrk);
405 if (m_depth & ApplytrackWIDTH) Corr*=1./getTrackWIDTHResponse(jetP4.pt()/m_GeV*Corr,etabin,trackWIDTH);
406 if ( jetP4.pt() < m_punchThroughMinPt ) return Corr; //Applying punch through correction to low pT jets introduces a bias, default threshold is 50 GeV
407 //eta binning for the punch through correction differs from the rest of the GSC, so the eta bin is determined in the GetPunchThroughResponse method
408 else if (m_depth & ApplyPunchThrough) {
409 jetP4*=Corr; //The punch through correction is binned in E instead of pT, so we determine E from the corrected jet here
410 Corr*=1/getPunchThroughResponse(jetP4.e()/m_GeV,eta,Nsegments);
411 }
412 }
413 else if (m_caloBased){
414 if (m_depth & ApplyTile0) Corr*=1./getTile0Response(jetP4.pt()/m_GeV*Corr, etabin, Tile0);
415 if (m_depth & ApplyEM3) Corr*=1./getEM3Response(jetP4.pt()/m_GeV*Corr, etabin, EM3);
416 if (m_depth & ApplyN90Constituents) Corr*=1/getN90ConstituentsResponse(jetP4.pt()/m_GeV*Corr, etabin, N90Constituents);
417 if (m_depth & ApplyTileGap3) Corr*=1/getTileGap3Response(jetP4.pt()/m_GeV*Corr,etabin, TileGap3);
418 if (m_depth & ApplycaloWIDTH) Corr*=1/getCaloWIDTHResponse(jetP4.pt()/m_GeV*Corr,etabin,caloWIDTH);
419 }
420 else{ // PFlow
421 if (m_depth & ApplyChargedFraction) Corr*=1./getChargedFractionResponse(jetP4.pt()/m_GeV, etabin, ChargedFraction);
422 if (m_depth & ApplyTile0) Corr*=1./getTile0Response(jetP4.pt()/m_GeV*Corr, etabin, Tile0);
423 if (m_depth & ApplyEM3) Corr*=1./getEM3Response(jetP4.pt()/m_GeV*Corr, etabin, EM3);
424 if ( m_nTrkwTrk_4PFlow && (m_depth & ApplynTrk) ) Corr*=1./getNTrkResponse(jetP4.pt()/m_GeV*Corr, etabin, nTrk);
425 if ( m_nTrkwTrk_4PFlow && (m_depth & ApplytrackWIDTH) ) Corr*=1./getTrackWIDTHResponse(jetP4.pt()/m_GeV*Corr,etabin,trackWIDTH);
426 if ( jetP4.pt() < m_punchThroughMinPt ) return Corr; //Applying punch through correction to low pT jets introduces a bias, default threshold is 50 GeV
427 //eta binning for the punch through correction differs from the rest of the GSC, so the eta bin is determined in the GetPunchThroughResponse method
428 else if (m_depth & ApplyPunchThrough) {
429 jetP4*=Corr; //The punch through correction is binned in E instead of pT, so we determine E from the corrected jet here
430 Corr*=1/getPunchThroughResponse(jetP4.e()/m_GeV,eta,Nsegments);
431 }
432 }
433 return Corr;
434}
Scalar eta() const
pseudorapidity method
double getChargedFractionResponse(double pT, uint etabin, double ChargedFraction) const
double getEM3Response(double pT, uint etabin, double EM3) const
double getN90ConstituentsResponse(double pT, uint etabin, double N90Constituents) const
double getCaloWIDTHResponse(double pT, uint etabin, double caloWIDTH) const
double getTrackWIDTHResponse(double pT, uint etabin, double trackWIDTH) const
double getTileGap3Response(double pT, uint etabin, double TileGap3) const
double getPunchThroughResponse(double E, double eta_det, int Nsegments) const
double getNTrkResponse(double pT, uint etabin, double nTrk) const
double getTile0Response(double pT, uint etabin, double Tile0) const

◆ getJetPropertyMax()

double GlobalSequentialCorrection::getJetPropertyMax ( TString jetPropName,
unsigned int etabin )
inlineprivate

Definition at line 53 of file GlobalSequentialCorrection.h.

53 {
54 if ( jetPropName.Contains("EM3") && etabin < m_EM3MaxEtaBin ) return m_respFactorsEM3[etabin]->GetYaxis()->GetXmax();
55 else if ( jetPropName.Contains("Tile0") && etabin < m_Tile0MaxEtaBin ) return m_respFactorsTile0[etabin]->GetYaxis()->GetXmax();
56 else if ( jetPropName.Contains("nTrk") && etabin < m_nTrkMaxEtaBin ) return m_respFactorsnTrk[etabin]->GetYaxis()->GetXmax();
57 else if ( jetPropName.Contains("trackWIDTH") && etabin < m_trackWIDTHMaxEtaBin ) return m_respFactorstrackWIDTH[etabin]->GetYaxis()->GetXmax();
58 else if ( jetPropName.Contains("N90Constituents") && etabin < m_N90ConstituentsMaxEtaBin ) return m_respFactorsN90Constituents[etabin]->GetYaxis()->GetXmax();
59 else if ( jetPropName.Contains("caloWIDTH") && etabin < m_caloWIDTHMaxEtaBin ) return m_respFactorscaloWIDTH[etabin]->GetYaxis()->GetXmax();
60 else if ( jetPropName.Contains("TileGap3") && etabin < m_TileGap3MaxEtaBin ) return m_respFactorsTileGap3[etabin]->GetYaxis()->GetXmax();
61 else return 1;
62 }

◆ getN90ConstituentsResponse()

double GlobalSequentialCorrection::getN90ConstituentsResponse ( double pT,
uint etabin,
double N90Constituents ) const
private

Definition at line 381 of file GlobalSequentialCorrection.cxx.

381 {
382 if (N90Constituents<=0) return 1; // N90Constituents < 0 is unphysical, N90Constituents = 0 is a special case, so return 1 for N90Constituents <= 0
383 if ( etabin >= m_respFactorsN90Constituents.size() ) return 1.;
384 double N90ConstituentsResponse = readPtJetPropertyHisto(pT, N90Constituents, *m_respFactorsN90Constituents[etabin]);
385 return N90ConstituentsResponse;
386}

◆ getNominalResolutionData()

StatusCode JetCalibrationStep::getNominalResolutionData ( const xAOD::Jet & ,
double &  ) const
virtualinherited

Reimplemented in JetSmearingCorrection.

Definition at line 33 of file JetCalibrationStep.cxx.

33 {
34 ATH_MSG_ERROR("Nominal data resolution requested from a jet calibration step that doesn't define it.");
35 return StatusCode::FAILURE;
36}

◆ getNominalResolutionMC()

StatusCode JetCalibrationStep::getNominalResolutionMC ( const xAOD::Jet & ,
double &  ) const
virtualinherited

Reimplemented in JetSmearingCorrection.

Definition at line 38 of file JetCalibrationStep.cxx.

38 {
39 ATH_MSG_ERROR("Nominal MC resolution requested from a jet calibration step that doesn't define it.");
40 return StatusCode::FAILURE;
41}

◆ getNTrkResponse()

double GlobalSequentialCorrection::getNTrkResponse ( double pT,
uint etabin,
double nTrk ) const
private

Definition at line 316 of file GlobalSequentialCorrection.cxx.

316 {
317 if (nTrk<=0) return 1; //nTrk < 0 is unphysical, nTrk = 0 is a special case, so return 1 for nTrk <= 0
318 if ( etabin >= m_respFactorsnTrk.size() ) return 1.;
319 double nTrkResponse;
321 if(pT>=m_turnOffStartingpT && pT<=m_turnOffEndpT){
322 double responseatStartingpT = readPtJetPropertyHisto(m_turnOffStartingpT, nTrk, *m_respFactorsnTrk[etabin]);
323 nTrkResponse = (1-responseatStartingpT)/(m_turnOffEndpT-m_turnOffStartingpT);
324 nTrkResponse *= pT;
325 nTrkResponse += 1 - (m_turnOffEndpT*(1-responseatStartingpT)/(m_turnOffEndpT-m_turnOffStartingpT));
326 return nTrkResponse;
327 }
328 else if(pT>m_turnOffEndpT) return 1;
329 }
330 nTrkResponse = readPtJetPropertyHisto(pT, nTrk, *m_respFactorsnTrk[etabin]);
331 return nTrkResponse;
332}

◆ getPunchThroughResponse()

double GlobalSequentialCorrection::getPunchThroughResponse ( double E,
double eta_det,
int Nsegments ) const
private

Definition at line 355 of file GlobalSequentialCorrection.cxx.

355 {
356 int etabin=-99;
357 //Check that the punch through eta binning defined in the config appears reasonable, otherwise throw an error.
359 ATH_MSG_WARNING("Please check that the punch through eta binning is properly set in your config file");
360 if ( eta_det >= m_punchThroughEtaBins.back() || Nsegments < 20 ) return 1;
361 for (uint i=0; i<m_punchThroughEtaBins.size()-1; ++i) {
362 if(eta_det >= m_punchThroughEtaBins[i] && eta_det < m_punchThroughEtaBins[i+1]) etabin = i;
363 }
364 if(etabin<0) {
365 ATH_MSG_WARNING("There was a problem determining the eta bin to use for the punch through correction.");
366 //this could probably be improved, but to avoid a seg fault...
367 return 1;
368 }
369 double PunchThroughResponse = readPtJetPropertyHisto(E,Nsegments,*m_respFactorsPunchThrough[etabin]);
370 if(!m_pTResponseRequirementOff && PunchThroughResponse>1) return 1;
371 return PunchThroughResponse;
372}

◆ getTile0Response()

double GlobalSequentialCorrection::getTile0Response ( double pT,
uint etabin,
double Tile0 ) const
private

Definition at line 334 of file GlobalSequentialCorrection.cxx.

334 {
335 if (Tile0<0) return 1; //Tile0 < 0 is unphysical, so we return 1
336 if ( etabin >= m_respFactorsTile0.size() ) return 1.;
337 double Tile0Response = readPtJetPropertyHisto(pT, Tile0, *m_respFactorsTile0[etabin]);
338 return Tile0Response;
339}

◆ getTileGap3Response()

double GlobalSequentialCorrection::getTileGap3Response ( double pT,
uint etabin,
double TileGap3 ) const
private

Definition at line 388 of file GlobalSequentialCorrection.cxx.

388 {
389 if (TileGap3<0) return 1; //TileGap3 < 0 is unphysical, so we return 1
390 if ( etabin >= m_respFactorsTileGap3.size() ) return 1.;
391 double TileGap3Response = readPtJetPropertyHisto(pT, TileGap3, *m_respFactorsTileGap3[etabin]);
392 return TileGap3Response;
393}

◆ getTrackWIDTHResponse()

double GlobalSequentialCorrection::getTrackWIDTHResponse ( double pT,
uint etabin,
double trackWIDTH ) const
private

Definition at line 297 of file GlobalSequentialCorrection.cxx.

297 {
298 if (trackWIDTH<=0) return 1;
299 if ( etabin >= m_respFactorstrackWIDTH.size() ) return 1.;
300 //jets with no tracks are assigned a trackWIDTH of -1, we use the trackWIDTH=0 correction in those cases
301 double trackWIDTHResponse;
303 if(pT>=m_turnOffStartingpT && pT<=m_turnOffEndpT){
304 double responseatStartingpT = readPtJetPropertyHisto(m_turnOffStartingpT, trackWIDTH, *m_respFactorstrackWIDTH[etabin]);
305 trackWIDTHResponse = (1-responseatStartingpT)/(m_turnOffEndpT-m_turnOffStartingpT);
306 trackWIDTHResponse *= pT;
307 trackWIDTHResponse += 1 - (m_turnOffEndpT*(1-responseatStartingpT)/(m_turnOffEndpT-m_turnOffStartingpT));
308 return trackWIDTHResponse;
309 }
310 else if(pT>m_turnOffEndpT) return 1;
311 }
312 trackWIDTHResponse = readPtJetPropertyHisto(pT, trackWIDTH, *m_respFactorstrackWIDTH[etabin]);
313 return trackWIDTHResponse;
314}

◆ initialize()

StatusCode GlobalSequentialCorrection::initialize ( )
overridevirtual

Implements JetCalibrationStep.

Definition at line 53 of file GlobalSequentialCorrection.cxx.

53 {
54
55 ATH_MSG_INFO("Initializing the Global Sequential Calibration tool");
56
57 if(!m_config){
58 ATH_MSG_ERROR("GSC tool received a null config pointer.");
59 return StatusCode::FAILURE;
60 }
61
62 // Set m_PFlow
63 m_PFlow = m_jetAlgo == "AntiKt4EMPFlow";
64
65 // Set m_caloBased
66 if( m_jetAlgo == "AntiKt4EMTopoTrig" && !m_PFlow ) {
67 m_caloBased = true;
68 ATH_MSG_INFO("Using calo based GSC");
69 } else{
70 // better to read from config which type of GSC: caloBased for trigger jets.
71 m_caloBased = m_config->GetValue("caloBasedGSC",false);
72 }
73
74 m_jetStartScale = m_config->GetValue("GSCStartingScale","JetEtaJESScaleMomentum");
75 m_turnOffTrackCorrections = m_config->GetValue("TurnOffTrackCorrections", false);
76 m_turnOffStartingpT = m_config->GetValue("TurnOffStartingpT", 1200);
77 m_turnOffEndpT = m_config->GetValue("TurnOffEndpT", 2000);
78 m_pTResponseRequirementOff = m_config->GetValue("PTResponseRequirementOff", false);
79
80 // In release 21, the nTrk and trackWIDTH corrections are also included for PFlow jets
81 // The default is set to false to maintain the backwards compatibility
82 m_nTrkwTrk_4PFlow = m_config->GetValue("nTrkwTrk4PFlow", false);
83
84 // For AFII calibrations, EM3 correction should be applied up to |eta|=3.2
85 m_EM3MaxEtaBin = m_config->GetValue("EM3MaxEtaBin", 35);
86
87 if ( m_jetAlgo.EqualTo("") ) { ATH_MSG_FATAL("No jet algorithm specified. Aborting."); return StatusCode::FAILURE; }
88
89 //find the ROOT file containing response histograms, path comes from the config file.
90 TString GSCFile = m_config->GetValue("GSCFactorsFile","empty");
91 if ( GSCFile.EqualTo("empty") ) {
92 ATH_MSG_FATAL("NO GSCFactorsFile specified. Aborting.");
93 return StatusCode::FAILURE;
94 }
95 if(m_dev){
96 GSCFile.Remove(0,33);
97 GSCFile.Insert(0,"JetCalibTools/");
98 }
99 else{GSCFile.Insert(14,m_calibAreaTag);}
100 TString fileName = PathResolverFindCalibFile(GSCFile.Data());
101 std::unique_ptr<TFile> inputFile(TFile::Open(fileName));
102 if (!inputFile){
103 ATH_MSG_FATAL("Cannot open GSC factors file" << fileName);
104 return StatusCode::FAILURE;
105 }
106
107 TString depthString = "";
108 if ( m_depthString != "auto" ) depthString = m_depthString;
109 else depthString = m_config->GetValue("GSCDepth","Full");
110 if ( !depthString.Contains("ChargedFraction") && !depthString.Contains("Tile0") && !depthString.Contains("EM3") && !depthString.Contains("nTrk") && !depthString.Contains("trackWIDTH") && !depthString.Contains("PunchThrough") && !depthString.Contains("N90Constituents") && !depthString.Contains("TileGap3") && !depthString.Contains("caloWIDTH") && !depthString.Contains("Full") ) {
111 ATH_MSG_FATAL("depthString flag not properly set, please check your config file.");
112 return StatusCode::FAILURE;
113 }
114
115 // Protection against requesting nTrk or trackWIDTH corrections for PFlow jets when m_nTrkwTrk_4PFlow is false
116 if ( !m_nTrkwTrk_4PFlow && (depthString.Contains("nTrk")||depthString.Contains("trackWIDTH")) && m_PFlow ){
117 ATH_MSG_FATAL("depthString flag not properly set, please check your config file. nTrkwTrk4PFlow should be set to true to apply nTrk or trackWIDTH corrections to PFlow jets");
118 return StatusCode::FAILURE;
119 }
120
121 // Protection against requesting nTrk/trackWIDTH/ChargedFraction/PunchThrough corrections for HLT trigger jets when m_caloBased is true
122 if ( m_caloBased && (depthString.Contains("nTrk")||depthString.Contains("trackWIDTH")||depthString.Contains("ChargedFraction")||depthString.Contains("PunchThrough"))){
123 ATH_MSG_FATAL("depthString flag not properly set, please check your config file. nTrk, trackWIDTH, PunchThrough and ChargedFraction corrections not available for trigger jets");
124 return StatusCode::FAILURE;
125 }
126
127
128 //ATH_MSG_INFO(" for " << m_jetAlgo << " jets\n\n");
129
130 if ( depthString.Contains("PunchThrough") || depthString.Contains("Full") ) {
131 setPunchThroughEtaBins( JetCalibUtils::VectorizeD( m_config->GetValue("PunchThroughEtaBins","") ) );
132 setPunchThroughMinPt( m_config->GetValue("PunchThroughMinPt",50) );
133 }
134
135 //set the depth private variable, used to determine which parts of the GS calibration are applied
136 if( !m_PFlow && !m_caloBased ){
137 if ( depthString.Contains("PunchThrough") || depthString.Contains("Full") ) m_depth = ApplyTile0 | ApplyEM3 | ApplynTrk | ApplytrackWIDTH | ApplyPunchThrough;
138 else if ( depthString.Contains("trackWIDTH") ) m_depth = ApplyTile0 | ApplyEM3 | ApplynTrk | ApplytrackWIDTH;
139 else if ( depthString.Contains("nTrk") ) m_depth = ApplyTile0 | ApplyEM3 | ApplynTrk;
140 else if ( depthString.Contains("EM3") ) m_depth = ApplyTile0 | ApplyEM3;
141 else if ( depthString.Contains("Tile0") ) m_depth = ApplyTile0;
142 else { ATH_MSG_FATAL("depthString flag not properly set, please check your config file."); return StatusCode::FAILURE; }
143 }
144 else if (m_caloBased){
145 if ( depthString.Contains("caloWIDTH") || depthString.Contains("Full") ) m_depth = ApplyTile0 | ApplyEM3 | ApplyN90Constituents | ApplycaloWIDTH;
146 else if ( depthString.Contains("TileGap3") ) m_depth = ApplyTile0 | ApplyEM3 | ApplyN90Constituents | ApplyTileGap3;
147 else if ( depthString.Contains("N90Constituents") ) m_depth = ApplyTile0 | ApplyEM3 | ApplyN90Constituents;
148 else if ( depthString.Contains("EM3") ) m_depth = ApplyTile0 | ApplyEM3;
149 else if ( depthString.Contains("Tile0") ) m_depth = ApplyTile0;
150 else { ATH_MSG_FATAL("depthString flag for calo based GSC not properly set, please check your config file."); return StatusCode::FAILURE; }
151 }
152 else { // PFlow
154 if ( depthString.Contains("PunchThrough") || depthString.Contains("Full") ) m_depth = ApplyChargedFraction | ApplyTile0 | ApplyEM3 | ApplyPunchThrough;
155 else if ( depthString.Contains("EM3") ) m_depth = ApplyChargedFraction | ApplyTile0 | ApplyEM3;
156 else if ( depthString.Contains("Tile0") ) m_depth = ApplyChargedFraction | ApplyTile0;
157 else if ( depthString.Contains("ChargedFraction") ) m_depth = ApplyChargedFraction;
158 else { ATH_MSG_FATAL("depthString flag not properly set, please check your config file."); return StatusCode::FAILURE; }
159 } else {
160 if ( depthString.Contains("PunchThrough") || depthString.Contains("Full") ) m_depth = ApplyChargedFraction | ApplyTile0 | ApplyEM3 | ApplynTrk | ApplytrackWIDTH | ApplyPunchThrough;
161 else if ( depthString.Contains("trackWIDTH") ) m_depth = ApplyChargedFraction | ApplyTile0 | ApplyEM3 | ApplynTrk | ApplytrackWIDTH;
162 else if ( depthString.Contains("nTrk") ) m_depth = ApplyChargedFraction | ApplyTile0 | ApplyEM3 | ApplynTrk;
163 else if ( depthString.Contains("EM3") ) m_depth = ApplyChargedFraction | ApplyTile0 | ApplyEM3;
164 else if ( depthString.Contains("Tile0") ) m_depth = ApplyChargedFraction | ApplyTile0;
165 else if ( depthString.Contains("ChargedFraction") ) m_depth = ApplyChargedFraction;
166 else { ATH_MSG_FATAL("depthString flag not properly set, please check your config file."); return StatusCode::FAILURE; }
167 }
168 }
169
170 //Get a TList of TKeys pointing to the histograms contained in the ROOT file
171 inputFile->cd();
172 TList *keys = inputFile->GetListOfKeys();
173 std::vector<TString> histoNames;
174 //fill the names of the TKeys into a vector of TStrings
175 TIter ikeys(keys);
176 while ( TKey *iterobj = (TKey*)ikeys() ) { histoNames.emplace_back(iterobj->GetName() ); }
177
178 //Grab the TH2Fs from the ROOT file and put them into a vectors of TH2Fs
179 for (uint ihisto=0; ihisto<histoNames.size(); ++ihisto) {
180 if ( !histoNames[ihisto].Contains( m_jetAlgo.Data() ) ) continue;
181 else if ( ihisto>0 && histoNames[ihisto].Contains( histoNames[ihisto-1].Data() ) ) continue;
182 else if ( histoNames[ihisto].Contains("EM3") && m_respFactorsEM3.size() < m_EM3MaxEtaBin)
183 m_respFactorsEM3.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
184 else if ( histoNames[ihisto].Contains("nTrk") && m_respFactorsnTrk.size() < m_nTrkMaxEtaBin)
185 m_respFactorsnTrk.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
186 else if ( histoNames[ihisto].Contains("Tile0") && m_respFactorsTile0.size() < m_Tile0MaxEtaBin)
187 m_respFactorsTile0.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
188 else if ( histoNames[ihisto].Contains("chargedFraction") && m_respFactorsChargedFraction.size() < m_chargedFractionMaxEtaBin)
189 m_respFactorsChargedFraction.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
190 else if ( histoNames[ihisto].Contains("trackWIDTH") && m_respFactorstrackWIDTH.size() < m_trackWIDTHMaxEtaBin)
191 m_respFactorstrackWIDTH.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
192 else if ( histoNames[ihisto].Contains("PunchThrough") )
193 m_respFactorsPunchThrough.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
194 else if ( histoNames[ihisto].Contains("N90Constituents") && m_respFactorsN90Constituents.size() < m_N90ConstituentsMaxEtaBin)
195 m_respFactorsN90Constituents.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
196 else if ( histoNames[ihisto].Contains("caloWIDTH") && m_respFactorscaloWIDTH.size() < m_caloWIDTHMaxEtaBin)
197 m_respFactorscaloWIDTH.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
198 else if ( histoNames[ihisto].Contains("TileGap3") && m_respFactorsTileGap3.size() < m_TileGap3MaxEtaBin )
199 m_respFactorsTileGap3.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
200 }
201
202 //Make sure we put something in the vectors of TH2Fs
203 if( !m_PFlow && !m_caloBased ){
204 if ( (m_depth & ApplyEM3) && m_respFactorsEM3.size() < 3 ) {
205 ATH_MSG_FATAL("Vector of EM3 histograms may be empty. Please check your GSCFactors file: " << GSCFile);
206 return StatusCode::FAILURE;
207 }
208 else if ( (m_depth & ApplynTrk) && m_respFactorsnTrk.size() < 3 ) {
209 ATH_MSG_FATAL("Vector of nTrk histograms may be empty. Please check your GSCFactors file: " << GSCFile);
210 return StatusCode::FAILURE;
211 }
212 else if ( (m_depth & ApplyTile0) && m_respFactorsTile0.size() < 3 ) {
213 ATH_MSG_FATAL("Vector of Tile0 histograms may be empty. Please check your GSCFactors file: " << GSCFile);
214 return StatusCode::FAILURE;
215 }
216 else if ( (m_depth & ApplytrackWIDTH) && m_respFactorstrackWIDTH.size() < 3 ) {
217 ATH_MSG_FATAL("Vector of trackWIDTH histograms may be empty. Please check your GSCFactors file: " << GSCFile);
218 return StatusCode::FAILURE;
219 }
220 else if ( (m_depth & ApplyPunchThrough) && m_respFactorsPunchThrough.size() < 2 ) {
221 ATH_MSG_FATAL("Vector of PunchThrough histograms may be empty. Please check your GSCFactors file: " << GSCFile);
222 return StatusCode::FAILURE;
223 }
224 else ATH_MSG_INFO("GSC Tool has been initialized with binning and eta fit factors from: " << fileName);
225 }
226 else if (m_caloBased) {
227 if ( (m_depth & ApplyEM3) && m_respFactorsEM3.size() < 3 ) {
228 ATH_MSG_FATAL("Vector of EM3 histograms may be empty. Please check your GSCFactors file: " << GSCFile);
229 return StatusCode::FAILURE;
230 }
231 else if ( (m_depth & ApplyN90Constituents) && m_respFactorsN90Constituents.size() < 3 ) {
232 ATH_MSG_FATAL("Vector of N90Constituents histograms may be empty. Please check your GSCFactors file: " << GSCFile);
233 return StatusCode::FAILURE;
234 }
235 else if ( (m_depth & ApplyTile0) && m_respFactorsTile0.size() < 3 ) {
236 ATH_MSG_FATAL("Vector of Tile0 histograms may be empty. Please check your GSCFactors file: " << GSCFile);
237 return StatusCode::FAILURE;
238 }
239 else if ( (m_depth & ApplycaloWIDTH) && m_respFactorscaloWIDTH.size() < 3 ) {
240 ATH_MSG_FATAL("Vector of caloWIDTH histograms may be empty. Please check your GSCFactors file: " << GSCFile);
241 return StatusCode::FAILURE;
242 }
243 else if ( (m_depth & ApplyTileGap3) && m_respFactorsTileGap3.size() < 3 ) {
244 ATH_MSG_FATAL("Vector of TileGap3 histograms may be empty. Please check your GSCFactors file: " << GSCFile);
245 return StatusCode::FAILURE;
246 }
247
248 else ATH_MSG_INFO("GSC Tool has been initialized with binning and eta fit factors from: " << fileName << "\n");
249 }
250 else{
252 ATH_MSG_FATAL("Vector of ChargedFraction histograms may be empty. Please check your GSCFactors file: " << GSCFile);
253 return StatusCode::FAILURE;
254 }
255 else if ( (m_depth & ApplyEM3) && m_respFactorsEM3.size() < 3 ) {
256 ATH_MSG_FATAL("Vector of EM3 histograms may be empty. Please check your GSCFactors file: " << GSCFile);
257 return StatusCode::FAILURE;
258 }
259 else if ( (m_depth & ApplyTile0) && m_respFactorsTile0.size() < 3 ) {
260 ATH_MSG_FATAL("Vector of Tile0 histograms may be empty. Please check your GSCFactors file: " << GSCFile);
261 return StatusCode::FAILURE;
262 }
263 else if ( m_nTrkwTrk_4PFlow && (m_depth & ApplynTrk) && m_respFactorsnTrk.size() < 3 ) {
264 ATH_MSG_FATAL("Vector of nTrk histograms may be empty. Please check your GSCFactors file: " << GSCFile);
265 return StatusCode::FAILURE;
266 }
267 else if ( m_nTrkwTrk_4PFlow && (m_depth & ApplytrackWIDTH) && m_respFactorstrackWIDTH.size() < 3 ) {
268 ATH_MSG_FATAL("Vector of trackWIDTH histograms may be empty. Please check your GSCFactors file: " << GSCFile);
269 return StatusCode::FAILURE;
270 }
271 else if ( (m_depth & ApplyPunchThrough) && m_respFactorsPunchThrough.size() < 2 ) {
272 ATH_MSG_FATAL("Vector of PunchThrough histograms may be empty. Please check your GSCFactors file: " << GSCFile);
273 return StatusCode::FAILURE;
274 }
275 else ATH_MSG_INFO("GSC Tool has been initialized with binning and eta fit factors from: " << fileName);
276 }
277 return StatusCode::SUCCESS;
278
279}
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
@ Data
Definition BaseObject.h:11
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
void setPunchThroughEtaBins(const VecD &etabins)
std::unique_ptr< const TH2 > GetHisto2(TFile &file, const TString &hname)
VecD VectorizeD(const TString &str, const TString &sep=" ")

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

40{
42 // If user did not set an explicit level, set a default
43 if (m_lvl == MSG::NIL) {
44 m_lvl = m_imsg ?
45 static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
46 MSG::INFO;
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)

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

49 {
50#ifndef XAOD_STANDALONE
51 return ::AthMessaging::msg();
52#else // not XAOD_STANDALONE
53 return m_msg;
54#endif // not XAOD_STANDALONE
55 }

◆ msg() [2/2]

MsgStream & asg::AsgMessaging::msg ( const MSG::Level lvl) const
inherited

The standard message stream.

Parameters
lvlThe 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.

57 {
58#ifndef XAOD_STANDALONE
59 return ::AthMessaging::msg( lvl );
60#else // not XAOD_STANDALONE
61 m_msg << lvl;
62 return m_msg;
63#endif // not XAOD_STANDALONE
64 }

◆ msgLvl()

bool asg::AsgMessaging::msgLvl ( const MSG::Level lvl) const
inherited

Test the output level of the object.

Parameters
lvlThe 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.

41 {
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
47 }

◆ readPtJetPropertyHisto()

double GlobalSequentialCorrection::readPtJetPropertyHisto ( double pT,
double jetProperty,
const TH2 & respFactors ) const
private

Definition at line 281 of file GlobalSequentialCorrection.cxx.

281 {
282 int pTbin = respFactors.GetXaxis()->FindBin(pT);
283 int pTMinbin = respFactors.GetXaxis()->GetFirst();
284 int pTMaxbin = respFactors.GetXaxis()->GetLast();
285 int jetPropbin = respFactors.GetYaxis()->FindBin(jetProperty);
286 int jetPropMinbin = respFactors.GetYaxis()->GetFirst();
287 int jetPropMaxbin = respFactors.GetYaxis()->GetLast();
288 //Protection against input values that are outside the histogram range, which would cause TH2::Interpolate to throw an error
289 if (pTbin < pTMinbin) pT = respFactors.GetXaxis()->GetBinLowEdge(pTMinbin)+1e-6;
290 else if (pTbin > pTMaxbin) pT = respFactors.GetXaxis()->GetBinUpEdge(pTMaxbin)-1e-6;
291 if (jetPropbin < jetPropMinbin) jetProperty = respFactors.GetYaxis()->GetBinLowEdge(jetPropMinbin)+1e-6;
292 else if (jetPropbin > jetPropMaxbin) jetProperty = respFactors.GetYaxis()->GetBinUpEdge(jetPropMaxbin)-1e-6;
293 //TH2::Interpolate is a bilinear interpolation from the bin centers.
294 return respFactors.Interpolate(pT, jetProperty);
295}

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29{
30 m_lvl = lvl;
31}

◆ setPunchThroughEtaBins()

void GlobalSequentialCorrection::setPunchThroughEtaBins ( const VecD & etabins)
inlineprivate

Definition at line 64 of file GlobalSequentialCorrection.h.

64 {
65 if (etabins.size()==0) ATH_MSG_ERROR("Please check that the punch through eta binning is properly set in your config file");
67 }

◆ setPunchThroughMinPt()

void GlobalSequentialCorrection::setPunchThroughMinPt ( double minPt)
inlineprivate

Definition at line 69 of file GlobalSequentialCorrection.h.

69 {
70 if (minPt < 0) ATH_MSG_ERROR("Error determining the punch through minimum pT");
71 m_punchThroughMinPt = minPt;
72 }

◆ setStartP4()

StatusCode JetCalibrationStep::setStartP4 ( xAOD::Jet & jet) const
protectedvirtualinherited

Definition at line 21 of file JetCalibrationStep.cxx.

21 {
23 if ( m_jetStartScale.compare("Default") == 0 ) {
24 return StatusCode::SUCCESS;
25 } else if ( jet.getAttribute<xAOD::JetFourMom_t>(m_jetStartScale.c_str(),tmp) ) {
26 jet.setJetP4(tmp);
27 return StatusCode::SUCCESS;
28 }
29 ATH_MSG_WARNING("Jet does not have the requested momentum state: " << m_jetStartScale);
30 return StatusCode::FAILURE;
31}

◆ setUnitsGeV()

virtual void JetCalibrationStep::setUnitsGeV ( bool useGeV)
inlinevirtualinherited

Definition at line 30 of file JetCalibrationStep.h.

30{ if (useGeV) m_GeV=1; else m_GeV=1000; }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_binSize

double GlobalSequentialCorrection::m_binSize
private

Definition at line 89 of file GlobalSequentialCorrection.h.

◆ m_calibAreaTag

TString GlobalSequentialCorrection::m_calibAreaTag
private

Definition at line 84 of file GlobalSequentialCorrection.h.

◆ m_caloBased

bool GlobalSequentialCorrection::m_caloBased {false}
private

Definition at line 95 of file GlobalSequentialCorrection.h.

95{false};

◆ m_caloWIDTHMaxEtaBin

uint GlobalSequentialCorrection::m_caloWIDTHMaxEtaBin
private

Definition at line 90 of file GlobalSequentialCorrection.h.

◆ m_chargedFractionMaxEtaBin

uint GlobalSequentialCorrection::m_chargedFractionMaxEtaBin
private

Definition at line 90 of file GlobalSequentialCorrection.h.

◆ m_config

TEnv* GlobalSequentialCorrection::m_config
private

Definition at line 83 of file GlobalSequentialCorrection.h.

◆ m_depth

uint GlobalSequentialCorrection::m_depth
private

Definition at line 90 of file GlobalSequentialCorrection.h.

◆ m_depthString

TString GlobalSequentialCorrection::m_depthString
private

Definition at line 84 of file GlobalSequentialCorrection.h.

◆ m_dev

bool GlobalSequentialCorrection::m_dev
private

Definition at line 85 of file GlobalSequentialCorrection.h.

◆ m_EM3MaxEtaBin

uint GlobalSequentialCorrection::m_EM3MaxEtaBin
private

Definition at line 90 of file GlobalSequentialCorrection.h.

◆ m_GeV

double JetCalibrationStep::m_GeV
protectedinherited

Definition at line 40 of file JetCalibrationStep.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

135{ nullptr };

◆ m_jetAlgo

TString GlobalSequentialCorrection::m_jetAlgo
private

Definition at line 84 of file GlobalSequentialCorrection.h.

◆ m_jetStartScale

std::string JetCalibrationStep::m_jetStartScale
protectedinherited

Definition at line 41 of file JetCalibrationStep.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

138{ MSG::NIL };

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

uint GlobalSequentialCorrection::m_N90ConstituentsMaxEtaBin
private

Definition at line 90 of file GlobalSequentialCorrection.h.

◆ m_name

std::string JetCalibrationStep::m_name
protectedinherited

Definition at line 42 of file JetCalibrationStep.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_nTrkMaxEtaBin

uint GlobalSequentialCorrection::m_nTrkMaxEtaBin
private

Definition at line 90 of file GlobalSequentialCorrection.h.

◆ m_nTrkwTrk_4PFlow

bool GlobalSequentialCorrection::m_nTrkwTrk_4PFlow {false}
private

Definition at line 97 of file GlobalSequentialCorrection.h.

97{false};

◆ m_PFlow

bool GlobalSequentialCorrection::m_PFlow {false}
private

Definition at line 94 of file GlobalSequentialCorrection.h.

94{false};

◆ m_pTResponseRequirementOff

bool GlobalSequentialCorrection::m_pTResponseRequirementOff {false}
private

Definition at line 96 of file GlobalSequentialCorrection.h.

96{false};

◆ m_punchThroughEtaBins

VecD GlobalSequentialCorrection::m_punchThroughEtaBins
private

Definition at line 91 of file GlobalSequentialCorrection.h.

◆ m_punchThroughMinPt

double GlobalSequentialCorrection::m_punchThroughMinPt
private

Definition at line 92 of file GlobalSequentialCorrection.h.

◆ m_respFactorscaloWIDTH

VecTH2 GlobalSequentialCorrection::m_respFactorscaloWIDTH
private

Definition at line 88 of file GlobalSequentialCorrection.h.

◆ m_respFactorsChargedFraction

VecTH2 GlobalSequentialCorrection::m_respFactorsChargedFraction
private

Definition at line 88 of file GlobalSequentialCorrection.h.

◆ m_respFactorsEM3

VecTH2 GlobalSequentialCorrection::m_respFactorsEM3
private

Definition at line 88 of file GlobalSequentialCorrection.h.

◆ m_respFactorsN90Constituents

VecTH2 GlobalSequentialCorrection::m_respFactorsN90Constituents
private

Definition at line 88 of file GlobalSequentialCorrection.h.

◆ m_respFactorsnTrk

VecTH2 GlobalSequentialCorrection::m_respFactorsnTrk
private

Definition at line 88 of file GlobalSequentialCorrection.h.

◆ m_respFactorsPunchThrough

VecTH2 GlobalSequentialCorrection::m_respFactorsPunchThrough
private

Definition at line 88 of file GlobalSequentialCorrection.h.

◆ m_respFactorsTile0

VecTH2 GlobalSequentialCorrection::m_respFactorsTile0
private

Definition at line 88 of file GlobalSequentialCorrection.h.

◆ m_respFactorsTileGap3

VecTH2 GlobalSequentialCorrection::m_respFactorsTileGap3
private

Definition at line 88 of file GlobalSequentialCorrection.h.

◆ m_respFactorstrackWIDTH

VecTH2 GlobalSequentialCorrection::m_respFactorstrackWIDTH
private

Definition at line 88 of file GlobalSequentialCorrection.h.

◆ m_Tile0MaxEtaBin

uint GlobalSequentialCorrection::m_Tile0MaxEtaBin
private

Definition at line 90 of file GlobalSequentialCorrection.h.

◆ m_TileGap3MaxEtaBin

uint GlobalSequentialCorrection::m_TileGap3MaxEtaBin
private

Definition at line 90 of file GlobalSequentialCorrection.h.

◆ m_trackWIDTHMaxEtaBin

uint GlobalSequentialCorrection::m_trackWIDTHMaxEtaBin
private

Definition at line 90 of file GlobalSequentialCorrection.h.

◆ m_turnOffEndpT

double GlobalSequentialCorrection::m_turnOffEndpT {2000}
private

Definition at line 98 of file GlobalSequentialCorrection.h.

98{1200.}, m_turnOffEndpT{2000};

◆ m_turnOffStartingpT

double GlobalSequentialCorrection::m_turnOffStartingpT {1200.}
private

Definition at line 98 of file GlobalSequentialCorrection.h.

98{1200.}, m_turnOffEndpT{2000};

◆ m_turnOffTrackCorrections

bool GlobalSequentialCorrection::m_turnOffTrackCorrections {false}
private

Definition at line 93 of file GlobalSequentialCorrection.h.

93{false};

◆ m_useOriginVertex

bool GlobalSequentialCorrection::m_useOriginVertex {false}
private

Definition at line 99 of file GlobalSequentialCorrection.h.

99{false};

The documentation for this class was generated from the following files: