149 bool checkModuleIds(
const unsigned int,
const std::vector<unsigned int>&)
const;
173 bool inUintInterval(
const std::vector<unsigned int>&,
const unsigned int,
const unsigned int = 999)
const;
221 : parameterSet_(iConfig),
222 siStripClusterInfo_(consumesCollector(),
std::
string(
"")),
227 maxTracksPerEvent_(parameterSet_.getParameter<unsigned
int>(
"maxTracksPerEvent")),
228 minGoodHitsPerTrack_(parameterSet_.getParameter<unsigned
int>(
"minGoodHitsPerTrack")),
229 analyzerMode_(parameterSet_.getParameter<
bool>(
"analyzerMode")),
230 calculateApe_(parameterSet_.getParameter<
bool>(
"calculateApe")) {
247 edm::LogError(
"SectorBuilder") <<
"TrackerTreeFile not found";
250 TTree* tkTree(
nullptr);
251 tkTreeFile->GetObject(
"TrackerTreeGenerator/TrackerTree/TrackerTree", tkTree);
255 edm::LogError(
"SectorBuilder") <<
"TrackerTree not found in file";
258 unsigned int rawId(999), subdetId(999), layer(999), side(999), half(999), rod(999),
ring(999), petal(999), blade(999),
260 bool isDoubleSide(
false), isRPhi(
false), isStereo(
false);
261 int uDirection(999), vDirection(999), wDirection(999);
262 float posR(999.
F), posPhi(999.
F), posEta(999.
F),
posX(999.
F),
posY(999.
F), posZ(999.
F);
264 tkTree->SetBranchAddress(
"RawId", &rawId);
265 tkTree->SetBranchAddress(
"SubdetId", &subdetId);
266 tkTree->SetBranchAddress(
"Layer", &layer);
267 tkTree->SetBranchAddress(
"Side", &side);
268 tkTree->SetBranchAddress(
"Half", &half);
269 tkTree->SetBranchAddress(
"Rod", &rod);
270 tkTree->SetBranchAddress(
"Ring", &
ring);
271 tkTree->SetBranchAddress(
"Petal", &petal);
272 tkTree->SetBranchAddress(
"Blade", &blade);
273 tkTree->SetBranchAddress(
"Panel", &panel);
274 tkTree->SetBranchAddress(
"OuterInner", &outerInner);
275 tkTree->SetBranchAddress(
"Module", &
module);
276 tkTree->SetBranchAddress(
"NStrips", &
nStrips);
277 tkTree->SetBranchAddress(
"IsDoubleSide", &isDoubleSide);
278 tkTree->SetBranchAddress(
"IsRPhi", &isRPhi);
279 tkTree->SetBranchAddress(
"IsStereo", &isStereo);
280 tkTree->SetBranchAddress(
"UDirection", &uDirection);
281 tkTree->SetBranchAddress(
"VDirection", &vDirection);
282 tkTree->SetBranchAddress(
"WDirection", &wDirection);
283 tkTree->SetBranchAddress(
"PosR", &posR);
284 tkTree->SetBranchAddress(
"PosPhi", &posPhi);
285 tkTree->SetBranchAddress(
"PosEta", &posEta);
286 tkTree->SetBranchAddress(
"PosX", &
posX);
287 tkTree->SetBranchAddress(
"PosY", &
posY);
288 tkTree->SetBranchAddress(
"PosZ", &posZ);
290 int nModules(tkTree->GetEntries());
294 unsigned int sectorCounter(0);
296 edm::LogInfo(
"SectorBuilder") <<
"There are " << v_sectorDef.size() <<
" Sectors definded";
297 for (
auto const& parSet : v_sectorDef) {
300 std::vector<unsigned int> v_rawId(parSet.getParameter<std::vector<unsigned int> >(
"rawId")),
301 v_subdetId(parSet.getParameter<std::vector<unsigned int> >(
"subdetId")),
302 v_layer(parSet.getParameter<std::vector<unsigned int> >(
"layer")),
303 v_side(parSet.getParameter<std::vector<unsigned int> >(
"side")),
304 v_half(parSet.getParameter<std::vector<unsigned int> >(
"half")),
305 v_rod(parSet.getParameter<std::vector<unsigned int> >(
"rod")),
306 v_ring(parSet.getParameter<std::vector<unsigned int> >(
"ring")),
307 v_petal(parSet.getParameter<std::vector<unsigned int> >(
"petal")),
308 v_blade(parSet.getParameter<std::vector<unsigned int> >(
"blade")),
309 v_panel(parSet.getParameter<std::vector<unsigned int> >(
"panel")),
310 v_outerInner(parSet.getParameter<std::vector<unsigned int> >(
"outerInner")),
311 v_module(parSet.getParameter<std::vector<unsigned int> >(
"module")),
312 v_nStrips(parSet.getParameter<std::vector<unsigned int> >(
"nStrips")),
313 v_isDoubleSide(parSet.getParameter<std::vector<unsigned int> >(
"isDoubleSide")),
314 v_isRPhi(parSet.getParameter<std::vector<unsigned int> >(
"isRPhi")),
315 v_isStereo(parSet.getParameter<std::vector<unsigned int> >(
"isStereo"));
316 std::vector<int> v_uDirection(parSet.getParameter<std::vector<int> >(
"uDirection")),
317 v_vDirection(parSet.getParameter<std::vector<int> >(
"vDirection")),
318 v_wDirection(parSet.getParameter<std::vector<int> >(
"wDirection"));
319 std::vector<double> v_posR(parSet.getParameter<std::vector<double> >(
"posR")),
320 v_posPhi(parSet.getParameter<std::vector<double> >(
"posPhi")),
321 v_posEta(parSet.getParameter<std::vector<double> >(
"posEta")),
322 v_posX(parSet.getParameter<std::vector<double> >(
"posX")),
323 v_posY(parSet.getParameter<std::vector<double> >(
"posY")),
324 v_posZ(parSet.getParameter<std::vector<double> >(
"posZ"));
335 tkSector.
name = sectorName;
343 if (sectorCounter == 1) {
403 tkSector.
v_rawId.push_back(rawId);
404 bool moduleSelected(
false);
405 for (
auto const& i_rawId : allSectors.v_rawId) {
406 if (rawId == i_rawId)
407 moduleSelected =
true;
410 allSectors.v_rawId.push_back(rawId);
415 for (
auto const& i_rawId : tkSector.
v_rawId) {
432 <<
"Incorrect Sector Definition: there are pixel and strip modules within one sector"
433 <<
"\n... sector selection is not applied, sector " << sectorCounter <<
" is not built";
439 edm::LogInfo(
"SectorBuilder") <<
"There are " << tkSector.
v_rawId.size() <<
" Modules in Sector " << sectorCounter;
450 if (v_id.size() % 2 == 1) {
452 <<
"Incorrect Sector Definition: Position Vectors need even number of arguments (Intervals)"
453 <<
"\n... sector selection is not applied, sector " << sectorCounter <<
" is not built";
457 double intervalBegin(999.);
458 for (
auto const& i_id : v_id) {
461 intervalBegin = i_id;
462 if (
entry % 2 == 0 && intervalBegin > i_id) {
463 edm::LogError(
"SectorBuilder") <<
"Incorrect Sector Definition (Position Vector Intervals): \t" << intervalBegin
464 <<
" is bigger than " << i_id <<
" but is expected to be smaller"
465 <<
"\n... sector selection is not applied, sector " << sectorCounter
476 for (
auto const& i_id : v_id) {
486 for (
auto const& i_id : v_id) {
489 if (2 == i_id && !
id)
498 for (
auto const& i_id : v_id) {
509 double intervalBegin(999.);
510 for (
auto const& i_id : v_id) {
513 intervalBegin = i_id;
514 if (
entry % 2 == 0 &&
id >= intervalBegin &&
id < i_id)
521 bool commonModules(
false);
522 for (std::map<unsigned int, TrackerSectorStruct>::const_iterator i_sector =
m_tkSector_.begin();
525 std::map<unsigned int, TrackerSectorStruct>::const_iterator i_sector2(i_sector);
526 for (++i_sector2; i_sector2 !=
m_tkSector_.end(); ++i_sector2) {
527 unsigned int nCommonModules(0);
528 for (
auto const& i_module : (*i_sector).second.v_rawId) {
529 for (
auto const& i_module2 : (*i_sector2).second.v_rawId) {
530 if (i_module2 == i_module)
534 if (nCommonModules == 0)
537 edm::LogError(
"SectorBuilder") <<
"Sector " << (*i_sector).first <<
" and Sector " << (*i_sector2).first
538 <<
" have " << nCommonModules <<
" Modules in common";
539 commonModules =
true;
543 if (static_cast<int>(allSectors.
v_rawId.size()) == nModules)
544 edm::LogInfo(
"SectorBuilder") <<
"ALL Tracker Modules are contained in the Sectors";
546 edm::LogWarning(
"SectorBuilder") <<
"There are " << allSectors.
v_rawId.size() <<
" Modules in all Sectors"
547 <<
" out of " << nModules <<
" Tracker Modules";
549 edm::LogInfo(
"SectorBuilder") <<
"There are ZERO modules associated to different sectors, no ambiguities exist";
552 <<
"There are modules associated to different sectors, APE value cannot be assigned reasonably";
559 if (v_residualErrorBinning.size() == 1) {
560 edm::LogError(
"ResidualErrorBinning") <<
"Incorrect selection of Residual Error Bins (used for APE calculation): \t"
561 <<
"Only one argument passed, so no interval is specified"
562 <<
"\n... delete whole bin selection";
566 unsigned int binCounter(-1);
567 for (
auto const& i_binning : v_residualErrorBinning) {
569 if (binCounter == 0) {
576 <<
"Incorrect selection of Residual Error Bins (used for APE calculation): \t" <<
xMin <<
" is bigger than "
577 <<
xMax <<
" but is expected to be smaller"
578 <<
"\n... delete whole bin selection";
587 <<
m_resErrBins_.size() <<
" Intervals of residual errors used for separate APE calculation sucessfully set";
594 for (std::vector<unsigned int>::iterator i_errHists = v_errHists.begin(); i_errHists != v_errHists.end();
596 for (std::vector<unsigned int>::iterator i_errHists2 = i_errHists; i_errHists2 != v_errHists.end();) {
598 if (*i_errHists == *i_errHists2) {
599 edm::LogError(
"BookSectorHists") <<
"Value of vErrHists in config exists twice: " << *i_errHists
600 <<
"\n... delete one of both";
601 v_errHists.erase(i_errHists2);
609 double widthMax = zoomHists ? 20. : 200.;
610 double chargePixelMax = zoomHists ? 200000. : 2000000.;
611 double chargeStripMax = zoomHists ? 1000. : 10000.;
612 double sOverNMax = zoomHists ? 200. : 2000.;
613 double logClusterProbMin = zoomHists ? -5. : -15.;
615 double resXAbsMax = zoomHists ? 0.5 : 5.;
616 double norResXAbsMax = zoomHists ? 10. : 50.;
617 double probXMin = zoomHists ? -0.01 : -0.1;
618 double probXMax = zoomHists ? 0.11 : 1.1;
619 double sigmaXMin = zoomHists ? 0. : -0.05;
620 double sigmaXMax = zoomHists ? 0.02 : 1.;
622 double sigmaXHitMax = zoomHists ? 0.02 : 1.;
623 double phiSensXMax = zoomHists ? 31. : 93.;
625 double norChi2Max = zoomHists ? 5. : 1000.;
626 double d0Max = zoomHists ? 0.02 : 40.;
627 double dzMax = zoomHists ? 15. : 100.;
628 double pMax = zoomHists ? 200. : 2000.;
629 double invPMax = zoomHists ? 0.05 : 10.;
636 std::stringstream sector;
637 sector <<
"Sector_" << i_sector.first;
641 i_sector.second.Name = secDir.
make<TH1F>(
"z_name", i_sector.second.name.c_str(), 1, 0, 1);
644 if (i_sector.second.v_rawId.empty()) {
648 i_sector.second.setCorrHistParams(&secDir, norResXAbsMax, sigmaXHitMax,
sigmaXMax);
651 const bool pixelSector(i_sector.second.isPixel);
654 i_sector.second.m_correlationHistsX[
"WidthX"] = i_sector.second.bookCorrHistsX(
"WidthX",
658 static_cast<int>(widthMax),
659 static_cast<int>(widthMax),
663 i_sector.second.m_correlationHistsX[
"BaryStripX"] = i_sector.second.bookCorrHistsX(
664 "BaryStripX",
"barycenter of cluster charge",
"b_{cl,x}",
"[# channels]", 800, 100, -10., 790.,
"nph");
667 i_sector.second.m_correlationHistsY[
"WidthY"] = i_sector.second.bookCorrHistsY(
"WidthY",
671 static_cast<int>(widthMax),
672 static_cast<int>(widthMax),
676 i_sector.second.m_correlationHistsY[
"BaryStripY"] = i_sector.second.bookCorrHistsY(
677 "BaryStripY",
"barycenter of cluster charge",
"b_{cl,y}",
"[# channels]", 800, 100, -10., 790.,
"nph");
679 i_sector.second.m_correlationHistsX[
"ChargePixel"] = i_sector.second.bookCorrHistsX(
680 "ChargePixel",
"cluster charge",
"c_{cl}",
"[e]", 100, 50, 0., chargePixelMax,
"nph");
681 i_sector.second.m_correlationHistsX[
"ClusterProbXY"] = i_sector.second.bookCorrHistsX(
682 "ClusterProbXY",
"cluster probability xy",
"prob_{cl,xy}",
"", 100, 50, 0., 1.,
"nph");
683 i_sector.second.m_correlationHistsX[
"ClusterProbQ"] = i_sector.second.bookCorrHistsX(
684 "ClusterProbQ",
"cluster probability q",
"prob_{cl,q}",
"", 100, 50, 0., 1.,
"nph");
685 i_sector.second.m_correlationHistsX[
"ClusterProbXYQ"] = i_sector.second.bookCorrHistsX(
686 "ClusterProbXYQ",
"cluster probability xyq",
"prob_{cl,xyq}",
"", 100, 50, 0., 1.,
"nph");
687 i_sector.second.m_correlationHistsX[
"LogClusterProb"] = i_sector.second.bookCorrHistsX(
688 "LogClusterProb",
"cluster probability xy",
"log(prob_{cl,xy})",
"", 60, 30, logClusterProbMin, 0.,
"nph");
689 i_sector.second.m_correlationHistsX[
"IsOnEdge"] =
690 i_sector.second.bookCorrHistsX(
"IsOnEdge",
"IsOnEdge",
"isOnEdge",
"", 2, 2, 0, 2,
"nph");
691 i_sector.second.m_correlationHistsX[
"HasBadPixels"] =
692 i_sector.second.bookCorrHistsX(
"HasBadPixels",
"HasBadPixels",
"hasBadPixels",
"", 2, 2, 0, 2,
"nph");
693 i_sector.second.m_correlationHistsX[
"SpansTwoRoc"] =
694 i_sector.second.bookCorrHistsX(
"SpansTwoRoc",
"SpansTwoRoc",
"spansTwoRoc",
"", 2, 2, 0, 2,
"nph");
695 i_sector.second.m_correlationHistsX[
"QBin"] =
696 i_sector.second.bookCorrHistsX(
"QBin",
"q bin",
"q bin",
"", 8, 8, 0, 8,
"nph");
698 i_sector.second.m_correlationHistsY[
"ChargePixel"] = i_sector.second.bookCorrHistsY(
699 "ChargePixel",
"cluster charge",
"c_{cl}",
"[e]", 100, 50, 0., chargePixelMax,
"nph");
700 i_sector.second.m_correlationHistsY[
"ClusterProbXY"] = i_sector.second.bookCorrHistsY(
701 "ClusterProbXY",
"cluster probability xy",
"prob_{cl,xy}",
"", 100, 50, 0., 1.,
"nph");
702 i_sector.second.m_correlationHistsY[
"ClusterProbQ"] = i_sector.second.bookCorrHistsY(
703 "ClusterProbQ",
"cluster probability q",
"prob_{cl,q}",
"", 100, 50, 0., 1.,
"nph");
704 i_sector.second.m_correlationHistsY[
"ClusterProbXYQ"] = i_sector.second.bookCorrHistsY(
705 "ClusterProbXYQ",
"cluster probability xyq",
"prob_{cl,xyq}",
"", 100, 50, 0., 1.,
"nph");
706 i_sector.second.m_correlationHistsY[
"LogClusterProb"] = i_sector.second.bookCorrHistsY(
707 "LogClusterProb",
"cluster probability xy",
"log(prob_{cl,xy})",
"", 60, 30, logClusterProbMin, 0.,
"nph");
708 i_sector.second.m_correlationHistsY[
"IsOnEdge"] =
709 i_sector.second.bookCorrHistsY(
"IsOnEdge",
"IsOnEdge",
"isOnEdge",
"", 2, 2, 0, 2,
"nph");
710 i_sector.second.m_correlationHistsY[
"HasBadPixels"] =
711 i_sector.second.bookCorrHistsY(
"HasBadPixels",
"HasBadPixels",
"hasBadPixels",
"", 2, 2, 0, 2,
"nph");
712 i_sector.second.m_correlationHistsY[
"SpansTwoRoc"] =
713 i_sector.second.bookCorrHistsY(
"SpansTwoRoc",
"SpansTwoRoc",
"spansTwoRoc",
"", 2, 2, 0, 2,
"nph");
714 i_sector.second.m_correlationHistsY[
"QBin"] =
715 i_sector.second.bookCorrHistsY(
"QBin",
"q bin",
"q bin",
"", 8, 8, 0, 8,
"nph");
719 i_sector.second.m_correlationHistsX[
"ChargeStrip"] = i_sector.second.bookCorrHistsX(
720 "ChargeStrip",
"cluster charge",
"c_{cl}",
"[APV counts]", 100, 50, 0., chargeStripMax,
"nph");
721 i_sector.second.m_correlationHistsX[
"MaxStrip"] = i_sector.second.bookCorrHistsX(
722 "MaxStrip",
"strip with max. charge",
"n_{cl,max}",
"[# strips]", 800, 800, -10., 790.,
"npht");
723 i_sector.second.m_correlationHistsX[
"MaxCharge"] = i_sector.second.bookCorrHistsX(
724 "MaxCharge",
"charge of strip with max. charge",
"c_{cl,max}",
"[APV counts]", 300, 75, -10., 290.,
"nph");
725 i_sector.second.m_correlationHistsX[
"MaxIndex"] = i_sector.second.bookCorrHistsX(
726 "MaxIndex",
"cluster-index of strip with max. charge",
"i_{cl,max}",
"[# strips]", 10, 10, 0., 10.,
"nph");
727 i_sector.second.m_correlationHistsX[
"ChargeOnEdges"] =
728 i_sector.second.bookCorrHistsX(
"ChargeOnEdges",
729 "fraction of charge on edge strips",
730 "(c_{st,L}+c_{st,R})/c_{cl}",
737 i_sector.second.m_correlationHistsX[
"ChargeAsymmetry"] =
738 i_sector.second.bookCorrHistsX(
"ChargeAsymmetry",
739 "asymmetry of charge on edge strips",
740 "(c_{st,L}-c_{st,R})/c_{cl}",
747 i_sector.second.m_correlationHistsX[
"ChargeLRplus"] =
748 i_sector.second.bookCorrHistsX(
"ChargeLRplus",
749 "fraction of charge not on maxStrip",
750 "(c_{cl,L}+c_{cl,R})/c_{cl}",
757 i_sector.second.m_correlationHistsX[
"ChargeLRminus"] =
758 i_sector.second.bookCorrHistsX(
"ChargeLRminus",
759 "asymmetry of charge L and R of maxStrip",
760 "(c_{cl,L}-c_{cl,R})/c_{cl}",
767 i_sector.second.m_correlationHistsX[
"SOverN"] =
768 i_sector.second.bookCorrHistsX(
"SOverN",
"signal over noise",
"s/N",
"", 100, 50, 0, sOverNMax,
"nph");
769 i_sector.second.m_correlationHistsX[
"WidthProj"] = i_sector.second.bookCorrHistsX(
770 "WidthProj",
"projected width",
"w_{p}",
"[# strips]", 200, 20, 0., widthMax,
"nph");
771 i_sector.second.m_correlationHistsX[
"WidthDiff"] = i_sector.second.bookCorrHistsX(
"WidthDiff",
781 i_sector.second.WidthVsWidthProjected = secDir.
make<TH2F>(
"h2_widthVsWidthProj",
782 "w_{cl} vs. w_{p};w_{p} [# strips];w_{cl} [# strips]",
783 static_cast<int>(widthMax),
786 static_cast<int>(widthMax),
789 i_sector.second.PWidthVsWidthProjected =
790 secDir.
make<TProfile>(
"p_widthVsWidthProj",
791 "w_{cl} vs. w_{p};w_{p} [# strips];w_{cl} [# strips]",
792 static_cast<int>(widthMax),
796 i_sector.second.WidthDiffVsMaxStrip =
797 secDir.
make<TH2F>(
"h2_widthDiffVsMaxStrip",
798 "(w_{p} - w_{cl}) vs. n_{cl,max};n_{cl,max};w_{p} - w_{cl} [# strips]",
802 static_cast<int>(widthMax),
805 i_sector.second.PWidthDiffVsMaxStrip =
806 secDir.
make<TProfile>(
"p_widthDiffVsMaxStrip",
807 "(w_{p} - w_{cl}) vs. n_{cl,max};n_{cl,max};w_{p} - w_{cl} [# strips]",
812 i_sector.second.WidthDiffVsSigmaXHit =
813 secDir.
make<TH2F>(
"h2_widthDiffVsSigmaXHit",
814 "(w_{p} - w_{cl}) vs. #sigma_{hit,x};#sigma_{hit,x} [cm];w_{p} - w_{cl} [# strips]",
821 i_sector.second.PWidthDiffVsSigmaXHit =
822 secDir.
make<TProfile>(
"p_widthDiffVsSigmaXHit",
823 "(w_{p} - w_{cl}) vs. #sigma_{hit,x};#sigma_{hit,x} [cm];w_{p} - w_{cl} [# strips]",
828 i_sector.second.WidthVsPhiSensX =
829 secDir.
make<TH2F>(
"h2_widthVsPhiSensX",
830 "w_{cl} vs. #phi_{module,x};#phi_{module,x} [ ^{o}];w_{cl} [# strips]",
834 static_cast<int>(widthMax),
837 i_sector.second.PWidthVsPhiSensX = secDir.
make<TProfile>(
838 "p_widthVsPhiSensX",
"w_{cl} vs. #phi_{module,x};#phi_{module,x} [ ^{o}];w_{cl} [# strips]", 93, -93, 93);
842 i_sector.second.m_correlationHistsX[
"SigmaXHit"] = i_sector.second.bookCorrHistsX(
843 "SigmaXHit",
"hit error",
"#sigma_{hit,x}",
"[#mum]", 105, 20,
sigmaXMin * 10000.,
sigmaXMax * 10000.,
"np");
844 i_sector.second.m_correlationHistsX[
"SigmaXTrk"] = i_sector.second.bookCorrHistsX(
845 "SigmaXTrk",
"track error",
"#sigma_{trk,x}",
"[#mum]", 105, 20,
sigmaXMin * 10000.,
sigmaXMax * 10000.,
"np");
846 i_sector.second.m_correlationHistsX[
"SigmaX"] = i_sector.second.bookCorrHistsX(
847 "SigmaX",
"residual error",
"#sigma_{r,x}",
"[#mum]", 105, 20,
sigmaXMin * 10000.,
sigmaXMax * 10000.,
"np");
848 i_sector.second.m_correlationHistsX[
"PhiSens"] = i_sector.second.bookCorrHistsX(
849 "PhiSens",
"track angle on sensor",
"#phi_{module}",
"[ ^{o}]", 96, 48, -3, 93,
"nphtr");
850 i_sector.second.m_correlationHistsX[
"PhiSensX"] = i_sector.second.bookCorrHistsX(
851 "PhiSensX",
"track angle on sensor",
"#phi_{module,x}",
"[ ^{o}]", 186, 93, -phiSensXMax, phiSensXMax,
"nphtr");
852 i_sector.second.m_correlationHistsX[
"PhiSensY"] = i_sector.second.bookCorrHistsX(
853 "PhiSensY",
"track angle on sensor",
"#phi_{module,y}",
"[ ^{o}]", 186, 93, -93, 93,
"nphtr");
855 i_sector.second.XHit = secDir.
make<TH1F>(
"h_XHit",
" hit measurement x_{hit};x_{hit} [cm];# hits", 100, -20, 20);
856 i_sector.second.XTrk = secDir.
make<TH1F>(
"h_XTrk",
"track prediction x_{trk};x_{trk} [cm];# hits", 100, -20, 20);
857 i_sector.second.SigmaX2 =
858 secDir.
make<TH1F>(
"h_SigmaX2",
859 "squared residual error #sigma_{r,x}^{2};#sigma_{r,x}^{2} [#mum^{2}];# hits",
862 sigmaX2Max * 10000. * 10000.);
863 i_sector.second.ResX = secDir.
make<TH1F>(
864 "h_ResX",
"residual r_{x};x_{trk}-x_{hit} [#mum];# hits", 100, -resXAbsMax * 10000., resXAbsMax * 10000.);
865 i_sector.second.NorResX =
866 secDir.
make<TH1F>(
"h_NorResX",
867 "normalized residual r_{x}/#sigma_{r,x};(x_{trk}-x_{hit})/#sigma_{r,x};# hits",
871 i_sector.second.ProbX = secDir.
make<TH1F>(
872 "h_ProbX",
"residual probability;prob(r_{x}^{2}/#sigma_{r,x}^{2},1);# hits", 60, probXMin, probXMax);
874 i_sector.second.PhiSensXVsBarycentreX =
875 secDir.
make<TH2F>(
"h2_phiSensXVsBarycentreX",
876 "#phi_{module,x} vs. b_{cl,x};b_{cl,x} [# channels];#phi_{module,x} [ ^{o}]",
883 i_sector.second.PPhiSensXVsBarycentreX =
884 secDir.
make<TProfile>(
"p_phiSensXVsBarycentreX",
885 "#phi_{module,x} vs. b_{cl,x};b_{cl,x} [# channels];#phi_{module,x} [ ^{o}]",
891 i_sector.second.m_correlationHistsY[
"SigmaYHit"] = i_sector.second.bookCorrHistsY(
892 "SigmaYHit",
"hit error",
"#sigma_{hit,y}",
"[#mum]", 105, 20,
sigmaXMin * 10000.,
sigmaXMax * 10000.,
"np");
893 i_sector.second.m_correlationHistsY[
"SigmaYTrk"] = i_sector.second.bookCorrHistsY(
894 "SigmaYTrk",
"track error",
"#sigma_{trk,y}",
"[#mum]", 105, 20,
sigmaXMin * 10000.,
sigmaXMax * 10000.,
"np");
895 i_sector.second.m_correlationHistsY[
"SigmaY"] = i_sector.second.bookCorrHistsY(
896 "SigmaY",
"residual error",
"#sigma_{r,y}",
"[#mum]", 105, 20,
sigmaXMin * 10000.,
sigmaXMax * 10000.,
"np");
897 i_sector.second.m_correlationHistsY[
"PhiSens"] = i_sector.second.bookCorrHistsY(
898 "PhiSens",
"track angle on sensor",
"#phi_{module}",
"[ ^{o}]", 96, 48, -3, 93,
"nphtr");
899 i_sector.second.m_correlationHistsY[
"PhiSensX"] = i_sector.second.bookCorrHistsY(
"PhiSensX",
900 "track angle on sensor",
908 i_sector.second.m_correlationHistsY[
"PhiSensY"] = i_sector.second.bookCorrHistsY(
909 "PhiSensY",
"track angle on sensor",
"#phi_{module,y}",
"[ ^{o}]", 186, 93, -93, 93,
"nphtr");
911 i_sector.second.YHit = secDir.
make<TH1F>(
"h_YHit",
" hit measurement y_{hit};y_{hit} [cm];# hits", 100, -20, 20);
912 i_sector.second.YTrk = secDir.
make<TH1F>(
"h_YTrk",
"track prediction y_{trk};y_{trk} [cm];# hits", 100, -20, 20);
913 i_sector.second.SigmaY2 =
914 secDir.
make<TH1F>(
"h_SigmaY2",
915 "squared residual error #sigma_{r,y}^{2};#sigma_{r,y}^{2} [#mum^{2}];# hits",
918 sigmaX2Max * 10000. * 10000.);
919 i_sector.second.ResY = secDir.
make<TH1F>(
920 "h_ResY",
"residual r_{y};y_{trk}-y_{hit} [#mum];# hits", 100, -resXAbsMax * 10000., resXAbsMax * 10000.);
921 i_sector.second.NorResY =
922 secDir.
make<TH1F>(
"h_NorResY",
923 "normalized residual r_{y}/#sigma_{r,y};(y_{trk}-y_{hit})/#sigma_{r,y};# hits",
927 i_sector.second.ProbY = secDir.
make<TH1F>(
928 "h_ProbY",
"residual probability;prob(r_{y}^{2}/#sigma_{r,y}^{2},1);# hits", 60, probXMin, probXMax);
930 i_sector.second.PhiSensYVsBarycentreY =
931 secDir.
make<TH2F>(
"h2_phiSensYVsBarycentreY",
932 "#phi_{module,y} vs. b_{cl,y};b_{cl,y} [# channels];#phi_{module,y} [ ^{o}]",
939 i_sector.second.PPhiSensYVsBarycentreY =
940 secDir.
make<TProfile>(
"p_phiSensYVsBarycentreY",
941 "#phi_{module,y} vs. b_{cl,y};b_{cl,y} [# channels];#phi_{module,y} [ ^{o}]",
948 i_sector.second.m_correlationHistsX[
"HitsValid"] =
949 i_sector.second.bookCorrHistsX(
"HitsValid",
"# hits",
"[valid]", 50, 0, 50,
"npt");
950 i_sector.second.m_correlationHistsX[
"HitsInvalid"] =
951 i_sector.second.bookCorrHistsX(
"HitsInvalid",
"# hits",
"[invalid]", 20, 0, 20,
"npt");
952 i_sector.second.m_correlationHistsX[
"Hits2D"] =
953 i_sector.second.bookCorrHistsX(
"Hits2D",
"# hits",
"[2D]", 20, 0, 20,
"npt");
954 i_sector.second.m_correlationHistsX[
"LayersMissed"] =
955 i_sector.second.bookCorrHistsX(
"LayersMissed",
"# layers",
"[missed]", 10, 0, 10,
"npt");
956 i_sector.second.m_correlationHistsX[
"HitsPixel"] =
957 i_sector.second.bookCorrHistsX(
"HitsPixel",
"# hits",
"[pixel]", 10, 0, 10,
"npt");
958 i_sector.second.m_correlationHistsX[
"HitsStrip"] =
959 i_sector.second.bookCorrHistsX(
"HitsStrip",
"# hits",
"[strip]", 40, 0, 40,
"npt");
960 i_sector.second.m_correlationHistsX[
"HitsGood"] =
961 i_sector.second.bookCorrHistsX(
"HitsGood",
"# hits",
"[good]", 50, 0, 50,
"npt");
962 i_sector.second.m_correlationHistsX[
"NorChi2"] =
963 i_sector.second.bookCorrHistsX(
"NorChi2",
"#chi^{2}/f",
"", 50, 0, norChi2Max,
"npr");
964 i_sector.second.m_correlationHistsX[
"Theta"] =
965 i_sector.second.bookCorrHistsX(
"Theta",
"#theta",
"[ ^{o}]", 40, -10, 190,
"npt");
966 i_sector.second.m_correlationHistsX[
"Phi"] =
967 i_sector.second.bookCorrHistsX(
"Phi",
"#phi",
"[ ^{o}]", 76, -190, 190,
"npt");
968 i_sector.second.m_correlationHistsX[
"D0Beamspot"] =
969 i_sector.second.bookCorrHistsX(
"D0Beamspot",
"d_{0, BS}",
"[cm]", 40, -
d0Max,
d0Max,
"npt");
970 i_sector.second.m_correlationHistsX[
"Dz"] =
971 i_sector.second.bookCorrHistsX(
"Dz",
"d_{z}",
"[cm]", 40, -
dzMax,
dzMax,
"npt");
972 i_sector.second.m_correlationHistsX[
"Pt"] =
973 i_sector.second.bookCorrHistsX(
"Pt",
"p_{t}",
"[GeV]", 50, 0,
pMax,
"npt");
974 i_sector.second.m_correlationHistsX[
"P"] = i_sector.second.bookCorrHistsX(
"P",
"|p|",
"[GeV]", 50, 0,
pMax,
"npt");
975 i_sector.second.m_correlationHistsX[
"InvP"] =
976 i_sector.second.bookCorrHistsX(
"InvP",
"1/|p|",
"[GeV^{-1}]", 25, 0, invPMax,
"t");
977 i_sector.second.m_correlationHistsX[
"MeanAngle"] =
978 i_sector.second.bookCorrHistsX(
"MeanAngle",
"<#phi_{module}>",
"[ ^{o}]", 25, -5, 95,
"npt");
982 i_sector.second.m_correlationHistsY[
"HitsValid"] =
983 i_sector.second.bookCorrHistsY(
"HitsValid",
"# hits",
"[valid]", 50, 0, 50,
"npt");
984 i_sector.second.m_correlationHistsY[
"HitsInvalid"] =
985 i_sector.second.bookCorrHistsY(
"HitsInvalid",
"# hits",
"[invalid]", 20, 0, 20,
"npt");
986 i_sector.second.m_correlationHistsY[
"Hits2D"] =
987 i_sector.second.bookCorrHistsY(
"Hits2D",
"# hits",
"[2D]", 20, 0, 20,
"npt");
988 i_sector.second.m_correlationHistsY[
"LayersMissed"] =
989 i_sector.second.bookCorrHistsY(
"LayersMissed",
"# layers",
"[missed]", 10, 0, 10,
"npt");
990 i_sector.second.m_correlationHistsY[
"HitsPixel"] =
991 i_sector.second.bookCorrHistsY(
"HitsPixel",
"# hits",
"[pixel]", 10, 0, 10,
"npt");
992 i_sector.second.m_correlationHistsY[
"HitsStrip"] =
993 i_sector.second.bookCorrHistsY(
"HitsStrip",
"# hits",
"[strip]", 40, 0, 40,
"npt");
994 i_sector.second.m_correlationHistsY[
"HitsGood"] =
995 i_sector.second.bookCorrHistsY(
"HitsGood",
"# hits",
"[good]", 50, 0, 50,
"npt");
996 i_sector.second.m_correlationHistsY[
"NorChi2"] =
997 i_sector.second.bookCorrHistsY(
"NorChi2",
"#chi^{2}/f",
"", 50, 0, norChi2Max,
"npr");
998 i_sector.second.m_correlationHistsY[
"Theta"] =
999 i_sector.second.bookCorrHistsY(
"Theta",
"#theta",
"[ ^{o}]", 40, -10, 190,
"npt");
1000 i_sector.second.m_correlationHistsY[
"Phi"] =
1001 i_sector.second.bookCorrHistsY(
"Phi",
"#phi",
"[ ^{o}]", 76, -190, 190,
"npt");
1002 i_sector.second.m_correlationHistsY[
"D0Beamspot"] =
1003 i_sector.second.bookCorrHistsY(
"D0Beamspot",
"d_{0, BS}",
"[cm]", 40, -
d0Max,
d0Max,
"npt");
1004 i_sector.second.m_correlationHistsY[
"Dz"] =
1005 i_sector.second.bookCorrHistsY(
"Dz",
"d_{z}",
"[cm]", 40, -
dzMax,
dzMax,
"npt");
1006 i_sector.second.m_correlationHistsY[
"Pt"] =
1007 i_sector.second.bookCorrHistsY(
"Pt",
"p_{t}",
"[GeV]", 50, 0,
pMax,
"npt");
1008 i_sector.second.m_correlationHistsY[
"P"] =
1009 i_sector.second.bookCorrHistsY(
"P",
"|p|",
"[GeV]", 50, 0,
pMax,
"npt");
1010 i_sector.second.m_correlationHistsY[
"InvP"] =
1011 i_sector.second.bookCorrHistsY(
"InvP",
"1/|p|",
"[GeV^{-1}]", 25, 0, invPMax,
"t");
1012 i_sector.second.m_correlationHistsY[
"MeanAngle"] =
1013 i_sector.second.bookCorrHistsY(
"MeanAngle",
"<#phi_{module}>",
"[ ^{o}]", 25, -5, 95,
"npt");
1017 for (
auto const& i_errHists : v_errHists) {
1018 double xMin(0.01 * (i_errHists - 1)),
xMax(0.01 * (i_errHists));
1019 std::stringstream sigmaXHit, sigmaXTrk,
sigmaX;
1020 sigmaXHit <<
"h_sigmaXHit_" << i_errHists;
1021 sigmaXTrk <<
"h_sigmaXTrk_" << i_errHists;
1022 sigmaX <<
"h_sigmaX_" << i_errHists;
1023 i_sector.second.m_sigmaX[
"sigmaXHit"].push_back(
1024 secDir.
make<TH1F>(sigmaXHit.str().c_str(),
1025 "hit error #sigma_{hit,x};#sigma_{hit,x} [#mum];# hits",
1029 i_sector.second.m_sigmaX[
"sigmaXTrk"].push_back(
1030 secDir.
make<TH1F>(sigmaXTrk.str().c_str(),
1031 "track error #sigma_{trk,x};#sigma_{trk,x} [#mum];# hits",
1035 i_sector.second.m_sigmaX[
"sigmaX"].push_back(
1037 "residual error #sigma_{r,x};#sigma_{r,x} [#mum];# hits",
1042 std::stringstream sigmaYHit, sigmaYTrk,
sigmaY;
1043 sigmaYHit <<
"h_sigmaYHit_" << i_errHists;
1044 sigmaYTrk <<
"h_sigmaYTrk_" << i_errHists;
1045 sigmaY <<
"h_sigmaY_" << i_errHists;
1046 i_sector.second.m_sigmaY[
"sigmaYHit"].push_back(
1047 secDir.
make<TH1F>(sigmaYHit.str().c_str(),
1048 "hit error #sigma_{hit,y};#sigma_{hit,y} [#mum];# hits",
1052 i_sector.second.m_sigmaY[
"sigmaYTrk"].push_back(
1053 secDir.
make<TH1F>(sigmaYTrk.str().c_str(),
1054 "track error #sigma_{trk,y};#sigma_{trk,y} [#mum];# hits",
1058 i_sector.second.m_sigmaY[
"sigmaY"].push_back(
1060 "residual error #sigma_{r,y};#sigma_{r,y} [#mum];# hits",
1071 for (std::vector<unsigned int>::iterator i_errHists = v_errHists.begin(); i_errHists != v_errHists.end();
1073 for (std::vector<unsigned int>::iterator i_errHists2 = i_errHists; i_errHists2 != v_errHists.end();) {
1075 if (*i_errHists == *i_errHists2) {
1076 edm::LogError(
"BookSectorHists") <<
"Value of vErrHists in config exists twice: " << *i_errHists
1077 <<
"\n... delete one of both";
1078 v_errHists.erase(i_errHists2);
1089 std::stringstream sector;
1090 sector <<
"Sector_" << i_sector.first;
1094 i_sector.second.Name = secDir.
make<TH1F>(
"z_name", i_sector.second.name.c_str(), 1, 0, 1);
1097 if (i_sector.second.v_rawId.empty()) {
1109 interval <<
"Interval_" << i_errBins.first;
1111 i_sector.second.m_binnedHists[i_errBins.first][
"sigmaX"] =
1112 intDir.
make<TH1F>(
"h_sigmaX",
"residual resolution #sigma_{x};#sigma_{x} [cm];# hits", 100, 0., 0.01);
1113 i_sector.second.m_binnedHists[i_errBins.first][
"norResX"] = intDir.
make<TH1F>(
1114 "h_norResX",
"normalized residual r_{x}/#sigma_{r,x};(x_{trk}-x_{hit})/#sigma_{r,x};# hits", 100, -10, 10);
1115 if (i_sector.second.isPixel) {
1116 i_sector.second.m_binnedHists[i_errBins.first][
"sigmaY"] =
1117 intDir.
make<TH1F>(
"h_sigmaY",
"residual resolution #sigma_{y};#sigma_{y} [cm];# hits", 100, 0., 0.01);
1118 i_sector.second.m_binnedHists[i_errBins.first][
"norResY"] = intDir.
make<TH1F>(
1119 "h_norResY",
"normalized residual r_{y}/#sigma_{r,y};(y_{trk}-y_{hit})/#sigma_{r,y};# hits", 100, -10, 10);
1126 unsigned int rawId(0);
1127 i_sector.second.RawId = resDir.
make<TTree>(
"rawIdTree",
"Tree containing rawIds of all modules in sector");
1128 i_sector.second.RawId->Branch(
"RawId", &rawId,
"RawId/i");
1129 for (
auto const& i_rawId : i_sector.second.v_rawId) {
1131 i_sector.second.RawId->Fill();
1137 for (
auto& i_binX : v_binX) {
1140 i_sector.second.EntriesX =
1141 resDir.
make<TH1F>(
"h_entriesX",
"# hits used;#sigma_{x} [#mum];# hits", v_binX.size() - 1, &(v_binX[0]));
1142 if (i_sector.second.isPixel) {
1143 i_sector.second.EntriesY =
1144 resDir.
make<TH1F>(
"h_entriesY",
"# hits used;#sigma_{y} [#mum];# hits", v_binX.size() - 1, &(v_binX[0]));
1149 i_sector.second.ResX = resDir.
make<TH1F>(
1150 "h_ResX",
"residual r_{x};x_{trk}-x_{hit} [#mum];# hits", 100, -0.03 * 10000., 0.03 * 10000.);
1151 i_sector.second.NorResX = resDir.
make<TH1F>(
1152 "h_NorResX",
"normalized residual r_{x}/#sigma_{r,x};(x_{trk}-x_{hit})/#sigma_{r,x};# hits", 100, -5., 5.);
1153 if (i_sector.second.isPixel) {
1154 i_sector.second.ResY = resDir.
make<TH1F>(
1155 "h_ResY",
"residual r_{y};y_{trk}-y_{hit} [#mum];# hits", 100, -0.03 * 10000., 0.03 * 10000.);
1156 i_sector.second.NorResY = resDir.
make<TH1F>(
1157 "h_NorResY",
"normalized residual r_{y}/#sigma_{r,y};(y_{trk}-y_{hit})/#sigma_{r,y};# hits", 100, -5., 5.);
1167 int trackSizeBins = zoomHists ? 6 : 201;
1168 double trackSizeMax = trackSizeBins - 1;
1170 double chi2Max = zoomHists ? 100. : 2000.;
1171 double norChi2Max = zoomHists ? 5. : 1000.;
1172 double d0max = zoomHists ? 0.02 : 40.;
1173 double dzmax = zoomHists ? 15. : 100.;
1174 double pMax = zoomHists ? 200. : 2000.;
1179 evtDir.
make<TH1F>(
"h_trackSize",
"# tracks [all];# tracks;# events", trackSizeBins, -1, trackSizeMax);
1181 evtDir.
make<TH1F>(
"h_trackSizeGood",
"# tracks [good];# tracks;# events", trackSizeBins, -1, trackSizeMax);
1183 tkDetector_.
HitsSize = trkDir.make<TH1F>(
"h_hitsSize",
"# hits;# hits;# tracks", 51, -1, 50);
1184 tkDetector_.
HitsValid = trkDir.make<TH1F>(
"h_hitsValid",
"# hits [valid];# hits [valid];# tracks", 51, -1, 50);
1186 trkDir.make<TH1F>(
"h_hitsInvalid",
"# hits [invalid];# hits [invalid];# tracks", 21, -1, 20);
1187 tkDetector_.
Hits2D = trkDir.make<TH1F>(
"h_hits2D",
"# hits [2D];# hits [2D];# tracks", 21, -1, 20);
1189 trkDir.make<TH1F>(
"h_layersMissed",
"# layers [missed];# layers [missed];# tracks", 11, -1, 10);
1190 tkDetector_.
HitsPixel = trkDir.make<TH1F>(
"h_hitsPixel",
"# hits [pixel];# hits [pixel];# tracks", 11, -1, 10);
1191 tkDetector_.
HitsStrip = trkDir.make<TH1F>(
"h_hitsStrip",
"# hits [strip];# hits [strip];# tracks", 41, -1, 40);
1192 tkDetector_.
Charge = trkDir.make<TH1F>(
"h_charge",
"charge q;q [e];# tracks", 5, -2, 3);
1194 tkDetector_.
Ndof = trkDir.make<TH1F>(
"h_ndof",
"# degrees of freedom f;f;# tracks", 101, -1, 100);
1195 tkDetector_.
NorChi2 = trkDir.make<TH1F>(
"h_norChi2",
"normalized #chi^{2};#chi^{2}/f;# tracks", 200, 0, norChi2Max);
1196 tkDetector_.
Prob = trkDir.make<TH1F>(
"h_prob",
" #chi^{2} probability;prob(#chi^{2},f);# tracks", 50, 0, 1);
1197 tkDetector_.
Eta = trkDir.make<TH1F>(
"h_eta",
"pseudorapidity #eta;#eta;# tracks", 100, -5, 5);
1198 tkDetector_.
EtaErr = trkDir.make<TH1F>(
"h_etaErr",
"Error of #eta;#sigma(#eta);# tracks", 100, 0, 0.001);
1200 trkDir.make<TH1F>(
"h_etaSig",
"Significance of #eta;#eta/#sigma(#eta);# tracks", 100, -20000, 20000);
1201 tkDetector_.
Theta = trkDir.make<TH1F>(
"h_theta",
"polar angle #theta;#theta [ ^{o}];# tracks", 100, -10, 190);
1202 tkDetector_.
Phi = trkDir.make<TH1F>(
"h_phi",
"azimuth angle #phi;#phi [ ^{o}];# tracks", 190, -190, 190);
1203 tkDetector_.
PhiErr = trkDir.make<TH1F>(
"h_phiErr",
"Error of #phi;#sigma(#phi) [ ^{o}];# tracks", 100, 0, 0.04);
1205 trkDir.make<TH1F>(
"h_phiSig",
"Significance of #phi;#phi/#sigma(#phi) [ ^{o}];# tracks", 100, -50000, 50000);
1207 "h_d0Beamspot",
"Closest approach d_{0} wrt. beamspot;d_{0, BS} [cm];# tracks", 200, -d0max, d0max);
1209 trkDir.make<TH1F>(
"h_d0BeamspotErr",
"Error of d_{0, BS};#sigma(d_{0, BS}) [cm];# tracks", 200, 0, 0.01);
1211 "h_d0BeamspotSig",
"Significance of d_{0, BS};d_{0, BS}/#sigma(d_{0, BS});# tracks", 100, -5, 5);
1212 tkDetector_.
Dz = trkDir.make<TH1F>(
"h_dz",
"Closest approach d_{z};d_{z} [cm];# tracks", 200, -dzmax, dzmax);
1213 tkDetector_.
DzErr = trkDir.make<TH1F>(
"h_dzErr",
"Error of d_{z};#sigma(d_{z}) [cm];# tracks", 200, 0, 0.01);
1215 trkDir.make<TH1F>(
"h_dzSig",
"Significance of d_{z};d_{z}/#sigma(d_{z});# tracks", 100, -10000, 10000);
1216 tkDetector_.
Pt = trkDir.make<TH1F>(
"h_pt",
"transverse momentum p_{t};p_{t} [GeV];# tracks", 100, 0,
pMax);
1217 tkDetector_.
PtErr = trkDir.make<TH1F>(
"h_ptErr",
"Error of p_{t};#sigma(p_{t}) [GeV];# tracks", 100, 0, 1.6);
1218 tkDetector_.
PtSig = trkDir.make<TH1F>(
"h_ptSig",
"Significance of p_{t};p_{t}/#sigma(p_{t});# tracks", 100, 0, 200);
1219 tkDetector_.
P = trkDir.make<TH1F>(
"h_p",
"momentum magnitude |p|;|p| [GeV];# tracks", 100, 0,
pMax);
1221 "h_meanAngle",
"mean angle on module <#phi_{module}>;<#phi_{module}> [ ^{o}];# tracks", 100, -5, 95);
1222 tkDetector_.
HitsGood = trkDir.make<TH1F>(
"h_hitsGood",
"# hits [good];# hits [good];# tracks", 51, -1, 50);
1225 "h2_meanAngleVsHits",
"<#phi_{module}> vs. # hits;# hits;<#phi_{module}> [ ^{o}]", 51, -1, 50, 50, -5, 95);
1227 trkDir.make<TH2F>(
"h2_hitsGoodVsHitsValid",
1228 "# hits [good] vs. # hits [valid];# hits [valid];# hits [good]",
1236 trkDir.make<TH2F>(
"h2_hitsPixelVsEta",
"# hits [pixel] vs. #eta;#eta;# hits [pixel]", 60, -3, 3, 11, -1, 10);
1238 "h2_hitsPixelVsTheta",
"# hits [pixel] vs. #theta;#theta;# hits [pixel]", 100, -10, 190, 11, -1, 10);
1240 trkDir.make<TH2F>(
"h2_hitsStripVsEta",
"# hits [strip] vs. #eta;#eta;# hits [strip]", 60, -3, 3, 31, -1, 40);
1242 "h2_hitsStripVsTheta",
"# hits [strip] vs. #theta;#theta;# hits [strip]", 100, -10, 190, 31, -1, 40);
1243 tkDetector_.
PtVsEta = trkDir.make<TH2F>(
"h2_ptVsEta",
"p_{t} vs. #eta;#eta;p_{t} [GeV]", 60, -3, 3, 100, 0,
pMax);
1245 trkDir.make<TH2F>(
"h2_ptVsTheta",
"p_{t} vs. #theta;#theta;p_{t} [GeV]", 100, -10, 190, 100, 0,
pMax);
1248 "p_meanAngleVsHits",
"<#phi_{module}> vs. # hits;# hits;<#phi_{module}> [ ^{o}]", 51, -1, 50);
1250 "p_hitsGoodVsHitsValid",
"# hits [good] vs. # hits [valid];# hits [valid];# hits [good]", 51, -1, 50);
1252 trkDir.make<TProfile>(
"p_hitsPixelVsEta",
"# hits [pixel] vs. #eta;#eta;# hits [pixel]", 60, -3, 3);
1254 trkDir.make<TProfile>(
"p_hitsPixelVsTheta",
"# hits [pixel] vs. #theta;#theta;# hits [pixel]", 100, -10, 190);
1256 trkDir.make<TProfile>(
"p_hitsStripVsEta",
"# hits [strip] vs. #eta;#eta;# hits [strip]", 60, -3, 3);
1258 trkDir.make<TProfile>(
"p_hitsStripVsTheta",
"# hits [strip] vs. #theta;#theta;# hits [strip]", 100, -10, 190);
1259 tkDetector_.
PPtVsEta = trkDir.make<TProfile>(
"p_ptVsEta",
"p_{t} vs. #eta;#eta;p_{t} [GeV]", 60, -3, 3);
1260 tkDetector_.
PPtVsTheta = trkDir.make<TProfile>(
"p_ptVsTheta",
"p_{t} vs. #theta;#theta;p_{t} [GeV]", 100, -10, 190);
1269 double d0BeamspotErr =
1280 trkParams.hitsValid =
track.found();
1281 trkParams.hitsInvalid = trkParams.hitsSize - trkParams.hitsValid;
1282 trkParams.layersMissed =
1284 trkParams.hitsPixel = hitPattern.numberOfValidPixelHits();
1285 trkParams.hitsStrip = hitPattern.numberOfValidStripHits();
1286 trkParams.charge =
track.charge();
1287 trkParams.chi2 =
track.chi2();
1288 trkParams.ndof =
track.ndof();
1289 trkParams.norChi2 = trkParams.chi2 / trkParams.ndof;
1290 trkParams.prob = TMath::Prob(trkParams.chi2, trkParams.ndof);
1291 trkParams.eta =
track.eta();
1292 trkParams.etaErr =
track.etaError();
1293 trkParams.theta =
track.theta();
1294 trkParams.phi =
track.phi();
1295 trkParams.phiErr =
track.phiError();
1296 trkParams.d0 =
track.d0();
1297 trkParams.d0Beamspot = -1. *
track.dxy(beamPoint);
1298 trkParams.d0BeamspotErr = d0BeamspotErr;
1299 trkParams.dz =
track.dz();
1300 trkParams.dzErr =
track.dzError();
1301 trkParams.dzBeamspot =
track.dz(beamPoint);
1302 trkParams.p =
track.p();
1303 trkParams.pt =
track.pt();
1304 trkParams.ptErr =
track.ptError();
1306 const std::vector<TrajectoryMeasurement>& v_meas = traj.
measurements();
1309 float meanPhiSensToNorm(0.
F);
1310 for (
auto const& i_meas : v_meas) {
1319 meanPhiSensToNorm += atan(fabs(
sqrt(mom.x() * mom.x() + mom.y() * mom.y()) / mom.z()));
1321 meanPhiSensToNorm *= (1. / static_cast<float>(trkParams.hitsSize));
1323 trkParams.hits2D = count2D;
1324 trkParams.meanPhiSensToNorm = meanPhiSensToNorm;
1328 if (trkParams.hitsStrip < 11 || trkParams.hits2D < 2 || trkParams.hitsPixel < 2 ||
1329 trkParams.hitsStrip > 35 || trkParams.hitsPixel > 7 || trkParams.norChi2 > 5. || trkParams.pt < 25. ||
1330 trkParams.pt > 150. ||
std::abs(trkParams.d0Beamspot) > 0.02 ||
std::abs(trkParams.dz) > 15.)
1350 const DetId& detId(
hit.geographicalId());
1356 const uint32_t rawId(detId.rawId());
1359 for (
auto const& i_rawId : i_sector.second.v_rawId) {
1360 if (rawId == i_rawId) {
1361 hitParams.
v_sector.push_back(i_sector.first);
1368 int xMomentum(0), yMomentum(0), zMomentum(0);
1369 xMomentum = mom.x() > 0. ? 1 : -1;
1370 yMomentum = mom.y() > 0. ? 1 : -1;
1371 zMomentum = mom.z() > 0. ? 1 : -1;
1373 std::atan(std::fabs(mom.x() / mom.z())) *
1376 float phiSensY = std::atan(std::fabs(mom.y() / mom.z())) * static_cast<float>(
m_tkTreeVar_[rawId].vDirection);
1377 hitParams.
phiSens = std::atan(std::fabs(
std::sqrt(mom.x() * mom.x() + mom.y() * mom.y()) / mom.z()));
1378 hitParams.
phiSensX = (xMomentum == zMomentum ? phiSensX : -phiSensX);
1379 hitParams.
phiSensY = (yMomentum == zMomentum ? phiSensY : -phiSensY);
1381 if (!
hit.isValid()) {
1408 edm::LogWarning(
"FillHitVariables") <<
"cant identify wether hit is from pixel or strip";
1413 if (!
hit.detUnit()) {
1420 if (!dynamic_cast<const PixelTopology*>(&detUnit.
type().
topology())) {
1427 errorWithoutAPE =
LocalError(errHitApe.
xx() - lape.
xx(), errHitApe.
xy() - lape.
xy(), errHitApe.
yy() - lape.
yy());
1431 if (!dynamic_cast<const StripTopology*>(&detUnit.
type().
topology())) {
1438 errorWithoutAPE =
LocalError(errHitApe.
xx() - lape.
xx(), errHitApe.
xy() - lape.
xy(), errHitApe.
yy() - lape.
yy());
1442 const LocalError& errHitWoApe = errorWithoutAPE;
1447 edm::LogInfo(
"CalculateAPE") <<
"errHitWoApe " << errHitWoApe <<
"errHitApe " << errHitApe;
1474 const float xHit = positionAndError2Hit.second.posX;
1475 const float xTrk = positionAndError2Trk.second.posX;
1476 const float yHit = positionAndError2Hit.second.posY;
1477 const float yTrk = positionAndError2Trk.second.posY;
1479 const float errXHit2(positionAndError2Hit.second.errX2);
1480 const float errXHitWoApe2(positionAndError2HitWoApe.second.errX2);
1481 const float errXTrk2(positionAndError2Trk.second.errX2);
1482 const float errYHit2(positionAndError2Hit.second.errY2);
1483 const float errYHitWoApe2(positionAndError2HitWoApe.second.errY2);
1484 const float errYTrk2(positionAndError2Trk.second.errY2);
1486 const float errXHit =
std::sqrt(positionAndError2Hit.second.errX2);
1487 const float errXHitWoApe =
std::sqrt(positionAndError2HitWoApe.second.errX2);
1488 const float errXTrk =
std::sqrt(positionAndError2Trk.second.errX2);
1489 const float errYHit =
std::sqrt(positionAndError2Hit.second.errY2);
1490 const float errYHitWoApe =
std::sqrt(positionAndError2HitWoApe.second.errY2);
1491 const float errYTrk =
std::sqrt(positionAndError2Trk.second.errY2);
1493 const float resX = xTrk - xHit;
1494 const float resY = yTrk - yHit;
1497 const float errXWoApe2 = errXHitWoApe2 + errXTrk2;
1498 const float errXWoApe =
std::sqrt(errXWoApe2);
1500 const float errYWoApe2 = errYHitWoApe2 + errYTrk2;
1501 const float errYWoApe =
std::sqrt(errYWoApe2);
1503 const float norResX = resX /
errX;
1504 const float norResY = resY /
errY;
1508 float resXprime(999.
F), resYprime(999.
F), norResXprime(999.
F), norResYprime(999.
F);
1511 norResXprime = norResX;
1514 norResXprime = -norResX;
1516 edm::LogError(
"FillHitVariables") <<
"Incorrect value of uDirection, which gives global module orientation";
1522 norResYprime = norResY;
1525 norResYprime = -norResY;
1527 edm::LogError(
"FillHitVariables") <<
"Incorrect value of vDirection, which gives global module orientation";
1532 hitParams.
xHit = xHit;
1533 hitParams.
xTrk = xTrk;
1543 hitParams.
resX = resXprime;
1544 hitParams.
norResX = norResXprime;
1546 const float norResX2(norResXprime * norResXprime);
1547 hitParams.
probX = TMath::Prob(norResX2, 1);
1549 hitParams.
yHit = yHit;
1550 hitParams.
yTrk = yTrk;
1560 hitParams.
resY = resYprime;
1561 hitParams.
norResY = norResYprime;
1563 const float norResY2(norResYprime * norResYprime);
1564 hitParams.
probY = TMath::Prob(norResY2, 1);
1594 if (!(dynamic_cast<const SiStripRecHit2D*>(&
recHit) || dynamic_cast<const SiStripRecHit1D*>(&
recHit))) {
1596 <<
"RecHit in Strip is 'Matched' or 'Projected', but here all should be monohits per module";
1603 if (dynamic_cast<const SiStripRecHit1D*>(&
recHit)) {
1605 clusterPtr = &(*stripHit.
cluster());
1606 }
else if (dynamic_cast<const SiStripRecHit2D*>(&
recHit)) {
1607 edm::LogWarning(
"FillHitVariables") <<
"Data has TIB/TOB hits as SiStripRecHit2D and not 1D. Probably data is "
1608 "processed with CMSSW<34X. Nevertheless everything should work fine";
1610 clusterPtr = &(*stripHit.
cluster());
1615 clusterPtr = &(*stripHit.
cluster());
1618 edm::LogError(
"FillHitVariables") <<
"Pointer to cluster not valid!!! This should never happen...";
1628 const std::pair<uint16_t, uint16_t> stripChargeLR = std::make_pair(*stripChargeL, *stripChargeR);
1639 static_cast<float>(stripChargeLR.first + stripChargeLR.second) / static_cast<float>(hitParams.
chargeStrip);
1640 hitParams.
chargeAsymmetry = static_cast<float>(stripChargeLR.first - stripChargeLR.second) /
1641 static_cast<float>(stripChargeLR.first + stripChargeLR.second);
1651 if (!
hit.detUnit()) {
1656 if (!dynamic_cast<const StripTopology*>(&detUnit.
type().
topology())) {
1673 float dirX = -tanLorentzAnglePerTesla *
bField.y();
1674 float dirY = tanLorentzAnglePerTesla *
bField.x();
1686 if (momentumDir.z() > 0.)
1687 scaledMomentumDir *= std::fabs(
thickness / momentumDir.z());
1688 else if (momentumDir.z() < 0.)
1689 scaledMomentumDir *= -std::fabs(
thickness / momentumDir.z());
1691 scaledMomentumDir *= maxLength / momentumDir.mag();
1704 float coveredStrips = std::fabs(projEdge2 - projEdge1);
1709 edm::LogError(
"FillHitVariables") <<
"Incorrect subdetector ID, hit not associated to tracker";
1733 const DetId& detId(
hit.geographicalId());
1734 const uint32_t& rawId(detId.rawId());
1735 const unsigned int& subdetId(
m_tkTreeVar_[rawId].subdetId);
1737 if (localError.
xx() < 0. || localError.
yy() < 0.) {
1757 if (!dynamic_cast<const RadialStripTopology*>(&detUnit.
type().
topology()))
1762 if (measError.uu() < 0. || measError.vv() < 0.) {
1777 edm::LogError(
"FillHitVariables") <<
"Incorrect subdetector ID, hit not associated to tracker";
1784 const float x(lP.
x());
1785 const float y(lP.
y());
1786 const float errX2(lE.
xx());
1787 const float errY2(lE.
yy());
1804 float errX2(-999.
F);
1805 float errY2(-999.
F);
1809 const float l_0 = r_0 - topol.
detHeight() / 2;
1811 y = measPos.
y() * stripLength - 0.5 * stripLength + l_0 * (1. / cosPhi - 1.);
1814 const float errPhi2(measErr.
uu() * angularWidth2);
1816 errX2 = errPhi2 * r_0 * r_0;
1819 const float helpSummand = l_0 * l_0 * (sinPhi2 / cosPhi4 * errPhi2);
1820 errY2 = measErr.
vv() * stripLength * stripLength + helpSummand;
1875 edm::LogInfo(
"HitSelector") <<
"applying hit cuts ...";
1876 bool emptyMap(
true);
1878 if (!i_hitSelection.second.empty()) {
1880 double intervalBegin(999.);
1881 for (std::vector<double>::iterator i_hitInterval = i_hitSelection.second.begin();
1882 i_hitInterval != i_hitSelection.second.end();
1884 if (
entry % 2 == 1) {
1885 intervalBegin = *i_hitInterval;
1888 if (intervalBegin > *i_hitInterval) {
1889 edm::LogError(
"HitSelector") <<
"INVALID Interval selected for " << i_hitSelection.first <<
":\t"
1890 << intervalBegin <<
" > " << (*i_hitInterval) <<
"\n ... delete Selection for "
1891 << i_hitSelection.first;
1892 i_hitSelection.second.clear();
1893 i_hitInterval = i_hitSelection.second.begin();
1895 edm::LogInfo(
"HitSelector") <<
"Interval selected for " << i_hitSelection.first <<
":\t" << intervalBegin
1896 <<
", " << (*i_hitInterval);
1901 if (!i_hitSelection.second.empty())
1906 bool emptyMapUInt(
true);
1908 if (!i_hitSelection.second.empty()) {
1910 unsigned int intervalBegin(999);
1911 for (std::vector<unsigned int>::iterator i_hitInterval = i_hitSelection.second.begin();
1912 i_hitInterval != i_hitSelection.second.end();
1914 if (
entry % 2 == 1) {
1915 intervalBegin = *i_hitInterval;
1918 if (intervalBegin > *i_hitInterval) {
1919 edm::LogError(
"HitSelector") <<
"INVALID Interval selected for " << i_hitSelection.first <<
":\t"
1920 << intervalBegin <<
" > " << (*i_hitInterval) <<
"\n ... delete Selection for "
1921 << i_hitSelection.first;
1922 i_hitSelection.second.clear();
1923 i_hitInterval = i_hitSelection.second.begin();
1925 edm::LogInfo(
"HitSelector") <<
"Interval selected for " << i_hitSelection.first <<
":\t" << intervalBegin
1926 <<
", " << (*i_hitInterval);
1931 if (!i_hitSelection.second.empty())
1932 emptyMapUInt =
false;
1936 if (emptyMap && emptyMapUInt) {
1946 std::vector<double> v_cutVariable(parSet.
getParameter<std::vector<double> >(cutVariable));
1947 if (v_cutVariable.size() % 2 == 1) {
1948 edm::LogError(
"HitSelector") <<
"Invalid Hit Selection for " << cutVariable
1949 <<
": need even number of arguments (intervals)"
1950 <<
"\n ... delete Selection for " << cutVariable;
1951 v_cutVariable.clear();
1961 std::vector<unsigned int> v_cutVariable(parSet.
getParameter<std::vector<unsigned int> >(cutVariable));
1962 if (v_cutVariable.size() % 2 == 1) {
1963 edm::LogError(
"HitSelector") <<
"Invalid Hit Selection for " << cutVariable
1964 <<
": need even number of arguments (intervals)"
1965 <<
"\n ... delete Selection for " << cutVariable;
1966 v_cutVariable.clear();
1982 bool isGoodHit(
true);
1983 bool isGoodHitX(
true);
1984 bool isGoodHitY(
true);
1988 const std::vector<double>& v_hitSelection(i_hitSelection.second);
1989 if (v_hitSelection.empty())
2110 const std::vector<unsigned int>& v_hitSelection(i_hitSelection.second);
2111 if (v_hitSelection.empty())
2169 double intervalBegin(999.);
2170 bool isSelected(
false);
2171 for (
auto const& i_hitInterval : v_hitSelection) {
2174 intervalBegin = i_hitInterval;
2183 const unsigned int variable2)
const {
2185 unsigned int intervalBegin(999);
2186 bool isSelected(
false);
2187 for (
auto i_hitInterval : v_hitSelection) {
2190 intervalBegin = i_hitInterval;
2192 if (variable2 == 999 || (variable2 >= intervalBegin && variable2 <= i_hitInterval))
2202 unsigned int goodHitsPerTrack(trackStruct.
v_hitParams.size());
2269 bool moduleInSector(
false);
2270 for (
auto const& i_hitSector :
hit.v_sector) {
2271 if (i_sector.first == i_hitSector) {
2272 moduleInSector =
true;
2276 if (!moduleInSector)
2280 if (
hit.goodXMeasurement) {
2281 std::map<std::string, TrackerSectorStruct::CorrelationHists>& m_corrHists(sector.
m_correlationHistsX);
2288 m_corrHists[
"HitsGood"].fillCorrHistsX(
hit, goodHitsPerTrack);
2300 m_corrHists[
"P"].fillCorrHistsX(
hit, trackStruct.
trkParams.
p);
2301 m_corrHists[
"InvP"].fillCorrHistsX(
hit, 1. / trackStruct.
trkParams.
p);
2305 if (
hit.goodYMeasurement) {
2306 std::map<std::string, TrackerSectorStruct::CorrelationHists>& m_corrHists(sector.
m_correlationHistsY);
2313 m_corrHists[
"HitsGood"].fillCorrHistsY(
hit, goodHitsPerTrack);
2325 m_corrHists[
"P"].fillCorrHistsY(
hit, trackStruct.
trkParams.
p);
2326 m_corrHists[
"InvP"].fillCorrHistsY(
hit, 1. / trackStruct.
trkParams.
p);
2331 for (
auto& i_sigmaX : sector.
m_sigmaX) {
2332 for (
auto& iHist : i_sigmaX.second) {
2333 if (i_sigmaX.first ==
"sigmaXHit")
2334 iHist->Fill(
hit.errXHit * 10000.);
2335 else if (i_sigmaX.first ==
"sigmaXTrk")
2336 iHist->Fill(
hit.errXTrk * 10000.);
2337 else if (i_sigmaX.first ==
"sigmaX")
2338 iHist->Fill(
hit.errX * 10000.);
2341 for (
auto& i_sigmaY : sector.
m_sigmaY) {
2342 for (
auto& iHist : i_sigmaY.second) {
2343 if (i_sigmaY.first ==
"sigmaYHit")
2344 iHist->Fill(
hit.errYHit * 10000.);
2345 else if (i_sigmaY.first ==
"sigmaYTrk")
2346 iHist->Fill(
hit.errYTrk * 10000.);
2347 else if (i_sigmaY.first ==
"sigmaY")
2348 iHist->Fill(
hit.errY * 10000.);
2357 std::map<std::string, TrackerSectorStruct::CorrelationHists>& m_corrHists(sector.
m_correlationHistsX);
2360 m_corrHists[
"WidthX"].fillCorrHistsX(
hit,
hit.widthX);
2361 m_corrHists[
"BaryStripX"].fillCorrHistsX(
hit,
hit.baryStripX);
2363 if (
hit.isPixelHit) {
2364 m_corrHists[
"ChargePixel"].fillCorrHistsX(
hit,
hit.chargePixel);
2365 m_corrHists[
"ClusterProbXY"].fillCorrHistsX(
hit,
hit.clusterProbabilityXY);
2366 m_corrHists[
"ClusterProbQ"].fillCorrHistsX(
hit,
hit.clusterProbabilityQ);
2367 m_corrHists[
"ClusterProbXYQ"].fillCorrHistsX(
hit,
hit.clusterProbabilityXYQ);
2368 m_corrHists[
"LogClusterProb"].fillCorrHistsX(
hit,
hit.logClusterProbability);
2369 m_corrHists[
"IsOnEdge"].fillCorrHistsX(
hit,
hit.isOnEdge);
2370 m_corrHists[
"HasBadPixels"].fillCorrHistsX(
hit,
hit.hasBadPixels);
2371 m_corrHists[
"SpansTwoRoc"].fillCorrHistsX(
hit,
hit.spansTwoRoc);
2372 m_corrHists[
"QBin"].fillCorrHistsX(
hit,
hit.qBin);
2375 m_corrHists[
"ChargeStrip"].fillCorrHistsX(
hit,
hit.chargeStrip);
2376 m_corrHists[
"MaxStrip"].fillCorrHistsX(
hit,
hit.maxStrip);
2377 m_corrHists[
"MaxCharge"].fillCorrHistsX(
hit,
hit.maxCharge);
2378 m_corrHists[
"MaxIndex"].fillCorrHistsX(
hit,
hit.maxIndex);
2379 m_corrHists[
"ChargeOnEdges"].fillCorrHistsX(
hit,
hit.chargeOnEdges);
2380 m_corrHists[
"ChargeAsymmetry"].fillCorrHistsX(
hit,
hit.chargeAsymmetry);
2381 m_corrHists[
"ChargeLRplus"].fillCorrHistsX(
hit,
hit.chargeLRplus);
2382 m_corrHists[
"ChargeLRminus"].fillCorrHistsX(
hit,
hit.chargeLRminus);
2383 m_corrHists[
"SOverN"].fillCorrHistsX(
hit,
hit.sOverN);
2384 m_corrHists[
"WidthProj"].fillCorrHistsX(
hit,
hit.projWidth);
2385 m_corrHists[
"WidthDiff"].fillCorrHistsX(
hit,
hit.projWidth - static_cast<float>(
hit.widthX));
2401 m_corrHists[
"SigmaXHit"].fillCorrHistsX(
hit,
hit.errXHit * 10000.);
2402 m_corrHists[
"SigmaXTrk"].fillCorrHistsX(
hit,
hit.errXTrk * 10000.);
2403 m_corrHists[
"SigmaX"].fillCorrHistsX(
hit,
hit.errX * 10000.);
2405 m_corrHists[
"PhiSens"].fillCorrHistsX(
hit,
hit.phiSens * 180. /
M_PI);
2406 m_corrHists[
"PhiSensX"].fillCorrHistsX(
hit,
hit.phiSensX * 180. /
M_PI);
2407 m_corrHists[
"PhiSensY"].fillCorrHistsX(
hit,
hit.phiSensY * 180. /
M_PI);
2411 sector.
SigmaX2->Fill(
hit.errX2 * 10000. * 10000.);
2413 sector.
ResX->Fill(
hit.resX * 10000.);
2424 std::map<std::string, TrackerSectorStruct::CorrelationHists>& m_corrHists(sector.
m_correlationHistsY);
2426 if (!
hit.isPixelHit)
2430 m_corrHists[
"WidthY"].fillCorrHistsY(
hit,
hit.widthY);
2431 m_corrHists[
"BaryStripY"].fillCorrHistsY(
hit,
hit.baryStripY);
2433 m_corrHists[
"ChargePixel"].fillCorrHistsY(
hit,
hit.chargePixel);
2434 m_corrHists[
"ClusterProbXY"].fillCorrHistsY(
hit,
hit.clusterProbabilityXY);
2435 m_corrHists[
"ClusterProbQ"].fillCorrHistsY(
hit,
hit.clusterProbabilityQ);
2436 m_corrHists[
"ClusterProbXYQ"].fillCorrHistsY(
hit,
hit.clusterProbabilityXYQ);
2437 m_corrHists[
"LogClusterProb"].fillCorrHistsY(
hit,
hit.logClusterProbability);
2438 m_corrHists[
"IsOnEdge"].fillCorrHistsY(
hit,
hit.isOnEdge);
2439 m_corrHists[
"HasBadPixels"].fillCorrHistsY(
hit,
hit.hasBadPixels);
2440 m_corrHists[
"SpansTwoRoc"].fillCorrHistsY(
hit,
hit.spansTwoRoc);
2441 m_corrHists[
"QBin"].fillCorrHistsY(
hit,
hit.qBin);
2444 m_corrHists[
"SigmaYHit"].fillCorrHistsY(
hit,
hit.errYHit * 10000.);
2445 m_corrHists[
"SigmaYTrk"].fillCorrHistsY(
hit,
hit.errYTrk * 10000.);
2446 m_corrHists[
"SigmaY"].fillCorrHistsY(
hit,
hit.errY * 10000.);
2448 m_corrHists[
"PhiSens"].fillCorrHistsY(
hit,
hit.phiSens * 180. /
M_PI);
2449 m_corrHists[
"PhiSensX"].fillCorrHistsY(
hit,
hit.phiSensX * 180. /
M_PI);
2450 m_corrHists[
"PhiSensY"].fillCorrHistsY(
hit,
hit.phiSensY * 180. /
M_PI);
2454 sector.
SigmaY2->Fill(
hit.errY2 * 10000. * 10000.);
2456 sector.
ResY->Fill(
hit.resY * 10000.);
2466 unsigned int goodHitsPerTrack(trackStruct.
v_hitParams.size());
2474 for (
auto const& i_hit : trackStruct.
v_hitParams) {
2480 bool moduleInSector(
false);
2481 for (
auto const& i_hitSector : i_hit.v_sector) {
2482 if (i_sector.first == i_hitSector) {
2483 moduleInSector =
true;
2487 if (!moduleInSector)
2493 if (i_hit.goodXMeasurement) {
2498 if (i_hit.errXWoApe < i_errBins.second.first || i_hit.errXWoApe >= i_errBins.second.second) {
2501 i_sector.second.m_binnedHists[i_errBins.first][
"sigmaX"]->Fill(i_hit.errXWoApe);
2502 i_sector.second.m_binnedHists[i_errBins.first][
"norResX"]->Fill(i_hit.norResX);
2505 i_sector.second.ResX->Fill(i_hit.resX * 10000.);
2506 i_sector.second.NorResX->Fill(i_hit.norResX);
2509 if (i_hit.goodYMeasurement) {
2514 if (i_hit.errYWoApe < i_errBins.second.first || i_hit.errYWoApe >= i_errBins.second.second) {
2517 i_sector.second.m_binnedHists[i_errBins.first][
"sigmaY"]->Fill(i_hit.errYWoApe);
2518 i_sector.second.m_binnedHists[i_errBins.first][
"norResY"]->Fill(i_hit.norResY);
2521 i_sector.second.ResY->Fill(i_hit.resY * 10000.);
2522 i_sector.second.NorResY->Fill(i_hit.norResY);
2534 for (
auto const& i_errBins : i_sector.second.m_binnedHists) {
2535 std::map<std::string, TH1*> m_Hists = i_errBins.second;
2538 double integralX = m_Hists[
"norResX"]->Integral();
2539 i_sector.second.EntriesX->SetBinContent(i_errBins.first, integralX);
2541 if (i_sector.second.isPixel) {
2542 double integralY = m_Hists[
"norResY"]->Integral();
2543 i_sector.second.EntriesY->SetBinContent(i_errBins.first, integralY);
2555 if (!
hit.isValid() || (
hit.dimension() < 2 && !dynamic_cast<const SiStripRecHit1D*>(&
hit))) {
2558 const DetId detId(
hit.geographicalId());
2566 else if (dynamic_cast<const SiStripRecHit1D*>(&
hit) || dynamic_cast<const SiStripRecHit2D*>(&
hit))
2569 else if (dynamic_cast<const SiStripMatchedRecHit2D*>(&
hit))
2571 else if (dynamic_cast<const ProjectedSiStripRecHit2D*>(&
hit)) {
2575 edm::LogError(
"UnkownType") <<
"@SUB=AlignmentTrackSelector::isHit2D"
2576 <<
"Tracker hit not in pixel, neither SiStripRecHit[12]D nor "
2577 <<
"SiStripMatchedRecHit2D nor ProjectedSiStripRecHit2D.";
2582 edm::LogWarning(
"DetectorMismatch") <<
"@SUB=AlignmentTrackSelector::isHit2D"
2583 <<
"Hit not in tracker with 'official' dimension >=2.";
2598 if (beamSpotHandle.
isValid()) {
2601 edm::LogError(
"ApeEstimator") <<
"No beam spot available from EventSetup"
2602 <<
"\n...skip event";
2619 typedef std::vector<ConstTrajTrackPair> ConstTrajTrackPairCollection;
2620 ConstTrajTrackPairCollection trajTracks;
2623 for (i_trajTrack = m_TrajTracksMap->
begin(); i_trajTrack != m_TrajTracksMap->
end(); ++i_trajTrack) {
2624 trajTracks.push_back(
ConstTrajTrackPair(&(*(*i_trajTrack).key), &(*(*i_trajTrack).val)));
2628 unsigned int trackSizeGood(0);
2629 ConstTrajTrackPairCollection::const_iterator iTrack;
2630 for (iTrack = trajTracks.begin(); iTrack != trajTracks.end(); ++iTrack) {
2640 const std::vector<TrajectoryMeasurement> v_meas = (*traj).measurements();
2643 for (std::vector<TrajectoryMeasurement>::const_iterator i_meas = v_meas.begin(); i_meas != v_meas.end(); ++i_meas) {