|
|
Go to the documentation of this file.
17 TopFolderName_(pSet.getParameter<
std::
string>(
"TopFolderName")),
18 AlignmentLabel_(pSet.getParameter<
std::
string>(
"AlignmentLabel")),
19 ndof_(pSet.getParameter<
int>(
"ndof")),
28 bsBeamWidthX(nullptr),
29 bsBeamWidthY(nullptr),
41 dxyVsPhi_pt1(nullptr),
43 dxyVsEta_pt1(nullptr),
45 dxyVsPhi_pt10(nullptr),
46 dzVsPhi_pt10(nullptr),
47 dxyVsEta_pt10(nullptr),
48 dzVsEta_pt10(nullptr) {
73 nbvtx = iBooker.
book1D(
"vtxNbr",
"Reconstructed Vertices in Event", 80, -0.5, 79.5);
74 nbgvtx = iBooker.
book1D(
"goodvtxNbr",
"Reconstructed Good Vertices in Event", 80, -0.5, 79.5);
80 nbtksinvtx[0] = iBooker.
book1D(
"otherVtxTrksNbr",
"Reconstructed Tracks in Vertex (other Vtx)", 40, -0.5, 99.5);
82 "otherVtxTrksVsZ",
"Reconstructed Tracks in Vertex (other Vtx) vs Z", 80, -20., 20., 50, 0, 100,
"");
86 score[0] = iBooker.
book1D(
"otherVtxScore",
"sqrt(score) (other Vtx)", 100, 0., 400.);
87 trksWeight[0] = iBooker.
book1D(
"otherVtxTrksWeight",
"Total weight of Tracks in Vertex (other Vtx)", 40, 0, 100.);
88 vtxchi2[0] = iBooker.
book1D(
"otherVtxChi2",
"#chi^{2} (other Vtx)", 100, 0., 200.);
89 vtxndf[0] = iBooker.
book1D(
"otherVtxNdf",
"ndof (other Vtx)", 100, 0., 200.);
90 vtxprob[0] = iBooker.
book1D(
"otherVtxProb",
"#chi^{2} probability (other Vtx)", 100, 0., 1.);
91 nans[0] = iBooker.
book1D(
"otherVtxNans",
"Illegal values for x,y,z,xx,xy,xz,yy,yz,zz (other Vtx)", 9, 0.5, 9.5);
93 nbtksinvtx[1] = iBooker.
book1D(
"tagVtxTrksNbr",
"Reconstructed Tracks in Vertex (tagged Vtx)", 100, -0.5, 99.5);
95 "tagVtxTrksVsZ",
"Reconstructed Tracks in Vertex (tagged Vtx) vs Z", 80, -20., 20., 50, 0, 100,
"");
99 score[1] = iBooker.
book1D(
"tagVtxScore",
"sqrt(score) (tagged Vtx)", 100, 0., 400.);
100 trksWeight[1] = iBooker.
book1D(
"tagVtxTrksWeight",
"Total weight of Tracks in Vertex (tagged Vtx)", 100, 0, 100.);
101 vtxchi2[1] = iBooker.
book1D(
"tagVtxChi2",
"#chi^{2} (tagged Vtx)", 100, 0., 200.);
102 vtxndf[1] = iBooker.
book1D(
"tagVtxNdf",
"ndof (tagged Vtx)", 100, 0., 200.);
103 vtxprob[1] = iBooker.
book1D(
"tagVtxProb",
"#chi^{2} probability (tagged Vtx)", 100, 0., 1.);
104 nans[1] = iBooker.
book1D(
"tagVtxNans",
"Illegal values for x,y,z,xx,xy,xz,yy,yz,zz (tagged Vtx)", 9, 0.5, 9.5);
106 xrec[0] = iBooker.
book1D(
"otherPosX",
"Position x Coordinate (other Vtx)", 100, vposx - 0.1, vposx + 0.1);
107 yrec[0] = iBooker.
book1D(
"otherPosY",
"Position y Coordinate (other Vtx)", 100, vposy - 0.1, vposy + 0.1);
108 zrec[0] = iBooker.
book1D(
"otherPosZ",
"Position z Coordinate (other Vtx)", 100, -20., 20.);
109 xDiff[0] = iBooker.
book1D(
"otherDiffX",
"X distance from BeamSpot (other Vtx)", 100, -500, 500);
110 yDiff[0] = iBooker.
book1D(
"otherDiffY",
"Y distance from BeamSpot (other Vtx)", 100, -500, 500);
111 xerr[0] = iBooker.
book1D(
"otherErrX",
"Uncertainty x Coordinate (other Vtx)", 100, 0., 100);
112 yerr[0] = iBooker.
book1D(
"otherErrY",
"Uncertainty y Coordinate (other Vtx)", 100, 0., 100);
113 zerr[0] = iBooker.
book1D(
"otherErrZ",
"Uncertainty z Coordinate (other Vtx)", 100, 0., 100);
115 "otherErrVsWeightX",
"Uncertainty x Coordinate vs. track weight (other Vtx)", 100, 0, 100., 100, 0., 100);
117 "otherErrVsWeightY",
"Uncertainty y Coordinate vs. track weight (other Vtx)", 100, 0, 100., 100, 0., 100);
119 "otherErrVsWeightZ",
"Uncertainty z Coordinate vs. track weight (other Vtx)", 100, 0, 100., 100, 0., 100);
121 xrec[1] = iBooker.
book1D(
"tagPosX",
"Position x Coordinate (tagged Vtx)", 100, vposx - 0.1, vposx + 0.1);
122 yrec[1] = iBooker.
book1D(
"tagPosY",
"Position y Coordinate (tagged Vtx)", 100, vposy - 0.1, vposy + 0.1);
123 zrec[1] = iBooker.
book1D(
"tagPosZ",
"Position z Coordinate (tagged Vtx)", 100, -20., 20.);
124 xDiff[1] = iBooker.
book1D(
"tagDiffX",
"X distance from BeamSpot (tagged Vtx)", 100, -500, 500);
125 yDiff[1] = iBooker.
book1D(
"tagDiffY",
"Y distance from BeamSpot (tagged Vtx)", 100, -500, 500);
126 xerr[1] = iBooker.
book1D(
"tagErrX",
"Uncertainty x Coordinate (tagged Vtx)", 100, 0., 100);
127 yerr[1] = iBooker.
book1D(
"tagErrY",
"Uncertainty y Coordinate (tagged Vtx)", 100, 0., 100);
128 zerr[1] = iBooker.
book1D(
"tagErrZ",
"Uncertainty z Coordinate (tagged Vtx)", 100, 0., 100);
130 "tagErrVsWeightX",
"Uncertainty x Coordinate vs. track weight (tagged Vtx)", 100, 0, 100., 100, 0., 100);
132 "tagErrVsWeightY",
"Uncertainty y Coordinate vs. track weight (tagged Vtx)", 100, 0, 100., 100, 0., 100);
134 "tagErrVsWeightZ",
"Uncertainty z Coordinate vs. track weight (tagged Vtx)", 100, 0, 100., 100, 0., 100);
136 type[0] = iBooker.
book1D(
"otherType",
"Vertex type (other Vtx)", 3, -0.5, 2.5);
137 type[1] = iBooker.
book1D(
"tagType",
"Vertex type (tagged Vtx)", 3, -0.5, 2.5);
138 for (
int i = 0;
i < 2; ++
i) {
140 type[
i]->setBinLabel(2,
"Valid, fake");
141 type[
i]->setBinLabel(3,
"Invalid");
148 bsX = iBooker.
book1D(
"bsX",
"BeamSpot x0", 100, -0.1, 0.1);
149 bsY = iBooker.
book1D(
"bsY",
"BeamSpot y0", 100, -0.1, 0.1);
150 bsZ = iBooker.
book1D(
"bsZ",
"BeamSpot z0", 100, -2., 2.);
151 bsSigmaZ = iBooker.
book1D(
"bsSigmaZ",
"BeamSpot sigmaZ", 100, 0., 10.);
152 bsDxdz = iBooker.
book1D(
"bsDxdz",
"BeamSpot dxdz", 100, -0.0003, 0.0003);
153 bsDydz = iBooker.
book1D(
"bsDydz",
"BeamSpot dydz", 100, -0.0003, 0.0003);
156 bsType = iBooker.
book1D(
"bsType",
"BeamSpot type", 4, -1.5, 2.5);
186 ntracks = iBooker.
book1D(
"ntracks",
"number of PV tracks (p_{T} > 1 GeV)", TKNoBin, TKNoMin, TKNoMax);
190 weight = iBooker.
book1D(
"weight",
"weight of PV tracks (p_{T} > 1 GeV)", 100, 0., 1.);
191 weight->setAxisTitle(
"weight of PV Tracks (p_{T} > 1 GeV) per Event", 1);
192 weight->setAxisTitle(
"Number of Event", 2);
194 sumpt = iBooker.
book1D(
"sumpt",
"#Sum p_{T} of PV tracks (p_{T} > 1 GeV)", 100, -0.5, 249.5);
195 chi2ndf = iBooker.
book1D(
"chi2ndf",
"PV tracks (p_{T} > 1 GeV) #chi^{2}/ndof", 100, 0., 20.);
196 chi2prob = iBooker.
book1D(
"chi2prob",
"PV tracks (p_{T} > 1 GeV) #chi^{2} probability", 100, 0., 1.);
200 dxyErr = iBooker.
book1D(
"dxyErr",
"PV tracks (p_{T} > 1 GeV) d_{xy} error (#mum)", 100, 0., 2000.);
202 dzErr = iBooker.
book1D(
"dzErr",
"PV tracks (p_{T} > 1 GeV) d_{z} error(#mum)", 100, 0., 10000.);
205 "PV tracks (p_{T} > 1 GeV) d_{xy} (#mum) VS track #phi",
217 "PV tracks (p_{T} > 1 GeV) d_{z} (#mum) VS track #phi",
229 "PV tracks (p_{T} > 1 GeV) d_{xy} (#mum) VS track #eta",
241 "PV tracks (p_{T} > 1 GeV) d_{z} (#mum) VS track #eta",
253 "PV tracks (p_{T} > 10 GeV) d_{xy} (#mum) VS track #phi",
265 "PV tracks (p_{T} > 10 GeV) d_{z} (#mum) VS track #phi",
277 "PV tracks (p_{T} > 10 GeV) d_{xy} (#mum) VS track #eta",
289 "PV tracks (p_{T} > 10 GeV) d_{z} (#mum) VS track #eta",
316 if (recVtxs.
isValid() ==
false || beamSpotHandle.
isValid() ==
false) {
318 <<
" Some products not available in the event: VertexCollection " <<
vertexInputTag_ <<
" " << recVtxs.
isValid()
326 for (
const auto&
v : *recVtxs) {
327 if (
v.tracksSize() > 0) {
328 const auto& ref =
v.trackRefAt(0);
329 if (ref.isNull() || !ref.isAvailable()) {
333 <<
" since likely the track collection the vertex has refs pointing to is missing (at least the first "
334 "TrackBaseRef is null or not available)";
349 for (
auto const& vx : (*recVtxs))
350 if (vx.isValid() && !vx.isFake() && vx.ndof() >=
ndof_)
354 if (scores.
isValid() && !(*scores).empty()) {
355 auto pvScore = (*scores).get(0);
357 for (
unsigned int i = 1;
i < (*scores).size(); ++
i)
362 if (!recVtxs->empty()) {
366 for (reco::VertexCollection::const_iterator
v = recVtxs->begin() + 1;
v != recVtxs->end(); ++
v)
388 if (
v.tracksSize() == 0) {
393 const math::XYZPoint myVertex(
v.position().x(),
v.position().y(),
v.position().z());
404 float pt = (**t).pt();
410 float eta = (**t).eta();
411 float phi = (**t).phi();
413 float w =
v.trackWeight(*
t);
414 float chi2NDF = (**t).normalizedChi2();
415 float chi2Prob = TMath::Prob((**t).chi2(), (
int)(**t).ndof());
416 float Dxy = (**t).dxy(myVertex) *
cmToUm;
417 float Dz = (**t).dz(myVertex) *
cmToUm;
418 float DxyErr = (**t).dxyError() *
cmToUm;
419 float DzErr = (**t).dzError() *
cmToUm;
459 if (
v.isValid() && !
v.isFake()) {
492 for (
int k = 0;
k != 3;
k++) {
493 for (
int j =
k;
j != 3;
j++) {
497 if (
j ==
k &&
v.covariance(
k,
j) < 0) {
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
const unsigned int nTracks(const reco::Vertex &sv)
MonitorElement * dxyVsPhi_pt1
constexpr bool isNotFinite(T x)
edm::InputTag vertexInputTag_
float ChiSquaredProbability(double chiSquared, double nrDOF)
MonitorElement * dxyVsEta_pt10
MonitorElement * score[2]
MonitorElement * xDiff[2]
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * trksWeight[2]
MonitorElement * ntracksVsZ[2]
MonitorElement * nbtksinvtx[2]
MonitorElement * vtxprob[2]
void vertexPlots(const reco::Vertex &v, const reco::BeamSpot &beamSpot, int i)
PrimaryVertexMonitor(const edm::ParameterSet &pSet)
MonitorElement * bsSigmaZ
MonitorElement * yerrVsTrks[2]
void pvTracksPlots(const reco::Vertex &v)
std::string TopFolderName_
#define DEFINE_FWK_MODULE(type)
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
std::string AlignmentLabel_
MonitorElement * dxyVsEta_pt1
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * dxyVsPhi_pt10
MonitorElement * dzVsPhi_pt1
XYZPointD XYZPoint
point in space with cartesian internal representation
MonitorElement * yDiff[2]
edm::InputTag beamSpotInputTag_
static const float cmToUm
MonitorElement * vtxndf[2]
MonitorElement * bsBeamWidthY
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
T getParameter(std::string const &) const
MonitorElement * zerrVsTrks[2]
MonitorElement * dzVsEta_pt1
edm::EDGetTokenT< VertexScore > scoreToken_
MonitorElement * dzVsEta_pt10
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
MonitorElement * vtxchi2[2]
~PrimaryVertexMonitor() override
edm::EDGetTokenT< reco::BeamSpot > beamspotToken_
MonitorElement * bsBeamWidthX
MonitorElement * xerrVsTrks[2]
MonitorElement * dzVsPhi_pt10
MonitorElement * chi2prob
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())