ATLAS Offline Software
Loading...
Searching...
No Matches
StripClusterValidationPlots.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7namespace ActsTrk {
8
10 const std::string& sDir)
11 : PlotBase(pParent, sDir)
12 {
13 m_barrelEndcap = Book1D("barrelEndcap", "StripCluster_barrelEndcap;Barrel-Endcap;Entries;", 5, -2, 3, false);
14
15 m_layerDisk_barrel = Book1D("layerDisk_barrel", "StripCluster_layerDisk_barrel;Layer Disk;Entries;", 6, 0, 6, false);
16 m_layerDisk_endcap = Book1D("layerDisk_endcap", "StripCluster_layerDisk_endcap;Layer Disk;Entries;", 6, 0, 6, false);
17
18 m_phiModule_barrel = Book1D("phiModule_barrel", "StripCluster_phiModule_barrel;Phi Module;Entries", 75, 0, 75, false);
19 m_phiModule_endcap = Book1D("phiModule_endcap", "StripCluster_phiModule_endcap;Phi Module;Entries", 75, 0, 75, false);
20
21 m_etaModule_barrel = Book1D("etaModule_barrel", "StripCluster_etaModule_barrel;Eta Module;Entries;", 120, -60, 60, false);
22 m_etaModule_endcap = Book1D("etaModule_endcap", "StripCluster_etaModule_endcap;Eta Module;Entries;", 120, -60, 60, false);
23
24 m_sideModule_barrel = Book1D("sideModule_barrel", "StripCluster_sideModule_barrel;Side Module;Entries;", 2, 0, 2, false);
25 m_sideModule_endcap = Book1D("sideModule_endcap", "StripCluster_sideModule_endcap;Side Module;Entries;", 2, 0, 2, false);
26
27 m_eta_barrel = Book1D("eta_barrel", "StripCluster_eta_barrel;eta;Entries;", 30, -3, 3, false);
28 m_eta_endcap = Book1D("eta_endcap", "StripCluster_eta_endcap;eta;Entries;", 30, -3, 3, false);
29
30 m_perp_barrel = Book1D("perp_barrel", "StripCluster_perp_barrel;r [mm];Entries;", 100, 300, 1100, false);
31 m_perp_endcap = Book1D("perp_endcap", "StripCluster_perp_endcap;r [mm];Entries;", 100, 300, 1100, false);
32
33 m_global_x_barrel = Book1D("global_x_barrel", "StripCluster_global_x_barrel;Global x [mm];Entries;", 100, -1100, 1100, false);
34 m_global_x_endcap = Book1D("global_x_endcap", "StripCluster_global_x_endcap;Global x [mm];Entries;", 100, -1100, 1100, false);
35
36 m_global_y_barrel = Book1D("global_y_barrel", "StripCluster_global_y_barrel;Global y [mm];Entries;", 100, -1100, 1100, false);
37 m_global_y_endcap = Book1D("global_y_endcap", "StripCluster_global_y_endcap;Global y [mm];Entries;", 100, -1100, 1100, false);
38
39 m_global_z_barrel = Book1D("global_z_barrel", "StripCluster_global_z_barrel;Global z [mm];Entries;", 100, -3000, 3000, false);
40 m_global_z_endcap = Book1D("global_z_endcap", "StripCluster_global_z_endcap;Global z [mm];Entries;", 100, -3000, 3000, false);
41
42 m_local_x_barrel = Book1D("local_x_barrel", "StripCluster_local_x_barrel;Loval x [mm];Entries;", 100, -50, 50, false);
43 m_local_x_endcap = Book1D("local_x_endcap", "StripCluster_local_x_endcap;Loval x [mm];Entries;", 100, -50, 50, false);
44
45 m_localCovXX_barrel = Book1D("localCovXX_barrel", "StripCluster_localCovXX_barrel;Local Cov XX [mm2];Entries;", 100, 0, 0.5*1e-3, false);
46 m_localCovXX_endcap = Book1D("localCovXX_endcap", "StripCluster_localCovXX_endcap;Local Cov XX [mm2];Entries;", 100, 0, 0.5*1e-3, false);
47
48 m_sizeX_barrel = Book1D("sizeX_barrel", "StripCluster_sizeX_barrel;Size X;Entries;", 100, 0, 400, false);
49 m_sizeX_endcap = Book1D("sizeX_endcap", "StripCluster_sizeX_endcap;Size X;Entries;", 100, 0, 400, false);
50
51 m_global_xy_barrel = Book2D("global_xy_barrel", "StripCluster_global_xy_barrel;x [mm];y [mm];", 100, -1100, 1100, 100, -1100, 1100, false);
52 m_global_xy_endcap = Book2D("global_xy_endcap", "StripCluster_global_xy_endcap;x [mm];y [mm];", 100, -1100, 1100, 100, -1100, 1100, false);
53
54 m_global_zr_barrel = Book2D("global_zr_barrel", "StripCluster_global_zr_barrel;z [mm];r [mm];", 100, -3000, 3000, 100, 300, 1100, false);
55 m_global_zr_endcap = Book2D("global_zr_endcap", "StripCluster_global_zr_endcap;z [mm];r [mm];", 100, -3000, 3000, 100, 300, 1100, false);
56 }
57
59 float beamSpotWeight,
60 const SCT_ID* stripID)
61 {
62 const Identifier& id = stripID->wafer_id(cluster->identifierHash());
63 bool isBarrel = (stripID->barrel_ec(id) == 0);
64
65 const auto& local_position = cluster->template localPosition<1>();
66 const auto& local_covariance = cluster->template localCovariance<1>();
67 const auto& globalPos = cluster->globalPosition();
68 Amg::Vector3D globalPosition(globalPos(0, 0), globalPos(1, 0), globalPos(2, 0));
69
70 m_barrelEndcap->Fill(stripID->barrel_ec(id), beamSpotWeight);
71
72 if (isBarrel) {
73 m_layerDisk_barrel->Fill(stripID->layer_disk(id), beamSpotWeight);
74 m_phiModule_barrel->Fill(stripID->phi_module(id), beamSpotWeight);
75 m_etaModule_barrel->Fill(stripID->eta_module(id), beamSpotWeight);
76 m_sideModule_barrel->Fill(stripID->side(id), beamSpotWeight);
77
78 m_eta_barrel->Fill(globalPosition.eta(), beamSpotWeight);
79 m_perp_barrel->Fill(globalPosition.perp() , beamSpotWeight);
80
81 m_global_x_barrel->Fill(globalPos(0, 0), beamSpotWeight);
82 m_global_y_barrel->Fill(globalPos(1, 0), beamSpotWeight);
83 m_global_z_barrel->Fill(globalPos(2, 0), beamSpotWeight);
84
85 m_local_x_barrel->Fill(local_position(0, 0), beamSpotWeight);
86
87 m_localCovXX_barrel->Fill(local_covariance(0, 0), beamSpotWeight);
88
89 m_sizeX_barrel->Fill(cluster->channelsInPhi(), beamSpotWeight);
90
91 m_global_xy_barrel->Fill(globalPos(0, 0), globalPos(1, 0), beamSpotWeight);
92 m_global_zr_barrel->Fill(globalPos(2, 0), globalPosition.perp(), beamSpotWeight);
93 } else {
94 m_layerDisk_endcap->Fill(stripID->layer_disk(id), beamSpotWeight);
95 m_phiModule_endcap->Fill(stripID->phi_module(id), beamSpotWeight);
96 m_etaModule_endcap->Fill(stripID->eta_module(id), beamSpotWeight);
97 m_sideModule_endcap->Fill(stripID->side(id), beamSpotWeight);
98
99 m_eta_endcap->Fill(globalPosition.eta(), beamSpotWeight);
100 m_perp_endcap->Fill(globalPosition.perp() , beamSpotWeight);
101
102 m_global_x_endcap->Fill(globalPos(0, 0), beamSpotWeight);
103 m_global_y_endcap->Fill(globalPos(1, 0), beamSpotWeight);
104 m_global_z_endcap->Fill(globalPos(2, 0), beamSpotWeight);
105
106 m_local_x_endcap->Fill(local_position(0, 0), beamSpotWeight);
107
108 m_localCovXX_endcap->Fill(local_covariance(0, 0), beamSpotWeight);
109
110 m_sizeX_endcap->Fill(cluster->channelsInPhi(), beamSpotWeight);
111
112 m_global_xy_endcap->Fill(globalPos(0, 0), globalPos(1, 0), beamSpotWeight);
113 m_global_zr_endcap->Fill(globalPos(2, 0), globalPosition.perp(), beamSpotWeight);
114 }
115 }
116
117}
StripClusterValidationPlots(PlotBase *pParent, const std::string &sDir)
void fill(const xAOD::StripCluster *cluster, float beamSpotWeight, const SCT_ID *)
TH1D * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition PlotBase.cxx:94
PlotBase(PlotBase *parent, const std::string &sDir)
Definition PlotBase.cxx:29
TH2F * Book2D(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, bool prependDir=true)
Book a TH2F histogram.
Definition PlotBase.cxx:123
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
int layer_disk(const Identifier &id) const
Definition SCT_ID.h:687
int side(const Identifier &id) const
Definition SCT_ID.h:705
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
Definition SCT_ID.h:459
int phi_module(const Identifier &id) const
Definition SCT_ID.h:693
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition SCT_ID.h:681
int eta_module(const Identifier &id) const
Definition SCT_ID.h:699
ConstVectorMap< 3 > globalPosition() const
Returns the global position of the strip cluster.
int channelsInPhi() const
Returns the dimensions of the cluster in numbers of channels in phi (x), respectively.
DetectorIDHashType identifierHash() const
Returns the IdentifierHash of the measurement (corresponds to the detector element IdentifierHash)
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Eigen::Matrix< double, 3, 1 > Vector3D
StripCluster_v1 StripCluster
Define the version of the strip cluster class.