25 #include <boost/range/adaptor/indexed.hpp>
74 compressionSettings_(iConfig.getUntrackedParameter<
int>(
"compressionSettings", -1)),
75 storeNtuple_(iConfig.getParameter<
bool>(
"storeNtuple")),
76 lightNtupleSwitch_(iConfig.getParameter<
bool>(
"isLightNtuple")),
77 useTracksFromRecoVtx_(iConfig.getParameter<
bool>(
"useTracksFromRecoVtx")),
78 vertexZMax_(iConfig.getUntrackedParameter<double>(
"vertexZMax", 99.)),
79 intLumi_(iConfig.getUntrackedParameter<double>(
"intLumi", 0.)),
80 askFirstLayerHit_(iConfig.getParameter<
bool>(
"askFirstLayerHit")),
81 doBPix_(iConfig.getUntrackedParameter<
bool>(
"doBPix",
true)),
82 doFPix_(iConfig.getUntrackedParameter<
bool>(
"doFPix",
true)),
83 ptOfProbe_(iConfig.getUntrackedParameter<double>(
"probePt", 0.)),
84 pOfProbe_(iConfig.getUntrackedParameter<double>(
"probeP", 0.)),
85 etaOfProbe_(iConfig.getUntrackedParameter<double>(
"probeEta", 2.4)),
86 nHitsOfProbe_(iConfig.getUntrackedParameter<double>(
"probeNHits", 0.)),
87 nBins_(iConfig.getUntrackedParameter<
int>(
"numberOfBins", 24)),
88 minPt_(iConfig.getUntrackedParameter<double>(
"minPt", 1.)),
89 maxPt_(iConfig.getUntrackedParameter<double>(
"maxPt", 20.)),
90 debug_(iConfig.getParameter<
bool>(
"Debug")),
91 runControl_(iConfig.getUntrackedParameter<
bool>(
"runControl",
false)),
92 forceBeamSpotContraint_(iConfig.getUntrackedParameter<
bool>(
"forceBeamSpot",
false)) {
98 std::vector<unsigned int> defaultRuns;
99 defaultRuns.push_back(0);
117 if (clusteringAlgorithm ==
"gap") {
121 }
else if (clusteringAlgorithm ==
"DA") {
126 }
else if (clusteringAlgorithm ==
"DA_vect") {
131 throw VertexException(
"PrimaryVertexProducerAlgorithm: unknown clustering algorithm: " + clusteringAlgorithm);
144 auto plot_index = static_cast<PVValHelper::plotVariable>(
i);
145 auto res_index = static_cast<PVValHelper::residualType>(
j);
162 edm::LogVerbatim(
"PrimaryVertexValidation") <<
"######################################";
167 << std::setw(5) << it.second.second <<
") |" << std::endl;
194 toOutput += std::to_string(ptbin);
198 edm::LogVerbatim(
"PrimaryVertexValidation") <<
"######################################\n";
199 edm::LogVerbatim(
"PrimaryVertexValidation") <<
"The pT binning is: [" << toOutput <<
"] \n";
215 using namespace reco;
220 <<
"*********************************************************************************\n"
221 <<
"* The configuration (ptOfProbe > " <<
ptOfProbe_
222 <<
"GeV) is not correctly set for current value of magnetic field \n"
223 <<
"* Switching it to 0. !!! \n"
224 <<
"*********************************************************************************" << std::endl;
232 bool passesRunControl =
false;
236 if (
iEvent.eventAuxiliary().run() == runControlNumber) {
239 <<
" run number: " <<
iEvent.eventAuxiliary().run() <<
" keeping run:" << runControlNumber;
241 passesRunControl =
true;
245 if (!passesRunControl)
275 edm::LogInfo(
"tracker geometry read") <<
"There are: " << pDD->
dets().size() <<
" detectors";
298 <<
" pixel phase2 setup, nLadders: " <<
nLadders_ <<
" nModules:" <<
nModZ_;
333 <<
" pixel phase1 setup, nLadders: " <<
nLadders_ <<
" nModules:" <<
nModZ_;
354 <<
" pixel phase0 setup, nLadders: " <<
nLadders_ <<
" nModules:" <<
nModZ_;
387 double fBfield_ = ((*theB_).field()->inTesla(
GlobalPoint(0., 0., 0.))).
z();
395 if (!trackCollectionHandle.
isValid())
397 auto const&
tracks = *trackCollectionHandle;
416 LogTrace(
"PrimaryVertexValidation") <<
"caught std::exception " << er.
what() << std::endl;
419 std::vector<Vertex> vsorted = *(
vertices);
450 unsigned int vertexCollectionSize = vsorted.size();
453 for (
unsigned int i = 0;
i < vertexCollectionSize;
i++) {
466 double chi2prob = 0.;
468 if (!vsorted.at(0).isFake()) {
472 chi2ndf =
pv.normalizedChi2();
473 chi2prob = TMath::Prob(
pv.chi2(), (
int)
pv.ndof());
480 double pt = (**itrk).pt();
485 double dxyRes = (**itrk).dxy(myVertex);
486 double dzRes = (**itrk).dz(myVertex);
488 double dxy_err = (**itrk).dxyError();
489 double dz_err = (**itrk).dzError();
491 float trackphi = ((**itrk).phi()) * (180 /
M_PI);
492 float tracketa = (**itrk).eta();
501 if (tracketa >= etaF && tracketa < etaL) {
508 if (trackphi >= phiF && trackphi < phiL) {
518 if (tracketa >= etaJ && tracketa < etaK) {
542 if (beamSpotHandle.
isValid()) {
579 const time_t start_time = times.first / 1000000;
581 <<
RunNumber_ <<
" has start time: " << times.first <<
" - " << times.second << std::endl;
583 <<
"human readable time: " << std::asctime(std::gmtime(&start_time)) << std::endl;
597 edm::LogInfo(
"PrimaryVertexValidation") <<
" looping over " << trackCollectionHandle->size() <<
"tracks";
599 h_nTracks->Fill(trackCollectionHandle->size());
605 std::vector<TransientTrack> t_tks;
613 edm::LogInfo(
"PrimaryVertexValidation") <<
"Found: " << t_tks.size() <<
" reconstructed tracks";
630 <<
" looping over: " <<
clusters.size() <<
" clusters from " << t_tks.size() <<
" selected tracks";
639 for (
const auto& iclus :
clusters) {
643 for (
const auto& theTTrack : iclus) {
652 const Track& theTrack = theTTrack.track();
686 int nhitinTIB =
hits.numberOfValidStripTIBHits();
687 int nhitinTOB =
hits.numberOfValidStripTOBHits();
688 int nhitinTID =
hits.numberOfValidStripTIDHits();
689 int nhitinTEC =
hits.numberOfValidStripTECHits();
690 int nhitinBPIX =
hits.numberOfValidPixelBarrelHits();
691 int nhitinFPIX =
hits.numberOfValidPixelEndcapHits();
693 if ((*iHit)->isValid()) {
727 vector<TransientTrack> theFinalTracks;
728 theFinalTracks.clear();
730 for (
const auto& tk : iclus) {
736 theFinalTracks.push_back(tk);
741 if (theFinalTracks.size() > 1) {
743 edm::LogInfo(
"PrimaryVertexValidation") <<
"Transient Track Collection size: " << theFinalTracks.size();
750 theFittedVertex = theFitter->vertex(theFinalTracks,
beamSpot);
752 theFittedVertex = theFitter->vertex(theFinalTracks);
755 double totalTrackWeights = 0;
756 if (theFittedVertex.isValid()) {
757 if (theFittedVertex.hasTrackWeight()) {
758 for (
const auto& theFinalTrack : theFinalTracks) {
760 totalTrackWeights += theFittedVertex.trackWeight(theFinalTrack);
769 theFittedVertex.position().x(), theFittedVertex.position().y(), theFittedVertex.position().z());
783 TMath::Prob(theFittedVertex.totalChiSquared(), (
int)theFittedVertex.degreesOfFreedom());
791 TMath::Prob(theFittedVertex.totalChiSquared(), (
int)theFittedVertex.degreesOfFreedom()));
794 double dxyFromMyVertex = theTrack.
dxy(myVertex);
795 double dzFromMyVertex = theTrack.
dz(myVertex);
798 theFittedVertex.position().x(), theFittedVertex.position().y(), theFittedVertex.position().z());
804 double dz_err =
sqrt(
std::pow(theTrack.
dzError(), 2) + theFittedVertex.positionError().czz());
808 theTTrack,
GlobalVector(theTrack.
px(), theTrack.
py(), theTrack.
pz()), theFittedVertex);
810 double s_ip2dpv_corr = s_ip2dpv.second.value();
811 double s_ip2dpv_err = s_ip2dpv.second.error();
815 theTTrack,
GlobalVector(theTrack.
px(), theTrack.
py(), theTrack.
pz()), theFittedVertex);
817 double s_ip3dpv_corr = s_ip3dpv.second.value();
818 double s_ip3dpv_err = s_ip3dpv.second.error();
822 double ip3d_corr = ip3dpv.second.value();
823 double ip3d_err = ip3dpv.second.error();
831 float my_dx = refPoint.
x() - myVertex.x();
832 float my_dy = refPoint.
y() - myVertex.y();
834 float my_dx2 = cPToVtx.
x() - myVertex.x();
835 float my_dy2 = cPToVtx.
y() - myVertex.y();
837 float my_dxy =
std::sqrt(my_dx * my_dx + my_dy * my_dy);
846 <<
"my_dx:" << my_dx <<
" my_dy:" << my_dy <<
" my_dxy:" << my_dxy <<
" my_dx2:" << my_dx2
847 <<
" my_dy2:" << my_dy2 <<
" d0: " <<
d0 <<
" dxyFromVtx:" << dxyFromMyVertex <<
"\n"
848 <<
" ============================== "
852 <<
"diff3:" << (my_dx - my_dx2) <<
" " << (my_dy - my_dy2) <<
"\n"
872 float trackphi = (theTrack.
phi()) * (180. /
M_PI);
873 float tracketa = theTrack.
eta();
874 float trackpt = theTrack.
pt();
875 float trackp = theTrack.
p();
880 int ladder_num = -1.;
881 int module_num = -1.;
882 int L1BPixHitCount = 0;
885 const DetId& detId =
hit->geographicalId();
886 unsigned int subid = detId.
subdetId();
891 const SiPixelRecHit* prechit = dynamic_cast<const SiPixelRecHit*>(
894 if (clusterProbability > 0) {
911 if (module_num > 0 && ladder_num > 0) {
920 for (
int ipTBin = 0; ipTBin <
nPtBins_; ipTBin++) {
926 <<
" < pT < " <<
mypT_bins_[ipTBin + 1] << std::endl;
928 if (
std::abs(tracketa) < 1.5 && (trackpt >= pTF && trackpt < pTL)) {
939 <<
"passes tight eta cut: " <<
mypT_bins_[ipTBin] << std::endl;
954 if (pixelOcc.first ==
true)
955 edm::LogInfo(
"PrimaryVertexValidation") <<
"has BPIx hits" << std::endl;
956 if (pixelOcc.second ==
true)
957 edm::LogInfo(
"PrimaryVertexValidation") <<
"has FPix hits" << std::endl;
960 if (!
doBPix_ && (pixelOcc.first ==
true))
962 if (!
doFPix_ && (pixelOcc.second ==
true))
990 float dxyRecoV = theTrack.
dz(theRecoVertex);
991 float dzRecoV = theTrack.
dxy(theRecoVertex);
992 float dxysigmaRecoV =
997 double zTrack = (theTTrack.stateAtBeamLine().trackStateAtPCA()).
position().z();
998 double zVertex = theFittedVertex.position().z();
999 double tantheta =
tan((theTTrack.stateAtBeamLine().trackStateAtPCA()).momentum().theta());
1002 double restrkz = zTrack -
zVertex;
1003 double pulltrkz = (zTrack -
zVertex) / TMath::Sqrt(dz2);
1028 n_dxyVsPhi->Fill(trackphi, dxyFromMyVertex / s_ip2dpv_err);
1033 n_dxyVsEta->Fill(tracketa, dxyFromMyVertex / s_ip2dpv_err);
1036 if (ladder_num > 0 && module_num > 0) {
1037 LogDebug(
"PrimaryVertexValidation")
1038 <<
" ladder_num: " << ladder_num <<
" module_num: " << module_num << std::endl;
1049 if (L1BPixHitCount == 1) {
1070 if (tracketa >= etaF && tracketa < etaL) {
1087 if (trackphi >= phiF && trackphi < phiL) {
1107 if (tracketa >= etaJ && tracketa < etaK) {
1122 <<
" myVertex.x()= " << myVertex.x() <<
"\n"
1123 <<
" myVertex.y()= " << myVertex.y() <<
" \n"
1124 <<
" myVertex.z()= " << myVertex.z() <<
" \n"
1125 <<
" theTrack.dz(myVertex)= " << theTrack.
dz(myVertex) <<
" \n"
1126 <<
" zPCA -myVertex.z() = " << (theTrack.
vertex().z() - myVertex.z());
1134 LogTrace(
"PrimaryVertexValidation") <<
"caught std::exception " << er.
what() << std::endl;
1141 edm::LogInfo(
"PrimaryVertexValidation") <<
"Not enough tracks to make a vertex. Returns no vertex info";
1148 edm::LogInfo(
"PrimaryVertexValidation") <<
"Track " <<
i <<
" : pT = " << theTrack.
pt();
1162 if (
hit.dimension() < 2) {
1165 const DetId detId(
hit.geographicalId());
1170 if (dynamic_cast<const SiStripRecHit2D*>(&
hit))
1172 else if (dynamic_cast<const SiStripMatchedRecHit2D*>(&
hit))
1174 else if (dynamic_cast<const ProjectedSiStripRecHit2D*>(&
hit))
1177 edm::LogError(
"UnknownType") <<
"@SUB=PrimaryVertexValidation::isHit2D"
1178 <<
"Tracker hit not in pixel and neither SiStripRecHit2D nor "
1179 <<
"SiStripMatchedRecHit2D nor ProjectedSiStripRecHit2D.";
1186 edm::LogWarning(
"DetectorMismatch") <<
"@SUB=PrimaryVertexValidation::isHit2D"
1187 <<
"Hit not in tracker with 'official' dimension >=2.";
1196 bool hasBPixHits =
false;
1197 bool hasFPixHits =
false;
1200 if (
p.numberOfValidPixelEndcapHits() != 0) {
1203 if (
p.numberOfValidPixelBarrelHits() != 0) {
1207 return std::make_pair(hasBPixHits, hasFPixHits);
1212 using namespace reco;
1214 for (
int i = 0;
i <
p.numberOfAllHits(HitPattern::TRACK_HITS);
i++) {
1215 uint32_t
pattern =
p.getHitPattern(HitPattern::TRACK_HITS,
i);
1229 edm::LogInfo(
"PrimaryVertexValidation") <<
"######################################\n"
1231 <<
"######################################";
1325 TH1F::SetDefaultSumw2(kTRUE);
1328 EventFeatures.
make<TH1F>(
"h_lumiFromConfig",
"luminosity from config;;luminosity of present run", 1, -0.5, 0.5);
1332 "run number from config;;run number (from configuration)",
1342 EventFeatures.
make<TH1I>(
"h_runFromEvent",
"run number from event;;run number (from event)", 1, -0.5, 0.5);
1344 EventFeatures.
make<TH1F>(
"h_nTracks",
"number of tracks per event;n_{tracks}/event;n_{events}", 300, -0.5, 299.5);
1346 EventFeatures.
make<TH1F>(
"h_nClus",
"number of track clusters;n_{clusters}/event;n_{events}", 50, -0.5, 49.5);
1348 "h_nOfflineVertices",
"number of offline reconstructed vertices;n_{vertices}/event;n_{events}", 50, -0.5, 49.5);
1349 h_runNumber = EventFeatures.
make<TH1F>(
"h_runNumber",
"run number;run number;n_{events}", 100000, 250000., 350000.);
1351 "h_xOfflineVertex",
"x-coordinate of offline vertex;x_{vertex};n_{events}", 100, -0.1, 0.1);
1353 "h_yOfflineVertex",
"y-coordinate of offline vertex;y_{vertex};n_{events}", 100, -0.1, 0.1);
1355 "h_zOfflineVertex",
"z-coordinate of offline vertex;z_{vertex};n_{events}", 100, -30., 30.);
1357 "h_xErrOfflineVertex",
"x-coordinate error of offline vertex;err_{x}^{vtx};n_{events}", 100, 0., 0.01);
1359 "h_yErrOfflineVertex",
"y-coordinate error of offline vertex;err_{y}^{vtx};n_{events}", 100, 0., 0.01);
1361 "h_zErrOfflineVertex",
"z-coordinate error of offline vertex;err_{z}^{vtx};n_{events}", 100, 0., 10.);
1362 h_BSx0 = EventFeatures.
make<TH1F>(
"h_BSx0",
"x-coordinate of reco beamspot;x^{BS}_{0};n_{events}", 100, -0.1, 0.1);
1363 h_BSy0 = EventFeatures.
make<TH1F>(
"h_BSy0",
"y-coordinate of reco beamspot;y^{BS}_{0};n_{events}", 100, -0.1, 0.1);
1364 h_BSz0 = EventFeatures.
make<TH1F>(
"h_BSz0",
"z-coordinate of reco beamspot;z^{BS}_{0};n_{events}", 100, -1., 1.);
1366 EventFeatures.
make<TH1F>(
"h_Beamsigmaz",
"z-coordinate beam width;#sigma_{Z}^{beam};n_{events}", 100, 0., 1.);
1368 EventFeatures.
make<TH1F>(
"h_BeamWidthX",
"x-coordinate beam width;#sigma_{X}^{beam};n_{events}", 100, 0., 0.01);
1370 EventFeatures.
make<TH1F>(
"h_BeamWidthY",
"y-coordinate beam width;#sigma_{Y}^{beam};n_{events}", 100, 0., 0.01);
1372 h_etaMax = EventFeatures.
make<TH1F>(
"etaMax",
"etaMax", 1, -0.5, 0.5);
1373 h_pTinfo = EventFeatures.
make<TH1F>(
"pTinfo",
"pTinfo", 3, -1.5, 1.5);
1374 h_pTinfo->GetXaxis()->SetBinLabel(1,
"n. bins");
1375 h_pTinfo->GetXaxis()->SetBinLabel(2,
"pT min");
1376 h_pTinfo->GetXaxis()->SetBinLabel(3,
"pT max");
1378 h_nbins = EventFeatures.
make<TH1F>(
"nbins",
"nbins", 1, -0.5, 0.5);
1379 h_nLadders = EventFeatures.
make<TH1F>(
"nladders",
"n. ladders", 1, -0.5, 0.5);
1380 h_nModZ = EventFeatures.
make<TH1F>(
"nModZ",
"n. modules along z", 1, -0.5, 0.5);
1385 h_probePt_ = ProbeFeatures.
make<TH1F>(
"h_probePt",
"p_{T} of probe track;track p_{T} (GeV); tracks", 100, 0., 50.);
1387 "h_probePtRebin",
"p_{T} of probe track;track p_{T} (GeV); tracks",
mypT_bins_.size() - 1,
mypT_bins_.data());
1388 h_probeP_ = ProbeFeatures.
make<TH1F>(
"h_probeP",
"momentum of probe track;track p (GeV); tracks", 100, 0., 100.);
1391 h_probePhi_ = ProbeFeatures.
make<TH1F>(
"h_probePhi",
"#phi of probe track;track #phi (rad);tracks", 100, -3.15, 3.15);
1394 ProbeFeatures.
make<TH2F>(
"h2_probeEtaPhi",
1395 "probe track #phi vs #eta;#eta of probe track;track #phi of probe track (rad); tracks",
1403 "probe track p_{T} vs #eta;#eta of probe track;track p_{T} (GeV); tracks",
1412 ProbeFeatures.
make<TH1F>(
"h_probeChi2",
"#chi^{2} of probe track;track #chi^{2}; tracks", 100, 0., 100.);
1414 "h_probeNormChi2",
" normalized #chi^{2} of probe track;track #chi^{2}/ndof; tracks", 100, 0., 10.);
1416 ProbeFeatures.
make<TH1F>(
"h_probeCharge",
"charge of probe track;track charge Q;tracks", 3, -1.5, 1.5);
1418 ProbeFeatures.
make<TH1F>(
"h_probeQoverP",
"q/p of probe track; track Q/p (GeV^{-1});tracks", 200, -1., 1.);
1420 "h_probedzRecoV",
"d_{z}(V_{offline}) of probe track;track d_{z}(V_{off}) (cm);tracks", 200, -1., 1.);
1422 "h_probedxyRecoV",
"d_{xy}(V_{offline}) of probe track;track d_{xy}(V_{off}) (cm);tracks", 200, -1., 1.);
1424 "h_probedzRefitV",
"d_{z}(V_{refit}) of probe track;track d_{z}(V_{fit}) (cm);tracks", 200, -0.5, 0.5);
1426 "h_probesignIPRefitV",
"ip_{2D}(V_{refit}) of probe track;track ip_{2D}(V_{fit}) (cm);tracks", 200, -1., 1.);
1428 "h_probedxyRefitV",
"d_{xy}(V_{refit}) of probe track;track d_{xy}(V_{fit}) (cm);tracks", 200, -0.5, 0.5);
1431 "h_probez0RefitV",
"z_{0}(V_{refit}) of probe track;track z_{0}(V_{fit}) (cm);tracks", 200, -1., 1.);
1433 "h_probed0RefitV",
"d_{0}(V_{refit}) of probe track;track d_{0}(V_{fit}) (cm);tracks", 200, -1., 1.);
1436 "h_probed3DRefitV",
"d_{3D}(V_{refit}) of probe track;track d_{3D}(V_{fit}) (cm);tracks", 200, 0., 1.);
1438 "h_probeReszRefitV",
"z_{track} -z_{V_{refit}};track res_{z}(V_{refit}) (cm);tracks", 200, -1., 1.);
1441 "h_probeRecoVSigZ",
"Longitudinal DCA Significance (reco);d_{z}(V_{off})/#sigma_{dz};tracks", 100, -8, 8);
1443 "h_probeRecoVSigXY",
"Transverse DCA Significance (reco);d_{xy}(V_{off})/#sigma_{dxy};tracks", 100, -8, 8);
1445 "h_probeRefitVSigZ",
"Longitudinal DCA Significance (refit);d_{z}(V_{fit})/#sigma_{dz};tracks", 100, -8, 8);
1447 "h_probeRefitVSigXY",
"Transverse DCA Significance (refit);d_{xy}(V_{fit})/#sigma_{dxy};tracks", 100, -8, 8);
1449 "h_probeRefitVSig3D",
"3D DCA Significance (refit);d_{3D}/#sigma_{3D};tracks", 100, 0., 20.);
1451 ProbeFeatures.
make<TH1F>(
"h_probeRefitVLogSig3D",
1452 "log_{10}(3D DCA-Significance) (refit);log_{10}(d_{3D}/#sigma_{3D});tracks",
1457 "h_probeRefitVSigResZ",
1458 "Longitudinal residual significance (refit);(z_{track} -z_{V_{fit}})/#sigma_{res_{z}};tracks",
1463 h_probeHits_ = ProbeFeatures.
make<TH1F>(
"h_probeNRechits",
"N_{hits} ;N_{hits} ;tracks", 40, -0.5, 39.5);
1464 h_probeHits1D_ = ProbeFeatures.
make<TH1F>(
"h_probeNRechits1D",
"N_{hits} 1D ;N_{hits} 1D ;tracks", 40, -0.5, 39.5);
1465 h_probeHits2D_ = ProbeFeatures.
make<TH1F>(
"h_probeNRechits2D",
"N_{hits} 2D ;N_{hits} 2D ;tracks", 40, -0.5, 39.5);
1467 ProbeFeatures.
make<TH1F>(
"h_probeNRechitsTIB",
"N_{hits} TIB ;N_{hits} TIB;tracks", 40, -0.5, 39.5);
1469 ProbeFeatures.
make<TH1F>(
"h_probeNRechitsTOB",
"N_{hits} TOB ;N_{hits} TOB;tracks", 40, -0.5, 39.5);
1471 ProbeFeatures.
make<TH1F>(
"h_probeNRechitsTID",
"N_{hits} TID ;N_{hits} TID;tracks", 40, -0.5, 39.5);
1473 ProbeFeatures.
make<TH1F>(
"h_probeNRechitsTEC",
"N_{hits} TEC ;N_{hits} TEC;tracks", 40, -0.5, 39.5);
1475 ProbeFeatures.
make<TH1F>(
"h_probeNRechitsBPIX",
"N_{hits} BPIX;N_{hits} BPIX;tracks", 40, -0.5, 39.5);
1477 ProbeFeatures.
make<TH1F>(
"h_probeNRechitsFPIX",
"N_{hits} FPIX;N_{hits} FPIX;tracks", 40, -0.5, 39.5);
1480 "h_probeL1Ladder",
"Ladder number (L1 hit); ladder number",
nLadders_ + 2, -1.5,
nLadders_ + 0.5);
1482 "h_probeL1Module",
"Module number (L1 hit); module number",
nModZ_ + 2, -1.5,
nModZ_ + 0.5);
1485 "Position in Layer 1 of first hit;module number;ladder number",
1494 "Position in Layer 1 of first hit;module number;ladder number",
1502 ProbeFeatures.
make<TH1I>(
"h_probeHasBPixL1Overlap",
"n. hits in L1;n. L1-BPix hits;tracks", 5, -0.5, 4.5);
1504 "h_probeL1ClusterProb",
1505 "log_{10}(Cluster Probability) for Layer1 hits;log_{10}(cluster probability); n. Layer1 hits",
1513 "h_fitVtxNtracks",
"N_{trks} used in vertex fit;N^{fit}_{tracks};vertices", 100, -0.5, 99.5);
1515 "h_fitVtxNdof",
"N_{DOF} of vertex fit;N_{DOF} of refit vertex;vertices", 100, -0.5, 99.5);
1517 "h_fitVtxChi2",
"#chi^{2} of vertex fit;vertex #chi^{2};vertices", 100, -0.5, 99.5);
1519 "h_fitVtxChi2ndf",
"#chi^{2}/ndf of vertex fit;vertex #chi^{2}/ndf;vertices", 100, -0.5, 9.5);
1521 "h_fitVtxChi2Prob",
"Prob(#chi^{2},ndf) of vertex fit;Prob(#chi^{2},ndf);vertices", 40, 0., 1.);
1523 "h_fitVtxTrackWeights",
"track weights associated to track;track weights;tracks", 40, 0., 1.);
1525 "h_fitVtxTrackAverageWeight_",
"average track weight per vertex;#LT track weight #GT;vertices", 40, 0., 1.);
1530 RecoVertexFeatures.
make<TH1F>(
"h_recoVtxNtracks",
"N^{vtx}_{trks};N^{vtx}_{trks};vertices", 100, -0.5, 99.5);
1532 RecoVertexFeatures.
make<TH1F>(
"h_recoVtxChi2ndf",
"#chi^{2}/ndf vtx;#chi^{2}/ndf vtx;vertices", 10, -0.5, 9.5);
1534 "h_recoVtxChi2Prob",
"Prob(#chi^{2},ndf);Prob(#chi^{2},ndf);vertices", 40, 0., 1.);
1536 RecoVertexFeatures.
make<TH1F>(
"h_recoVtxSumPt",
"Sum(p^{trks}_{T});Sum(p^{trks}_{T});vertices", 100, 0., 200.);
1701 for (
unsigned int iLadder = 0; iLadder <
nLadders_; iLadder++) {
1702 for (
unsigned int iModule = 0; iModule <
nModZ_; iModule++) {
1704 AbsL1Map.
make<TH1F>(Form(
"histo_dxy_ladder%i_module%i", iLadder, iModule),
1705 Form(
"d_{xy} ladder=%i module=%i;d_{xy} [#mum];tracks", iLadder, iModule),
1711 AbsL1Map.
make<TH1F>(Form(
"histo_dz_ladder%i_module%i", iLadder, iModule),
1712 Form(
"d_{z} ladder=%i module=%i;d_{z} [#mum];tracks", iLadder, iModule),
1718 NormL1Map.
make<TH1F>(Form(
"histo_norm_dxy_ladder%i_module%i", iLadder, iModule),
1719 Form(
"d_{xy} ladder=%i module=%i;d_{xy}/#sigma_{d_{xy}};tracks", iLadder, iModule),
1725 NormL1Map.
make<TH1F>(Form(
"histo_norm_dz_ladder%i_module%i", iLadder, iModule),
1726 Form(
"d_{z} ladder=%i module=%i;d_{z}/#sigma_{d_{z}};tracks", iLadder, iModule),
1749 Form(
"histo_dxy_eta_plot%i_phi_plot%i",
i,
j),
1750 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{xy};tracks", etaF, etaL, phiF, phiL),
1756 Form(
"histo_dz_eta_plot%i_phi_plot%i",
i,
j),
1757 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{z};tracks", etaF, etaL, phiF, phiL),
1763 Form(
"histo_d3D_eta_plot%i_phi_plot%i",
i,
j),
1764 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{3D};tracks", etaF, etaL, phiF, phiL),
1770 Form(
"histo_norm_dxy_eta_plot%i_phi_plot%i",
i,
j),
1771 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{xy}/#sigma_{d_{xy}};tracks",
1781 Form(
"histo_norm_dz_eta_plot%i_phi_plot%i",
i,
j),
1782 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{z}/#sigma_{d_{z}};tracks",
1792 Form(
"histo_norm_d3D_eta_plot%i_phi_plot%i",
i,
j),
1793 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{3D}/#sigma_{d_{3D}};tracks",
1809 "d_{xy} vs track #phi;track #phi [rad];track d_{xy}(PV) [#mum]",
1818 "d_{z} vs track #phi;track #phi [rad];track d_{z}(PV) [#mum]",
1828 "d_{xy}/#sigma_{d_{xy}} vs track #phi;track #phi [rad];track d_{xy}(PV)/#sigma_{d_{xy}}",
1837 BiasVsParameter.
make<TH2F>(
"h2_n_dz_vs_phi",
1838 "d_{z}/#sigma_{d_{z}} vs track #phi;track #phi [rad];track d_{z}(PV)/#sigma_{d_{z}}",
1847 "d_{xy} vs track #eta;track #eta;track d_{xy}(PV) [#mum]",
1856 "d_{z} vs track #eta;track #eta;track d_{z}(PV) [#mum]",
1865 BiasVsParameter.
make<TH2F>(
"h2_n_dxy_vs_eta",
1866 "d_{xy}/#sigma_{d_{xy}} vs track #eta;track #eta;track d_{xy}(PV)/#sigma_{d_{xy}}",
1875 "d_{z}/#sigma_{d_{z}} vs track #eta;track #eta;track d_{z}(PV)/#sigma_{d_{z}}",
1898 "#LT d_{xy} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{xy} #GT [#mum]",
1905 "#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees];#sigma_{d_{xy}} [#mum]",
1912 "#LT d_{z} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{z} #GT [#mum]",
1919 "#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];#sigma_{d_{z}} [#mum]",
1925 "means_dxy_eta",
"#LT d_{xy} #GT vs #eta sector;#eta (sector);#LT d_{xy} #GT [#mum]",
nBins_,
lowedge,
highedge);
1928 "#sigma_{d_{xy}} vs #eta sector;#eta (sector);#sigma_{d_{xy}} [#mum]",
1934 "means_dz_eta",
"#LT d_{z} #GT vs #eta sector;#eta (sector);#LT d_{z} #GT [#mum]",
nBins_,
lowedge,
highedge);
1937 "widths_dz_eta",
"#sigma_{d_{xy}} vs #eta sector;#eta (sector);#sigma_{d_{z}} [#mum]",
nBins_,
lowedge,
highedge);
1940 "norm_means_dxy_phi",
1941 "#LT d_{xy}/#sigma_{d_{xy}} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{xy}/#sigma_{d_{xy}} #GT",
1947 "norm_widths_dxy_phi",
1948 "width(d_{xy}/#sigma_{d_{xy}}) vs #phi sector;#varphi (sector) [degrees]; width(d_{xy}/#sigma_{d_{xy}})",
1954 "norm_means_dz_phi",
1955 "#LT d_{z}/#sigma_{d_{z}} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{z}/#sigma_{d_{z}} #GT",
1961 "norm_widths_dz_phi",
1962 "width(d_{z}/#sigma_{d_{z}}) vs #phi sector;#varphi (sector) [degrees];width(d_{z}/#sigma_{d_{z}})",
1968 "norm_means_dxy_eta",
1969 "#LT d_{xy}/#sigma_{d_{xy}} #GT vs #eta sector;#eta (sector);#LT d_{xy}/#sigma_{d_{z}} #GT",
1975 "norm_widths_dxy_eta",
1976 "width(d_{xy}/#sigma_{d_{xy}}) vs #eta sector;#eta (sector);width(d_{xy}/#sigma_{d_{z}})",
1983 "#LT d_{z}/#sigma_{d_{z}} #GT vs #eta sector;#eta (sector);#LT d_{z}/#sigma_{d_{z}} #GT",
1990 "width(d_{z}/#sigma_{d_{z}}) vs #eta sector;#eta (sector);width(d_{z}/#sigma_{d_{z}})",
1998 "#LT d_{xy} #GT vs pT;p_{T} [GeV];#LT d_{xy} #GT [#mum]",
2003 "#sigma_{d_{xy}} vs pT;p_{T} [GeV];#sigma_{d_{xy}} [#mum]",
2008 "means_dz_pT",
"#LT d_{z} #GT vs pT;p_{T} [GeV];#LT d_{z} #GT [#mum]",
mypT_bins_.size() - 1,
mypT_bins_.data());
2011 "#sigma_{d_{z}} vs pT;p_{T} [GeV];#sigma_{d_{z}} [#mum]",
2017 "#LT d_{xy}/#sigma_{d_{xy}} #GT vs pT;p_{T} [GeV];#LT d_{xy}/#sigma_{d_{xy}} #GT",
2023 "width(d_{xy}/#sigma_{d_{xy}}) vs pT;p_{T} [GeV]; width(d_{xy}/#sigma_{d_{xy}})",
2029 "#LT d_{z}/#sigma_{d_{z}} #GT vs pT;p_{T} [GeV];#LT d_{z}/#sigma_{d_{z}} #GT",
2035 "width(d_{z}/#sigma_{d_{z}}) vs pT;p_{T} [GeV];width(d_{z}/#sigma_{d_{z}})",
2041 "#LT d_{xy} #GT vs p_{T};p_{T}(|#eta|<1.) [GeV];#LT d_{xy} #GT [#mum]",
2047 "#sigma_{d_{xy}} vs p_{T};p_{T}(|#eta|<1.) [GeV];#sigma_{d_{xy}} [#mum]",
2053 "#LT d_{z} #GT vs p_{T};p_{T}(|#eta|<1.) [GeV];#LT d_{z} #GT [#mum]",
2059 "#sigma_{d_{z}} vs p_{T};p_{T}(|#eta|<1.) [GeV];#sigma_{d_{z}} [#mum]",
2064 "norm_means_dxy_pTCentral",
2065 "#LT d_{xy}/#sigma_{d_{xy}} #GT vs p_{T};p_{T}(|#eta|<1.) [GeV];#LT d_{xy}/#sigma_{d_{z}} #GT",
2070 "norm_widths_dxy_pTCentral",
2071 "width(d_{xy}/#sigma_{d_{xy}}) vs p_{T};p_{T}(|#eta|<1.) [GeV];width(d_{xy}/#sigma_{d_{z}})",
2076 "norm_means_dz_pTCentral",
2077 "#LT d_{z}/#sigma_{d_{z}} #GT vs p_{T};p_{T}(|#eta|<1.) [GeV];#LT d_{z}/#sigma_{d_{z}} #GT",
2082 "norm_widths_dz_pTCentral",
2083 "width(d_{z}/#sigma_{d_{z}}) vs p_{T};p_{T}(|#eta|<1.) [GeV];width(d_{z}/#sigma_{d_{z}})",
2090 "#LT d_{xy} #GT map;#eta (sector);#varphi (sector) [degrees]",
2099 "#LT d_{z} #GT map;#eta (sector);#varphi (sector) [degrees]",
2108 "#LT d_{xy}/#sigma_{d_{xy}} #GT map;#eta (sector);#varphi (sector) [degrees]",
2117 "#LT d_{z}/#sigma_{d_{z}} #GT map;#eta (sector);#varphi (sector) [degrees]",
2126 "#sigma_{d_{xy}} map;#eta (sector);#varphi (sector) [degrees]",
2135 "#sigma_{d_{z}} map;#eta (sector);#varphi (sector) [degrees]",
2145 "width(d_{xy}/#sigma_{d_{xy}}) map;#eta (sector);#varphi (sector) [degrees]",
2154 "width(d_{z}/#sigma_{d_{z}}) map;#eta (sector);#varphi (sector) [degrees]",
2166 "Median of d_{xy} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{xy}) [#mum]",
2173 "Median absolute deviation of d_{xy} vs #phi sector;#varphi (sector) [degrees];MAD(d_{xy}) [#mum]",
2180 "Median of d_{z} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{z}) [#mum]",
2187 "Median absolute deviation of d_{z} vs #phi sector;#varphi (sector) [degrees];MAD(d_{z}) [#mum]",
2194 "Median of d_{xy} vs #eta sector;#eta (sector);#mu_{1/2}(d_{xy}) [#mum]",
2201 "Median absolute deviation of d_{xy} vs #eta sector;#eta (sector);MAD(d_{xy}) [#mum]",
2208 "Median of d_{z} vs #eta sector;#eta (sector);#mu_{1/2}(d_{z}) [#mum]",
2215 "Median absolute deviation of d_{z} vs #eta sector;#eta (sector);MAD(d_{z}) [#mum]",
2221 "norm_medians_dxy_phi",
2222 "Median of d_{xy}/#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{xy}/#sigma_{d_{xy}})",
2228 "Median absolute deviation of d_{xy}/#sigma_{d_{xy}} vs #phi "
2229 "sector;#varphi (sector) [degrees]; MAD(d_{xy}/#sigma_{d_{xy}})",
2235 "norm_medians_dz_phi",
2236 "Median of d_{z}/#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{z}/#sigma_{d_{z}})",
2242 "Median absolute deviation of d_{z}/#sigma_{d_{z}} vs #phi sector;#varphi "
2243 "(sector) [degrees];MAD(d_{z}/#sigma_{d_{z}})",
2249 "norm_medians_dxy_eta",
2250 "Median of d_{xy}/#sigma_{d_{xy}} vs #eta sector;#eta (sector);#mu_{1/2}(d_{xy}/#sigma_{d_{z}})",
2256 "norm_MADs_dxy_eta",
2257 "Median absolute deviation of d_{xy}/#sigma_{d_{xy}} vs #eta sector;#eta (sector);MAD(d_{xy}/#sigma_{d_{z}})",
2263 "norm_medians_dz_eta",
2264 "Median of d_{z}/#sigma_{d_{z}} vs #eta sector;#eta (sector);#mu_{1/2}(d_{z}/#sigma_{d_{z}})",
2271 "Median absolute deviation of d_{z}/#sigma_{d_{z}} vs #eta sector;#eta (sector);MAD(d_{z}/#sigma_{d_{z}})",
2320 Form(
"histo_dxy_eta_plot%i_phi_plot%i",
i,
j),
2321 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{xy} [#mum];tracks", etaF, etaL, phiF, phiL),
2327 Form(
"histo_dxy_eta_plot%i_phi_plot%i",
i,
j),
2328 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{z} [#mum];tracks", etaF, etaL, phiF, phiL),
2334 Form(
"histo_norm_dxy_eta_plot%i_phi_plot%i",
i,
j),
2335 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{xy}/#sigma_{d_{xy}};tracks",
2345 Form(
"histo_norm_dxy_eta_plot%i_phi_plot%i",
i,
j),
2346 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{z}/#sigma_{d_{z}};tracks",
2370 MeanBiasTrendsDir.
make<TH1F>(
"means_dxy_phi",
2371 "#LT d_{xy} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{xy} #GT [#mum]",
2378 "#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees];#sigma_{d_{xy}} [#mum]",
2384 MeanBiasTrendsDir.
make<TH1F>(
"means_dz_phi",
2385 "#LT d_{z} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{z} #GT [#mum]",
2391 WidthBiasTrendsDir.
make<TH1F>(
"widths_dz_phi",
2392 "#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];#sigma_{d_{z}} [#mum]",
2398 "means_dxy_eta",
"#LT d_{xy} #GT vs #eta sector;#eta (sector);#LT d_{xy} #GT [#mum]",
nBins_,
lowedge,
highedge);
2401 WidthBiasTrendsDir.
make<TH1F>(
"widths_dxy_eta",
2402 "#sigma_{d_{xy}} vs #eta sector;#eta (sector);#sigma_{d_{xy}} [#mum]",
2408 "means_dz_eta",
"#LT d_{z} #GT vs #eta sector;#eta (sector);#LT d_{z} #GT [#mum]",
nBins_,
lowedge,
highedge);
2411 WidthBiasTrendsDir.
make<TH1F>(
"widths_dz_eta",
2412 "#sigma_{d_{xy}} vs #eta sector;#eta (sector);#sigma_{d_{z}} [#mum]",
2418 "norm_means_dxy_phi",
2419 "#LT d_{xy}/#sigma_{d_{xy}} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{xy}/#sigma_{d_{xy}} #GT",
2425 "norm_widths_dxy_phi",
2426 "width(d_{xy}/#sigma_{d_{xy}}) vs #phi sector;#varphi (sector) [degrees]; width(d_{xy}/#sigma_{d_{xy}})",
2432 "norm_means_dz_phi",
2433 "#LT d_{z}/#sigma_{d_{z}} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{z}/#sigma_{d_{z}} #GT",
2439 "norm_widths_dz_phi",
2440 "width(d_{z}/#sigma_{d_{z}}) vs #phi sector;#varphi (sector) [degrees];width(d_{z}/#sigma_{d_{z}})",
2446 "norm_means_dxy_eta",
2447 "#LT d_{xy}/#sigma_{d_{xy}} #GT vs #eta sector;#eta (sector);#LT d_{xy}/#sigma_{d_{z}} #GT",
2453 "norm_widths_dxy_eta",
2454 "width(d_{xy}/#sigma_{d_{xy}}) vs #eta sector;#eta (sector);width(d_{xy}/#sigma_{d_{z}})",
2460 "norm_means_dz_eta",
2461 "#LT d_{z}/#sigma_{d_{z}} #GT vs #eta sector;#eta (sector);#LT d_{z}/#sigma_{d_{z}} #GT",
2467 "norm_widths_dz_eta",
2468 "width(d_{z}/#sigma_{d_{z}}) vs #eta sector;#eta (sector);width(d_{z}/#sigma_{d_{z}})",
2476 "#LT d_{xy} #GT map;#eta (sector);#varphi (sector) [degrees]",
2485 "#LT d_{z} #GT map;#eta (sector);#varphi (sector) [degrees]",
2494 Mean2DBiasMapsDir.
make<TH2F>(
"norm_means_dxy_map",
2495 "#LT d_{xy}/#sigma_{d_{xy}} #GT map;#eta (sector);#varphi (sector) [degrees]",
2504 Mean2DBiasMapsDir.
make<TH2F>(
"norm_means_dz_map",
2505 "#LT d_{z}/#sigma_{d_{z}} #GT map;#eta (sector);#varphi (sector) [degrees]",
2514 "#sigma_{d_{xy}} map;#eta (sector);#varphi (sector) [degrees]",
2523 "#sigma_{d_{z}} map;#eta (sector);#varphi (sector) [degrees]",
2532 Width2DBiasMapsDir.
make<TH2F>(
"norm_widths_dxy_map",
2533 "width(d_{xy}/#sigma_{d_{xy}}) map;#eta (sector);#varphi (sector) [degrees]",
2542 Width2DBiasMapsDir.
make<TH2F>(
"norm_widths_dz_map",
2543 "width(d_{z}/#sigma_{d_{z}}) map;#eta (sector);#varphi (sector) [degrees]",
2555 "Median of d_{xy} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{xy}) [#mum]",
2562 "Median absolute deviation of d_{xy} vs #phi sector;#varphi (sector) [degrees];MAD(d_{xy}) [#mum]",
2569 "Median of d_{z} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{z}) [#mum]",
2576 "Median absolute deviation of d_{z} vs #phi sector;#varphi (sector) [degrees];MAD(d_{z}) [#mum]",
2582 MedianBiasTrendsDir.
make<TH1F>(
"medians_dxy_eta",
2583 "Median of d_{xy} vs #eta sector;#eta (sector);#mu_{1/2}(d_{xy}) [#mum]",
2590 "Median absolute deviation of d_{xy} vs #eta sector;#eta (sector);MAD(d_{xy}) [#mum]",
2596 MedianBiasTrendsDir.
make<TH1F>(
"medians_dz_eta",
2597 "Median of d_{z} vs #eta sector;#eta (sector);#mu_{1/2}(d_{z}) [#mum]",
2603 MADBiasTrendsDir.
make<TH1F>(
"MADs_dz_eta",
2604 "Median absolute deviation of d_{z} vs #eta sector;#eta (sector);MAD(d_{z}) [#mum]",
2610 "norm_medians_dxy_phi",
2611 "Median of d_{xy}/#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{xy}/#sigma_{d_{xy}})",
2617 "Median absolute deviation of d_{xy}/#sigma_{d_{xy}} vs #phi "
2618 "sector;#varphi (sector) [degrees]; MAD(d_{xy}/#sigma_{d_{xy}})",
2624 "norm_medians_dz_phi",
2625 "Median of d_{z}/#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{z}/#sigma_{d_{z}})",
2631 "Median absolute deviation of d_{z}/#sigma_{d_{z}} vs #phi "
2632 "sector;#varphi (sector) [degrees];MAD(d_{z}/#sigma_{d_{z}})",
2638 "norm_medians_dxy_eta",
2639 "Median of d_{xy}/#sigma_{d_{xy}} vs #eta sector;#eta (sector);#mu_{1/2}(d_{xy}/#sigma_{d_{z}})",
2645 "norm_MADs_dxy_eta",
2646 "Median absolute deviation of d_{xy}/#sigma_{d_{xy}} vs #eta sector;#eta (sector);MAD(d_{xy}/#sigma_{d_{z}})",
2652 "norm_medians_dz_eta",
2653 "Median of d_{z}/#sigma_{d_{z}} vs #eta sector;#eta (sector);#mu_{1/2}(d_{z}/#sigma_{d_{z}})",
2660 "Median absolute deviation of d_{z}/#sigma_{d_{z}} vs #eta sector;#eta (sector);MAD(d_{z}/#sigma_{d_{z}})",
2682 unsigned int count = 1;
2694 edm::LogInfo(
"PrimaryVertexValidation") <<
"######################################\n"
2695 <<
"# PrimaryVertexValidation::endJob()\n"
2696 <<
"# Number of analyzed events: " <<
Nevt_ <<
"\n"
2697 <<
"######################################";
2702 "means_dxy_modZ",
"#LT d_{xy} #GT vs modZ;module number (Z);#LT d_{xy} #GT [#mum]",
nModZ_, 0.,
nModZ_);
2705 "widths_dxy_modZ",
"#sigma_{d_{xy}} vs modZ;module number (Z);#sigma_{d_{xy}} [#mum]",
nModZ_, 0.,
nModZ_);
2708 "means_dz_modZ",
"#LT d_{z} #GT vs modZ;module number (Z);#LT d_{z} #GT [#mum]",
nModZ_, 0.,
nModZ_);
2711 "widths_dz_modZ",
"#sigma_{d_{z}} vs modZ;module number (Z);#sigma_{d_{z}} [#mum]",
nModZ_, 0.,
nModZ_);
2714 "#LT d_{xy} #GT vs ladder;ladder number (#phi);#LT d_{xy} #GT [#mum]",
2721 "#sigma_{d_{xy}} vs ladder;ladder number (#phi);#sigma_{d_{xy}} [#mum]",
2727 "means_dz_ladder",
"#LT d_{z} #GT vs ladder;ladder number (#phi);#LT d_{z} #GT [#mum]",
nLadders_, 0.,
nLadders_);
2731 "#sigma_{d_{z}} vs ladder;ladder number (#phi);#sigma_{d_{z}} [#mum]",
2737 "norm_means_dxy_modZ",
2738 "#LT d_{xy}/#sigma_{d_{xy}} #GT vs modZ;module number (Z);#LT d_{xy}/#sigma_{d_{xy}} #GT",
2744 "norm_widths_dxy_modZ",
2745 "width(d_{xy}/#sigma_{d_{xy}}) vs modZ;module number (Z); width(d_{xy}/#sigma_{d_{xy}})",
2752 "#LT d_{z}/#sigma_{d_{z}} #GT vs modZ;module number (Z);#LT d_{z}/#sigma_{d_{z}} #GT",
2759 "width(d_{z}/#sigma_{d_{z}}) vs pT;module number (Z);width(d_{z}/#sigma_{d_{z}})",
2765 "norm_means_dxy_ladder",
2766 "#LT d_{xy}/#sigma_{d_{xy}} #GT vs ladder;ladder number (#phi);#LT d_{xy}/#sigma_{d_{z}} #GT",
2772 "norm_widths_dxy_ladder",
2773 "width(d_{xy}/#sigma_{d_{xy}}) vs ladder;ladder number (#phi);width(d_{xy}/#sigma_{d_{z}})",
2779 "norm_means_dz_ladder",
2780 "#LT d_{z}/#sigma_{d_{z}} #GT vs ladder;ladder number (#phi);#LT d_{z}/#sigma_{d_{z}} #GT",
2786 "norm_widths_dz_ladder",
2787 "width(d_{z}/#sigma_{d_{z}}) vs ladder;ladder number (#phi);width(d_{z}/#sigma_{d_{z}})",
2795 "#LT d_{xy} #GT map;module number [z];ladder number [#varphi]",
2804 "#LT d_{z} #GT map;module number [z];ladder number [#varphi]",
2814 "#LT d_{xy}/#sigma_{d_{xy}} #GT map;module number [z];ladder number [#varphi]",
2823 "#LT d_{z}/#sigma_{d_{z}} #GT map;module number [z];ladder number [#varphi]",
2832 "#sigma_{d_{xy}} map;module number [z];ladder number [#varphi]",
2841 "#sigma_{d_{z}} map;module number [z];ladder number [#varphi]",
2851 "width(d_{xy}/#sigma_{d_{xy}}) map;module number [z];ladder number [#varphi]",
2861 "width(d_{z}/#sigma_{d_{z}}) map;module number [z];ladder number [#varphi]",
3046 <<
runInfo.product()->m_start_time_str <<
" " <<
runInfo.product()->m_stop_time_str << std::endl;
3048 return std::make_pair(
runInfo.product()->m_start_time_ll,
runInfo.product()->m_stop_time_ll);
3056 double average_current =
runInfo.product()->m_avg_current;
3057 bool isOn = (average_current > 2000.);
3060 return ((isOn && !is0T) || (!isOn && is0T));
3139 TH1F* residualsPlot[100],
3145 char phibincenter[129];
3147 sprintf(phibincenter,
"%.f", (phiBins[
i] + phiBins[
i + 1]) / 2.);
3149 char etabincenter[129];
3157 trendPlot->SetBinContent(
i + 1, mean_);
3158 trendPlot->SetBinError(
i + 1, meanErr_);
3164 trendPlot->SetBinContent(
i + 1, width_);
3165 trendPlot->SetBinError(
i + 1, widthErr_);
3171 trendPlot->SetBinContent(
i + 1, median_);
3172 trendPlot->SetBinError(
i + 1, medianErr_);
3178 trendPlot->SetBinContent(
i + 1, mad_);
3179 trendPlot->SetBinError(
i + 1, madErr_);
3184 <<
"fillTrendPlot() " << fitPar_ <<
" unknown estimator!" << std::endl;
3188 if (var_.find(
"eta") != std::string::npos) {
3189 trendPlot->GetXaxis()->SetBinLabel(
i + 1, etabincenter);
3190 }
else if (var_.find(
"phi") != std::string::npos) {
3191 trendPlot->GetXaxis()->SetBinLabel(
i + 1, phibincenter);
3194 <<
"fillTrendPlot() " << var_ <<
" unknown track parameter!" << std::endl;
3201 std::vector<TH1F*>&
h,
3206 for (
auto iterator =
h.begin(); iterator !=
h.end(); iterator++) {
3212 float mean_ = myFit.first.value();
3213 float meanErr_ = myFit.first.error();
3214 trendPlot->SetBinContent(
bin, mean_);
3215 trendPlot->SetBinError(
bin, meanErr_);
3219 float width_ = myFit.second.value();
3220 float widthErr_ = myFit.second.error();
3221 trendPlot->SetBinContent(
bin, width_);
3222 trendPlot->SetBinError(
bin, widthErr_);
3228 trendPlot->SetBinContent(
bin, median_);
3229 trendPlot->SetBinError(
bin, medianErr_);
3235 trendPlot->SetBinContent(
bin, mad_);
3236 trendPlot->SetBinError(
bin, madErr_);
3241 <<
"fillTrendPlotByIndex() " << fitPar_ <<
" unknown estimator!" << std::endl;
3245 char bincenter[129];
3249 trendPlot->GetXaxis()->SetBinLabel(
bin, bincenter);
3252 sprintf(bincenter,
"%.f", (phiBins[
bin - 1] + phiBins[
bin]) / 2.);
3253 trendPlot->GetXaxis()->SetBinLabel(
bin, bincenter);
3263 TH1F* residualsMapPlot[100][100],
3269 for (
int i = 0;
i < nYBins_; ++
i) {
3270 char phibincenter[129];
3272 sprintf(phibincenter,
"%.f", (phiBins[
i] + phiBins[
i + 1]) / 2.);
3274 if (nXBins_ == nYBins_) {
3275 trendMap->GetYaxis()->SetBinLabel(
i + 1, phibincenter);
3278 for (
int j = 0;
j < nXBins_; ++
j) {
3279 char etabincenter[129];
3284 if (nXBins_ == nYBins_) {
3285 trendMap->GetXaxis()->SetBinLabel(
j + 1, etabincenter);
3293 trendMap->SetBinContent(
j + 1,
i + 1, mean_);
3294 trendMap->SetBinError(
j + 1,
i + 1, meanErr_);
3300 trendMap->SetBinContent(
j + 1,
i + 1, width_);
3301 trendMap->SetBinError(
j + 1,
i + 1, widthErr_);
3307 trendMap->SetBinContent(
j + 1,
i + 1, median_);
3308 trendMap->SetBinError(
j + 1,
i + 1, medianErr_);
3314 trendMap->SetBinContent(
j + 1,
i + 1, mad_);
3315 trendMap->SetBinError(
j + 1,
i + 1, madErr_);
3319 edm::LogWarning(
"PrimaryVertexValidation:") <<
" fillMap() " << fitPar_ <<
" unknown estimator!" << std::endl;
3329 if (
a.tracksSize() !=
b.tracksSize())
3330 return a.tracksSize() >
b.tracksSize() ?
true :
false;
3332 return a.chi2() <
b.chi2() ?
true :
false;
3345 double vzErr = 0.0, vxErr = 0.0, vyErr = 0.0;
3346 vtxPoint =
vertex.position();
3351 double dxy = 0.0,
dz = 0.0, dxysigma = 0.0, dzsigma = 0.0;
3354 dxysigma =
sqrt(
track.d0Error() *
track.d0Error() + vxErr * vyErr);
3355 dzsigma =
sqrt(
track.dzError() *
track.dzError() + vzErr * vzErr);
3363 if (
track.ptError() /
track.pt() > ptErrMax_)
3373 TH1F::SetDefaultSumw2(kTRUE);
3375 std::map<std::string, TH1*>
h;
3380 h[
"pseudorapidity_" +
type] =
3381 dir.make<TH1F>((
"rapidity_" +
type).c_str(),
"track pseudorapidity; track #eta; tracks", 100, -3., 3.);
3382 h[
"z0_" +
type] =
dir.make<TH1F>((
"z0_" +
type).c_str(),
"track z_{0};track z_{0} (cm);tracks", 80, -40., 40.);
3383 h[
"phi_" +
type] =
dir.make<TH1F>((
"phi_" +
type).c_str(),
"track #phi; track #phi;tracks", 80, -
M_PI,
M_PI);
3384 h[
"eta_" +
type] =
dir.make<TH1F>((
"eta_" +
type).c_str(),
"track #eta; track #eta;tracks", 80, -4., 4.);
3385 h[
"pt_" +
type] =
dir.make<TH1F>((
"pt_" +
type).c_str(),
"track p_{T}; track p_{T} [GeV];tracks", 100, 0., 20.);
3386 h[
"p_" +
type] =
dir.make<TH1F>((
"p_" +
type).c_str(),
"track p; track p [GeV];tracks", 100, 0., 20.);
3387 h[
"found_" +
type] =
3388 dir.make<TH1F>((
"found_" +
type).c_str(),
"n. found hits;n^{found}_{hits};tracks", 30, 0., 30.);
3389 h[
"lost_" +
type] =
dir.make<TH1F>((
"lost_" +
type).c_str(),
"n. lost hits;n^{lost}_{hits};tracks", 20, 0., 20.);
3390 h[
"nchi2_" +
type] =
3391 dir.make<TH1F>((
"nchi2_" +
type).c_str(),
"normalized track #chi^{2};track #chi^{2}/ndf;tracks", 100, 0., 20.);
3392 h[
"rstart_" +
type] =
dir.make<TH1F>(
3393 (
"rstart_" +
type).c_str(),
"track start radius; track innermost radius r (cm);tracks", 100, 0., 20.);
3394 h[
"expectedInner_" +
type] =
dir.make<TH1F>(
3395 (
"expectedInner_" +
type).c_str(),
"n. expected inner hits;n^{expected}_{inner};tracks", 10, 0., 10.);
3396 h[
"expectedOuter_" +
type] =
dir.make<TH1F>(
3397 (
"expectedOuter_" +
type).c_str(),
"n. expected outer hits;n^{expected}_{outer};tracks ", 10, 0., 10.);
3398 h[
"logtresxy_" +
type] =
3399 dir.make<TH1F>((
"logtresxy_" +
type).c_str(),
3400 "log10(track r-#phi resolution/#mum);log10(track r-#phi resolution/#mum);tracks",
3404 h[
"logtresz_" +
type] =
dir.make<TH1F>((
"logtresz_" +
type).c_str(),
3405 "log10(track z resolution/#mum);log10(track z resolution/#mum);tracks",
3409 h[
"tpullxy_" +
type] =
3410 dir.make<TH1F>((
"tpullxy_" +
type).c_str(),
"track r-#phi pull;pull_{r-#phi};tracks", 100, -10., 10.);
3411 h[
"tpullz_" +
type] =
3412 dir.make<TH1F>((
"tpullz_" +
type).c_str(),
"track r-z pull;pull_{r-z};tracks", 100, -50., 50.);
3413 h[
"tlogDCAxy_" +
type] =
dir.make<TH1F>(
3414 (
"tlogDCAxy_" +
type).c_str(),
"track log_{10}(DCA_{r-#phi});track log_{10}(DCA_{r-#phi});tracks", 200, -5., 3.);
3415 h[
"tlogDCAz_" +
type] =
dir.make<TH1F>(
3416 (
"tlogDCAz_" +
type).c_str(),
"track log_{10}(DCA_{r-z});track log_{10}(DCA_{r-z});tracks", 200, -5., 5.);
3417 h[
"lvseta_" +
type] =
dir.make<TH2F>(
3418 (
"lvseta_" +
type).c_str(),
"cluster length vs #eta;track #eta;cluster length", 60, -3., 3., 20, 0., 20);
3419 h[
"lvstanlambda_" +
type] =
dir.make<TH2F>((
"lvstanlambda_" +
type).c_str(),
3420 "cluster length vs tan #lambda; tan#lambda;cluster length",
3427 h[
"restrkz_" +
type] =
3428 dir.make<TH1F>((
"restrkz_" +
type).c_str(),
"z-residuals (track vs vertex);res_{z} (cm);tracks", 200, -5., 5.);
3429 h[
"restrkzvsphi_" +
type] =
dir.make<TH2F>((
"restrkzvsphi_" +
type).c_str(),
3430 "z-residuals (track - vertex) vs track #phi;track #phi;res_{z} (cm)",
3437 h[
"restrkzvseta_" +
type] =
dir.make<TH2F>((
"restrkzvseta_" +
type).c_str(),
3438 "z-residuals (track - vertex) vs track #eta;track #eta;res_{z} (cm)",
3445 h[
"pulltrkzvsphi_" +
type] =
3446 dir.make<TH2F>((
"pulltrkzvsphi_" +
type).c_str(),
3447 "normalized z-residuals (track - vertex) vs track #phi;track #phi;res_{z}/#sigma_{res_{z}}",
3454 h[
"pulltrkzvseta_" +
type] =
3455 dir.make<TH2F>((
"pulltrkzvseta_" +
type).c_str(),
3456 "normalized z-residuals (track - vertex) vs track #eta;track #eta;res_{z}/#sigma_{res_{z}}",
3463 h[
"pulltrkz_" +
type] =
dir.make<TH1F>((
"pulltrkz_" +
type).c_str(),
3464 "normalized z-residuals (track vs vertex);res_{z}/#sigma_{res_{z}};tracks",
3468 h[
"sigmatrkz0_" +
type] =
dir.make<TH1F>(
3469 (
"sigmatrkz0_" +
type).c_str(),
"z-resolution (excluding beam);#sigma^{trk}_{z_{0}} (cm);tracks", 100, 0., 5.);
3470 h[
"sigmatrkz_" +
type] =
dir.make<TH1F>(
3471 (
"sigmatrkz_" +
type).c_str(),
"z-resolution (including beam);#sigma^{trk}_{z} (cm);tracks", 100, 0., 5.);
3472 h[
"nbarrelhits_" +
type] =
dir.make<TH1F>(
3473 (
"nbarrelhits_" +
type).c_str(),
"number of pixel barrel hits;n. hits Barrel Pixel;tracks", 10, 0., 10.);
3474 h[
"nbarrelLayers_" +
type] =
dir.make<TH1F>(
3475 (
"nbarrelLayers_" +
type).c_str(),
"number of pixel barrel layers;n. layers Barrel Pixel;tracks", 10, 0., 10.);
3476 h[
"nPxLayers_" +
type] =
dir.make<TH1F>(
3477 (
"nPxLayers_" +
type).c_str(),
"number of pixel layers (barrel+endcap);n. Pixel layers;tracks", 10, 0., 10.);
3478 h[
"nSiLayers_" +
type] =
3479 dir.make<TH1F>((
"nSiLayers_" +
type).c_str(),
"number of Tracker layers;n. Tracker layers;tracks", 20, 0., 20.);
3480 h[
"trackAlgo_" +
type] =
3481 dir.make<TH1F>((
"trackAlgo_" +
type).c_str(),
"track algorithm;track algo;tracks", 30, 0., 30.);
3482 h[
"trackQuality_" +
type] =
3483 dir.make<TH1F>((
"trackQuality_" +
type).c_str(),
"track quality;track quality;tracks", 7, -1., 6.);
3493 unsigned int theNOfBins,
3496 bool isNormalized) {
3497 TH1F::SetDefaultSumw2(kTRUE);
3509 std::vector<TH1F*>
h;
3510 h.reserve(theNOfBins);
3512 if (theNOfBins == 0) {
3514 <<
"bookResidualsHistogram() The number of bins cannot be identically 0" << std::endl;
3525 for (
unsigned int i = 0;
i < theNOfBins;
i++) {
3527 ? Form(
"%s vs %s - bin %i (%f < %s < %f);%s %s;tracks",
3536 : Form(
"%s vs %s - bin %i;%s %s;tracks",
3543 TH1F* htemp =
dir.make<TH1F>(
3544 Form(
"histo_%s_%s_plot%i", s_resType.c_str(), s_varType.c_str(),
i),
3565 using namespace reco;
3578 double d0Error =
tt->track().d0Error();
3587 double dzError =
tt->track().dzError();
3607 double z = (
tt->stateAtBeamLine().trackStateAtPCA()).
position().z();
3608 double tantheta =
tan((
tt->stateAtBeamLine().trackStateAtPCA()).momentum().theta());
3609 double dz2 =
pow(
tt->track().dzError(), 2) +
wxy2_ /
pow(tantheta, 2);
3622 double kappa = -0.002998 * fBfield_ *
tt->track().qoverp() /
cos(
tt->track().theta());
3625 double s0 = (
x1 *
cos(
tt->track().phi()) +
y1 *
sin(
tt->track().phi())) /
q;
3639 PVValHelper::fill(
h,
"nbarrelLayers_" + ttype,
tt->track().hitPattern().pixelBarrelLayersWithMeasurement());
3640 PVValHelper::fill(
h,
"nPxLayers_" + ttype,
tt->track().hitPattern().pixelLayersWithMeasurement());
3641 PVValHelper::fill(
h,
"nSiLayers_" + ttype,
tt->track().hitPattern().trackerLayersWithMeasurement());
3643 h,
"expectedInner_" + ttype,
tt->track().hitPattern().numberOfLostHits(HitPattern::MISSING_INNER_HITS));
3645 h,
"expectedOuter_" + ttype,
tt->track().hitPattern().numberOfLostHits(HitPattern::MISSING_OUTER_HITS));
3650 int longesthit = 0, nbarrel = 0;
3651 for (
auto const&
hit :
tt->track().recHits()) {
3660 if (clust->sizeY() - longesthit > 0)
3661 longesthit = clust->sizeY();
3662 if (clust->sizeY() > 20.) {
3679 desc.setComment(
"Validates alignment payloads by evaluating unbiased track paramter resisuals to vertices");
3683 desc.addUntracked<
int>(
"compressionSettings", -1);
3684 desc.add<
bool>(
"storeNtuple",
false);
3685 desc.add<
bool>(
"isLightNtuple",
true);
3686 desc.add<
bool>(
"useTracksFromRecoVtx",
false);
3687 desc.addUntracked<
double>(
"vertexZMax", 99);
3688 desc.addUntracked<
double>(
"intLumi", 0.);
3689 desc.add<
bool>(
"askFirstLayerHit",
false);
3690 desc.addUntracked<
bool>(
"doBPix",
true);
3691 desc.addUntracked<
bool>(
"doFPix",
true);
3692 desc.addUntracked<
double>(
"probePt", 0.);
3693 desc.addUntracked<
double>(
"probeP", 0.);
3694 desc.addUntracked<
double>(
"probeEta", 2.4);
3695 desc.addUntracked<
double>(
"probeNHits", 0.);
3696 desc.addUntracked<
int>(
"numberOfBins", 24);
3697 desc.addUntracked<
double>(
"minPt", 1.);
3698 desc.addUntracked<
double>(
"maxPt", 20.);
3699 desc.add<
bool>(
"Debug",
false);
3700 desc.addUntracked<
bool>(
"runControl",
false);
3701 desc.addUntracked<
bool>(
"forceBeamSpot",
false);
3703 std::vector<unsigned int> defaultRuns;
3704 defaultRuns.push_back(0);
3705 desc.addUntracked<std::vector<unsigned int>>(
"runControlNumber", defaultRuns);
3716 psd0.add<
int>(
"numTracksThreshold", 0);
3735 descriptions.
add(
"primaryVertexValidation",
desc);