ATLAS Offline Software
Public Member Functions | Public Attributes | Protected Attributes | List of all members
egammaMonitoring::TrackHistograms Class Reference

#include <TrackHistograms.h>

Inheritance diagram for egammaMonitoring::TrackHistograms:
Collaboration diagram for egammaMonitoring::TrackHistograms:

Public Member Functions

StatusCode initializePlots ()
 
void fill (const xAOD::IParticle &track, float mu)
 
void fill (const xAOD::IParticle &track)
 
 IHistograms ()
 
 IHistograms (std::string name, std::string title, std::string folder, ITHistSvc *&rootHistSvc)
 

Public Attributes

std::map< std::string, TProfile * > profileMap
 
std::map< std::string, TH1D * > histoMap
 

Protected Attributes

std::string m_name
 
std::string m_title
 
std::string m_folder
 
ITHistSvc * m_rootHistSvc = nullptr
 

Detailed Description

Definition at line 17 of file TrackHistograms.h.

Member Function Documentation

◆ fill() [1/2]

void TrackHistograms::fill ( const xAOD::IParticle track)
virtual

Implements egammaMonitoring::IHistograms.

Definition at line 54 of file TrackHistograms.cxx.

54  {
56 }

◆ fill() [2/2]

void TrackHistograms::fill ( const xAOD::IParticle track,
float  mu 
)
virtual

Implements egammaMonitoring::IHistograms.

Definition at line 59 of file TrackHistograms.cxx.

60 {
61 
62  const xAOD::TrackParticle* tp =
63  dynamic_cast<const xAOD::TrackParticle*>(&track);
64 
65  int nTRTHits = summaryValueInt(*tp, xAOD::numberOfTRTHits);
66  int nTRTTubeHits = summaryValueInt(*tp, xAOD::numberOfTRTTubeHits);
67  float precHitFrac = (nTRTHits > 0 && nTRTTubeHits >= 0)
68  ? (1. - ((float)nTRTTubeHits) / ((float)nTRTHits))
69  : -999.;
70 
72 
73  histoMap["pT"]->Fill(tp->pt() / 1000.);
74 
75  histoMap["PrecisionHitFraction"]->Fill(precHitFrac);
76  histoMap["eProbabilityHT"]->Fill(eProbabilityHT);
77 
78  if (mu < 25.) {
79  histoMap["PrecisionHitFraction_lowmu"]->Fill(precHitFrac);
80  histoMap["eProbabilityHT_lowmu"]->Fill(eProbabilityHT);
81  }
82 
83  if (mu > 35.) {
84  histoMap["PrecisionHitFraction_highmu"]->Fill(precHitFrac);
85  histoMap["eProbabilityHT_highmu"]->Fill(eProbabilityHT);
86  }
87 
88  profileMap["PrecisionHitFractionvsmu"]->Fill(mu, precHitFrac);
89  profileMap["eProbabilityHTvsmu"]->Fill(mu, eProbabilityHT);
90 }

◆ IHistograms() [1/2]

egammaMonitoring::IHistograms::IHistograms

◆ IHistograms() [2/2]

egammaMonitoring::IHistograms::IHistograms
inline

Definition at line 23 of file IHistograms.h.

27  :
28  m_name(std::move(std::move(name))),
29  m_title(std::move(std::move(title))),
30  m_folder(std::move(std::move(folder))),
31  m_rootHistSvc(rootHistSvc) {}

◆ initializePlots()

StatusCode TrackHistograms::initializePlots ( )
virtual

Implements egammaMonitoring::IHistograms.

Definition at line 19 of file TrackHistograms.cxx.

19  {
20 
21  const char* fN = m_name.c_str();
22 
23  histoMap["pT"] = new TH1D(Form("%s_pT",fN), ";p_{T} [GeV];Tracks", 100, 0., 100.);
24 
25  histoMap["PrecisionHitFraction"] = new TH1D(Form("%s_PrecisionHitFraction",fN), ";Precision hit fraction;Tracks", 20, 0., 1.);
26  histoMap["PrecisionHitFraction_lowmu"] = new TH1D(Form("%s_PrecisionHitFraction_lowmu",fN), ";Precision hit fraction;Tracks", 20, 0., 1.);
27  histoMap["PrecisionHitFraction_highmu"] = new TH1D(Form("%s_PrecisionHitFraction_highmu",fN), ";Precision hit fraction;Tracks", 20, 0., 1.);
28 
29  histoMap["eProbabilityHT"] = new TH1D(Form("%s_eProbabilityHT",fN), ";eProbabilityHT;Tracks", 20, 0., 1.);
30  histoMap["eProbabilityHT_lowmu"] = new TH1D(Form("%s_eProbabilityHT_lowmu",fN), ";eProbabilityHT;Tracks", 20, 0., 1.);
31  histoMap["eProbabilityHT_highmu"] = new TH1D(Form("%s_eProbabilityHT_highmu",fN), ";eProbabilityHT;Tracks", 20, 0., 1.);
32 
33  profileMap["PrecisionHitFractionvsmu"] = new TProfile(Form("%s_PrecisionHitFractionvsmu",fN), ";mu;Precision hit fraction", 35, 0., 70., 0., 1.);
34  profileMap["eProbabilityHTvsmu"] = new TProfile(Form("%s_eProbabilityHTvsmu",fN), ";mu;eProbabilityHT", 35, 0., 70., 0., 1.);
35 
36  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"pT", histoMap["pT"]));
37 
38  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"PrecisionHitFraction", histoMap["PrecisionHitFraction"]));
39  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"PrecisionHitFraction_lowmu", histoMap["PrecisionHitFraction_lowmu"]));
40  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"PrecisionHitFraction_highmu", histoMap["PrecisionHitFraction_highmu"]));
41 
42  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"eProbabilityHT", histoMap["eProbabilityHT"]));
43  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"eProbabilityHT_lowmu", histoMap["eProbabilityHT_lowmu"]));
44  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"eProbabilityHT_highmu", histoMap["eProbabilityHT_highmu"]));
45 
46  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"PrecisionHitFractionvsmu", profileMap["PrecisionHitFractionvsmu"]));
47  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"eProbabilityHTvsmu", profileMap["eProbabilityHTvsmu"]));
48 
49  return StatusCode::SUCCESS;
50 
51 } // initializePlots

Member Data Documentation

◆ histoMap

std::map<std::string, TH1D*> egammaMonitoring::IHistograms::histoMap
inherited

Definition at line 39 of file IHistograms.h.

◆ m_folder

std::string egammaMonitoring::IHistograms::m_folder
protectedinherited

Definition at line 44 of file IHistograms.h.

◆ m_name

std::string egammaMonitoring::IHistograms::m_name
protectedinherited

Definition at line 42 of file IHistograms.h.

◆ m_rootHistSvc

ITHistSvc* egammaMonitoring::IHistograms::m_rootHistSvc = nullptr
protectedinherited

Definition at line 45 of file IHistograms.h.

◆ m_title

std::string egammaMonitoring::IHistograms::m_title
protectedinherited

Definition at line 43 of file IHistograms.h.

◆ profileMap

std::map<std::string, TProfile*> egammaMonitoring::TrackHistograms::profileMap

Definition at line 22 of file TrackHistograms.h.


The documentation for this class was generated from the following files:
xAOD::EgammaHelpers::summaryValueFloat
float summaryValueFloat(const xAOD::TrackParticle &tp, const xAOD::SummaryType &info, float deflt=-999.)
return the summary value for a TrackParticle or default value (-999)
Definition: EgammaxAODHelpers.cxx:168
ParticleTest.tp
tp
Definition: ParticleTest.py:25
xAOD::numberOfTRTHits
@ numberOfTRTHits
number of TRT hits [unit8_t].
Definition: TrackingPrimitives.h:275
xAOD::numberOfTRTTubeHits
@ numberOfTRTTubeHits
number of TRT tube hits [unit8_t].
Definition: TrackingPrimitives.h:283
egammaMonitoring::IHistograms::m_rootHistSvc
ITHistSvc * m_rootHistSvc
Definition: IHistograms.h:45
egammaMonitoring::TrackHistograms::fill
void fill(const xAOD::IParticle &track, float mu)
Definition: TrackHistograms.cxx:59
egammaMonitoring::IHistograms::m_folder
std::string m_folder
Definition: IHistograms.h:44
python.TrigEgammaMonitorHelper.TProfile
def TProfile(*args, **kwargs)
Definition: TrigEgammaMonitorHelper.py:81
covarianceTool.title
title
Definition: covarianceTool.py:542
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::EgammaHelpers::summaryValueInt
int summaryValueInt(const xAOD::TrackParticle &tp, const xAOD::SummaryType &info, int deflt=-999)
return the summary value for a TrackParticle or default value (-999) (to be used mostly in python whe...
Definition: EgammaxAODHelpers.cxx:161
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
egammaMonitoring::TrackHistograms::profileMap
std::map< std::string, TProfile * > profileMap
Definition: TrackHistograms.h:22
xAOD::eProbabilityHT
@ eProbabilityHT
Electron probability from High Threshold (HT) information [float].
Definition: TrackingPrimitives.h:301
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
egammaMonitoring::IHistograms::m_title
std::string m_title
Definition: IHistograms.h:43
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
readCCLHist.float
float
Definition: readCCLHist.py:83
egammaMonitoring::IHistograms::m_name
std::string m_name
Definition: IHistograms.h:42
egammaMonitoring::IHistograms::histoMap
std::map< std::string, TH1D * > histoMap
Definition: IHistograms.h:37