ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
MuonValR4::xMuonHitAnalysis::HistoSet Struct Reference
Collaboration diagram for MuonValR4::xMuonHitAnalysis::HistoSet:

Public Member Functions

 HistoSet (const Muon::IMuonIdHelperSvc *idHelperSvc, const ServiceHandle< ITHistSvc > &histSvc, const std::string &basePath, const TechIdx_t techIdx, const int stIdent)
 Helper struct to define histograms spectrometer region. More...
 

Public Attributes

int identifier {-1}
 Identifier (Either the stationIndex (Mdt/Rpc) or stationName (Tgc/Mm/sTgc)) More...
 
TH1 * h_dirTheta {nullptr}
 Local theta direction of the hit. More...
 
TH1 * h_dirPhi {nullptr}
 Local phi direction of the hit. More...
 
TH1 * h_energy {nullptr}
 Energy of the hit. More...
 
TH1 * h_deposit {nullptr}
 Energy deposit of the hit. More...
 
TH1 * h_pdgId {nullptr}
 pdgId of the hit More...
 
TH1 * h_stationPhi {nullptr}
 Station phi of the hit
More...
 
TH1 * h_stationEta {nullptr}
 Station eta of the hit. More...
 
TH1 * h_localHitPos {nullptr}
 Local position of the hit (signed radius) / pos in x-y plane. More...
 
TH1 * h_localHitZ {nullptr}
 Local z-hit position. More...
 
TH1 * h_globHitXY {nullptr}
 Global hit position (x-y) plane. More...
 
TH1 * h_globHitRZ {nullptr}
 Global hit position (r-z) plane. More...
 

Detailed Description

Definition at line 41 of file xMuonHitAnalysis.h.

Constructor & Destructor Documentation

◆ HistoSet()

MuonValR4::xMuonHitAnalysis::HistoSet::HistoSet ( const Muon::IMuonIdHelperSvc idHelperSvc,
const ServiceHandle< ITHistSvc > &  histSvc,
const std::string &  basePath,
const TechIdx_t  techIdx,
const int  stIdent 
)

Helper struct to define histograms spectrometer region.

Parameters
idHelperSvcPointer to the idHelperSvc
histSvcReference to the THistSvc piping the histograms
basePathBase path of the histogram
techIdxTechnology index of the histograms to plot
stIdentStation identifier (stationName or stIndex)

Definition at line 16 of file xMuonHitAnalysis.cxx.

20  :
21  identifier{stIdent} {
22 
23  auto registerHisto = [&](TH1* h) {
24  h->Sumw2();
25  h->StatOverflows();
26 
27  std::string stName = "Inclusive";
28  if (stIdent >= 0) {
29  switch (techIdx) {
30  case TechIdx_t::MDT:
31  case TechIdx_t::RPC: {
33  break;
34  } case TechIdx_t::TGC: {
35  stName = idHelperSvc->tgcIdHelper().stationNameString(stIdent);
36  break;
37  } case TechIdx_t::STGC: {
38  stName = idHelperSvc->stgcIdHelper().stationNameString(stIdent);
39  break;
40  } case TechIdx_t::MM: {
41  stName = idHelperSvc->mmIdHelper().stationNameString(stIdent);
42  break;
43  } default:
44  break;
45  }
46  }
47  const std::string histPath = std::format("/{}/Station_{}/{}",
48  basePath, stName, h->GetName());
49  histSvc->regHist(histPath, h).ignore();
50  return h;
51  };
52  h_dirTheta = registerHisto(new TH1F("dirTheta", "local direction; #theta [deg]", 180, 0, 180));
53  h_dirPhi = registerHisto(new TH1F("dirPhi", "local direction; #phi [deg]", 360, -180, 180));
54  h_energy = registerHisto(new TH1F("energy", "kinetic energy; e[GeV]", 150, 0, 150));
55  h_deposit = registerHisto(new TH1F("energyDeposit", "energy deposit; e[GeV]", 20, 0, 2));
56  h_pdgId = registerHisto(new TH1F("pdgId", "Particle data ID; pdgId",31, -15.5, 15.5));
57 
58  switch (techIdx) {
59  case TechIdx_t::TGC: {
60  h_stationPhi = registerHisto(new TH1F("stationPhi", "StationPhi;stationPhi",48, 0.5, 48.5));
61  h_stationEta = registerHisto(new TH1F("stationEta", "StationEta;stationEta",11, -5.5, 5.5));
62  h_localHitPos = registerHisto(new TH2F("localHitPosXY", "hit position;x [mm]; y[mm]",
63  240, -1200, 1200, 240, -1200, 1200));
64  h_localHitZ = registerHisto(new TH1F("localHitPosZ", "position in gas gap;z [mm]", 20, -5, 5));
65 
66  constexpr double r = 12. * Gaudi::Units::m;
67  constexpr double z = 14 * Gaudi::Units::m;
68  h_globHitXY = registerHisto(new TH2F("hitXY", "hitXY;x [mm]; y[mm];entries", 240, -r,r, 240,-r,r));
69  h_globHitRZ = registerHisto(new TH2F("hitRZ", "hitRz;r [mm]; z[mm];entries", 1200, 0, r, 2200,-z,z));
70  break;
71  } case TechIdx_t::RPC: {
72  h_stationPhi = registerHisto(new TH1F("stationPhi", "StationPhi;stationPhi",8, 0.5, 8.5));
73  h_stationEta = registerHisto(new TH1F("stationEta", "StationEta;stationEta",17, -8.5, 8.5));
74  h_localHitPos = registerHisto(new TH2F("localHitPosXY", "hit position;x [mm]; y[mm]",
75  70, -1400, 1400, 70, -1400, 1400));
76  h_localHitZ = registerHisto(new TH1F("localHitPosZ", "position in gas gap;z [mm]", 11, -0.5, 0.5));
77  constexpr double r = 12. * Gaudi::Units::m;
78  constexpr double z = 12 * Gaudi::Units::m;
79  h_globHitXY = registerHisto(new TH2F("hitXY", "hitXY;x [mm]; y[mm];entries", 240, -r,r, 240,-r,r));
80  h_globHitRZ = registerHisto(new TH2F("hitRZ", "hitRz;r [mm]; z[mm];entries", 1200, 0, r, 600,-z,z));
81 
82  break;
83  } case TechIdx_t::MDT: {
84  h_stationPhi = registerHisto(new TH1F("stationPhi", "StationPhi;stationPhi",8, 0.5, 8.5));
85  h_stationEta = registerHisto(new TH1F("stationEta", "StationEta;stationEta",17, -8.5, 8.5));
86  h_localHitPos = registerHisto(new TH1F("localHitPosR", "hit position;r [mm]", 61, -15, 15));
87  h_localHitZ = registerHisto(new TH1F("localHitPosZ", "position in gas gap;z [mm]", 310, -3100, 3100));
88  constexpr double r = 12. * Gaudi::Units::m;
89  constexpr double z = 22 * Gaudi::Units::m;
90  h_globHitXY = registerHisto(new TH2F("hitXY", "hitXY;x [mm]; y[mm];entries", 2400, -r,r, 2400,-r,r));
91  h_globHitRZ = registerHisto(new TH2F("hitRZ", "hitRz;r [mm]; z[mm];entries", 1200, 0, r, 2200,-z,z));
92 
93  break;
94  } case TechIdx_t::MM: {
95  h_stationPhi = registerHisto(new TH1F("stationPhi", "StationPhi;stationPhi",8, 0.5, 8.5));
96  h_stationEta = registerHisto(new TH1F("stationEta", "StationEta;stationEta",5, -2.5, 2.5));
97  h_localHitPos = registerHisto(new TH2F("localHitPosXY", "hit position;x [mm]; y[mm]",
98  480, -1200, 1200, 480, -2400, 2400));
99  h_localHitZ = registerHisto(new TH1F("localHitPosZ", "position in gas gap;z [mm]", 11, -0.5, 0.5));
100  constexpr double r = 5 * Gaudi::Units::m;
101  constexpr double z = 8. *Gaudi::Units::m;
102  h_globHitXY = registerHisto(new TH2F("hitXY", "hitXY;x [mm]; y[mm];entries", 1000, -r,r, 1000,-r,r));
103  h_globHitRZ = registerHisto(new TH2F("hitRZ", "hitRz;r [mm]; z[mm];entries", 500, 0, r, 160, -z, z));
104 
105  break;
106  } case TechIdx_t::STGC: {
107  h_stationPhi = registerHisto(new TH1F("stationPhi", "StationPhi;stationPhi",8, 0.5, 8.5));
108  h_stationEta = registerHisto(new TH1F("stationEta", "StationEta;stationEta",7, -3.5, 3.5));
109  h_localHitPos = registerHisto(new TH2F("localHitPosXY", "hit position;x [mm]; y[mm]",
110  440, -1100, 1100, 440, -1100, 1100));
111  h_localHitZ = registerHisto(new TH1F("localHitPosZ", "position in gas gap;z [mm]", 11, -0.5, 0.5));
112  constexpr double r = 5 * Gaudi::Units::m;
113  constexpr double z = 8. *Gaudi::Units::m;
114  h_globHitXY = registerHisto(new TH2F("hitXY", "hitXY;x [mm]; y[mm];entries", 1000, -r,r, 1000,-r,r));
115  h_globHitRZ = registerHisto(new TH2F("hitRZ", "hitRz;r [mm]; z[mm];entries", 500, 0, r, 160, -z, z));
116  break;
117  } default:
118  break;
119  }
120  }

Member Data Documentation

◆ h_deposit

TH1* MuonValR4::xMuonHitAnalysis::HistoSet::h_deposit {nullptr}

Energy deposit of the hit.

Definition at line 63 of file xMuonHitAnalysis.h.

◆ h_dirPhi

TH1* MuonValR4::xMuonHitAnalysis::HistoSet::h_dirPhi {nullptr}

Local phi direction of the hit.

Definition at line 59 of file xMuonHitAnalysis.h.

◆ h_dirTheta

TH1* MuonValR4::xMuonHitAnalysis::HistoSet::h_dirTheta {nullptr}

Local theta direction of the hit.

Definition at line 57 of file xMuonHitAnalysis.h.

◆ h_energy

TH1* MuonValR4::xMuonHitAnalysis::HistoSet::h_energy {nullptr}

Energy of the hit.

Definition at line 61 of file xMuonHitAnalysis.h.

◆ h_globHitRZ

TH1* MuonValR4::xMuonHitAnalysis::HistoSet::h_globHitRZ {nullptr}

Global hit position (r-z) plane.

Definition at line 77 of file xMuonHitAnalysis.h.

◆ h_globHitXY

TH1* MuonValR4::xMuonHitAnalysis::HistoSet::h_globHitXY {nullptr}

Global hit position (x-y) plane.

Definition at line 75 of file xMuonHitAnalysis.h.

◆ h_localHitPos

TH1* MuonValR4::xMuonHitAnalysis::HistoSet::h_localHitPos {nullptr}

Local position of the hit (signed radius) / pos in x-y plane.

Definition at line 71 of file xMuonHitAnalysis.h.

◆ h_localHitZ

TH1* MuonValR4::xMuonHitAnalysis::HistoSet::h_localHitZ {nullptr}

Local z-hit position.

Definition at line 73 of file xMuonHitAnalysis.h.

◆ h_pdgId

TH1* MuonValR4::xMuonHitAnalysis::HistoSet::h_pdgId {nullptr}

pdgId of the hit

Definition at line 65 of file xMuonHitAnalysis.h.

◆ h_stationEta

TH1* MuonValR4::xMuonHitAnalysis::HistoSet::h_stationEta {nullptr}

Station eta of the hit.

Definition at line 69 of file xMuonHitAnalysis.h.

◆ h_stationPhi

TH1* MuonValR4::xMuonHitAnalysis::HistoSet::h_stationPhi {nullptr}

Station phi of the hit

Definition at line 67 of file xMuonHitAnalysis.h.

◆ identifier

int MuonValR4::xMuonHitAnalysis::HistoSet::identifier {-1}

Identifier (Either the stationIndex (Mdt/Rpc) or stationName (Tgc/Mm/sTgc))

Definition at line 55 of file xMuonHitAnalysis.h.


The documentation for this struct was generated from the following files:
MuonValR4::xMuonHitAnalysis::HistoSet::h_globHitRZ
TH1 * h_globHitRZ
Global hit position (r-z) plane.
Definition: xMuonHitAnalysis.h:77
AthHistogramAlgorithm::histSvc
const ServiceHandle< ITHistSvc > & histSvc() const
The standard THistSvc (for writing histograms and TTrees and more to a root file) Returns (kind of) a...
Definition: AthHistogramAlgorithm.h:113
beamspotman.r
def r
Definition: beamspotman.py:672
Muon::IMuonIdHelperSvc::stgcIdHelper
virtual const sTgcIdHelper & stgcIdHelper() const =0
access to TgcIdHelper
vtune_athena.format
format
Definition: vtune_athena.py:14
Muon::MuonStationIndex::TechnologyIndex::RPC
@ RPC
MuonValR4::xMuonHitAnalysis::HistoSet::identifier
int identifier
Identifier (Either the stationIndex (Mdt/Rpc) or stationName (Tgc/Mm/sTgc))
Definition: xMuonHitAnalysis.h:55
Muon::MuonStationIndex::stName
const std::string & stName(StIndex index)
convert StIndex into a string
Definition: MuonStationIndex.cxx:104
MuonValR4::xMuonHitAnalysis::HistoSet::h_localHitZ
TH1 * h_localHitZ
Local z-hit position.
Definition: xMuonHitAnalysis.h:73
MuonValR4::xMuonHitAnalysis::HistoSet::h_pdgId
TH1 * h_pdgId
pdgId of the hit
Definition: xMuonHitAnalysis.h:65
Muon::IMuonIdHelperSvc::mmIdHelper
virtual const MmIdHelper & mmIdHelper() const =0
access to CscIdHelper
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
Muon::MuonStationIndex::TechnologyIndex::MDT
@ MDT
MuonValR4::xMuonHitAnalysis::HistoSet::h_stationEta
TH1 * h_stationEta
Station eta of the hit.
Definition: xMuonHitAnalysis.h:69
MuonValR4::xMuonHitAnalysis::HistoSet::h_localHitPos
TH1 * h_localHitPos
Local position of the hit (signed radius) / pos in x-y plane.
Definition: xMuonHitAnalysis.h:71
MuonValR4::xMuonHitAnalysis::HistoSet::h_dirPhi
TH1 * h_dirPhi
Local phi direction of the hit.
Definition: xMuonHitAnalysis.h:59
Muon::MuonStationIndex::TechnologyIndex::MM
@ MM
MuonValR4::xMuonHitAnalysis::HistoSet::h_energy
TH1 * h_energy
Energy of the hit.
Definition: xMuonHitAnalysis.h:61
Muon::MuonStationIndex::TechnologyIndex::TGC
@ TGC
z
#define z
h
extractSporadic.h
list h
Definition: extractSporadic.py:96
MuonValR4::xMuonHitAnalysis::HistoSet::h_deposit
TH1 * h_deposit
Energy deposit of the hit.
Definition: xMuonHitAnalysis.h:63
MuonValR4::xMuonHitAnalysis::HistoSet::h_dirTheta
TH1 * h_dirTheta
Local theta direction of the hit.
Definition: xMuonHitAnalysis.h:57
MuonIdHelper::stationNameString
const std::string & stationNameString(const int &index) const
Definition: MuonIdHelper.cxx:860
Muon::IMuonIdHelperSvc::tgcIdHelper
virtual const TgcIdHelper & tgcIdHelper() const =0
access to TgcIdHelper
Muon::MuonStationIndex::TechnologyIndex::STGC
@ STGC
MuonValR4::xMuonHitAnalysis::HistoSet::h_globHitXY
TH1 * h_globHitXY
Global hit position (x-y) plane.
Definition: xMuonHitAnalysis.h:75
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
MuonValR4::xMuonHitAnalysis::HistoSet::h_stationPhi
TH1 * h_stationPhi
Station phi of the hit
Definition: xMuonHitAnalysis.h:67
MuonValR4::xMuonHitAnalysis::StIdx_t
Muon::MuonStationIndex::StIndex StIdx_t
Definition: xMuonHitAnalysis.h:36
python.SystemOfUnits.m
float m
Definition: SystemOfUnits.py:106