ATLAS Offline Software
PixelSpacePointValidationPlots.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 namespace ActsTrk {
9 
11  const std::string& sDir)
12  : PlotBase(pParent, sDir)
13  {
14  m_barrelEndcap = Book1D("barrelEndcap", "PixelSpacePoint_barrelEndcap;Barrel-Endcap;Entries;", 5, -2, 3, false);
15 
16  m_layerDisk_barrel = Book1D("layerDisk_barrel", "PixelSpacePoint_layerDisk_barrel;Layer Disk;Entries;", 9, 0, 9, false);
17  m_layerDisk_endcap = Book1D("layerDisk_endcap", "PixelSpacePoint_layerDisk_endcap;Layer Disk;Entries;", 9, 0, 9, false);
18 
19  m_phiModule_barrel = Book1D("phiModule_barrel", "PixelSpacePoint_phiModule_barrel;Phi Module;Entries", 56, 0, 56, false);
20  m_phiModule_endcap = Book1D("phiModule_endcap", "PixelSpacePoint_phiModule_endcap;Phi Module;Entries", 56, 0, 56, false);
21 
22  m_etaModule_barrel = Book1D("etaModule_barrel", "PixelSpacePoint_etaModule_barrel;Eta Module;Entries;", 46, -18, 28, false);
23  m_etaModule_endcap = Book1D("etaModule_endcap", "PixelSpacePoint_etaModule_endcap;Eta Module;Entries;", 46, -18, 28, false);
24 
25  m_isInnermost_barrel = Book1D("isInnermost_barrel", "PixelSpacePoint_isInnermost_barrel;In Innermost;Entries;", 2, 0, 2, false);
26  m_isInnermost_endcap = Book1D("isInnermost_endcap", "PixelSpacePoint_isInnermost_endcap;In Innermost;Entries;", 2, 0, 2, false);
27 
28  m_isNextToInnermost_barrel = Book1D("isNextToInnermost_barrel", "PixelSpacePoint_isNextToInnermost_barrel;Is Next To Innermost;Entries", 2, 0, 2, false);
29  m_isNextToInnermost_endcap = Book1D("isNextToInnermost_endcap", "PixelSpacePoint_isNextToInnermost_endcap;Is Next To Innermost;Entries", 2, 0, 2, false);
30 
31  m_eta_barrel = Book1D("eta_barrel", "PixelSpacePoint_eta_barrel;eta;Entries;", 50, -5, 5, false);
32  m_eta_endcap = Book1D("eta_endcap", "PixelSpacePoint_eta_endcap;eta;Entries;", 50, -5, 5, false);
33 
34  m_perp_barrel = Book1D("perp_barrel", "PixelSpacePoint_perp_barrel;r [mm];Entries;", 100, 0, 320, false);
35  m_perp_endcap = Book1D("perp_endcap", "PixelSpacePoint_perp_endcap;r [mm];Entries;", 100, 0, 320, false);
36 
37  m_global_x_barrel = Book1D("global_x_barrel", "PixelSpacePoint_global_x_barrel;Global x [mm];Entries;", 64, -350, 350, false);
38  m_global_x_endcap = Book1D("global_x_endcap", "PixelSpacePoint_global_x_endcap;Global x [mm];Entries;", 64, -350, 350, false);
39 
40  m_global_y_barrel = Book1D("global_y_barrel", "PixelSpacePoint_global_y_barrel;Global y [mm];Entries;", 64, -350, 350, false);
41  m_global_y_endcap = Book1D("global_y_endcap", "PixelSpacePoint_global_y_endcap;Global y [mm];Entries;", 64, -350, 350, false);
42 
43  m_global_z_barrel = Book1D("global_z_barrel", "PixelSpacePoint_global_z_barrel;Global z [mm];Entries;", 100, -3000, 3000, false);
44  m_global_z_endcap = Book1D("global_z_endcap", "PixelSpacePoint_global_z_endcap;Global z [mm];Entries;", 100, -3000, 3000, false);
45 
46  m_globalCovR_barrel = Book1D("globalCovR_barrel", "PixelSpacePoint_globalCovR_barrel;Global Cov R;Entries;", 70, 0, 140, false);
47  m_globalCovR_endcap = Book1D("globalCovR_endcap", "PixelSpacePoint_globalCovR_endcap;Global Cov R;Entries;", 70, 0, 140, false);
48 
49  m_globalCovZ_barrel = Book1D("globalCovZ_barrel", "PixelSpacePoint_globalCovZ_barrel;Global Cov Z;Entries;", 70, 0, 140, false);
50  m_globalCovZ_endcap = Book1D("globalCovZ_endcap", "PixelSpacePoint_globalCovZ_endcap;Global Cov Z;Entries;", 70, 0, 140, false);
51 
52  m_global_xy_barrel = Book2D("global_xy_barrel", "PixelSpacePoint_global_xy_barrel;x [mm];y [mm];", 64, -320, 320, 64, -350, 350, false);
53  m_global_xy_endcap = Book2D("global_xy_endcap", "PixelSpacePoint_global_xy_endcap;x [mm];y [mm];", 64, -320, 320, 64, -350, 350, false);
54 
55  m_global_zr_barrel = Book2D("global_zr_barrel", "PixelSpacePoint_global_zr_barrel;z [mm];r [mm];", 100, -3000, 3000, 100, 0, 350, false);
56  m_global_zr_endcap = Book2D("global_zr_endcap", "PixelSpacePoint_global_zr_endcap;z [mm];r [mm];", 100, -3000, 3000, 100, 0, 350, false);
57  }
58 
60  float beamSpotWeight,
61  const PixelID* pixelID)
62  {
63  const Identifier& id = pixelID->wafer_id(spacePoint->elementIdList()[0]);
64  bool isBarrel = (pixelID->barrel_ec(id) == 0);
65  int pixLayerDisk = pixelID->layer_disk(id);
66 
67  const auto& globalPos = spacePoint->globalPosition();
68  Amg::Vector3D globalPosition(globalPos(0, 0), globalPos(1, 0), globalPos(2, 0));
69 
70  m_barrelEndcap->Fill(pixelID->barrel_ec(id), beamSpotWeight);
71 
72  if (isBarrel) {
73  m_layerDisk_barrel->Fill(pixLayerDisk, beamSpotWeight);
74  m_phiModule_barrel->Fill(pixelID->phi_module(id), beamSpotWeight);
75  m_etaModule_barrel->Fill(pixelID->eta_module(id), beamSpotWeight);
76 
77  m_isInnermost_barrel->Fill(static_cast<int>(pixLayerDisk==0), beamSpotWeight);
78  m_isNextToInnermost_barrel->Fill(static_cast<int>(pixLayerDisk==1), beamSpotWeight);
79 
80  m_eta_barrel->Fill(globalPosition.eta(), beamSpotWeight);
81  m_perp_barrel->Fill(globalPosition.perp() , beamSpotWeight);
82 
83  m_global_x_barrel->Fill(globalPos(0, 0), beamSpotWeight);
84  m_global_y_barrel->Fill(globalPos(1, 0), beamSpotWeight);
85  m_global_z_barrel->Fill(globalPos(2, 0), beamSpotWeight);
86 
87  m_globalCovR_barrel->Fill(spacePoint->varianceR(), beamSpotWeight);
88  m_globalCovZ_barrel->Fill(spacePoint->varianceZ(), beamSpotWeight);
89 
90  m_global_xy_barrel->Fill(globalPos(0, 0), globalPos(1, 0), beamSpotWeight);
91  m_global_zr_barrel->Fill(globalPos(2, 0), globalPosition.perp(), beamSpotWeight);
92  } else {
93  m_layerDisk_endcap->Fill(pixLayerDisk, beamSpotWeight);
94  m_phiModule_endcap->Fill(pixelID->phi_module(id), beamSpotWeight);
95  m_etaModule_endcap->Fill(pixelID->eta_module(id), beamSpotWeight);
96 
97  m_isInnermost_endcap->Fill(static_cast<int>(pixLayerDisk==0), beamSpotWeight);
98  m_isNextToInnermost_endcap->Fill(static_cast<int>(pixLayerDisk==1), beamSpotWeight);
99 
100  m_eta_endcap->Fill(globalPosition.eta(), beamSpotWeight);
101  m_perp_endcap->Fill(globalPosition.perp() , beamSpotWeight);
102 
103  m_global_x_endcap->Fill(globalPos(0, 0), beamSpotWeight);
104  m_global_y_endcap->Fill(globalPos(1, 0), beamSpotWeight);
105  m_global_z_endcap->Fill(globalPos(2, 0), beamSpotWeight);
106 
107  m_globalCovR_endcap->Fill(spacePoint->varianceR(), beamSpotWeight);
108  m_globalCovZ_endcap->Fill(spacePoint->varianceZ(), beamSpotWeight);
109 
110  m_global_xy_endcap->Fill(globalPos(0, 0), globalPos(1, 0), beamSpotWeight);
111  m_global_zr_endcap->Fill(globalPos(2, 0), globalPosition.perp(), beamSpotWeight);
112  }
113  }
114 
115 }
ActsTrk::PixelSpacePointValidationPlots::m_globalCovZ_barrel
TH1 * m_globalCovZ_barrel
Definition: PixelSpacePointValidationPlots.h:60
TH2::Fill
int Fill(double, double)
Definition: rootspy.cxx:382
ActsTrk::PixelSpacePointValidationPlots::m_global_y_barrel
TH1 * m_global_y_barrel
Definition: PixelSpacePointValidationPlots.h:51
ActsTrk::PixelSpacePointValidationPlots::m_global_zr_barrel
TH2 * m_global_zr_barrel
Definition: PixelSpacePointValidationPlots.h:66
ActsTrk::PixelSpacePointValidationPlots::m_global_xy_barrel
TH2 * m_global_xy_barrel
Definition: PixelSpacePointValidationPlots.h:63
PlotBase::Book1D
TH1F * 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:88
PixelSpacePointValidationPlots.h
ActsTrk::PixelSpacePointValidationPlots::m_perp_endcap
TH1 * m_perp_endcap
Definition: PixelSpacePointValidationPlots.h:46
PlotBase
Definition: PlotBase.h:33
ActsTrk::PixelSpacePointValidationPlots::m_global_xy_endcap
TH2 * m_global_xy_endcap
Definition: PixelSpacePointValidationPlots.h:64
PixelID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: PixelID.h:619
ActsTrk::PixelSpacePointValidationPlots::m_etaModule_barrel
TH1 * m_etaModule_barrel
Definition: PixelSpacePointValidationPlots.h:33
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
ActsTrk::PixelSpacePointValidationPlots::m_layerDisk_endcap
TH1 * m_layerDisk_endcap
Definition: PixelSpacePointValidationPlots.h:28
ActsTrk::PixelSpacePointValidationPlots::m_isInnermost_barrel
TH1 * m_isInnermost_barrel
Definition: PixelSpacePointValidationPlots.h:36
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 TH2D histogram.
Definition: PlotBase.cxx:117
ActsTrk::PixelSpacePointValidationPlots::m_layerDisk_barrel
TH1 * m_layerDisk_barrel
Definition: PixelSpacePointValidationPlots.h:27
xAOD::SpacePoint_v1
Definition: SpacePoint_v1.h:29
ActsTrk::PixelSpacePointValidationPlots::m_phiModule_endcap
TH1 * m_phiModule_endcap
Definition: PixelSpacePointValidationPlots.h:31
xAOD::SpacePoint_v1::globalPosition
ConstVectorMap globalPosition() const
Returns the global position of the pixel cluster.
PixelID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition: PixelID.h:364
xAOD::SpacePoint_v1::elementIdList
const std::vector< DetectorIDHashType > & elementIdList() const
Returns the IdentifierHash of the spacepoint (corresponds to the detector element IdentifierHash)
GeoPrimitives.h
ActsTrk::PixelSpacePointValidationPlots::m_global_zr_endcap
TH2 * m_global_zr_endcap
Definition: PixelSpacePointValidationPlots.h:67
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
ActsTrk::PixelSpacePointValidationPlots::m_globalCovR_endcap
TH1 * m_globalCovR_endcap
Definition: PixelSpacePointValidationPlots.h:58
xAOD::SpacePoint_v1::varianceZ
float varianceZ() const
ActsTrk::PixelSpacePointValidationPlots::m_isNextToInnermost_endcap
TH1 * m_isNextToInnermost_endcap
Definition: PixelSpacePointValidationPlots.h:40
xAOD::SpacePoint_v1::varianceR
float varianceR() const
Returns the variances.
ActsTrk::PixelSpacePointValidationPlots::m_global_y_endcap
TH1 * m_global_y_endcap
Definition: PixelSpacePointValidationPlots.h:52
ActsTrk::PixelSpacePointValidationPlots::m_perp_barrel
TH1 * m_perp_barrel
Definition: PixelSpacePointValidationPlots.h:45
TH1::Fill
int Fill(double)
Definition: rootspy.cxx:285
ActsTrk::PixelSpacePointValidationPlots::fill
void fill(const xAOD::SpacePoint *spacePoint, float beamSpotWeight, const PixelID *)
Definition: PixelSpacePointValidationPlots.cxx:59
ActsTrk::PixelSpacePointValidationPlots::m_global_z_endcap
TH1 * m_global_z_endcap
Definition: PixelSpacePointValidationPlots.h:55
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
PixelID::eta_module
int eta_module(const Identifier &id) const
Definition: PixelID.h:651
ActsTrk::PixelSpacePointValidationPlots::m_eta_endcap
TH1 * m_eta_endcap
Definition: PixelSpacePointValidationPlots.h:43
ActsTrk::PixelSpacePointValidationPlots::m_eta_barrel
TH1 * m_eta_barrel
Definition: PixelSpacePointValidationPlots.h:42
ActsTrk::PixelSpacePointValidationPlots::m_global_x_barrel
TH1 * m_global_x_barrel
Definition: PixelSpacePointValidationPlots.h:48
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ActsTrk::PixelSpacePointValidationPlots::m_isInnermost_endcap
TH1 * m_isInnermost_endcap
Definition: PixelSpacePointValidationPlots.h:37
ActsTrk::PixelSpacePointValidationPlots::m_barrelEndcap
TH1 * m_barrelEndcap
Definition: PixelSpacePointValidationPlots.h:25
ActsTrk::PixelSpacePointValidationPlots::m_globalCovR_barrel
TH1 * m_globalCovR_barrel
Definition: PixelSpacePointValidationPlots.h:57
ActsTrk::PixelSpacePointValidationPlots::PixelSpacePointValidationPlots
PixelSpacePointValidationPlots(PlotBase *pParent, const std::string &sDir)
Definition: PixelSpacePointValidationPlots.cxx:10
python.LArCondContChannels.isBarrel
isBarrel
Definition: LArCondContChannels.py:659
ActsTrk::PixelSpacePointValidationPlots::m_etaModule_endcap
TH1 * m_etaModule_endcap
Definition: PixelSpacePointValidationPlots.h:34
ActsTrk::PixelSpacePointValidationPlots::m_isNextToInnermost_barrel
TH1 * m_isNextToInnermost_barrel
Definition: PixelSpacePointValidationPlots.h:39
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:34
ActsTrk::PixelSpacePointValidationPlots::m_global_z_barrel
TH1 * m_global_z_barrel
Definition: PixelSpacePointValidationPlots.h:54
PixelID::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:644
PixelID
Definition: PixelID.h:67
ActsTrk::PixelSpacePointValidationPlots::m_global_x_endcap
TH1 * m_global_x_endcap
Definition: PixelSpacePointValidationPlots.h:49
ActsTrk::PixelSpacePointValidationPlots::m_globalCovZ_endcap
TH1 * m_globalCovZ_endcap
Definition: PixelSpacePointValidationPlots.h:61
ActsTrk::PixelSpacePointValidationPlots::m_phiModule_barrel
TH1 * m_phiModule_barrel
Definition: PixelSpacePointValidationPlots.h:30