18 , TopFolderName_ ( pSet.getParameter<std::
string>(
"TopFolderName") )
19 , AlignmentLabel_( pSet.getParameter<std::
string>(
"AlignmentLabel"))
77 nbvtx = iBooker.
book1D(
"vtxNbr",
"Reconstructed Vertices in Event",50,-0.5,49.5);
78 nbgvtx = iBooker.
book1D(
"goodvtxNbr",
"Reconstructed Good Vertices in Event",50,-0.5,49.5);
84 nbtksinvtx[0] = iBooker.
book1D(
"otherVtxTrksNbr",
"Reconstructed Tracks in Vertex (other Vtx)",40,-0.5,99.5);
85 ntracksVsZ[0] = iBooker.
bookProfile(
"otherVtxTrksVsZ",
"Reconstructed Tracks in Vertex (other Vtx) vs Z",80,-20.,20.,50,0,100,
"");
89 trksWeight[0] = iBooker.
book1D(
"otherVtxTrksWeight",
"Total weight of Tracks in Vertex (other Vtx)",40,0,100.);
90 vtxchi2[0] = iBooker.
book1D(
"otherVtxChi2",
"#chi^{2} (other Vtx)",100,0.,200.);
91 vtxndf[0] = iBooker.
book1D(
"otherVtxNdf",
"ndof (other Vtx)",100,0.,200.);
92 vtxprob[0] = iBooker.
book1D(
"otherVtxProb",
"#chi^{2} probability (other Vtx)",100,0.,1.);
93 nans[0] = iBooker.
book1D(
"otherVtxNans",
"Illegal values for x,y,z,xx,xy,xz,yy,yz,zz (other Vtx)",9,0.5,9.5);
95 nbtksinvtx[1] = iBooker.
book1D(
"tagVtxTrksNbr",
"Reconstructed Tracks in Vertex (tagged Vtx)",100,-0.5,99.5);
96 ntracksVsZ[1] = iBooker.
bookProfile(
"tagVtxTrksVsZ",
"Reconstructed Tracks in Vertex (tagged Vtx) vs Z",80,-20.,20.,50,0,100,
"");
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);
114 xerrVsTrks[0] = iBooker.
book2D(
"otherErrVsWeightX",
"Uncertainty x Coordinate vs. track weight (other Vtx)",100,0,100.,100,0.,100);
115 yerrVsTrks[0] = iBooker.
book2D(
"otherErrVsWeightY",
"Uncertainty y Coordinate vs. track weight (other Vtx)",100,0,100.,100,0.,100);
116 zerrVsTrks[0] = iBooker.
book2D(
"otherErrVsWeightZ",
"Uncertainty z Coordinate vs. track weight (other Vtx)",100,0,100.,100,0.,100);
119 xrec[1] = iBooker.
book1D(
"tagPosX",
"Position x Coordinate (tagged Vtx)",100,vposx-0.1,vposx+0.1);
120 yrec[1] = iBooker.
book1D(
"tagPosY",
"Position y Coordinate (tagged Vtx)",100,vposx-0.1,vposy+0.1);
121 zrec[1] = iBooker.
book1D(
"tagPosZ",
"Position z Coordinate (tagged Vtx)",100,-20.,20.);
122 xDiff[1] = iBooker.
book1D(
"tagDiffX",
"X distance from BeamSpot (tagged Vtx)",100,-500, 500);
123 yDiff[1] = iBooker.
book1D(
"tagDiffY",
"Y distance from BeamSpot (tagged Vtx)",100,-500, 500);
124 xerr[1] = iBooker.
book1D(
"tagErrX",
"Uncertainty x Coordinate (tagged Vtx)",100,0.,100);
125 yerr[1] = iBooker.
book1D(
"tagErrY",
"Uncertainty y Coordinate (tagged Vtx)",100,0.,100);
126 zerr[1] = iBooker.
book1D(
"tagErrZ",
"Uncertainty z Coordinate (tagged Vtx)",100,0.,100);
127 xerrVsTrks[1] = iBooker.
book2D(
"tagErrVsWeightX",
"Uncertainty x Coordinate vs. track weight (tagged Vtx)",100,0,100.,100,0.,100);
128 yerrVsTrks[1] = iBooker.
book2D(
"tagErrVsWeightY",
"Uncertainty y Coordinate vs. track weight (tagged Vtx)",100,0,100.,100,0.,100);
129 zerrVsTrks[1] = iBooker.
book2D(
"tagErrVsWeightZ",
"Uncertainty z Coordinate vs. track weight (tagged Vtx)",100,0,100.,100,0.,100);
131 type[0] = iBooker.
book1D(
"otherType",
"Vertex type (other Vtx)",3,-0.5,2.5);
132 type[1] = iBooker.
book1D(
"tagType",
"Vertex type (tagged Vtx)",3,-0.5,2.5);
133 for (
int i=0;
i<2;++
i){
134 type[
i]->
getTH1F()->GetXaxis()->SetBinLabel(1,
"Valid, real");
135 type[
i]->getTH1F()->GetXaxis()->SetBinLabel(2,
"Valid, fake");
136 type[
i]->getTH1F()->GetXaxis()->SetBinLabel(3,
"Invalid");
144 bsX = iBooker.
book1D(
"bsX",
"BeamSpot x0", 100,-0.1,0.1);
145 bsY = iBooker.
book1D(
"bsY",
"BeamSpot y0", 100,-0.1,0.1);
146 bsZ = iBooker.
book1D(
"bsZ",
"BeamSpot z0", 100,-2.,2.);
147 bsSigmaZ = iBooker.
book1D(
"bsSigmaZ",
"BeamSpot sigmaZ", 100, 0., 10. );
148 bsDxdz = iBooker.
book1D(
"bsDxdz",
"BeamSpot dxdz", 100, -0.0003, 0.0003);
149 bsDydz = iBooker.
book1D(
"bsDydz",
"BeamSpot dydz", 100, -0.0003, 0.0003);
152 bsType = iBooker.
book1D(
"bsType",
"BeamSpot type", 4, -1.5, 2.5);
184 ntracks = iBooker.
book1D(
"ntracks",
"number of PV tracks (p_{T} > 1 GeV)", TKNoBin, TKNoMin, TKNoMax);
185 ntracks->
setAxisTitle(
"Number of PV Tracks (p_{T} > 1 GeV) per Event", 1);
186 ntracks->setAxisTitle(
"Number of Event", 2);
188 weight = iBooker.
book1D(
"weight",
"weight of PV tracks (p_{T} > 1 GeV)", 100, 0., 1.);
192 sumpt = iBooker.
book1D(
"sumpt",
"#Sum p_{T} of PV tracks (p_{T} > 1 GeV)", 100,-0.5,249.5);
193 chi2ndf = iBooker.
book1D(
"chi2ndf",
"PV tracks (p_{T} > 1 GeV) #chi^{2}/ndof", 100, 0., 20. );
194 chi2prob = iBooker.
book1D(
"chi2prob",
"PV tracks (p_{T} > 1 GeV) #chi^{2} probability",100, 0., 1. );
195 dxy = iBooker.
book1D(
"dxy",
"PV tracks (p_{T} > 1 GeV) d_{xy} (cm)", DxyBin, DxyMin, DxyMax);
196 dxy2 = iBooker.
book1D(
"dxyzoom",
"PV tracks (p_{T} > 1 GeV) d_{xy} (cm)", DxyBin, DxyMin/5., DxyMax/5.);
197 dz = iBooker.
book1D(
"dz",
"PV tracks (p_{T} > 1 GeV) d_{z} (cm)", DzBin, DzMin, DzMax );
198 dxyErr = iBooker.
book1D(
"dxyErr",
"PV tracks (p_{T} > 1 GeV) d_{xy} error (cm)", 100, 0., 0.2 );
199 dzErr = iBooker.
book1D(
"dzErr",
"PV tracks (p_{T} > 1 GeV) d_{z} error(cm)", 100, 0., 1. );
201 dxyVsPhi_pt1 = iBooker.
bookProfile(
"dxyVsPhi_pt1",
"PV tracks (p_{T} > 1 GeV) d_{xy} (cm) VS track #phi",PhiBin, PhiMin, PhiMax, DxyBin, DxyMin, DxyMax,
"");
204 dzVsPhi_pt1 = iBooker.
bookProfile(
"dzVsPhi_pt1",
"PV tracks (p_{T} > 1 GeV) d_{z} (cm) VS track #phi", PhiBin, PhiMin, PhiMax, DzBin, DzMin, DzMax,
"");
208 dxyVsEta_pt1 = iBooker.
bookProfile(
"dxyVsEta_pt1",
"PV tracks (p_{T} > 1 GeV) d_{xy} (cm) VS track #eta",EtaBin, EtaMin, EtaMax, DxyBin, DxyMin, DxyMax,
"");
211 dzVsEta_pt1 = iBooker.
bookProfile(
"dzVsEta_pt1",
"PV tracks (p_{T} > 1 GeV) d_{z} (cm) VS track #eta", EtaBin, EtaMin, EtaMax, DzBin, DzMin, DzMax,
"");
215 dxyVsPhi_pt10 = iBooker.
bookProfile(
"dxyVsPhi_pt10",
"PV tracks (p_{T} > 1 GeV) d_{xy} (cm) VS track #phi",PhiBin, PhiMin, PhiMax, DxyBin, DxyMin, DxyMax,
"");
218 dzVsPhi_pt10 = iBooker.
bookProfile(
"dzVsPhi_pt10",
"PV tracks (p_{T} > 10 GeV) d_{z} (cm) VS track #phi", PhiBin, PhiMin, PhiMax, DzBin, DzMin, DzMax,
"");
222 dxyVsEta_pt10 = iBooker.
bookProfile(
"dxyVsEta_pt10",
"PV tracks (p_{T} > 10 GeV) d_{xy} (cm) VS track #eta",EtaBin, EtaMin, EtaMax, DxyBin, DxyMin, DxyMax,
"");
225 dzVsEta_pt10 = iBooker.
bookProfile(
"dzVsEta_pt10",
"PV tracks (p_{T} > 10 GeV) d_{z} (cm) VS track #eta", EtaBin, EtaMin, EtaMax, DzBin, DzMin, DzMax,
"");
246 if (recVtxs.
isValid() ==
false || beamSpotHandle.
isValid()==
false){
248 <<
" Some products not available in the event: VertexCollection "
250 <<recVtxs.
isValid() <<
" BeamSpot "
252 <<beamSpotHandle.
isValid()<<
". Skipping plots for this event";
260 for (
auto const & vx : (*recVtxs) )
261 if (vx.isValid() && !vx.isFake() && vx.ndof()>=4.) ++ng;
269 for(reco::VertexCollection::const_iterator
v=recVtxs->begin()+1;
270 v!=recVtxs->end(); ++
v){
305 if ( !isHighPurity )
continue;
307 float pt = (**t).pt();
308 if ( pt < 1. )
continue;
312 float eta = (**t).eta();
313 float phi = (**t).phi();
316 float chi2NDF = (**t).normalizedChi2();
317 float chi2Prob = TMath::Prob((**t).chi2(),(int)(**t).ndof());
318 float Dxy = (**t).dxy(myVertex);
319 float Dz = (**t).dz(myVertex);
320 float DxyErr = (**t).dxyError();
321 float DzErr = (**t).dzError();
341 if ( pt < 10. )
continue;
355 if (i < 0 || i > 1)
return;
358 else type[
i]->Fill(0.);
376 float xb = beamSpot.
x0() + beamSpot.
dxdz() * (v.
position().z() - beamSpot.
z0());
377 float yb = beamSpot.
y0() + beamSpot.
dydz() * (v.
position().z() - beamSpot.
z0());
393 for (
int k = 0;
k != 3;
k++) {
394 for (
int j =
k;
j != 3;
j++) {
std::string AlignmentLabel_
MonitorElement * xerrVsTrks[2]
T getParameter(std::string const &) const
double z0() const
z coordinate
const unsigned int nTracks(const reco::Vertex &sv)
MonitorElement * vtxndf[2]
MonitorElement * dxyVsEta_pt1
MonitorElement * dzVsPhi_pt10
MonitorElement * dzVsPhi_pt1
void pvTracksPlots(const reco::Vertex &v)
trackRef_iterator tracks_end() const
last iterator over tracks
MonitorElement * bookProfile(Args &&...args)
void vertexPlots(const reco::Vertex &v, const reco::BeamSpot &beamSpot, int i)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double zError() const
error on z
#define DEFINE_FWK_MODULE(type)
MonitorElement * bsSigmaZ
edm::InputTag beamSpotInputTag_
bool isValid() const
Tells whether the vertex is valid.
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
MonitorElement * dxyVsPhi_pt10
MonitorElement * xDiff[2]
const Point & position() const
position
MonitorElement * dzVsEta_pt1
MonitorElement * ntracksVsZ[2]
MonitorElement * zerrVsTrks[2]
double dydz() const
dydz slope
MonitorElement * yerrVsTrks[2]
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * dxyVsEta_pt10
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * book1D(Args &&...args)
double chi2() const
chi-squares
float ChiSquaredProbability(double chiSquared, double nrDOF)
double BeamWidthX() const
beam width X
const double EtaMin[kNumberCalorimeter]
float trackWeight(const TREF &r) const
returns the weight with which a Track has contributed to the vertex-fit.
MonitorElement * vtxchi2[2]
edm::EDGetTokenT< reco::BeamSpot > beamspotToken_
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
double dxdz() const
dxdz slope
MonitorElement * dzVsEta_pt10
edm::InputTag vertexInputTag_
std::string TopFolderName_
double xError() const
error on x
void setCurrentFolder(const std::string &fullpath)
MonitorElement * chi2prob
MonitorElement * book2D(Args &&...args)
XYZPointD XYZPoint
point in space with cartesian internal representation
MonitorElement * nbtksinvtx[2]
double sigmaZ() const
sigma z
TH1F * getTH1F(void) const
double BeamWidthY() const
beam width Y
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
double y0() const
y coordinate
MonitorElement * vtxprob[2]
trackRef_iterator tracks_begin() const
first iterator over tracks
MonitorElement * bsBeamWidthY
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * yDiff[2]
double yError() const
error on y
MonitorElement * trksWeight[2]
size_t tracksSize() const
number of tracks
PrimaryVertexMonitor(const edm::ParameterSet &pSet)
MonitorElement * bsBeamWidthX
MonitorElement * dxyVsPhi_pt1
double x0() const
x coordinate