|
|
Go to the documentation of this file.
27 doAllSeedPlots(iConfig.getParameter<
bool>(
"doSeedParameterHistos")),
28 doTCPlots(iConfig.getParameter<
bool>(
"doTrackCandHistos")),
29 doAllTCPlots(iConfig.getParameter<
bool>(
"doAllTrackCandHistos")),
30 doPT(iConfig.getParameter<
bool>(
"doSeedPTHisto")),
31 doETA(iConfig.getParameter<
bool>(
"doSeedETAHisto")),
32 doPHI(iConfig.getParameter<
bool>(
"doSeedPHIHisto")),
33 doPHIVsETA(iConfig.getParameter<
bool>(
"doSeedPHIVsETAHisto")),
34 doTheta(iConfig.getParameter<
bool>(
"doSeedThetaHisto")),
35 doQ(iConfig.getParameter<
bool>(
"doSeedQHisto")),
36 doDxy(iConfig.getParameter<
bool>(
"doSeedDxyHisto")),
37 doDz(iConfig.getParameter<
bool>(
"doSeedDzHisto")),
38 doNRecHits(iConfig.getParameter<
bool>(
"doSeedNRecHitsHisto")),
39 doProfPHI(iConfig.getParameter<
bool>(
"doSeedNVsPhiProf")),
40 doProfETA(iConfig.getParameter<
bool>(
"doSeedNVsEtaProf")),
109 std::vector<std::string> mvaProducers = iConfig.
getParameter<std::vector<std::string> >(
"MVAProducers");
122 histname =
"SeedPt_" + seedProducer.label() +
"_";
129 histname =
"SeedEta_" + seedProducer.label() +
"_";
136 histname =
"SeedPhi_" + seedProducer.label() +
"_";
143 histname =
"SeedPhiVsEta_" + seedProducer.label() +
"_";
151 histname =
"SeedTheta_" + seedProducer.label() +
"_";
158 histname =
"SeedQ_" + seedProducer.label() +
"_";
165 histname =
"SeedDxy_" + seedProducer.label() +
"_";
172 histname =
"SeedDz_" + seedProducer.label() +
"_";
179 histname =
"NumberOfRecHitsPerSeed_" + seedProducer.label() +
"_";
187 histname =
"NumberOfRecHitsPerSeedVsPhiProfile_" + seedProducer.label() +
"_";
202 histname =
"NumberOfRecHitsPerSeedVsEtaProfile_" + seedProducer.label() +
"_";
218 histname =
"TrackingRegionEta_" + seedProducer.label() +
"_";
225 histname =
"TrackingRegionPhi_" + seedProducer.label() +
"_";
232 histname =
"TrackingRegionPhiVsEta_" + seedProducer.label() +
"_";
245 histname =
"TrackingRegionCandidatePt_" + seedProducer.label() +
"_";
253 histname =
"TrackingRegionCandidateEta_" + seedProducer.label() +
"_";
261 histname =
"TrackingRegionCandidatePhi_" + seedProducer.label() +
"_";
269 histname =
"TrackingRegionCandidatePhiVsEta_" + seedProducer.label() +
"_";
281 const auto candsBin = iConfig.
getParameter<
int>(
"SeedCandBin");
282 const auto candsMin = iConfig.
getParameter<
double>(
"SeedCandMin");
283 const auto candsMax = iConfig.
getParameter<
double>(
"SeedCandMax");
285 histname =
"SeedStoppingSource_" + seedProducer.label() +
"_";
291 histname =
"SeedStoppingSourceVsPhi_" + seedProducer.label() +
"_";
297 histname =
"SeedStoppingSourceVsEta_" + seedProducer.label() +
"_";
303 histname =
"NumberOfTrajCandsPerSeed_" + seedProducer.label() +
"_";
309 histname =
"NumberOfTrajCandsPerSeedVsPhi_" + seedProducer.label() +
"_";
315 histname =
"NumberOfTrajCandsPerSeedVsEta_" + seedProducer.label() +
"_";
321 histname =
"SeedStoppingSourceVsNumberOfTrajCandsPerSeed_" + seedProducer.label() +
"_";
327 for (
unsigned int i = 0;
i < stopReasonSize; ++
i) {
336 histname =
"StoppingSource_" + seedProducer.label() +
"_";
338 histname + CatagoryName,
histname + CatagoryName, StopReasonNameSize, 0.,
double(StopReasonNameSize));
342 histname =
"StoppingSourceVSeta_" + seedProducer.label() +
"_";
348 histname =
"StoppingSourceVSphi_" + seedProducer.label() +
"_";
354 for (
size_t ibin = 0; ibin < StopReasonNameSize; ibin++) {
365 histname =
"TrackCandPt_" + tcProducer.label() +
"_";
370 histname =
"TrackCandEta_" + tcProducer.label() +
"_";
375 histname =
"TrackCandPhi_" + tcProducer.label() +
"_";
381 histname =
"TrackCandTheta_" + tcProducer.label() +
"_";
388 histname =
"TrackCandQ_" + tcProducer.label() +
"_";
393 histname =
"TrackCandDxy_" + tcProducer.label() +
"_";
398 histname =
"TrackCandDz_" + tcProducer.label() +
"_";
403 histname =
"NumberOfRecHitsPerTrackCand_" + tcProducer.label() +
"_";
409 histname =
"NumberOfRecHitsPerTrackCandVsPhiProfile_" + tcProducer.label() +
"_";
415 histname =
"NumberOfRecHitsPerTrackCandVsEtaProfile_" + tcProducer.label() +
"_";
422 histname =
"TrackCandPhiVsEta_" + tcProducer.label() +
"_";
429 for (
size_t i = 1,
end = mvaProducers.size();
i <=
end; ++
i) {
430 auto num = std::to_string(
i);
438 pfix =
" (not loose-selected)";
440 histname =
"TrackMVA" +
num +
"HP_" + tcProducer.label() +
"_";
444 trackMVAsHP.back()->setAxisTitle(
"Number of tracks", 2);
446 histname =
"TrackMVA" +
num +
"HPVsPtProfile_" + tcProducer.label() +
"_";
458 histname =
"TrackMVA" +
num +
"HPVsEtaProfile_" + tcProducer.label() +
"_";
465 histname =
"TrackMVA" +
num +
"_" + tcProducer.label() +
"_";
468 trackMVAs.back()->setAxisTitle(
"Track selection MVA" +
num, 1);
469 trackMVAs.back()->setAxisTitle(
"Number of tracks", 2);
471 histname =
"TrackMVA" +
num +
"VsPtProfile_" + tcProducer.label() +
"_";
483 histname =
"TrackMVA" +
num +
"VsEtaProfile_" + tcProducer.label() +
"_";
510 tscblBuilder(*
state.freeState(),
bs);
511 if (!(tsAtClosestApproachSeed.
isValid())) {
512 edm::LogVerbatim(
"TrackBuilding") <<
"TrajectoryStateClosestToBeamLine not valid";
520 double eta =
state.globalPosition().eta();
521 double phi =
state.globalPosition().phi();
522 double theta =
state.globalPosition().theta();
528 double numberOfHits = candidate.
nHits();
530 double dz =
v.z() - (
v.x() *
p.x() +
v.y() *
p.y()) /
p.perp() *
p.z() /
p.perp();
586 tscblBuilder(*
state.freeState(),
bs);
587 if (!(tsAtClosestApproachTrackCand.
isValid())) {
588 edm::LogVerbatim(
"TrackBuilding") <<
"TrajectoryStateClosestToBeamLine not valid";
596 double eta =
state.globalPosition().eta();
597 double phi =
state.globalPosition().phi();
598 double theta =
state.globalPosition().theta();
604 double numberOfHits = candidate.
nRecHits();
607 double dz =
v.z() - (
v.x() *
p.x() +
v.y() *
p.y()) /
p.perp() *
p.z() /
p.perp();
643 bool trackSelected(
unsigned char mask,
unsigned char qual) {
return mask & 1 << qual; }
646 const std::vector<const MVACollection*>& mvaCollections,
647 const std::vector<const QualityMaskCollection*>& qualityMaskCollections) {
654 const auto nmva = mvaCollections.size();
655 for (
const auto mva : mvaCollections) {
657 edm::LogError(
"LogicError") <<
"TrackBuildingAnalyzer: Incompatible size of MVACollection, " <<
mva->size()
658 <<
" differs from the size of the track collection " <<
ntracks;
662 for (
const auto qual : qualityMaskCollections) {
664 edm::LogError(
"LogicError") <<
"TrackBuildingAnalyzer: Incompatible size of QualityMaskCollection, "
665 << qual->size() <<
" differs from the size of the track collection " <<
ntracks;
670 for (
size_t iTrack = 0; iTrack <
ntracks; ++iTrack) {
673 bool selectedLoose =
false;
674 bool selectedHP =
false;
679 for (
size_t iMVA = 0; iMVA < nmva; ++iMVA) {
680 const auto mva = (*(mvaCollections[iMVA]))[iTrack];
681 if (!selectedLoose) {
686 if (iMVA >= 1 && !selectedHP) {
692 const auto qual = (*(qualityMaskCollections)[iMVA])[iTrack];
696 if (selectedLoose && selectedHP)
706 for (
const auto& candidate : regionCandidates) {
707 const auto eta = candidate.eta();
708 const auto phi = candidate.phi();
726 return &(regionLayers.
region());
730 template <
typename T>
736 if (
const auto* etaPhiRegion = dynamic_cast<const RectangularEtaPhiTrackingRegion*>(regionPtr(
tmp))) {
737 const auto&
etaRange = etaPhiRegion->etaRange();
738 const auto& phiMargin = etaPhiRegion->phiMargin();
743 const auto phiMin = etaPhiRegion->phiDirection() - phiMargin.left();
744 const auto phiMax = etaPhiRegion->phiDirection() + phiMargin.right();
PTrajectoryStateOnDet const & trajectoryStateOnDet() const
GlobalVector momentum() const
ESHandle< TrackerGeometry > geometry
MonitorElement * TrackingRegionCandidateEta
MonitorElement * TrackCandPt
MonitorElement * TrackCandDxy
MonitorElement * NumberOfRecHitsPerTrackCand
MonitorElement * seedStoppingSourceVsEta
unsigned int nHits() const
MonitorElement * seedStoppingSourceVsPhi
static const std::string StopReasonName[]
virtual void setCurrentFolder(std::string const &fullpath)
unsigned short candidatesPerSeed() const
MonitorElement * TrackingRegionPhiVsEta
MonitorElement * NumberOfRecHitsPerSeedVsPhiProfile
std::vector< MonitorElement * > trackMVAsVsEtaProfile
MonitorElement * TrackingRegionEta
GlobalPoint position() const
Sin< T >::type sin(const T &t)
MonitorElement * NumberOfRecHitsPerSeedVsEtaProfile
std::vector< MonitorElement * > trackMVAsVsPtProfile
MonitorElement * NumberOfRecHitsPerTrackCandVsPhiProfile
Cos< T >::type cos(const T &t)
MonitorElement * TrackCandDz
MonitorElement * numberOfTrajCandsPerSeedVsPhi
MonitorElement * TrackingRegionPhi
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 * TrackingRegionCandidatePhiVsEta
MonitorElement * TrackingRegionCandidatePt
MonitorElement * SeedTheta
Geom::Theta< T > theta() const
MonitorElement * stoppingSourceVSeta
static const std::string SeedStopReasonName[]
SeedStopReason stopReason() const
MonitorElement * SeedPhiVsEta
MonitorElement * TrackCandEta
const TrackingRegion & region() const
std::vector< MonitorElement * > trackMVAsHP
std::vector< MonitorElement * > trackMVAsHPVsPtProfile
const bool doAllSeedPlots
MonitorElement * TrackCandPhiVsEta
MonitorElement * numberOfTrajCandsPerSeed
MonitorElement * seedStoppingSourceVsNumberOfTrajCandsPerSeed
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)
MonitorElement * TrackingRegionCandidatePhi
MonitorElement * NumberOfRecHitsPerSeed
Log< level::Error, false > LogError
std::vector< MonitorElement * > trackMVAs
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)
Log< level::Info, true > LogVerbatim
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
virtual int getNbinsX() const
get # of bins in X-axis
uint8_t stopReason() const
MonitorElement * seedStoppingSource
MonitorElement * TrackCandPhi
T getParameter(std::string const &) const
MonitorElement * NumberOfRecHitsPerTrackCandVsEtaProfile
PTrajectoryStateOnDet const & startingState() const
unsigned char stopReasonUC() const
MonitorElement * TrackCandQ
MonitorElement * stoppingSourceVSphi
MonitorElement * stoppingSource
FTS const & trackStateAtPCA() const
TrackBuildingAnalyzer(const edm::ParameterSet &)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::vector< MonitorElement * > trackMVAsHPVsEtaProfile
MonitorElement * numberOfTrajCandsPerSeedVsEta
const bool doRegionCandidatePlots
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
void analyzeRegions(const T ®ions)
void initHisto(DQMStore::IBooker &ibooker, const edm::ParameterSet &)
constexpr T reduceRange(T x)
MonitorElement * TrackCandTheta