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
int m_punchThroughMinNseg
std::string m_ghostMuSegCountName {"GhostMuonSegmentCount"}
SG::ConstAccessor< int > m_ghostMuSegCountAcc {m_ghostMuSegCountName}
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 442 of file GlobalSequentialCorrection.cxx.

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

380 {
381 if (caloWIDTH<=0) return 1;
382 if ( etabin >= m_respFactorscaloWIDTH.size() ) return 1.;
383 double caloWIDTHResponse = readPtJetPropertyHisto(pT, caloWIDTH, *m_respFactorscaloWIDTH[etabin]);
384 return caloWIDTHResponse;
385}
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 354 of file GlobalSequentialCorrection.cxx.

354 {
355 if (ChargedFraction<=0) return 1; //ChargedFraction < 0 is unphysical, ChargedFraction = 0 is a special case, so we return 1 for ChargedFraction <= 0
356 if ( etabin >= m_respFactorsChargedFraction.size() ) return 1.;
357 double ChargedFractionResponse = readPtJetPropertyHisto(pT, ChargedFraction, *m_respFactorsChargedFraction[etabin]);
358 return ChargedFractionResponse;
359}

◆ getEM3Response()

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

Definition at line 347 of file GlobalSequentialCorrection.cxx.

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

◆ 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 401 of file GlobalSequentialCorrection.cxx.

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

387 {
388 if (N90Constituents<=0) return 1; // N90Constituents < 0 is unphysical, N90Constituents = 0 is a special case, so return 1 for N90Constituents <= 0
389 if ( etabin >= m_respFactorsN90Constituents.size() ) return 1.;
390 double N90ConstituentsResponse = readPtJetPropertyHisto(pT, N90Constituents, *m_respFactorsN90Constituents[etabin]);
391 return N90ConstituentsResponse;
392}

◆ 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 322 of file GlobalSequentialCorrection.cxx.

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

◆ getPunchThroughResponse()

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

Definition at line 361 of file GlobalSequentialCorrection.cxx.

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

◆ getTile0Response()

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

Definition at line 340 of file GlobalSequentialCorrection.cxx.

340 {
341 if (Tile0<0) return 1; //Tile0 < 0 is unphysical, so we return 1
342 if ( etabin >= m_respFactorsTile0.size() ) return 1.;
343 double Tile0Response = readPtJetPropertyHisto(pT, Tile0, *m_respFactorsTile0[etabin]);
344 return Tile0Response;
345}

◆ getTileGap3Response()

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

Definition at line 394 of file GlobalSequentialCorrection.cxx.

394 {
395 if (TileGap3<0) return 1; //TileGap3 < 0 is unphysical, so we return 1
396 if ( etabin >= m_respFactorsTileGap3.size() ) return 1.;
397 double TileGap3Response = readPtJetPropertyHisto(pT, TileGap3, *m_respFactorsTileGap3[etabin]);
398 return TileGap3Response;
399}

◆ getTrackWIDTHResponse()

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

Definition at line 303 of file GlobalSequentialCorrection.cxx.

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

◆ initialize()

StatusCode GlobalSequentialCorrection::initialize ( )
overridevirtual

Implements JetCalibrationStep.

Definition at line 53 of file GlobalSequentialCorrection.cxx.

53 {
54
55 ATH_MSG_DEBUG("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_DEBUG("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 // What is the Nsegments threshold for the punch-through correction? Either 20 or 10
88 m_punchThroughMinNseg = m_config->GetValue("PunchThrough_minNseg", 20);
89 // Use GhostMuonSegmentCount or only unassociated muon segments?
90 m_ghostMuSegCountName = m_config->GetValue("MuonSegmentName", "GhostMuonSegmentCount");
91 m_ghostMuSegCountAcc = SG::ConstAccessor<int>(m_ghostMuSegCountName);
92
93 if ( m_jetAlgo.EqualTo("") ) { ATH_MSG_FATAL("No jet algorithm specified. Aborting."); return StatusCode::FAILURE; }
94
95 //find the ROOT file containing response histograms, path comes from the config file.
96 TString GSCFile = m_config->GetValue("GSCFactorsFile","empty");
97 if ( GSCFile.EqualTo("empty") ) {
98 ATH_MSG_FATAL("NO GSCFactorsFile specified. Aborting.");
99 return StatusCode::FAILURE;
100 }
101 if(m_dev){
102 GSCFile.Remove(0,33);
103 GSCFile.Insert(0,"JetCalibTools/");
104 }
105 else{GSCFile.Insert(14,m_calibAreaTag);}
106 TString fileName = PathResolverFindCalibFile(GSCFile.Data());
107 std::unique_ptr<TFile> inputFile(TFile::Open(fileName));
108 if (!inputFile){
109 ATH_MSG_FATAL("Cannot open GSC factors file" << fileName);
110 return StatusCode::FAILURE;
111 }
112
113 TString depthString = "";
114 if ( m_depthString != "auto" ) depthString = m_depthString;
115 else depthString = m_config->GetValue("GSCDepth","Full");
116 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") ) {
117 ATH_MSG_FATAL("depthString flag not properly set, please check your config file.");
118 return StatusCode::FAILURE;
119 }
120
121 // Protection against requesting nTrk or trackWIDTH corrections for PFlow jets when m_nTrkwTrk_4PFlow is false
122 if ( !m_nTrkwTrk_4PFlow && (depthString.Contains("nTrk")||depthString.Contains("trackWIDTH")) && m_PFlow ){
123 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");
124 return StatusCode::FAILURE;
125 }
126
127 // Protection against requesting nTrk/trackWIDTH/ChargedFraction/PunchThrough corrections for HLT trigger jets when m_caloBased is true
128 if ( m_caloBased && (depthString.Contains("nTrk")||depthString.Contains("trackWIDTH")||depthString.Contains("ChargedFraction")||depthString.Contains("PunchThrough"))){
129 ATH_MSG_FATAL("depthString flag not properly set, please check your config file. nTrk, trackWIDTH, PunchThrough and ChargedFraction corrections not available for trigger jets");
130 return StatusCode::FAILURE;
131 }
132
133
134 //ATH_MSG_INFO(" for " << m_jetAlgo << " jets\n\n");
135
136 if ( depthString.Contains("PunchThrough") || depthString.Contains("Full") ) {
137 setPunchThroughEtaBins( JetCalibUtils::VectorizeD( m_config->GetValue("PunchThroughEtaBins","") ) );
138 setPunchThroughMinPt( m_config->GetValue("PunchThroughMinPt",50) );
139 }
140
141 //set the depth private variable, used to determine which parts of the GS calibration are applied
142 if( !m_PFlow && !m_caloBased ){
143 if ( depthString.Contains("PunchThrough") || depthString.Contains("Full") ) m_depth = ApplyTile0 | ApplyEM3 | ApplynTrk | ApplytrackWIDTH | ApplyPunchThrough;
144 else if ( depthString.Contains("trackWIDTH") ) m_depth = ApplyTile0 | ApplyEM3 | ApplynTrk | ApplytrackWIDTH;
145 else if ( depthString.Contains("nTrk") ) m_depth = ApplyTile0 | ApplyEM3 | ApplynTrk;
146 else if ( depthString.Contains("EM3") ) m_depth = ApplyTile0 | ApplyEM3;
147 else if ( depthString.Contains("Tile0") ) m_depth = ApplyTile0;
148 else { ATH_MSG_FATAL("depthString flag not properly set, please check your config file."); return StatusCode::FAILURE; }
149 }
150 else if (m_caloBased){
151 if ( depthString.Contains("caloWIDTH") || depthString.Contains("Full") ) m_depth = ApplyTile0 | ApplyEM3 | ApplyN90Constituents | ApplycaloWIDTH;
152 else if ( depthString.Contains("TileGap3") ) m_depth = ApplyTile0 | ApplyEM3 | ApplyN90Constituents | ApplyTileGap3;
153 else if ( depthString.Contains("N90Constituents") ) m_depth = ApplyTile0 | ApplyEM3 | ApplyN90Constituents;
154 else if ( depthString.Contains("EM3") ) m_depth = ApplyTile0 | ApplyEM3;
155 else if ( depthString.Contains("Tile0") ) m_depth = ApplyTile0;
156 else { ATH_MSG_FATAL("depthString flag for calo based GSC not properly set, please check your config file."); return StatusCode::FAILURE; }
157 }
158 else { // PFlow
160 if ( depthString.Contains("PunchThrough") || depthString.Contains("Full") ) m_depth = ApplyChargedFraction | ApplyTile0 | ApplyEM3 | ApplyPunchThrough;
161 else if ( depthString.Contains("EM3") ) m_depth = ApplyChargedFraction | ApplyTile0 | ApplyEM3;
162 else if ( depthString.Contains("Tile0") ) m_depth = ApplyChargedFraction | ApplyTile0;
163 else if ( depthString.Contains("ChargedFraction") ) m_depth = ApplyChargedFraction;
164 else { ATH_MSG_FATAL("depthString flag not properly set, please check your config file."); return StatusCode::FAILURE; }
165 } else {
166 if ( depthString.Contains("PunchThrough") || depthString.Contains("Full") ) m_depth = ApplyChargedFraction | ApplyTile0 | ApplyEM3 | ApplynTrk | ApplytrackWIDTH | ApplyPunchThrough;
167 else if ( depthString.Contains("trackWIDTH") ) m_depth = ApplyChargedFraction | ApplyTile0 | ApplyEM3 | ApplynTrk | ApplytrackWIDTH;
168 else if ( depthString.Contains("nTrk") ) m_depth = ApplyChargedFraction | ApplyTile0 | ApplyEM3 | ApplynTrk;
169 else if ( depthString.Contains("EM3") ) m_depth = ApplyChargedFraction | ApplyTile0 | ApplyEM3;
170 else if ( depthString.Contains("Tile0") ) m_depth = ApplyChargedFraction | ApplyTile0;
171 else if ( depthString.Contains("ChargedFraction") ) m_depth = ApplyChargedFraction;
172 else { ATH_MSG_FATAL("depthString flag not properly set, please check your config file."); return StatusCode::FAILURE; }
173 }
174 }
175
176 //Get a TList of TKeys pointing to the histograms contained in the ROOT file
177 inputFile->cd();
178 TList *keys = inputFile->GetListOfKeys();
179 std::vector<TString> histoNames;
180 //fill the names of the TKeys into a vector of TStrings
181 TIter ikeys(keys);
182 while ( TKey *iterobj = (TKey*)ikeys() ) { histoNames.emplace_back(iterobj->GetName() ); }
183
184 //Grab the TH2Fs from the ROOT file and put them into a vectors of TH2Fs
185 for (uint ihisto=0; ihisto<histoNames.size(); ++ihisto) {
186 if ( !histoNames[ihisto].Contains( m_jetAlgo.Data() ) ) continue;
187 else if ( ihisto>0 && histoNames[ihisto].Contains( histoNames[ihisto-1].Data() ) ) continue;
188 else if ( histoNames[ihisto].Contains("EM3") && m_respFactorsEM3.size() < m_EM3MaxEtaBin)
189 m_respFactorsEM3.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
190 else if ( histoNames[ihisto].Contains("nTrk") && m_respFactorsnTrk.size() < m_nTrkMaxEtaBin)
191 m_respFactorsnTrk.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
192 else if ( histoNames[ihisto].Contains("Tile0") && m_respFactorsTile0.size() < m_Tile0MaxEtaBin)
193 m_respFactorsTile0.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
194 else if ( histoNames[ihisto].Contains("chargedFraction") && m_respFactorsChargedFraction.size() < m_chargedFractionMaxEtaBin)
195 m_respFactorsChargedFraction.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
196 else if ( histoNames[ihisto].Contains("trackWIDTH") && m_respFactorstrackWIDTH.size() < m_trackWIDTHMaxEtaBin)
197 m_respFactorstrackWIDTH.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
198 else if ( histoNames[ihisto].Contains("PunchThrough") )
199 m_respFactorsPunchThrough.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
200 else if ( histoNames[ihisto].Contains("N90Constituents") && m_respFactorsN90Constituents.size() < m_N90ConstituentsMaxEtaBin)
201 m_respFactorsN90Constituents.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
202 else if ( histoNames[ihisto].Contains("caloWIDTH") && m_respFactorscaloWIDTH.size() < m_caloWIDTHMaxEtaBin)
203 m_respFactorscaloWIDTH.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
204 else if ( histoNames[ihisto].Contains("TileGap3") && m_respFactorsTileGap3.size() < m_TileGap3MaxEtaBin )
205 m_respFactorsTileGap3.push_back( JetCalibUtils::GetHisto2(*inputFile,histoNames[ihisto]) );
206 }
207
208 //Make sure we put something in the vectors of TH2Fs
209 if( !m_PFlow && !m_caloBased ){
210 if ( (m_depth & ApplyEM3) && m_respFactorsEM3.size() < 3 ) {
211 ATH_MSG_FATAL("Vector of EM3 histograms may be empty. Please check your GSCFactors file: " << GSCFile);
212 return StatusCode::FAILURE;
213 }
214 else if ( (m_depth & ApplynTrk) && m_respFactorsnTrk.size() < 3 ) {
215 ATH_MSG_FATAL("Vector of nTrk histograms may be empty. Please check your GSCFactors file: " << GSCFile);
216 return StatusCode::FAILURE;
217 }
218 else if ( (m_depth & ApplyTile0) && m_respFactorsTile0.size() < 3 ) {
219 ATH_MSG_FATAL("Vector of Tile0 histograms may be empty. Please check your GSCFactors file: " << GSCFile);
220 return StatusCode::FAILURE;
221 }
222 else if ( (m_depth & ApplytrackWIDTH) && m_respFactorstrackWIDTH.size() < 3 ) {
223 ATH_MSG_FATAL("Vector of trackWIDTH histograms may be empty. Please check your GSCFactors file: " << GSCFile);
224 return StatusCode::FAILURE;
225 }
226 else if ( (m_depth & ApplyPunchThrough) && m_respFactorsPunchThrough.size() < 2 ) {
227 ATH_MSG_FATAL("Vector of PunchThrough histograms may be empty. Please check your GSCFactors file: " << GSCFile);
228 return StatusCode::FAILURE;
229 }
230 else ATH_MSG_DEBUG("GSC Tool has been initialized with binning and eta fit factors from: " << fileName);
231 }
232 else if (m_caloBased) {
233 if ( (m_depth & ApplyEM3) && m_respFactorsEM3.size() < 3 ) {
234 ATH_MSG_FATAL("Vector of EM3 histograms may be empty. Please check your GSCFactors file: " << GSCFile);
235 return StatusCode::FAILURE;
236 }
237 else if ( (m_depth & ApplyN90Constituents) && m_respFactorsN90Constituents.size() < 3 ) {
238 ATH_MSG_FATAL("Vector of N90Constituents histograms may be empty. Please check your GSCFactors file: " << GSCFile);
239 return StatusCode::FAILURE;
240 }
241 else if ( (m_depth & ApplyTile0) && m_respFactorsTile0.size() < 3 ) {
242 ATH_MSG_FATAL("Vector of Tile0 histograms may be empty. Please check your GSCFactors file: " << GSCFile);
243 return StatusCode::FAILURE;
244 }
245 else if ( (m_depth & ApplycaloWIDTH) && m_respFactorscaloWIDTH.size() < 3 ) {
246 ATH_MSG_FATAL("Vector of caloWIDTH histograms may be empty. Please check your GSCFactors file: " << GSCFile);
247 return StatusCode::FAILURE;
248 }
249 else if ( (m_depth & ApplyTileGap3) && m_respFactorsTileGap3.size() < 3 ) {
250 ATH_MSG_FATAL("Vector of TileGap3 histograms may be empty. Please check your GSCFactors file: " << GSCFile);
251 return StatusCode::FAILURE;
252 }
253
254 else ATH_MSG_DEBUG("GSC Tool has been initialized with binning and eta fit factors from: " << fileName << "\n");
255 }
256 else{
258 ATH_MSG_FATAL("Vector of ChargedFraction histograms may be empty. Please check your GSCFactors file: " << GSCFile);
259 return StatusCode::FAILURE;
260 }
261 else if ( (m_depth & ApplyEM3) && m_respFactorsEM3.size() < 3 ) {
262 ATH_MSG_FATAL("Vector of EM3 histograms may be empty. Please check your GSCFactors file: " << GSCFile);
263 return StatusCode::FAILURE;
264 }
265 else if ( (m_depth & ApplyTile0) && m_respFactorsTile0.size() < 3 ) {
266 ATH_MSG_FATAL("Vector of Tile0 histograms may be empty. Please check your GSCFactors file: " << GSCFile);
267 return StatusCode::FAILURE;
268 }
269 else if ( m_nTrkwTrk_4PFlow && (m_depth & ApplynTrk) && m_respFactorsnTrk.size() < 3 ) {
270 ATH_MSG_FATAL("Vector of nTrk histograms may be empty. Please check your GSCFactors file: " << GSCFile);
271 return StatusCode::FAILURE;
272 }
273 else if ( m_nTrkwTrk_4PFlow && (m_depth & ApplytrackWIDTH) && m_respFactorstrackWIDTH.size() < 3 ) {
274 ATH_MSG_FATAL("Vector of trackWIDTH histograms may be empty. Please check your GSCFactors file: " << GSCFile);
275 return StatusCode::FAILURE;
276 }
277 else if ( (m_depth & ApplyPunchThrough) && m_respFactorsPunchThrough.size() < 2 ) {
278 ATH_MSG_FATAL("Vector of PunchThrough histograms may be empty. Please check your GSCFactors file: " << GSCFile);
279 return StatusCode::FAILURE;
280 }
281 else ATH_MSG_DEBUG("GSC Tool has been initialized with binning and eta fit factors from: " << fileName);
282 }
283 return StatusCode::SUCCESS;
284
285}
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_FATAL(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)
int outputLevel(const IMessageSvc *ims, const std::string &source)

◆ 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 287 of file GlobalSequentialCorrection.cxx.

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

◆ 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 28 of file JetCalibrationStep.h.

28{ 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 100 of file GlobalSequentialCorrection.h.

100{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 38 of file JetCalibrationStep.h.

◆ m_ghostMuSegCountAcc

SG::ConstAccessor<int> GlobalSequentialCorrection::m_ghostMuSegCountAcc {m_ghostMuSegCountName}
private

Definition at line 96 of file GlobalSequentialCorrection.h.

◆ m_ghostMuSegCountName

std::string GlobalSequentialCorrection::m_ghostMuSegCountName {"GhostMuonSegmentCount"}
private

Definition at line 95 of file GlobalSequentialCorrection.h.

95{"GhostMuonSegmentCount"};

◆ 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 39 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 40 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 102 of file GlobalSequentialCorrection.h.

102{false};

◆ m_PFlow

bool GlobalSequentialCorrection::m_PFlow {false}
private

Definition at line 99 of file GlobalSequentialCorrection.h.

99{false};

◆ m_pTResponseRequirementOff

bool GlobalSequentialCorrection::m_pTResponseRequirementOff {false}
private

Definition at line 101 of file GlobalSequentialCorrection.h.

101{false};

◆ m_punchThroughEtaBins

VecD GlobalSequentialCorrection::m_punchThroughEtaBins
private

Definition at line 91 of file GlobalSequentialCorrection.h.

◆ m_punchThroughMinNseg

int GlobalSequentialCorrection::m_punchThroughMinNseg
private

Definition at line 94 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 103 of file GlobalSequentialCorrection.h.

103{1200.}, m_turnOffEndpT{2000};

◆ m_turnOffStartingpT

double GlobalSequentialCorrection::m_turnOffStartingpT {1200.}
private

Definition at line 103 of file GlobalSequentialCorrection.h.

103{1200.}, m_turnOffEndpT{2000};

◆ m_turnOffTrackCorrections

bool GlobalSequentialCorrection::m_turnOffTrackCorrections {false}
private

Definition at line 98 of file GlobalSequentialCorrection.h.

98{false};

◆ m_useOriginVertex

bool GlobalSequentialCorrection::m_useOriginVertex {false}
private

Definition at line 104 of file GlobalSequentialCorrection.h.

104{false};

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