16constexpr int chIdxMax =
static_cast<int>(ChIdx::ChIndexMax);
23 "segmentfitChi2",
"Segment fit #chi^{2};#chi^{2};Entries", 100, 0, 200);
25 "Segment fit N_{dof};N_{dof};Entries", 100, 0, 20);
27 "segmentfitChi2oNdof",
28 "Segment fit #chi^{2}/N_{dof};Segment fit #chi^{2}/N_{dof};Entries",
31 t0 =
Book1D(
"t0",
"Segment Refit t_{0};t_{0};Entries", 100, -25, 25);
32 t0_top =
Book1D(
"t0_top",
"Segment Refit t_{0} for y>0;t_{0};Entries", 100,
34 t0_bottom =
Book1D(
"t0_bottom",
"Segment Refit t_{0} for y<0;t_{0};Entries",
36 t0err =
Book1D(
"t0err",
"Segment Refit t_{0} error;t_{0} error;Entries",
39 "Segment Refit t_{0} error for y>0;t_{0} error;Entries",
42 "t0err_bottom",
"Segment Refit t_{0} error for y<0;t_{0} error;Entries",
46 "Segment precision hits;hits;Entries", 20, 0, 20);
51 "Segment eta trigger layers;#eta trigger layers;Entries", 10, 0, 10);
53 "nPrecisionHits_nTriggerHits",
54 "Number of MDT hits vs Tigger station hits; MDT hits; Trigger hits", 20,
55 -0.5, 19.5, 20, -0.5, 19.5);
57 etaIndex =
Book1D(
"etaIndex",
"Segment #eta Index ;#eta index;Entries", 21,
59 sector =
Book1D(
"sector",
"Segment phi sector;#phi sector;Entries", 16, 0.5,
63 Book2D(
"xypos_barrel",
"Segment position x-y, barrel;x_{pos};y_{pos}",
64 150, -14000, 14000, 150, -14000, 14000);
66 Book2D(
"xypos_endcap",
"Segment position x-y, endcap;x_{pos};y_{pos}",
67 150, -14000, 14000, 150, -14000, 14000);
69 "Segment position r-z, large sectors normalized "
70 "by solid angle;z_{pos};r_{pos}",
71 100, -23000, 23000, 75, 0, 14000);
74 "Segment position r-z, small sectors normalized "
75 "by solid angle;z_{pos};r_{pos}",
76 100, -23000, 23000, 75, 0, 14000);
79 Book1D(
"etadir",
"Segment pointing direction eta;#eta_{dir};Entries",
83 "Segment pointing direction eta, barrel;#eta_{dir};Entries", 100,
87 "Segment pointing direction eta, endcap;#eta_{dir};Entries", 100,
90 Book1D(
"phidir",
"Segment pointing direction phi;#phi_{dir};Entries",
94 "Segment pointing direction phi vs eta;#eta_{dir};#phi_{dir}",
95 64, -3.2, 3.2, 64, -3.2, 3.2);
100 Book2D(
"chamberIndex_perSector",
101 "Number of Segments per Chamber, normalized by solid angle; "
102 "Sector; Chamber Index ",
105 Book2D(
"eff_chamberIndex_perSector_numerator",
106 "Number of expected hits for Segments per Chamber; Sector; "
110 Book2D(
"eff_chamberIndex_perSector_denominator",
111 "Number of recorded precision hits for Segments per Chamber; "
112 "Sector; Chamber Index ",
115 "eff_chamberIndex_perSector",
116 "precision layer hit efficiency per chamber; Sector; Chamber Index ",
121 for (
int i = 1; i <=
chamberIndex->GetXaxis()->GetNbins(); i++) {
122 const char* temp_chambername =
126 chamberIndex->GetXaxis()->SetBinLabel(i, temp_chambername);
129 i, temp_chambername);
131 i, temp_chambername);
136 Book2D(Form(
"%s_etastation", temp_chambername),
137 Form(
"Number of Segment in %s; #phi Sector; #eta Index",
139 18, -0.5, 17.5, 19, -9.5, 9.5));
141 Form(
"%s_etastation_nPrechit", temp_chambername),
142 Form(
"Number of Segment Prec hit in %s; #phi Sector; #eta Index",
144 18, -0.5, 17.5, 19, -9.5, 9.5));
146 Book2D(Form(
"%s_etastation_nTrighit", temp_chambername),
147 Form(
"Number of Segment Phi + Trigeta hit in %s; #phi "
148 "Sector; #eta Index",
150 18, -0.5, 17.5, 19, -9.5, 9.5));
152 Book2D(Form(
"eff_%s_etastation_nPrechit", temp_chambername),
153 Form(
"Segment Prec hit eff in %s; #phi Sector; #eta Index",
155 18, -0.5, 17.5, 19, -9.5, 9.5));
157 Form(
"eff_%s_etastation_nTrighit", temp_chambername),
158 Form(
"Segment Phi + Trigeta hit eff in %s; #phi Sector; #eta Index",
160 18, -0.5, 17.5, 19, -9.5, 9.5));
179 float segt0 = muSeg.
t0();
180 float segt0err = muSeg.
t0error();
182 t0->Fill(segt0, weight);
183 t0err->Fill(segt0err, weight);
185 t0_top->Fill(segt0, weight);
210 int sectorIndex = muSeg.
sector();
214 sectorIndex = -sectorIndex;
226 sectorIndex = muSeg.
sector();
247 chIndex !=
static_cast<int>(ChIdx::BEE)))
257 if (globalDir.mag() <= FLT_EPSILON || globalDir.perp() <= FLT_EPSILON) {
261 float r = globalPos.perp();
262 float z = globalPos.z();
270 float eta = globalDir.eta();
271 float phi = globalDir.phi();
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
std::vector< TH2 * > sector_etaIndex
std::vector< TH2 * > eff_sector_etaIndex_nTrighit
TH1 * segmentfitChi2oNdof
static constexpr std::array< float, 17 > Chamberarea
static constexpr std::array< float, 17 > Chamberexpectedhits
MuonSegmentPlots(PlotBase *pParent, const std::string &sDir)
std::vector< TH2 * > sector_etaIndex_nPrechit
std::vector< TH2 * > eff_sector_etaIndex_nPrechit
void fill(const xAOD::MuonSegment &muonSeg, float weight=1.0)
static constexpr std::array< float, 17 > Chamberexpectedtrighits
std::vector< TH2 * > sector_etaIndex_nTrighit
TH2 * eff_chamberIndex_perSector
TH2 * nPrecisionHits_nTriggerHits
TH2 * chamberIndex_perSector
TH2 * eff_chamberIndex_perSector_denominator
TH2 * eff_chamberIndex_perSector_numerator
TH1D * Book1D(std::string_view name, std::string_view labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
PlotBase(PlotBase *parent, std::string_view sDir)
TH2F * Book2D(std::string_view name, std::string_view labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, bool prependDir=true)
Book a TH2F histogram.
float y() const
Returns the x position.
std::uint8_t nTrigEtaLayers() const
Returns the number of trigger eta hits.
float numberDoF() const
Returns the numberDoF.
Amg::Vector3D direction() const
Returns the direction as Amg::Vector.
std::uint8_t nPrecisionHits() const
Returns the number of precision hits.
::Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index.
Amg::Vector3D position() const
Returns the position as Amg::Vector.
int etaIndex() const
Returns the eta index, which corresponds to stationEta in the offline identifiers (and the ).
float t0error() const
Returns the time error.
std::uint8_t nPhiLayers() const
Returns the number of trigger phi hits.
float z() const
Returns the y position.
double chi2(TH1 *h0, TH1 *h1)
Eigen::Matrix< double, 3, 1 > Vector3D
ChIndex chIndex(const std::string &index)
convert ChIndex name string to enum
bool isBarrel(const ChIndex index)
Returns true if the chamber index points to a barrel chamber.
const std::string & chName(ChIndex index)
convert ChIndex into a string
ChIndex
enum to classify the different chamber layers in the muon spectrometer
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
MuonStationIndex::ChIndex ChIdx
MuonSegment_v1 MuonSegment
Reference the current persistent version: