25 doAllSeedPlots(iConfig.getParameter<
bool>(
"doSeedParameterHistos")),
26 doTCPlots(iConfig.getParameter<
bool>(
"doTrackCandHistos")),
27 doAllTCPlots(iConfig.getParameter<
bool>(
"doAllTrackCandHistos")),
28 doPT(iConfig.getParameter<
bool>(
"doSeedPTHisto")),
29 doETA(iConfig.getParameter<
bool>(
"doSeedETAHisto")),
30 doPHI(iConfig.getParameter<
bool>(
"doSeedPHIHisto")),
31 doPHIVsETA(iConfig.getParameter<
bool>(
"doSeedPHIVsETAHisto")),
32 doTheta(iConfig.getParameter<
bool>(
"doSeedThetaHisto")),
33 doQ(iConfig.getParameter<
bool>(
"doSeedQHisto")),
34 doDxy(iConfig.getParameter<
bool>(
"doSeedDxyHisto")),
35 doDz(iConfig.getParameter<
bool>(
"doSeedDzHisto")),
36 doNRecHits(iConfig.getParameter<
bool>(
"doSeedNRecHitsHisto")),
37 doProfPHI(iConfig.getParameter<
bool>(
"doSeedNVsPhiProf")),
38 doProfETA(iConfig.getParameter<
bool>(
"doSeedNVsEtaProf")),
107 std::vector<std::string> mvaProducers = iConfig.
getParameter<std::vector<std::string> >(
"MVAProducers");
120 histname =
"SeedPt_" + seedProducer.label() +
"_";
127 histname =
"SeedEta_" + seedProducer.label() +
"_";
134 histname =
"SeedPhi_" + seedProducer.label() +
"_";
141 histname =
"SeedPhiVsEta_" + seedProducer.label() +
"_";
149 histname =
"SeedTheta_" + seedProducer.label() +
"_";
156 histname =
"SeedQ_" + seedProducer.label() +
"_";
163 histname =
"SeedDxy_" + seedProducer.label() +
"_";
170 histname =
"SeedDz_" + seedProducer.label() +
"_";
177 histname =
"NumberOfRecHitsPerSeed_" + seedProducer.label() +
"_";
185 histname =
"NumberOfRecHitsPerSeedVsPhiProfile_" + seedProducer.label() +
"_";
200 histname =
"NumberOfRecHitsPerSeedVsEtaProfile_" + seedProducer.label() +
"_";
216 histname =
"TrackingRegionEta_" + seedProducer.label() +
"_";
223 histname =
"TrackingRegionPhi_" + seedProducer.label() +
"_";
230 histname =
"TrackingRegionPhiVsEta_" + seedProducer.label() +
"_";
243 histname =
"TrackingRegionCandidatePt_" + seedProducer.label() +
"_";
251 histname =
"TrackingRegionCandidateEta_" + seedProducer.label() +
"_";
259 histname =
"TrackingRegionCandidatePhi_" + seedProducer.label() +
"_";
267 histname =
"TrackingRegionCandidatePhiVsEta_" + seedProducer.label() +
"_";
279 const auto candsBin = iConfig.
getParameter<
int>(
"SeedCandBin");
280 const auto candsMin = iConfig.
getParameter<
double>(
"SeedCandMin");
281 const auto candsMax = iConfig.
getParameter<
double>(
"SeedCandMax");
283 histname =
"SeedStoppingSource_" + seedProducer.label() +
"_";
289 histname =
"SeedStoppingSourceVsPhi_" + seedProducer.label() +
"_";
295 histname =
"SeedStoppingSourceVsEta_" + seedProducer.label() +
"_";
301 histname =
"NumberOfTrajCandsPerSeed_" + seedProducer.label() +
"_";
307 histname =
"NumberOfTrajCandsPerSeedVsPhi_" + seedProducer.label() +
"_";
313 histname =
"NumberOfTrajCandsPerSeedVsEta_" + seedProducer.label() +
"_";
319 histname =
"SeedStoppingSourceVsNumberOfTrajCandsPerSeed_" + seedProducer.label() +
"_";
325 for (
unsigned int i = 0;
i < stopReasonSize; ++
i) {
334 histname =
"StoppingSource_" + seedProducer.label() +
"_";
336 histname + CatagoryName,
histname + CatagoryName, StopReasonNameSize, 0.,
double(StopReasonNameSize));
340 histname =
"StoppingSourceVSeta_" + seedProducer.label() +
"_";
346 histname =
"StoppingSourceVSphi_" + seedProducer.label() +
"_";
352 for (
size_t ibin = 0; ibin < StopReasonNameSize; ibin++) {
363 histname =
"TrackCandPt_" + tcProducer.label() +
"_";
368 histname =
"TrackCandEta_" + tcProducer.label() +
"_";
373 histname =
"TrackCandPhi_" + tcProducer.label() +
"_";
379 histname =
"TrackCandTheta_" + tcProducer.label() +
"_";
386 histname =
"TrackCandQ_" + tcProducer.label() +
"_";
391 histname =
"TrackCandDxy_" + tcProducer.label() +
"_";
396 histname =
"TrackCandDz_" + tcProducer.label() +
"_";
401 histname =
"NumberOfRecHitsPerTrackCand_" + tcProducer.label() +
"_";
407 histname =
"NumberOfRecHitsPerTrackCandVsPhiProfile_" + tcProducer.label() +
"_";
413 histname =
"NumberOfRecHitsPerTrackCandVsEtaProfile_" + tcProducer.label() +
"_";
420 histname =
"TrackCandPhiVsEta_" + tcProducer.label() +
"_";
427 for (
size_t i = 1,
end = mvaProducers.size();
i <=
end; ++
i) {
436 pfix =
" (not loose-selected)";
438 histname =
"TrackMVA" +
num +
"HP_" + tcProducer.label() +
"_";
442 trackMVAsHP.back()->setAxisTitle(
"Number of tracks", 2);
444 histname =
"TrackMVA" +
num +
"HPVsPtProfile_" + tcProducer.label() +
"_";
456 histname =
"TrackMVA" +
num +
"HPVsEtaProfile_" + tcProducer.label() +
"_";
463 histname =
"TrackMVA" +
num +
"_" + tcProducer.label() +
"_";
466 trackMVAs.back()->setAxisTitle(
"Track selection MVA" +
num, 1);
467 trackMVAs.back()->setAxisTitle(
"Number of tracks", 2);
469 histname =
"TrackMVA" +
num +
"VsPtProfile_" + tcProducer.label() +
"_";
481 histname =
"TrackMVA" +
num +
"VsEtaProfile_" + tcProducer.label() +
"_";
508 tscblBuilder(*
state.freeState(),
bs);
509 if (!(tsAtClosestApproachSeed.
isValid())) {
510 edm::LogVerbatim(
"TrackBuilding") <<
"TrajectoryStateClosestToBeamLine not valid";
518 double eta =
state.globalPosition().eta();
519 double phi =
state.globalPosition().phi();
520 double theta =
state.globalPosition().theta();
526 double numberOfHits = candidate.
nHits();
528 double dz =
v.z() - (
v.x() *
p.x() +
v.y() *
p.y()) /
p.perp() *
p.z() /
p.perp();
584 tscblBuilder(*
state.freeState(),
bs);
585 if (!(tsAtClosestApproachTrackCand.
isValid())) {
586 edm::LogVerbatim(
"TrackBuilding") <<
"TrajectoryStateClosestToBeamLine not valid";
594 double eta =
state.globalPosition().eta();
595 double phi =
state.globalPosition().phi();
596 double theta =
state.globalPosition().theta();
602 double numberOfHits = candidate.
nRecHits();
605 double dz =
v.z() - (
v.x() *
p.x() +
v.y() *
p.y()) /
p.perp() *
p.z() /
p.perp();
641 bool trackSelected(
unsigned char mask,
unsigned char qual) {
return mask & 1 <<
qual; }
644 const std::vector<const MVACollection*>& mvaCollections,
645 const std::vector<const QualityMaskCollection*>& qualityMaskCollections) {
652 const auto nmva = mvaCollections.size();
653 for (
const auto mva : mvaCollections) {
655 edm::LogError(
"LogicError") <<
"TrackBuildingAnalyzer: Incompatible size of MVACollection, " <<
mva->size()
656 <<
" differs from the size of the track collection " <<
ntracks;
660 for (
const auto qual : qualityMaskCollections) {
662 edm::LogError(
"LogicError") <<
"TrackBuildingAnalyzer: Incompatible size of QualityMaskCollection, " 663 <<
qual->size() <<
" differs from the size of the track collection " <<
ntracks;
668 for (
size_t iTrack = 0; iTrack <
ntracks; ++iTrack) {
671 bool selectedLoose =
false;
672 bool selectedHP =
false;
677 for (
size_t iMVA = 0; iMVA < nmva; ++iMVA) {
678 const auto mva = (*(mvaCollections[iMVA]))[iTrack];
679 if (!selectedLoose) {
684 if (iMVA >= 1 && !selectedHP) {
690 const auto qual = (*(qualityMaskCollections)[iMVA])[iTrack];
694 if (selectedLoose && selectedHP)
704 for (
const auto& candidate : regionCandidates) {
705 const auto eta = candidate.eta();
706 const auto phi = candidate.phi();
724 return &(regionLayers.
region());
728 template <
typename T>
734 if (
const auto* etaPhiRegion = dynamic_cast<const RectangularEtaPhiTrackingRegion*>(regionPtr(
tmp))) {
735 const auto&
etaRange = etaPhiRegion->etaRange();
736 const auto& phiMargin = etaPhiRegion->phiMargin();
741 const auto phiMin = etaPhiRegion->phiDirection() - phiMargin.left();
742 const auto phiMax = etaPhiRegion->phiDirection() + phiMargin.right();
MonitorElement * NumberOfRecHitsPerTrackCandVsPhiProfile
MonitorElement * TrackCandPt
Log< level::Info, true > LogVerbatim
MonitorElement * seedStoppingSourceVsPhi
T getParameter(std::string const &) const
MonitorElement * numberOfTrajCandsPerSeed
MonitorElement * TrackingRegionCandidatePhiVsEta
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup, const TrajectorySeed &seed, const SeedStopInfo &stopInfo, const reco::BeamSpot &bs, const MagneticField &theMF, const TransientTrackingRecHitBuilder &theTTRHBuilder)
SeedStopReason stopReason() const
std::vector< MonitorElement * > trackMVAsVsPtProfile
constexpr T reduceRange(T x)
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * TrackCandDz
Sin< T >::type sin(const T &t)
MonitorElement * stoppingSourceVSphi
MonitorElement * TrackCandPhi
void initHisto(DQMStore::IBooker &ibooker, const edm::ParameterSet &)
Log< level::Error, false > LogError
std::vector< MonitorElement * > trackMVAs
MonitorElement * TrackCandPhiVsEta
MonitorElement * TrackingRegionCandidatePt
static std::string to_string(const XMLCh *ch)
MonitorElement * SeedTheta
uint8_t stopReason() const
MonitorElement * NumberOfRecHitsPerTrackCandVsEtaProfile
GlobalPoint position() const
MonitorElement * stoppingSource
MonitorElement * NumberOfRecHitsPerSeed
unsigned char stopReasonUC() const
MonitorElement * NumberOfRecHitsPerSeedVsPhiProfile
void analyzeRegions(const T ®ions)
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
MonitorElement * TrackCandDxy
unsigned int nHits() const
const bool doAllSeedPlots
const std::string SeedStopReasonName[]
Cos< T >::type cos(const T &t)
PTrajectoryStateOnDet const & trajectoryStateOnDet() const
const std::string StopReasonName[]
MonitorElement * TrackCandEta
GlobalVector momentum() const
std::vector< MonitorElement * > trackMVAsHP
FTS const & trackStateAtPCA() const
MonitorElement * numberOfTrajCandsPerSeedVsPhi
MonitorElement * TrackingRegionPhi
TrackBuildingAnalyzer(const edm::ParameterSet &)
std::vector< MonitorElement * > trackMVAsVsEtaProfile
MonitorElement * numberOfTrajCandsPerSeedVsEta
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
PTrajectoryStateOnDet const & startingState() const
std::vector< MonitorElement * > trackMVAsHPVsEtaProfile
MonitorElement * TrackingRegionPhiVsEta
const bool doRegionCandidatePlots
MonitorElement * stoppingSourceVSeta
unsigned short candidatesPerSeed() const
const TrackingRegion & region() const
MonitorElement * TrackingRegionEta
std::vector< MonitorElement * > trackMVAsHPVsPtProfile
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
MonitorElement * TrackCandTheta
MonitorElement * TrackCandQ
MonitorElement * SeedPhiVsEta
MonitorElement * TrackingRegionCandidateEta
MonitorElement * seedStoppingSourceVsEta
MonitorElement * TrackingRegionCandidatePhi
virtual int getNbinsX() const
get # of bins in X-axis
MonitorElement * seedStoppingSourceVsNumberOfTrajCandsPerSeed
MonitorElement * NumberOfRecHitsPerSeedVsEtaProfile
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Geom::Theta< T > theta() const
MonitorElement * NumberOfRecHitsPerTrackCand
MonitorElement * seedStoppingSource
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)