25 #include <boost/range/adaptor/indexed.hpp>
73 compressionSettings_(iConfig.getUntrackedParameter<
int>(
"compressionSettings", -1)),
74 storeNtuple_(iConfig.getParameter<
bool>(
"storeNtuple")),
75 lightNtupleSwitch_(iConfig.getParameter<
bool>(
"isLightNtuple")),
76 useTracksFromRecoVtx_(iConfig.getParameter<
bool>(
"useTracksFromRecoVtx")),
77 vertexZMax_(iConfig.getUntrackedParameter<double>(
"vertexZMax", 99.)),
78 intLumi_(iConfig.getUntrackedParameter<double>(
"intLumi", 0.)),
79 askFirstLayerHit_(iConfig.getParameter<
bool>(
"askFirstLayerHit")),
80 doBPix_(iConfig.getUntrackedParameter<
bool>(
"doBPix",
true)),
81 doFPix_(iConfig.getUntrackedParameter<
bool>(
"doFPix",
true)),
82 ptOfProbe_(iConfig.getUntrackedParameter<double>(
"probePt", 0.)),
83 pOfProbe_(iConfig.getUntrackedParameter<double>(
"probeP", 0.)),
84 etaOfProbe_(iConfig.getUntrackedParameter<double>(
"probeEta", 2.4)),
85 nHitsOfProbe_(iConfig.getUntrackedParameter<double>(
"probeNHits", 0.)),
86 nBins_(iConfig.getUntrackedParameter<
int>(
"numberOfBins", 24)),
87 minPt_(iConfig.getUntrackedParameter<double>(
"minPt", 1.)),
88 maxPt_(iConfig.getUntrackedParameter<double>(
"maxPt", 20.)),
89 debug_(iConfig.getParameter<
bool>(
"Debug")),
90 runControl_(iConfig.getUntrackedParameter<
bool>(
"runControl",
false)),
91 forceBeamSpotContraint_(iConfig.getUntrackedParameter<
bool>(
"forceBeamSpot",
false)) {
97 std::vector<unsigned int> defaultRuns;
98 defaultRuns.push_back(0);
116 if (clusteringAlgorithm ==
"gap") {
120 }
else if (clusteringAlgorithm ==
"DA") {
125 }
else if (clusteringAlgorithm ==
"DA_vect") {
130 throw VertexException(
"PrimaryVertexProducerAlgorithm: unknown clustering algorithm: " + clusteringAlgorithm);
143 auto plot_index = static_cast<PVValHelper::plotVariable>(
i);
144 auto res_index = static_cast<PVValHelper::residualType>(
j);
161 edm::LogVerbatim(
"PrimaryVertexValidation") <<
"######################################";
166 << std::setw(5) << it.second.second <<
") |" << std::endl;
193 toOutput += std::to_string(ptbin);
197 edm::LogVerbatim(
"PrimaryVertexValidation") <<
"######################################\n";
198 edm::LogVerbatim(
"PrimaryVertexValidation") <<
"The pT binning is: [" << toOutput <<
"] \n";
214 using namespace reco;
219 <<
"*********************************************************************************\n"
220 <<
"* The configuration (ptOfProbe > " <<
ptOfProbe_
221 <<
"GeV) is not correctly set for current value of magnetic field \n"
222 <<
"* Switching it to 0. !!! \n"
223 <<
"*********************************************************************************" << std::endl;
231 bool passesRunControl =
false;
235 if (
iEvent.eventAuxiliary().run() == runControlNumber) {
238 <<
" run number: " <<
iEvent.eventAuxiliary().run() <<
" keeping run:" << runControlNumber;
240 passesRunControl =
true;
244 if (!passesRunControl)
274 edm::LogInfo(
"tracker geometry read") <<
"There are: " << pDD->
dets().size() <<
" detectors";
326 double fBfield_ = ((*theB_).field()->inTesla(
GlobalPoint(0., 0., 0.))).
z();
334 if (!trackCollectionHandle.
isValid())
336 auto const&
tracks = *trackCollectionHandle;
355 LogTrace(
"PrimaryVertexValidation") <<
"caught std::exception " << er.
what() << std::endl;
358 std::vector<Vertex> vsorted = *(
vertices);
372 if (vsorted[0].isValid()) {
389 unsigned int vertexCollectionSize = vsorted.size();
392 for (
unsigned int i = 0;
i < vertexCollectionSize;
i++) {
405 double chi2prob = 0.;
407 if (!vsorted.at(0).isFake()) {
411 chi2ndf =
pv.normalizedChi2();
412 chi2prob = TMath::Prob(
pv.chi2(), (
int)
pv.ndof());
419 double pt = (**itrk).pt();
424 double dxyRes = (**itrk).dxy(myVertex);
425 double dzRes = (**itrk).dz(myVertex);
427 double dxy_err = (**itrk).dxyError();
428 double dz_err = (**itrk).dzError();
430 float trackphi = ((**itrk).phi()) * (180 /
M_PI);
431 float tracketa = (**itrk).eta();
440 if (tracketa >= etaF && tracketa < etaL) {
447 if (trackphi >= phiF && trackphi < phiL) {
457 if (tracketa >= etaJ && tracketa < etaK) {
481 if (beamSpotHandle.
isValid()) {
518 const time_t start_time = times.first / 1000000;
520 <<
RunNumber_ <<
" has start time: " << times.first <<
" - " << times.second << std::endl;
522 <<
"human readable time: " << std::asctime(std::gmtime(&start_time)) << std::endl;
536 edm::LogInfo(
"PrimaryVertexValidation") <<
" looping over " << trackCollectionHandle->size() <<
"tracks";
538 h_nTracks->Fill(trackCollectionHandle->size());
544 std::vector<TransientTrack> t_tks;
552 edm::LogInfo(
"PrimaryVertexValidation") <<
"Found: " << t_tks.size() <<
" reconstructed tracks";
569 <<
" looping over: " <<
clusters.size() <<
" clusters from " << t_tks.size() <<
" selected tracks";
578 for (
const auto& iclus :
clusters) {
582 for (
const auto& theTTrack : iclus) {
591 const Track& theTrack = theTTrack.track();
625 int nhitinTIB =
hits.numberOfValidStripTIBHits();
626 int nhitinTOB =
hits.numberOfValidStripTOBHits();
627 int nhitinTID =
hits.numberOfValidStripTIDHits();
628 int nhitinTEC =
hits.numberOfValidStripTECHits();
629 int nhitinBPIX =
hits.numberOfValidPixelBarrelHits();
630 int nhitinFPIX =
hits.numberOfValidPixelEndcapHits();
632 if ((*iHit)->isValid()) {
666 vector<TransientTrack> theFinalTracks;
667 theFinalTracks.clear();
669 for (
const auto& tk : iclus) {
675 theFinalTracks.push_back(tk);
680 if (theFinalTracks.size() > 1) {
682 edm::LogInfo(
"PrimaryVertexValidation") <<
"Transient Track Collection size: " << theFinalTracks.size();
689 theFittedVertex = theFitter->vertex(theFinalTracks,
beamSpot);
691 theFittedVertex = theFitter->vertex(theFinalTracks);
694 double totalTrackWeights = 0;
695 if (theFittedVertex.isValid()) {
696 if (theFittedVertex.hasTrackWeight()) {
697 for (
const auto& theFinalTrack : theFinalTracks) {
699 totalTrackWeights += theFittedVertex.trackWeight(theFinalTrack);
708 theFittedVertex.position().x(), theFittedVertex.position().y(), theFittedVertex.position().z());
722 TMath::Prob(theFittedVertex.totalChiSquared(), (
int)theFittedVertex.degreesOfFreedom());
730 TMath::Prob(theFittedVertex.totalChiSquared(), (
int)theFittedVertex.degreesOfFreedom()));
733 double dxyFromMyVertex = theTrack.
dxy(myVertex);
734 double dzFromMyVertex = theTrack.
dz(myVertex);
737 theFittedVertex.position().x(), theFittedVertex.position().y(), theFittedVertex.position().z());
743 double dz_err =
sqrt(
std::pow(theTrack.
dzError(), 2) + theFittedVertex.positionError().czz());
747 theTTrack,
GlobalVector(theTrack.
px(), theTrack.
py(), theTrack.
pz()), theFittedVertex);
749 double s_ip2dpv_corr = s_ip2dpv.second.value();
750 double s_ip2dpv_err = s_ip2dpv.second.error();
754 theTTrack,
GlobalVector(theTrack.
px(), theTrack.
py(), theTrack.
pz()), theFittedVertex);
756 double s_ip3dpv_corr = s_ip3dpv.second.value();
757 double s_ip3dpv_err = s_ip3dpv.second.error();
761 double ip3d_corr = ip3dpv.second.value();
762 double ip3d_err = ip3dpv.second.error();
770 float my_dx = refPoint.
x() - myVertex.x();
771 float my_dy = refPoint.
y() - myVertex.y();
773 float my_dx2 = cPToVtx.
x() - myVertex.x();
774 float my_dy2 = cPToVtx.
y() - myVertex.y();
776 float my_dxy =
std::sqrt(my_dx * my_dx + my_dy * my_dy);
785 <<
"my_dx:" << my_dx <<
" my_dy:" << my_dy <<
" my_dxy:" << my_dxy <<
" my_dx2:" << my_dx2
786 <<
" my_dy2:" << my_dy2 <<
" d0: " <<
d0 <<
" dxyFromVtx:" << dxyFromMyVertex <<
"\n"
787 <<
" ============================== "
791 <<
"diff3:" << (my_dx - my_dx2) <<
" " << (my_dy - my_dy2) <<
"\n"
811 float trackphi = (theTrack.
phi()) * (180. /
M_PI);
812 float tracketa = theTrack.
eta();
813 float trackpt = theTrack.
pt();
814 float trackp = theTrack.
p();
819 int ladder_num = -1.;
820 int module_num = -1.;
821 int L1BPixHitCount = 0;
824 const DetId& detId =
hit->geographicalId();
825 unsigned int subid = detId.
subdetId();
830 const SiPixelRecHit* prechit = dynamic_cast<const SiPixelRecHit*>(
833 if (clusterProbability > 0) {
850 if (module_num > 0 && ladder_num > 0) {
859 for (
int ipTBin = 0; ipTBin <
nPtBins_; ipTBin++) {
865 <<
" < pT < " <<
mypT_bins_[ipTBin + 1] << std::endl;
867 if (
std::abs(tracketa) < 1.5 && (trackpt >= pTF && trackpt < pTL)) {
878 <<
"passes tight eta cut: " <<
mypT_bins_[ipTBin] << std::endl;
893 if (pixelOcc.first ==
true)
894 edm::LogInfo(
"PrimaryVertexValidation") <<
"has BPIx hits" << std::endl;
895 if (pixelOcc.second ==
true)
896 edm::LogInfo(
"PrimaryVertexValidation") <<
"has FPix hits" << std::endl;
899 if (!
doBPix_ && (pixelOcc.first ==
true))
901 if (!
doFPix_ && (pixelOcc.second ==
true))
929 float dxyRecoV = theTrack.
dz(theRecoVertex);
930 float dzRecoV = theTrack.
dxy(theRecoVertex);
931 float dxysigmaRecoV =
936 double zTrack = (theTTrack.stateAtBeamLine().trackStateAtPCA()).
position().z();
937 double zVertex = theFittedVertex.position().z();
938 double tantheta =
tan((theTTrack.stateAtBeamLine().trackStateAtPCA()).momentum().theta());
941 double restrkz = zTrack -
zVertex;
942 double pulltrkz = (zTrack -
zVertex) / TMath::Sqrt(dz2);
967 n_dxyVsPhi->Fill(trackphi, dxyFromMyVertex / s_ip2dpv_err);
972 n_dxyVsEta->Fill(tracketa, dxyFromMyVertex / s_ip2dpv_err);
975 if (ladder_num > 0 && module_num > 0) {
977 <<
" ladder_num" << ladder_num <<
" module_num" << module_num << std::endl;
988 if (L1BPixHitCount == 1) {
1009 if (tracketa >= etaF && tracketa < etaL) {
1026 if (trackphi >= phiF && trackphi < phiL) {
1046 if (tracketa >= etaJ && tracketa < etaK) {
1061 <<
" myVertex.x()= " << myVertex.x() <<
"\n"
1062 <<
" myVertex.y()= " << myVertex.y() <<
" \n"
1063 <<
" myVertex.z()= " << myVertex.z() <<
" \n"
1064 <<
" theTrack.dz(myVertex)= " << theTrack.
dz(myVertex) <<
" \n"
1065 <<
" zPCA -myVertex.z() = " << (theTrack.
vertex().z() - myVertex.z());
1073 LogTrace(
"PrimaryVertexValidation") <<
"caught std::exception " << er.
what() << std::endl;
1080 edm::LogInfo(
"PrimaryVertexValidation") <<
"Not enough tracks to make a vertex. Returns no vertex info";
1087 edm::LogInfo(
"PrimaryVertexValidation") <<
"Track " <<
i <<
" : pT = " << theTrack.
pt();
1101 if (
hit.dimension() < 2) {
1104 const DetId detId(
hit.geographicalId());
1109 if (dynamic_cast<const SiStripRecHit2D*>(&
hit))
1111 else if (dynamic_cast<const SiStripMatchedRecHit2D*>(&
hit))
1113 else if (dynamic_cast<const ProjectedSiStripRecHit2D*>(&
hit))
1116 edm::LogError(
"UnkownType") <<
"@SUB=AlignmentTrackSelector::isHit2D"
1117 <<
"Tracker hit not in pixel and neither SiStripRecHit2D nor "
1118 <<
"SiStripMatchedRecHit2D nor ProjectedSiStripRecHit2D.";
1123 edm::LogWarning(
"DetectorMismatch") <<
"@SUB=AlignmentTrackSelector::isHit2D"
1124 <<
"Hit not in tracker with 'official' dimension >=2.";
1133 bool hasBPixHits =
false;
1134 bool hasFPixHits =
false;
1137 if (
p.numberOfValidPixelEndcapHits() != 0) {
1140 if (
p.numberOfValidPixelBarrelHits() != 0) {
1144 return std::make_pair(hasBPixHits, hasFPixHits);
1149 using namespace reco;
1151 for (
int i = 0;
i <
p.numberOfAllHits(HitPattern::TRACK_HITS);
i++) {
1152 uint32_t
pattern =
p.getHitPattern(HitPattern::TRACK_HITS,
i);
1166 edm::LogInfo(
"PrimaryVertexValidation") <<
"######################################\n"
1168 <<
"######################################";
1262 TH1F::SetDefaultSumw2(kTRUE);
1265 EventFeatures.
make<TH1F>(
"h_lumiFromConfig",
"luminosity from config;;luminosity of present run", 1, -0.5, 0.5);
1269 "run number from config;;run number (from configuration)",
1279 EventFeatures.
make<TH1I>(
"h_runFromEvent",
"run number from config;;run number (from event)", 1, -0.5, 0.5);
1281 EventFeatures.
make<TH1F>(
"h_nTracks",
"number of tracks per event;n_{tracks}/event;n_{events}", 300, -0.5, 299.5);
1283 EventFeatures.
make<TH1F>(
"h_nClus",
"number of track clusters;n_{clusters}/event;n_{events}", 50, -0.5, 49.5);
1285 "h_nOfflineVertices",
"number of offline reconstructed vertices;n_{vertices}/event;n_{events}", 50, -0.5, 49.5);
1286 h_runNumber = EventFeatures.
make<TH1F>(
"h_runNumber",
"run number;run number;n_{events}", 100000, 250000., 350000.);
1288 "h_xOfflineVertex",
"x-coordinate of offline vertex;x_{vertex};n_{events}", 100, -0.1, 0.1);
1290 "h_yOfflineVertex",
"y-coordinate of offline vertex;y_{vertex};n_{events}", 100, -0.1, 0.1);
1292 "h_zOfflineVertex",
"z-coordinate of offline vertex;z_{vertex};n_{events}", 100, -30., 30.);
1294 "h_xErrOfflineVertex",
"x-coordinate error of offline vertex;err_{x}^{vtx};n_{events}", 100, 0., 0.01);
1296 "h_yErrOfflineVertex",
"y-coordinate error of offline vertex;err_{y}^{vtx};n_{events}", 100, 0., 0.01);
1298 "h_zErrOfflineVertex",
"z-coordinate error of offline vertex;err_{z}^{vtx};n_{events}", 100, 0., 10.);
1299 h_BSx0 = EventFeatures.
make<TH1F>(
"h_BSx0",
"x-coordinate of reco beamspot;x^{BS}_{0};n_{events}", 100, -0.1, 0.1);
1300 h_BSy0 = EventFeatures.
make<TH1F>(
"h_BSy0",
"y-coordinate of reco beamspot;y^{BS}_{0};n_{events}", 100, -0.1, 0.1);
1301 h_BSz0 = EventFeatures.
make<TH1F>(
"h_BSz0",
"z-coordinate of reco beamspot;z^{BS}_{0};n_{events}", 100, -1., 1.);
1303 EventFeatures.
make<TH1F>(
"h_Beamsigmaz",
"z-coordinate beam width;#sigma_{Z}^{beam};n_{events}", 100, 0., 1.);
1305 EventFeatures.
make<TH1F>(
"h_BeamWidthX",
"x-coordinate beam width;#sigma_{X}^{beam};n_{events}", 100, 0., 0.01);
1307 EventFeatures.
make<TH1F>(
"h_BeamWidthY",
"y-coordinate beam width;#sigma_{Y}^{beam};n_{events}", 100, 0., 0.01);
1309 h_etaMax = EventFeatures.
make<TH1F>(
"etaMax",
"etaMax", 1, -0.5, 0.5);
1310 h_pTinfo = EventFeatures.
make<TH1F>(
"pTinfo",
"pTinfo", 3, -1.5, 1.5);
1311 h_pTinfo->GetXaxis()->SetBinLabel(1,
"n. bins");
1312 h_pTinfo->GetXaxis()->SetBinLabel(2,
"pT min");
1313 h_pTinfo->GetXaxis()->SetBinLabel(3,
"pT max");
1315 h_nbins = EventFeatures.
make<TH1F>(
"nbins",
"nbins", 1, -0.5, 0.5);
1316 h_nLadders = EventFeatures.
make<TH1F>(
"nladders",
"n. ladders", 1, -0.5, 0.5);
1321 h_probePt_ = ProbeFeatures.
make<TH1F>(
"h_probePt",
"p_{T} of probe track;track p_{T} (GeV); tracks", 100, 0., 50.);
1323 "h_probePtRebin",
"p_{T} of probe track;track p_{T} (GeV); tracks",
mypT_bins_.size() - 1,
mypT_bins_.data());
1324 h_probeP_ = ProbeFeatures.
make<TH1F>(
"h_probeP",
"momentum of probe track;track p (GeV); tracks", 100, 0., 100.);
1325 h_probeEta_ = ProbeFeatures.
make<TH1F>(
"h_probeEta",
"#eta of the probe track;track #eta;tracks", 54, -2.8, 2.8);
1326 h_probePhi_ = ProbeFeatures.
make<TH1F>(
"h_probePhi",
"#phi of probe track;track #phi (rad);tracks", 100, -3.15, 3.15);
1329 ProbeFeatures.
make<TH2F>(
"h2_probeEtaPhi",
1330 "probe track #phi vs #eta;#eta of probe track;track #phi of probe track (rad); tracks",
1338 "probe track p_{T} vs #eta;#eta of probe track;track p_{T} (GeV); tracks",
1347 ProbeFeatures.
make<TH1F>(
"h_probeChi2",
"#chi^{2} of probe track;track #chi^{2}; tracks", 100, 0., 100.);
1349 "h_probeNormChi2",
" normalized #chi^{2} of probe track;track #chi^{2}/ndof; tracks", 100, 0., 10.);
1351 ProbeFeatures.
make<TH1F>(
"h_probeCharge",
"charge of probe track;track charge Q;tracks", 3, -1.5, 1.5);
1353 ProbeFeatures.
make<TH1F>(
"h_probeQoverP",
"q/p of probe track; track Q/p (GeV^{-1});tracks", 200, -1., 1.);
1355 "h_probedzRecoV",
"d_{z}(V_{offline}) of probe track;track d_{z}(V_{off}) (cm);tracks", 200, -1., 1.);
1357 "h_probedxyRecoV",
"d_{xy}(V_{offline}) of probe track;track d_{xy}(V_{off}) (cm);tracks", 200, -1., 1.);
1359 "h_probedzRefitV",
"d_{z}(V_{refit}) of probe track;track d_{z}(V_{fit}) (cm);tracks", 200, -0.5, 0.5);
1361 "h_probesignIPRefitV",
"ip_{2D}(V_{refit}) of probe track;track ip_{2D}(V_{fit}) (cm);tracks", 200, -1., 1.);
1363 "h_probedxyRefitV",
"d_{xy}(V_{refit}) of probe track;track d_{xy}(V_{fit}) (cm);tracks", 200, -0.5, 0.5);
1366 "h_probez0RefitV",
"z_{0}(V_{refit}) of probe track;track z_{0}(V_{fit}) (cm);tracks", 200, -1., 1.);
1368 "h_probed0RefitV",
"d_{0}(V_{refit}) of probe track;track d_{0}(V_{fit}) (cm);tracks", 200, -1., 1.);
1371 "h_probed3DRefitV",
"d_{3D}(V_{refit}) of probe track;track d_{3D}(V_{fit}) (cm);tracks", 200, 0., 1.);
1373 "h_probeReszRefitV",
"z_{track} -z_{V_{refit}};track res_{z}(V_{refit}) (cm);tracks", 200, -1., 1.);
1376 "h_probeRecoVSigZ",
"Longitudinal DCA Significance (reco);d_{z}(V_{off})/#sigma_{dz};tracks", 100, -8, 8);
1378 "h_probeRecoVSigXY",
"Transverse DCA Significance (reco);d_{xy}(V_{off})/#sigma_{dxy};tracks", 100, -8, 8);
1380 "h_probeRefitVSigZ",
"Longitudinal DCA Significance (refit);d_{z}(V_{fit})/#sigma_{dz};tracks", 100, -8, 8);
1382 "h_probeRefitVSigXY",
"Transverse DCA Significance (refit);d_{xy}(V_{fit})/#sigma_{dxy};tracks", 100, -8, 8);
1384 "h_probeRefitVSig3D",
"3D DCA Significance (refit);d_{3D}/#sigma_{3D};tracks", 100, 0., 20.);
1386 ProbeFeatures.
make<TH1F>(
"h_probeRefitVLogSig3D",
1387 "log_{10}(3D DCA-Significance) (refit);log_{10}(d_{3D}/#sigma_{3D});tracks",
1392 "h_probeRefitVSigResZ",
1393 "Longitudinal residual significance (refit);(z_{track} -z_{V_{fit}})/#sigma_{res_{z}};tracks",
1398 h_probeHits_ = ProbeFeatures.
make<TH1F>(
"h_probeNRechits",
"N_{hits} ;N_{hits} ;tracks", 40, -0.5, 39.5);
1399 h_probeHits1D_ = ProbeFeatures.
make<TH1F>(
"h_probeNRechits1D",
"N_{hits} 1D ;N_{hits} 1D ;tracks", 40, -0.5, 39.5);
1400 h_probeHits2D_ = ProbeFeatures.
make<TH1F>(
"h_probeNRechits2D",
"N_{hits} 2D ;N_{hits} 2D ;tracks", 40, -0.5, 39.5);
1402 ProbeFeatures.
make<TH1F>(
"h_probeNRechitsTIB",
"N_{hits} TIB ;N_{hits} TIB;tracks", 40, -0.5, 39.5);
1404 ProbeFeatures.
make<TH1F>(
"h_probeNRechitsTOB",
"N_{hits} TOB ;N_{hits} TOB;tracks", 40, -0.5, 39.5);
1406 ProbeFeatures.
make<TH1F>(
"h_probeNRechitsTID",
"N_{hits} TID ;N_{hits} TID;tracks", 40, -0.5, 39.5);
1408 ProbeFeatures.
make<TH1F>(
"h_probeNRechitsTEC",
"N_{hits} TEC ;N_{hits} TEC;tracks", 40, -0.5, 39.5);
1410 ProbeFeatures.
make<TH1F>(
"h_probeNRechitsBPIX",
"N_{hits} BPIX;N_{hits} BPIX;tracks", 40, -0.5, 39.5);
1412 ProbeFeatures.
make<TH1F>(
"h_probeNRechitsFPIX",
"N_{hits} FPIX;N_{hits} FPIX;tracks", 40, -0.5, 39.5);
1415 ProbeFeatures.
make<TH1F>(
"h_probeL1Ladder",
"Ladder number (L1 hit); ladder number", 22, -1.5, 20.5);
1417 ProbeFeatures.
make<TH1F>(
"h_probeL1Module",
"Module number (L1 hit); module number", 10, -1.5, 8.5);
1420 "h2_probeLayer1Map",
"Position in Layer 1 of first hit;module number;ladder number", 8, 0.5, 8.5, 12, 0.5, 12.5);
1422 "Position in Layer 1 of first hit;module number;ladder number",
1430 ProbeFeatures.
make<TH1I>(
"h_probeHasBPixL1Overlap",
"n. hits in L1;n. L1-BPix hits;tracks", 5, -0.5, 4.5);
1432 "h_probeL1ClusterProb",
1433 "log_{10}(Cluster Probability) for Layer1 hits;log_{10}(cluster probability); n. Layer1 hits",
1441 "h_fitVtxNtracks",
"N_{trks} used in vertex fit;N^{fit}_{tracks};vertices", 100, -0.5, 99.5);
1443 "h_fitVtxNdof",
"N_{DOF} of vertex fit;N_{DOF} of refit vertex;vertices", 100, -0.5, 99.5);
1445 "h_fitVtxChi2",
"#chi^{2} of vertex fit;vertex #chi^{2};vertices", 100, -0.5, 99.5);
1447 "h_fitVtxChi2ndf",
"#chi^{2}/ndf of vertex fit;vertex #chi^{2}/ndf;vertices", 100, -0.5, 9.5);
1449 "h_fitVtxChi2Prob",
"Prob(#chi^{2},ndf) of vertex fit;Prob(#chi^{2},ndf);vertices", 40, 0., 1.);
1451 "h_fitVtxTrackWeights",
"track weights associated to track;track weights;tracks", 40, 0., 1.);
1453 "h_fitVtxTrackAverageWeight_",
"average track weight per vertex;#LT track weight #GT;vertices", 40, 0., 1.);
1458 RecoVertexFeatures.
make<TH1F>(
"h_recoVtxNtracks",
"N^{vtx}_{trks};N^{vtx}_{trks};vertices", 100, -0.5, 99.5);
1460 RecoVertexFeatures.
make<TH1F>(
"h_recoVtxChi2ndf",
"#chi^{2}/ndf vtx;#chi^{2}/ndf vtx;vertices", 10, -0.5, 9.5);
1462 "h_recoVtxChi2Prob",
"Prob(#chi^{2},ndf);Prob(#chi^{2},ndf);vertices", 40, 0., 1.);
1464 RecoVertexFeatures.
make<TH1F>(
"h_recoVtxSumPt",
"Sum(p^{trks}_{T});Sum(p^{trks}_{T});vertices", 100, 0., 200.);
1629 for (
unsigned int iLadder = 0; iLadder <
nLadders_; iLadder++) {
1630 for (
unsigned int iModule = 0; iModule < 8; iModule++) {
1632 AbsL1Map.
make<TH1F>(Form(
"histo_dxy_ladder%i_module%i", iLadder, iModule),
1633 Form(
"d_{xy} ladder=%i module=%i;d_{xy} [#mum];tracks", iLadder, iModule),
1639 AbsL1Map.
make<TH1F>(Form(
"histo_dz_ladder%i_module%i", iLadder, iModule),
1640 Form(
"d_{z} ladder=%i module=%i;d_{z} [#mum];tracks", iLadder, iModule),
1646 NormL1Map.
make<TH1F>(Form(
"histo_norm_dxy_ladder%i_module%i", iLadder, iModule),
1647 Form(
"d_{xy} ladder=%i module=%i;d_{xy}/#sigma_{d_{xy}};tracks", iLadder, iModule),
1653 NormL1Map.
make<TH1F>(Form(
"histo_norm_dz_ladder%i_module%i", iLadder, iModule),
1654 Form(
"d_{z} ladder=%i module=%i;d_{z}/#sigma_{d_{z}};tracks", iLadder, iModule),
1677 Form(
"histo_dxy_eta_plot%i_phi_plot%i",
i,
j),
1678 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{xy};tracks", etaF, etaL, phiF, phiL),
1684 Form(
"histo_dz_eta_plot%i_phi_plot%i",
i,
j),
1685 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{z};tracks", etaF, etaL, phiF, phiL),
1691 Form(
"histo_d3D_eta_plot%i_phi_plot%i",
i,
j),
1692 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{3D};tracks", etaF, etaL, phiF, phiL),
1698 Form(
"histo_norm_dxy_eta_plot%i_phi_plot%i",
i,
j),
1699 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{xy}/#sigma_{d_{xy}};tracks",
1709 Form(
"histo_norm_dz_eta_plot%i_phi_plot%i",
i,
j),
1710 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{z}/#sigma_{d_{z}};tracks",
1720 Form(
"histo_norm_d3D_eta_plot%i_phi_plot%i",
i,
j),
1721 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{3D}/#sigma_{d_{3D}};tracks",
1737 "d_{xy} vs track #phi;track #phi [rad];track d_{xy}(PV) [#mum]",
1746 "d_{z} vs track #phi;track #phi [rad];track d_{z}(PV) [#mum]",
1756 "d_{xy}/#sigma_{d_{xy}} vs track #phi;track #phi [rad];track d_{xy}(PV)/#sigma_{d_{xy}}",
1765 BiasVsParameter.
make<TH2F>(
"h2_n_dz_vs_phi",
1766 "d_{z}/#sigma_{d_{z}} vs track #phi;track #phi [rad];track d_{z}(PV)/#sigma_{d_{z}}",
1775 "d_{xy} vs track #eta;track #eta;track d_{xy}(PV) [#mum]",
1784 "d_{z} vs track #eta;track #eta;track d_{z}(PV) [#mum]",
1793 BiasVsParameter.
make<TH2F>(
"h2_n_dxy_vs_eta",
1794 "d_{xy}/#sigma_{d_{xy}} vs track #eta;track #eta;track d_{xy}(PV)/#sigma_{d_{xy}}",
1803 "d_{z}/#sigma_{d_{z}} vs track #eta;track #eta;track d_{z}(PV)/#sigma_{d_{z}}",
1826 "#LT d_{xy} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{xy} #GT [#mum]",
1833 "#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees];#sigma_{d_{xy}} [#mum]",
1840 "#LT d_{z} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{z} #GT [#mum]",
1847 "#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];#sigma_{d_{z}} [#mum]",
1853 "means_dxy_eta",
"#LT d_{xy} #GT vs #eta sector;#eta (sector);#LT d_{xy} #GT [#mum]",
nBins_,
lowedge,
highedge);
1856 "#sigma_{d_{xy}} vs #eta sector;#eta (sector);#sigma_{d_{xy}} [#mum]",
1862 "means_dz_eta",
"#LT d_{z} #GT vs #eta sector;#eta (sector);#LT d_{z} #GT [#mum]",
nBins_,
lowedge,
highedge);
1865 "widths_dz_eta",
"#sigma_{d_{xy}} vs #eta sector;#eta (sector);#sigma_{d_{z}} [#mum]",
nBins_,
lowedge,
highedge);
1868 "norm_means_dxy_phi",
1869 "#LT d_{xy}/#sigma_{d_{xy}} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{xy}/#sigma_{d_{xy}} #GT",
1875 "norm_widths_dxy_phi",
1876 "width(d_{xy}/#sigma_{d_{xy}}) vs #phi sector;#varphi (sector) [degrees]; width(d_{xy}/#sigma_{d_{xy}})",
1882 "norm_means_dz_phi",
1883 "#LT d_{z}/#sigma_{d_{z}} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{z}/#sigma_{d_{z}} #GT",
1889 "norm_widths_dz_phi",
1890 "width(d_{z}/#sigma_{d_{z}}) vs #phi sector;#varphi (sector) [degrees];width(d_{z}/#sigma_{d_{z}})",
1896 "norm_means_dxy_eta",
1897 "#LT d_{xy}/#sigma_{d_{xy}} #GT vs #eta sector;#eta (sector);#LT d_{xy}/#sigma_{d_{z}} #GT",
1903 "norm_widths_dxy_eta",
1904 "width(d_{xy}/#sigma_{d_{xy}}) vs #eta sector;#eta (sector);width(d_{xy}/#sigma_{d_{z}})",
1911 "#LT d_{z}/#sigma_{d_{z}} #GT vs #eta sector;#eta (sector);#LT d_{z}/#sigma_{d_{z}} #GT",
1918 "width(d_{z}/#sigma_{d_{z}}) vs #eta sector;#eta (sector);width(d_{z}/#sigma_{d_{z}})",
1926 "#LT d_{xy} #GT vs pT;p_{T} [GeV];#LT d_{xy} #GT [#mum]",
1931 "#sigma_{d_{xy}} vs pT;p_{T} [GeV];#sigma_{d_{xy}} [#mum]",
1936 "means_dz_pT",
"#LT d_{z} #GT vs pT;p_{T} [GeV];#LT d_{z} #GT [#mum]",
mypT_bins_.size() - 1,
mypT_bins_.data());
1939 "#sigma_{d_{z}} vs pT;p_{T} [GeV];#sigma_{d_{z}} [#mum]",
1945 "#LT d_{xy}/#sigma_{d_{xy}} #GT vs pT;p_{T} [GeV];#LT d_{xy}/#sigma_{d_{xy}} #GT",
1951 "width(d_{xy}/#sigma_{d_{xy}}) vs pT;p_{T} [GeV]; width(d_{xy}/#sigma_{d_{xy}})",
1957 "#LT d_{z}/#sigma_{d_{z}} #GT vs pT;p_{T} [GeV];#LT d_{z}/#sigma_{d_{z}} #GT",
1963 "width(d_{z}/#sigma_{d_{z}}) vs pT;p_{T} [GeV];width(d_{z}/#sigma_{d_{z}})",
1969 "#LT d_{xy} #GT vs p_{T};p_{T}(|#eta|<1.) [GeV];#LT d_{xy} #GT [#mum]",
1975 "#sigma_{d_{xy}} vs p_{T};p_{T}(|#eta|<1.) [GeV];#sigma_{d_{xy}} [#mum]",
1981 "#LT d_{z} #GT vs p_{T};p_{T}(|#eta|<1.) [GeV];#LT d_{z} #GT [#mum]",
1987 "#sigma_{d_{z}} vs p_{T};p_{T}(|#eta|<1.) [GeV];#sigma_{d_{z}} [#mum]",
1992 "norm_means_dxy_pTCentral",
1993 "#LT d_{xy}/#sigma_{d_{xy}} #GT vs p_{T};p_{T}(|#eta|<1.) [GeV];#LT d_{xy}/#sigma_{d_{z}} #GT",
1998 "norm_widths_dxy_pTCentral",
1999 "width(d_{xy}/#sigma_{d_{xy}}) vs p_{T};p_{T}(|#eta|<1.) [GeV];width(d_{xy}/#sigma_{d_{z}})",
2004 "norm_means_dz_pTCentral",
2005 "#LT d_{z}/#sigma_{d_{z}} #GT vs p_{T};p_{T}(|#eta|<1.) [GeV];#LT d_{z}/#sigma_{d_{z}} #GT",
2010 "norm_widths_dz_pTCentral",
2011 "width(d_{z}/#sigma_{d_{z}}) vs p_{T};p_{T}(|#eta|<1.) [GeV];width(d_{z}/#sigma_{d_{z}})",
2018 "#LT d_{xy} #GT map;#eta (sector);#varphi (sector) [degrees]",
2027 "#LT d_{z} #GT map;#eta (sector);#varphi (sector) [degrees]",
2036 "#LT d_{xy}/#sigma_{d_{xy}} #GT map;#eta (sector);#varphi (sector) [degrees]",
2045 "#LT d_{z}/#sigma_{d_{z}} #GT map;#eta (sector);#varphi (sector) [degrees]",
2054 "#sigma_{d_{xy}} map;#eta (sector);#varphi (sector) [degrees]",
2063 "#sigma_{d_{z}} map;#eta (sector);#varphi (sector) [degrees]",
2073 "width(d_{xy}/#sigma_{d_{xy}}) map;#eta (sector);#varphi (sector) [degrees]",
2082 "width(d_{z}/#sigma_{d_{z}}) map;#eta (sector);#varphi (sector) [degrees]",
2094 "Median of d_{xy} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{xy}) [#mum]",
2101 "Median absolute deviation of d_{xy} vs #phi sector;#varphi (sector) [degrees];MAD(d_{xy}) [#mum]",
2108 "Median of d_{z} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{z}) [#mum]",
2115 "Median absolute deviation of d_{z} vs #phi sector;#varphi (sector) [degrees];MAD(d_{z}) [#mum]",
2122 "Median of d_{xy} vs #eta sector;#eta (sector);#mu_{1/2}(d_{xy}) [#mum]",
2129 "Median absolute deviation of d_{xy} vs #eta sector;#eta (sector);MAD(d_{xy}) [#mum]",
2136 "Median of d_{z} vs #eta sector;#eta (sector);#mu_{1/2}(d_{z}) [#mum]",
2143 "Median absolute deviation of d_{z} vs #eta sector;#eta (sector);MAD(d_{z}) [#mum]",
2149 "norm_medians_dxy_phi",
2150 "Median of d_{xy}/#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{xy}/#sigma_{d_{xy}})",
2156 "Median absolute deviation of d_{xy}/#sigma_{d_{xy}} vs #phi "
2157 "sector;#varphi (sector) [degrees]; MAD(d_{xy}/#sigma_{d_{xy}})",
2163 "norm_medians_dz_phi",
2164 "Median of d_{z}/#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{z}/#sigma_{d_{z}})",
2170 "Median absolute deviation of d_{z}/#sigma_{d_{z}} vs #phi sector;#varphi "
2171 "(sector) [degrees];MAD(d_{z}/#sigma_{d_{z}})",
2177 "norm_medians_dxy_eta",
2178 "Median of d_{xy}/#sigma_{d_{xy}} vs #eta sector;#eta (sector);#mu_{1/2}(d_{xy}/#sigma_{d_{z}})",
2184 "norm_MADs_dxy_eta",
2185 "Median absolute deviation of d_{xy}/#sigma_{d_{xy}} vs #eta sector;#eta (sector);MAD(d_{xy}/#sigma_{d_{z}})",
2191 "norm_medians_dz_eta",
2192 "Median of d_{z}/#sigma_{d_{z}} vs #eta sector;#eta (sector);#mu_{1/2}(d_{z}/#sigma_{d_{z}})",
2199 "Median absolute deviation of d_{z}/#sigma_{d_{z}} vs #eta sector;#eta (sector);MAD(d_{z}/#sigma_{d_{z}})",
2248 Form(
"histo_dxy_eta_plot%i_phi_plot%i",
i,
j),
2249 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{xy} [#mum];tracks", etaF, etaL, phiF, phiL),
2255 Form(
"histo_dxy_eta_plot%i_phi_plot%i",
i,
j),
2256 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{z} [#mum];tracks", etaF, etaL, phiF, phiL),
2262 Form(
"histo_norm_dxy_eta_plot%i_phi_plot%i",
i,
j),
2263 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{xy}/#sigma_{d_{xy}};tracks",
2273 Form(
"histo_norm_dxy_eta_plot%i_phi_plot%i",
i,
j),
2274 Form(
"%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{z}/#sigma_{d_{z}};tracks",
2298 MeanBiasTrendsDir.
make<TH1F>(
"means_dxy_phi",
2299 "#LT d_{xy} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{xy} #GT [#mum]",
2306 "#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees];#sigma_{d_{xy}} [#mum]",
2312 MeanBiasTrendsDir.
make<TH1F>(
"means_dz_phi",
2313 "#LT d_{z} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{z} #GT [#mum]",
2319 WidthBiasTrendsDir.
make<TH1F>(
"widths_dz_phi",
2320 "#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];#sigma_{d_{z}} [#mum]",
2326 "means_dxy_eta",
"#LT d_{xy} #GT vs #eta sector;#eta (sector);#LT d_{xy} #GT [#mum]",
nBins_,
lowedge,
highedge);
2329 WidthBiasTrendsDir.
make<TH1F>(
"widths_dxy_eta",
2330 "#sigma_{d_{xy}} vs #eta sector;#eta (sector);#sigma_{d_{xy}} [#mum]",
2336 "means_dz_eta",
"#LT d_{z} #GT vs #eta sector;#eta (sector);#LT d_{z} #GT [#mum]",
nBins_,
lowedge,
highedge);
2339 WidthBiasTrendsDir.
make<TH1F>(
"widths_dz_eta",
2340 "#sigma_{d_{xy}} vs #eta sector;#eta (sector);#sigma_{d_{z}} [#mum]",
2346 "norm_means_dxy_phi",
2347 "#LT d_{xy}/#sigma_{d_{xy}} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{xy}/#sigma_{d_{xy}} #GT",
2353 "norm_widths_dxy_phi",
2354 "width(d_{xy}/#sigma_{d_{xy}}) vs #phi sector;#varphi (sector) [degrees]; width(d_{xy}/#sigma_{d_{xy}})",
2360 "norm_means_dz_phi",
2361 "#LT d_{z}/#sigma_{d_{z}} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{z}/#sigma_{d_{z}} #GT",
2367 "norm_widths_dz_phi",
2368 "width(d_{z}/#sigma_{d_{z}}) vs #phi sector;#varphi (sector) [degrees];width(d_{z}/#sigma_{d_{z}})",
2374 "norm_means_dxy_eta",
2375 "#LT d_{xy}/#sigma_{d_{xy}} #GT vs #eta sector;#eta (sector);#LT d_{xy}/#sigma_{d_{z}} #GT",
2381 "norm_widths_dxy_eta",
2382 "width(d_{xy}/#sigma_{d_{xy}}) vs #eta sector;#eta (sector);width(d_{xy}/#sigma_{d_{z}})",
2388 "norm_means_dz_eta",
2389 "#LT d_{z}/#sigma_{d_{z}} #GT vs #eta sector;#eta (sector);#LT d_{z}/#sigma_{d_{z}} #GT",
2395 "norm_widths_dz_eta",
2396 "width(d_{z}/#sigma_{d_{z}}) vs #eta sector;#eta (sector);width(d_{z}/#sigma_{d_{z}})",
2404 "#LT d_{xy} #GT map;#eta (sector);#varphi (sector) [degrees]",
2413 "#LT d_{z} #GT map;#eta (sector);#varphi (sector) [degrees]",
2422 Mean2DBiasMapsDir.
make<TH2F>(
"norm_means_dxy_map",
2423 "#LT d_{xy}/#sigma_{d_{xy}} #GT map;#eta (sector);#varphi (sector) [degrees]",
2432 Mean2DBiasMapsDir.
make<TH2F>(
"norm_means_dz_map",
2433 "#LT d_{z}/#sigma_{d_{z}} #GT map;#eta (sector);#varphi (sector) [degrees]",
2442 "#sigma_{d_{xy}} map;#eta (sector);#varphi (sector) [degrees]",
2451 "#sigma_{d_{z}} map;#eta (sector);#varphi (sector) [degrees]",
2460 Width2DBiasMapsDir.
make<TH2F>(
"norm_widths_dxy_map",
2461 "width(d_{xy}/#sigma_{d_{xy}}) map;#eta (sector);#varphi (sector) [degrees]",
2470 Width2DBiasMapsDir.
make<TH2F>(
"norm_widths_dz_map",
2471 "width(d_{z}/#sigma_{d_{z}}) map;#eta (sector);#varphi (sector) [degrees]",
2483 "Median of d_{xy} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{xy}) [#mum]",
2490 "Median absolute deviation of d_{xy} vs #phi sector;#varphi (sector) [degrees];MAD(d_{xy}) [#mum]",
2497 "Median of d_{z} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{z}) [#mum]",
2504 "Median absolute deviation of d_{z} vs #phi sector;#varphi (sector) [degrees];MAD(d_{z}) [#mum]",
2510 MedianBiasTrendsDir.
make<TH1F>(
"medians_dxy_eta",
2511 "Median of d_{xy} vs #eta sector;#eta (sector);#mu_{1/2}(d_{xy}) [#mum]",
2518 "Median absolute deviation of d_{xy} vs #eta sector;#eta (sector);MAD(d_{xy}) [#mum]",
2524 MedianBiasTrendsDir.
make<TH1F>(
"medians_dz_eta",
2525 "Median of d_{z} vs #eta sector;#eta (sector);#mu_{1/2}(d_{z}) [#mum]",
2531 MADBiasTrendsDir.
make<TH1F>(
"MADs_dz_eta",
2532 "Median absolute deviation of d_{z} vs #eta sector;#eta (sector);MAD(d_{z}) [#mum]",
2538 "norm_medians_dxy_phi",
2539 "Median of d_{xy}/#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{xy}/#sigma_{d_{xy}})",
2545 "Median absolute deviation of d_{xy}/#sigma_{d_{xy}} vs #phi "
2546 "sector;#varphi (sector) [degrees]; MAD(d_{xy}/#sigma_{d_{xy}})",
2552 "norm_medians_dz_phi",
2553 "Median of d_{z}/#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{z}/#sigma_{d_{z}})",
2559 "Median absolute deviation of d_{z}/#sigma_{d_{z}} vs #phi "
2560 "sector;#varphi (sector) [degrees];MAD(d_{z}/#sigma_{d_{z}})",
2566 "norm_medians_dxy_eta",
2567 "Median of d_{xy}/#sigma_{d_{xy}} vs #eta sector;#eta (sector);#mu_{1/2}(d_{xy}/#sigma_{d_{z}})",
2573 "norm_MADs_dxy_eta",
2574 "Median absolute deviation of d_{xy}/#sigma_{d_{xy}} vs #eta sector;#eta (sector);MAD(d_{xy}/#sigma_{d_{z}})",
2580 "norm_medians_dz_eta",
2581 "Median of d_{z}/#sigma_{d_{z}} vs #eta sector;#eta (sector);#mu_{1/2}(d_{z}/#sigma_{d_{z}})",
2588 "Median absolute deviation of d_{z}/#sigma_{d_{z}} vs #eta sector;#eta (sector);MAD(d_{z}/#sigma_{d_{z}})",
2602 unsigned int count = 1;
2614 edm::LogInfo(
"PrimaryVertexValidation") <<
"######################################\n"
2615 <<
"# PrimaryVertexValidation::endJob()\n"
2616 <<
"# Number of analyzed events: " <<
Nevt_ <<
"\n"
2617 <<
"######################################";
2622 "means_dxy_modZ",
"#LT d_{xy} #GT vs modZ;module number (Z);#LT d_{xy} #GT [#mum]",
nModZ_, 0.,
nModZ_);
2625 "widths_dxy_modZ",
"#sigma_{d_{xy}} vs modZ;module number (Z);#sigma_{d_{xy}} [#mum]",
nModZ_, 0.,
nModZ_);
2628 "means_dz_modZ",
"#LT d_{z} #GT vs modZ;module number (Z);#LT d_{z} #GT [#mum]",
nModZ_, 0.,
nModZ_);
2631 "widths_dz_modZ",
"#sigma_{d_{z}} vs modZ;module number (Z);#sigma_{d_{z}} [#mum]",
nModZ_, 0.,
nModZ_);
2634 "#LT d_{xy} #GT vs ladder;ladder number (#phi);#LT d_{xy} #GT [#mum]",
2641 "#sigma_{d_{xy}} vs ladder;ladder number (#phi);#sigma_{d_{xy}} [#mum]",
2647 "means_dz_ladder",
"#LT d_{z} #GT vs ladder;ladder number (#phi);#LT d_{z} #GT [#mum]",
nLadders_, 0.,
nLadders_);
2651 "#sigma_{d_{z}} vs ladder;ladder number (#phi);#sigma_{d_{z}} [#mum]",
2657 "norm_means_dxy_modZ",
2658 "#LT d_{xy}/#sigma_{d_{xy}} #GT vs modZ;module number (Z);#LT d_{xy}/#sigma_{d_{xy}} #GT",
2664 "norm_widths_dxy_modZ",
2665 "width(d_{xy}/#sigma_{d_{xy}}) vs modZ;module number (Z); width(d_{xy}/#sigma_{d_{xy}})",
2672 "#LT d_{z}/#sigma_{d_{z}} #GT vs modZ;module number (Z);#LT d_{z}/#sigma_{d_{z}} #GT",
2679 "width(d_{z}/#sigma_{d_{z}}) vs pT;module number (Z);width(d_{z}/#sigma_{d_{z}})",
2685 "norm_means_dxy_ladder",
2686 "#LT d_{xy}/#sigma_{d_{xy}} #GT vs ladder;ladder number (#phi);#LT d_{xy}/#sigma_{d_{z}} #GT",
2692 "norm_widths_dxy_ladder",
2693 "width(d_{xy}/#sigma_{d_{xy}}) vs ladder;ladder number (#phi);width(d_{xy}/#sigma_{d_{z}})",
2699 "norm_means_dz_ladder",
2700 "#LT d_{z}/#sigma_{d_{z}} #GT vs ladder;ladder number (#phi);#LT d_{z}/#sigma_{d_{z}} #GT",
2706 "norm_widths_dz_ladder",
2707 "width(d_{z}/#sigma_{d_{z}}) vs ladder;ladder number (#phi);width(d_{z}/#sigma_{d_{z}})",
2715 "#LT d_{xy} #GT map;module number [z];ladder number [#varphi]",
2724 "#LT d_{z} #GT map;module number [z];ladder number [#varphi]",
2734 "#LT d_{xy}/#sigma_{d_{xy}} #GT map;module number [z];ladder number [#varphi]",
2743 "#LT d_{z}/#sigma_{d_{z}} #GT map;module number [z];ladder number [#varphi]",
2752 "#sigma_{d_{xy}} map;module number [z];ladder number [#varphi]",
2761 "#sigma_{d_{z}} map;module number [z];ladder number [#varphi]",
2771 "width(d_{xy}/#sigma_{d_{xy}}) map;module number [z];ladder number [#varphi]",
2781 "width(d_{z}/#sigma_{d_{z}}) map;module number [z];ladder number [#varphi]",
2966 <<
runInfo.product()->m_start_time_str <<
" " <<
runInfo.product()->m_stop_time_str << std::endl;
2968 return std::make_pair(
runInfo.product()->m_start_time_ll,
runInfo.product()->m_stop_time_ll);
2976 double average_current =
runInfo.product()->m_avg_current;
2977 bool isOn = (average_current > 2000.);
2980 return ((isOn && !is0T) || (!isOn && is0T));
3059 TH1F* residualsPlot[100],
3065 char phibincenter[129];
3067 sprintf(phibincenter,
"%.f", (phiBins[
i] + phiBins[
i + 1]) / 2.);
3069 char etabincenter[129];
3077 trendPlot->SetBinContent(
i + 1, mean_);
3078 trendPlot->SetBinError(
i + 1, meanErr_);
3084 trendPlot->SetBinContent(
i + 1, width_);
3085 trendPlot->SetBinError(
i + 1, widthErr_);
3091 trendPlot->SetBinContent(
i + 1, median_);
3092 trendPlot->SetBinError(
i + 1, medianErr_);
3098 trendPlot->SetBinContent(
i + 1, mad_);
3099 trendPlot->SetBinError(
i + 1, madErr_);
3104 <<
"fillTrendPlot() " << fitPar_ <<
" unknown estimator!" << std::endl;
3108 if (var_.find(
"eta") != std::string::npos) {
3109 trendPlot->GetXaxis()->SetBinLabel(
i + 1, etabincenter);
3110 }
else if (var_.find(
"phi") != std::string::npos) {
3111 trendPlot->GetXaxis()->SetBinLabel(
i + 1, phibincenter);
3114 <<
"fillTrendPlot() " << var_ <<
" unknown track parameter!" << std::endl;
3121 std::vector<TH1F*>&
h,
3126 for (
auto iterator =
h.begin(); iterator !=
h.end(); iterator++) {
3132 float mean_ = myFit.first.value();
3133 float meanErr_ = myFit.first.error();
3134 trendPlot->SetBinContent(
bin, mean_);
3135 trendPlot->SetBinError(
bin, meanErr_);
3139 float width_ = myFit.second.value();
3140 float widthErr_ = myFit.second.error();
3141 trendPlot->SetBinContent(
bin, width_);
3142 trendPlot->SetBinError(
bin, widthErr_);
3148 trendPlot->SetBinContent(
bin, median_);
3149 trendPlot->SetBinError(
bin, medianErr_);
3155 trendPlot->SetBinContent(
bin, mad_);
3156 trendPlot->SetBinError(
bin, madErr_);
3161 <<
"fillTrendPlotByIndex() " << fitPar_ <<
" unknown estimator!" << std::endl;
3165 char bincenter[129];
3169 trendPlot->GetXaxis()->SetBinLabel(
bin, bincenter);
3172 sprintf(bincenter,
"%.f", (phiBins[
bin - 1] + phiBins[
bin]) / 2.);
3173 trendPlot->GetXaxis()->SetBinLabel(
bin, bincenter);
3183 TH1F* residualsMapPlot[100][100],
3189 for (
int i = 0;
i < nYBins_; ++
i) {
3190 char phibincenter[129];
3192 sprintf(phibincenter,
"%.f", (phiBins[
i] + phiBins[
i + 1]) / 2.);
3194 if (nXBins_ == nYBins_) {
3195 trendMap->GetYaxis()->SetBinLabel(
i + 1, phibincenter);
3198 for (
int j = 0;
j < nXBins_; ++
j) {
3199 char etabincenter[129];
3204 if (nXBins_ == nYBins_) {
3205 trendMap->GetXaxis()->SetBinLabel(
j + 1, etabincenter);
3213 trendMap->SetBinContent(
j + 1,
i + 1, mean_);
3214 trendMap->SetBinError(
j + 1,
i + 1, meanErr_);
3220 trendMap->SetBinContent(
j + 1,
i + 1, width_);
3221 trendMap->SetBinError(
j + 1,
i + 1, widthErr_);
3227 trendMap->SetBinContent(
j + 1,
i + 1, median_);
3228 trendMap->SetBinError(
j + 1,
i + 1, medianErr_);
3234 trendMap->SetBinContent(
j + 1,
i + 1, mad_);
3235 trendMap->SetBinError(
j + 1,
i + 1, madErr_);
3239 edm::LogWarning(
"PrimaryVertexValidation:") <<
" fillMap() " << fitPar_ <<
" unknown estimator!" << std::endl;
3249 if (
a.tracksSize() !=
b.tracksSize())
3250 return a.tracksSize() >
b.tracksSize() ?
true :
false;
3252 return a.chi2() <
b.chi2() ?
true :
false;
3265 double vzErr = 0.0, vxErr = 0.0, vyErr = 0.0;
3266 vtxPoint =
vertex.position();
3271 double dxy = 0.0,
dz = 0.0, dxysigma = 0.0, dzsigma = 0.0;
3274 dxysigma =
sqrt(
track.d0Error() *
track.d0Error() + vxErr * vyErr);
3275 dzsigma =
sqrt(
track.dzError() *
track.dzError() + vzErr * vzErr);
3283 if (
track.ptError() /
track.pt() > ptErrMax_)
3293 TH1F::SetDefaultSumw2(kTRUE);
3295 std::map<std::string, TH1*>
h;
3300 h[
"pseudorapidity_" +
type] =
3301 dir.make<TH1F>((
"rapidity_" +
type).c_str(),
"track pseudorapidity; track #eta; tracks", 100, -3., 3.);
3302 h[
"z0_" +
type] =
dir.make<TH1F>((
"z0_" +
type).c_str(),
"track z_{0};track z_{0} (cm);tracks", 80, -40., 40.);
3303 h[
"phi_" +
type] =
dir.make<TH1F>((
"phi_" +
type).c_str(),
"track #phi; track #phi;tracks", 80, -
M_PI,
M_PI);
3304 h[
"eta_" +
type] =
dir.make<TH1F>((
"eta_" +
type).c_str(),
"track #eta; track #eta;tracks", 80, -4., 4.);
3305 h[
"pt_" +
type] =
dir.make<TH1F>((
"pt_" +
type).c_str(),
"track p_{T}; track p_{T} [GeV];tracks", 100, 0., 20.);
3306 h[
"p_" +
type] =
dir.make<TH1F>((
"p_" +
type).c_str(),
"track p; track p [GeV];tracks", 100, 0., 20.);
3307 h[
"found_" +
type] =
3308 dir.make<TH1F>((
"found_" +
type).c_str(),
"n. found hits;n^{found}_{hits};tracks", 30, 0., 30.);
3309 h[
"lost_" +
type] =
dir.make<TH1F>((
"lost_" +
type).c_str(),
"n. lost hits;n^{lost}_{hits};tracks", 20, 0., 20.);
3310 h[
"nchi2_" +
type] =
3311 dir.make<TH1F>((
"nchi2_" +
type).c_str(),
"normalized track #chi^{2};track #chi^{2}/ndf;tracks", 100, 0., 20.);
3312 h[
"rstart_" +
type] =
dir.make<TH1F>(
3313 (
"rstart_" +
type).c_str(),
"track start radius; track innermost radius r (cm);tracks", 100, 0., 20.);
3314 h[
"expectedInner_" +
type] =
dir.make<TH1F>(
3315 (
"expectedInner_" +
type).c_str(),
"n. expected inner hits;n^{expected}_{inner};tracks", 10, 0., 10.);
3316 h[
"expectedOuter_" +
type] =
dir.make<TH1F>(
3317 (
"expectedOuter_" +
type).c_str(),
"n. expected outer hits;n^{expected}_{outer};tracks ", 10, 0., 10.);
3318 h[
"logtresxy_" +
type] =
3319 dir.make<TH1F>((
"logtresxy_" +
type).c_str(),
3320 "log10(track r-#phi resolution/#mum);log10(track r-#phi resolution/#mum);tracks",
3324 h[
"logtresz_" +
type] =
dir.make<TH1F>((
"logtresz_" +
type).c_str(),
3325 "log10(track z resolution/#mum);log10(track z resolution/#mum);tracks",
3329 h[
"tpullxy_" +
type] =
3330 dir.make<TH1F>((
"tpullxy_" +
type).c_str(),
"track r-#phi pull;pull_{r-#phi};tracks", 100, -10., 10.);
3331 h[
"tpullz_" +
type] =
3332 dir.make<TH1F>((
"tpullz_" +
type).c_str(),
"track r-z pull;pull_{r-z};tracks", 100, -50., 50.);
3333 h[
"tlogDCAxy_" +
type] =
dir.make<TH1F>(
3334 (
"tlogDCAxy_" +
type).c_str(),
"track log_{10}(DCA_{r-#phi});track log_{10}(DCA_{r-#phi});tracks", 200, -5., 3.);
3335 h[
"tlogDCAz_" +
type] =
dir.make<TH1F>(
3336 (
"tlogDCAz_" +
type).c_str(),
"track log_{10}(DCA_{r-z});track log_{10}(DCA_{r-z});tracks", 200, -5., 5.);
3337 h[
"lvseta_" +
type] =
dir.make<TH2F>(
3338 (
"lvseta_" +
type).c_str(),
"cluster length vs #eta;track #eta;cluster length", 60, -3., 3., 20, 0., 20);
3339 h[
"lvstanlambda_" +
type] =
dir.make<TH2F>((
"lvstanlambda_" +
type).c_str(),
3340 "cluster length vs tan #lambda; tan#lambda;cluster length",
3347 h[
"restrkz_" +
type] =
3348 dir.make<TH1F>((
"restrkz_" +
type).c_str(),
"z-residuals (track vs vertex);res_{z} (cm);tracks", 200, -5., 5.);
3349 h[
"restrkzvsphi_" +
type] =
dir.make<TH2F>((
"restrkzvsphi_" +
type).c_str(),
3350 "z-residuals (track - vertex) vs track #phi;track #phi;res_{z} (cm)",
3357 h[
"restrkzvseta_" +
type] =
dir.make<TH2F>((
"restrkzvseta_" +
type).c_str(),
3358 "z-residuals (track - vertex) vs track #eta;track #eta;res_{z} (cm)",
3365 h[
"pulltrkzvsphi_" +
type] =
3366 dir.make<TH2F>((
"pulltrkzvsphi_" +
type).c_str(),
3367 "normalized z-residuals (track - vertex) vs track #phi;track #phi;res_{z}/#sigma_{res_{z}}",
3374 h[
"pulltrkzvseta_" +
type] =
3375 dir.make<TH2F>((
"pulltrkzvseta_" +
type).c_str(),
3376 "normalized z-residuals (track - vertex) vs track #eta;track #eta;res_{z}/#sigma_{res_{z}}",
3383 h[
"pulltrkz_" +
type] =
dir.make<TH1F>((
"pulltrkz_" +
type).c_str(),
3384 "normalized z-residuals (track vs vertex);res_{z}/#sigma_{res_{z}};tracks",
3388 h[
"sigmatrkz0_" +
type] =
dir.make<TH1F>(
3389 (
"sigmatrkz0_" +
type).c_str(),
"z-resolution (excluding beam);#sigma^{trk}_{z_{0}} (cm);tracks", 100, 0., 5.);
3390 h[
"sigmatrkz_" +
type] =
dir.make<TH1F>(
3391 (
"sigmatrkz_" +
type).c_str(),
"z-resolution (including beam);#sigma^{trk}_{z} (cm);tracks", 100, 0., 5.);
3392 h[
"nbarrelhits_" +
type] =
dir.make<TH1F>(
3393 (
"nbarrelhits_" +
type).c_str(),
"number of pixel barrel hits;n. hits Barrel Pixel;tracks", 10, 0., 10.);
3394 h[
"nbarrelLayers_" +
type] =
dir.make<TH1F>(
3395 (
"nbarrelLayers_" +
type).c_str(),
"number of pixel barrel layers;n. layers Barrel Pixel;tracks", 10, 0., 10.);
3396 h[
"nPxLayers_" +
type] =
dir.make<TH1F>(
3397 (
"nPxLayers_" +
type).c_str(),
"number of pixel layers (barrel+endcap);n. Pixel layers;tracks", 10, 0., 10.);
3398 h[
"nSiLayers_" +
type] =
3399 dir.make<TH1F>((
"nSiLayers_" +
type).c_str(),
"number of Tracker layers;n. Tracker layers;tracks", 20, 0., 20.);
3400 h[
"trackAlgo_" +
type] =
3401 dir.make<TH1F>((
"trackAlgo_" +
type).c_str(),
"track algorithm;track algo;tracks", 30, 0., 30.);
3402 h[
"trackQuality_" +
type] =
3403 dir.make<TH1F>((
"trackQuality_" +
type).c_str(),
"track quality;track quality;tracks", 7, -1., 6.);
3413 unsigned int theNOfBins,
3416 bool isNormalized) {
3417 TH1F::SetDefaultSumw2(kTRUE);
3429 std::vector<TH1F*>
h;
3430 h.reserve(theNOfBins);
3432 if (theNOfBins == 0) {
3434 <<
"bookResidualsHistogram() The number of bins cannot be identically 0" << std::endl;
3445 for (
unsigned int i = 0;
i < theNOfBins;
i++) {
3447 ? Form(
"%s vs %s - bin %i (%f < %s < %f);%s %s;tracks",
3456 : Form(
"%s vs %s - bin %i;%s %s;tracks",
3463 TH1F* htemp =
dir.make<TH1F>(
3464 Form(
"histo_%s_%s_plot%i", s_resType.c_str(), s_varType.c_str(),
i),
3485 using namespace reco;
3498 double d0Error =
tt->track().d0Error();
3507 double dzError =
tt->track().dzError();
3527 double z = (
tt->stateAtBeamLine().trackStateAtPCA()).
position().z();
3528 double tantheta =
tan((
tt->stateAtBeamLine().trackStateAtPCA()).momentum().theta());
3529 double dz2 =
pow(
tt->track().dzError(), 2) +
wxy2_ /
pow(tantheta, 2);
3542 double kappa = -0.002998 * fBfield_ *
tt->track().qoverp() /
cos(
tt->track().theta());
3545 double s0 = (
x1 *
cos(
tt->track().phi()) +
y1 *
sin(
tt->track().phi())) /
q;
3559 PVValHelper::fill(
h,
"nbarrelLayers_" + ttype,
tt->track().hitPattern().pixelBarrelLayersWithMeasurement());
3560 PVValHelper::fill(
h,
"nPxLayers_" + ttype,
tt->track().hitPattern().pixelLayersWithMeasurement());
3561 PVValHelper::fill(
h,
"nSiLayers_" + ttype,
tt->track().hitPattern().trackerLayersWithMeasurement());
3563 h,
"expectedInner_" + ttype,
tt->track().hitPattern().numberOfLostHits(HitPattern::MISSING_INNER_HITS));
3565 h,
"expectedOuter_" + ttype,
tt->track().hitPattern().numberOfLostHits(HitPattern::MISSING_OUTER_HITS));
3570 int longesthit = 0, nbarrel = 0;
3571 for (
auto const&
hit :
tt->track().recHits()) {
3580 if (clust->sizeY() - longesthit > 0)
3581 longesthit = clust->sizeY();
3582 if (clust->sizeY() > 20.) {
3599 desc.setComment(
"Validates alignment payloads by evaluating unbiased track paramter resisuals to vertices");
3603 desc.addUntracked<
int>(
"compressionSettings", -1);
3604 desc.add<
bool>(
"storeNtuple",
false);
3605 desc.add<
bool>(
"isLightNtuple",
true);
3606 desc.add<
bool>(
"useTracksFromRecoVtx",
false);
3607 desc.addUntracked<
double>(
"vertexZMax", 99);
3608 desc.addUntracked<
double>(
"intLumi", 0.);
3609 desc.add<
bool>(
"askFirstLayerHit",
false);
3610 desc.addUntracked<
bool>(
"doBPix",
true);
3611 desc.addUntracked<
bool>(
"doFPix",
true);
3612 desc.addUntracked<
double>(
"probePt", 0.);
3613 desc.addUntracked<
double>(
"probeP", 0.);
3614 desc.addUntracked<
double>(
"probeEta", 2.4);
3615 desc.addUntracked<
double>(
"probeNHits", 0.);
3616 desc.addUntracked<
int>(
"numberOfBins", 24);
3617 desc.addUntracked<
double>(
"minPt", 1.);
3618 desc.addUntracked<
double>(
"maxPt", 20.);
3619 desc.add<
bool>(
"Debug",
false);
3620 desc.addUntracked<
bool>(
"runControl",
false);
3621 desc.addUntracked<
bool>(
"forceBeamSpot",
false);
3623 std::vector<unsigned int> defaultRuns;
3624 defaultRuns.push_back(0);
3625 desc.addUntracked<std::vector<unsigned int>>(
"runControlNumber", defaultRuns);
3636 psd0.
add<
double>(
"maxNormalizedChi2", 5.0);
3637 psd0.add<
double>(
"minPt", 0.0);
3639 psd0.add<
double>(
"maxEta", 5.0);
3640 psd0.add<
double>(
"maxD0Significance", 5.0);
3641 psd0.add<
double>(
"maxD0Error", 1.0);
3642 psd0.add<
double>(
"maxDzError", 1.0);
3644 psd0.add<
int>(
"minPixelLayersWithHits", 2);
3645 psd0.add<
int>(
"minSiliconLayersWithHits", 5);
3646 psd0.add<
int>(
"numTracksThreshold", 0);
3658 psd1.
add<
double>(
"d0CutOff", 3.0);
3659 psd1.
add<
double>(
"Tmin", 2.0);
3660 psd1.
add<
double>(
"delta_lowT", 0.001);
3661 psd1.
add<
double>(
"zmerge", 0.01);
3662 psd1.
add<
double>(
"dzCutOff", 3.0);
3663 psd1.
add<
double>(
"Tpurge", 2.0);
3664 psd1.
add<
int>(
"convergence_mode", 0);
3665 psd1.
add<
double>(
"delta_highT", 0.01);
3666 psd1.
add<
double>(
"Tstop", 0.5);
3667 psd1.
add<
double>(
"coolingFactor", 0.6);
3668 psd1.
add<
double>(
"vertexSize", 0.006);
3669 psd1.
add<
double>(
"uniquetrkweight", 0.8);
3670 psd1.
add<
double>(
"zrange", 4.0);
3671 psd1.
add<
double>(
"tmerge", 0.01);
3672 psd1.
add<
double>(
"dtCutOff", 4.);
3673 psd1.
add<
double>(
"t0Max", 1.0);
3674 psd1.
add<
double>(
"vertexSizeTime", 0.008);
3677 psd2.
add<
double>(
"zSeparation", 1.0);
3684 descriptions.
add(
"primaryVertexValidation",
desc);