ATLAS Offline Software
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 
7 namespace 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 }
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
xAOD::UncalibratedMeasurement_v1::identifierHash
DetectorIDHashType identifierHash() const
Returns the IdentifierHash of the measurement (corresponds to the detector element IdentifierHash)
ActsTrk::StripClusterValidationPlots::StripClusterValidationPlots
StripClusterValidationPlots(PlotBase *pParent, const std::string &sDir)
Definition: StripClusterValidationPlots.cxx:9
ActsTrk::StripClusterValidationPlots::m_sizeX_barrel
TH1 * m_sizeX_barrel
Definition: StripClusterValidationPlots.h:60
ActsTrk::StripClusterValidationPlots::m_eta_barrel
TH1 * m_eta_barrel
Definition: StripClusterValidationPlots.h:39
PlotBase
Definition: PlotBase.h:34
xAOD::StripCluster_v1::channelsInPhi
int channelsInPhi() const
Returns the dimensions of the cluster in numbers of channels in phi (x), respectively.
ActsTrk::StripClusterValidationPlots::m_perp_endcap
TH1 * m_perp_endcap
Definition: StripClusterValidationPlots.h:43
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
ActsTrk::StripClusterValidationPlots::m_global_zr_barrel
TH2 * m_global_zr_barrel
Definition: StripClusterValidationPlots.h:66
ActsTrk::StripClusterValidationPlots::m_localCovXX_barrel
TH1 * m_localCovXX_barrel
Definition: StripClusterValidationPlots.h:57
ActsTrk::StripClusterValidationPlots::m_global_xy_barrel
TH2 * m_global_xy_barrel
Definition: StripClusterValidationPlots.h:63
PlotBase::Book2D
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
ActsTrk::StripClusterValidationPlots::m_perp_barrel
TH1 * m_perp_barrel
Definition: StripClusterValidationPlots.h:42
ActsTrk::StripClusterValidationPlots::m_global_y_barrel
TH1 * m_global_y_barrel
Definition: StripClusterValidationPlots.h:48
SCT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: SCT_ID.h:728
SCT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: SCT_ID.h:740
ActsTrk::StripClusterValidationPlots::m_etaModule_barrel
TH1 * m_etaModule_barrel
Definition: StripClusterValidationPlots.h:33
ActsTrk::StripClusterValidationPlots::m_global_xy_endcap
TH2 * m_global_xy_endcap
Definition: StripClusterValidationPlots.h:64
ActsTrk::StripClusterValidationPlots::m_phiModule_barrel
TH1 * m_phiModule_barrel
Definition: StripClusterValidationPlots.h:30
ActsTrk::StripClusterValidationPlots::m_global_x_endcap
TH1 * m_global_x_endcap
Definition: StripClusterValidationPlots.h:46
PlotBase::Book1D
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
ActsTrk::StripClusterValidationPlots::m_barrelEndcap
TH1 * m_barrelEndcap
Definition: StripClusterValidationPlots.h:25
ActsTrk::StripClusterValidationPlots::m_etaModule_endcap
TH1 * m_etaModule_endcap
Definition: StripClusterValidationPlots.h:34
ActsTrk::StripClusterValidationPlots::m_layerDisk_barrel
TH1 * m_layerDisk_barrel
Definition: StripClusterValidationPlots.h:27
ActsTrk::StripClusterValidationPlots::m_layerDisk_endcap
TH1 * m_layerDisk_endcap
Definition: StripClusterValidationPlots.h:28
ActsTrk::StripClusterValidationPlots::m_eta_endcap
TH1 * m_eta_endcap
Definition: StripClusterValidationPlots.h:40
xAOD::StripCluster_v1
Definition: StripCluster_v1.h:17
ActsTrk::StripClusterValidationPlots::m_sideModule_barrel
TH1 * m_sideModule_barrel
Definition: StripClusterValidationPlots.h:36
ActsTrk::StripClusterValidationPlots::m_global_z_barrel
TH1 * m_global_z_barrel
Definition: StripClusterValidationPlots.h:51
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ActsTrk::StripClusterValidationPlots::m_global_z_endcap
TH1 * m_global_z_endcap
Definition: StripClusterValidationPlots.h:52
ActsTrk::StripClusterValidationPlots::m_phiModule_endcap
TH1 * m_phiModule_endcap
Definition: StripClusterValidationPlots.h:31
ActsTrk::StripClusterValidationPlots::m_global_y_endcap
TH1 * m_global_y_endcap
Definition: StripClusterValidationPlots.h:49
ActsTrk::StripClusterValidationPlots::m_local_x_endcap
TH1 * m_local_x_endcap
Definition: StripClusterValidationPlots.h:55
SCT_ID
Definition: SCT_ID.h:68
ActsTrk::StripClusterValidationPlots::m_sizeX_endcap
TH1 * m_sizeX_endcap
Definition: StripClusterValidationPlots.h:61
ActsTrk::StripClusterValidationPlots::m_sideModule_endcap
TH1 * m_sideModule_endcap
Definition: StripClusterValidationPlots.h:37
SCT_ID::eta_module
int eta_module(const Identifier &id) const
Definition: SCT_ID.h:746
ActsTrk::StripClusterValidationPlots::fill
void fill(const xAOD::StripCluster *cluster, float beamSpotWeight, const SCT_ID *)
Definition: StripClusterValidationPlots.cxx:58
xAOD::StripCluster_v1::globalPosition
ConstVectorMap< 3 > globalPosition() const
Returns the global position of the strip cluster.
Definition: StripCluster_v1.cxx:15
python.LArCondContChannels.isBarrel
isBarrel
Definition: LArCondContChannels.py:659
StripClusterValidationPlots.h
SCT_ID::side
int side(const Identifier &id) const
Definition: SCT_ID.h:752
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:49
ActsTrk::StripClusterValidationPlots::m_global_x_barrel
TH1 * m_global_x_barrel
Definition: StripClusterValidationPlots.h:45
SCT_ID::wafer_id
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:464
ActsTrk::StripClusterValidationPlots::m_local_x_barrel
TH1 * m_local_x_barrel
Definition: StripClusterValidationPlots.h:54
ActsTrk::StripClusterValidationPlots::m_localCovXX_endcap
TH1 * m_localCovXX_endcap
Definition: StripClusterValidationPlots.h:58
ActsTrk::StripClusterValidationPlots::m_global_zr_endcap
TH2 * m_global_zr_endcap
Definition: StripClusterValidationPlots.h:67
Identifier
Definition: IdentifierFieldParser.cxx:14