163 moduleName_(parameters_.getUntrackedParameter<
std::
string>(
"moduleName",
"StandaloneTrackMonitor")),
164 folderName_(parameters_.getUntrackedParameter<
std::
string>(
"folderName",
"highPurityTracks")),
165 trackTag_(parameters_.getUntrackedParameter<
edm::
InputTag>(
"trackInputTag",
edm::
InputTag(
"generalTracks"))),
166 bsTag_(parameters_.getUntrackedParameter<
edm::
InputTag>(
"offlineBeamSpot",
edm::
InputTag(
"offlineBeamSpot"))),
170 clusterTag_(parameters_.getUntrackedParameter<
edm::
InputTag>(
"clusterTag",
edm::
InputTag(
"siStripClusters"))),
176 trackQuality_(parameters_.getUntrackedParameter<
std::
string>(
"trackQuality",
"highPurity")),
177 siStripClusterInfo_(consumesCollector()),
178 doPUCorrection_(parameters_.getUntrackedParameter<
bool>(
"doPUCorrection",
false)),
179 isMC_(parameters_.getUntrackedParameter<
bool>(
"isMC",
false)),
180 haveAllHistograms_(parameters_.getUntrackedParameter<
bool>(
"haveAllHistograms",
false)),
182 parameters_.getUntrackedParameter<
std::
string>(
"puScaleFactorFile",
"PileupScaleFactor_run203002.root")),
183 verbose_(parameters_.getUntrackedParameter<
bool>(
"verbose",
false)),
256 TH1F* h1 =
dynamic_cast<TH1F*
>(
f1->Get(
"pileupweight"));
257 for (
int i = 1;
i <= h1->GetNbinsX(); ++
i)
258 vpu_.push_back(h1->GetBinContent(
i));
296 trackPH_ = iBook.
book1D(
"trackP",
"Track 4-momentum", 50, 0.0, 10.0);
300 TrackPtHistoPar.getParameter<int32_t>(
"Xbins"),
301 TrackPtHistoPar.getParameter<
double>(
"Xmin"),
302 TrackPtHistoPar.getParameter<
double>(
"Xmax"));
337 iBook.
book1D(
"pixelLayerwithMeasurement",
"No. of Pixel Layers per Track", 10, 0.0, 10.0);
340 iBook.
book1D(
"stripLayerwithMeasurement",
"No. of Strip Layers per Track", 20, 0.0, 20.0);
361 nPixBarrelH_ = iBook.
book1D(
"nHitPixelBarrel",
"No. of hits in Pixel Barrel per Track", 20, 0, 20.0);
363 nPixEndcapH_ = iBook.
book1D(
"nHitPixelEndcap",
"No. of hits in Pixel Endcap per Track", 20, 0, 20.0);
365 nStripTIBH_ = iBook.
book1D(
"nHitStripTIB",
"No. of hits in Strip TIB per Track", 30, 0, 30.0);
367 nStripTOBH_ = iBook.
book1D(
"nHitStripTOB",
"No. of hits in Strip TOB per Track", 30, 0, 30.0);
369 nStripTECH_ = iBook.
book1D(
"nHitStripTEC",
"No. of hits in Strip TEC per Track", 30, 0, 30.0);
371 nStripTIDH_ = iBook.
book1D(
"nHitStripTID",
"No. of hits in Strip TID per Tracks", 30, 0, 30.0);
374 nTracksH_ = iBook.
book1D(
"nTracks",
"No. of Tracks", 100, -0.5, 999.5);
380 nPUH_ = iBook.
book1D(
"nPU",
"No of Pileup", 60, 0, 60.0);
382 trueNIntH_ = iBook.
book1D(
"trueNInt",
"True no of Interactions", 60, 0, 60.0);
387 "Number of Hits Vs pT",
388 TrackPtHistoPar.getParameter<int32_t>(
"Xbins"),
389 TrackPtHistoPar.getParameter<
double>(
"Xmin"),
390 TrackPtHistoPar.getParameter<
double>(
"Xmax"),
395 nHitsVsnVtxH_ = iBook.
bookProfile(
"nHitsVsnVtx",
"Number of Hits Vs Number of Vertex", 100, 0.0, 50, 0.0, 0.0,
"g");
398 "Number of Hits Vs Eta",
407 iBook.
bookProfile(
"nHitsVsCosTheta",
"Number of Hits Vs Cos(Theta)", 50, -1.0, 1.0, 0.0, 0.0,
"g");
413 "Number of Lost Hits Vs pT",
414 TrackPtHistoPar.getParameter<int32_t>(
"Xbins"),
415 TrackPtHistoPar.getParameter<
double>(
"Xmin"),
416 TrackPtHistoPar.getParameter<
double>(
"Xmax"),
422 "Number of Lost Hits Vs Eta",
431 iBook.
bookProfile(
"nLostHitsVsCosTheta",
"Number of Lost Hits Vs Cos(Theta)", 50, -1.0, 1.0, 0.0, 0.0,
"g");
438 iBook.
book1D(
"hOnTrkClusChargeThin",
"On-track Cluster Charge (Thin Sensor)", 100, 0, 1000);
443 iBook.
book1D(
"hOnTrkClusChargeThick",
"On-track Cluster Charge (Thick Sensor)", 100, 0, 1000);
446 iBook.
book1D(
"hOnTrkClusWidthThick",
"On-track Cluster Width (Thick Sensor)", 20, -0.5, 19.5);
450 iBook.
book1D(
"hOffTrkClusChargeThin",
"Off-track Cluster Charge (Thin Sensor)", 100, 0, 1000);
453 iBook.
book1D(
"hOffTrkClusWidthThin",
"Off-track Cluster Width (Thin Sensor)", 20, -0.5, 19.5);
456 iBook.
book1D(
"hOffTrkClusChargeThick",
"Off-track Cluster Charge (Thick Sensor)", 100, 0, 1000);
459 iBook.
book1D(
"hOffTrkClusWidthThick",
"Off-track Cluster Width (Thick Sensor)", 20, -0.5, 19.5);
480 if (!
iEvent.isRealData()) {
485 edm::LogInfo(
"StandaloneTrackMonitor") <<
"nPUColl = " << PupInfo->size();
486 for (
auto const&
v : *PupInfo) {
487 int bx =
v.getBunchCrossing();
493 int ntrueInt =
v.getTrueNumInteractions();
497 if (ntrueInt > -1 && ntrueInt <
int(
vpu_.size()))
498 wfac =
vpu_.at(ntrueInt);
503 edm::LogInfo(
"StandaloneTrackMonitor") <<
"PU reweight factor = " << wfac;
508 int nvtx = (vertexColl.
isValid() ? vertexColl->size() : 0);
537 int nLostHits =
track.numberOfLostHits();
550 double thetaError =
track.thetaError();
553 double ptError =
track.ptError();
554 double qoverp =
track.qoverp();
555 double qoverpError =
track.qoverpError();
561 double dxyError =
track.dxyError();
563 double dzError =
track.dzError();
565 double trkd0 =
track.d0();
568 double vx =
track.vx();
569 double vy =
track.vy();
570 double vz =
track.vz();
612 int nPixBarrel = 0, nPixEndcap = 0, nStripTIB = 0, nStripTOB = 0, nStripTEC = 0, nStripTID = 0;
613 for (
auto it =
track.recHitsBegin(); it !=
track.recHitsEnd(); ++it) {
617 int subdetId =
hit.geographicalId().subdetId();
638 <<
" >>> HITs: nPixBarrel: " << nPixBarrel <<
" nPixEndcap: " << nPixEndcap <<
" nStripTIB: " << nStripTIB
639 <<
" nStripTOB: " << nStripTOB <<
" nStripTEC: " << nStripTEC <<
" nStripTID: " << nStripTID;
666 dsvit != clusterHandle->end();
668 uint32_t detId = dsvit->id();
669 std::map<uint32_t, std::set<const SiStripCluster*> >::iterator jt =
clusterMap_.find(detId);
670 bool detid_found = (jt !=
clusterMap_.end()) ?
true :
false;
675 std::set<const SiStripCluster*>&
s = jt->second;
676 if (
s.find(&*clusit) !=
s.end())
700 uint32_t detid =
recHit.geographicalId();
708 auto const& clus = thit.firstClusterRef();
714 if (thit.isMatched()) {
739 auto& cluster = clus.stripCluster();
752 std::map<uint32_t, std::set<const SiStripCluster*> >::iterator it =
clusterMap_.find(detid);
754 std::set<const SiStripCluster*>
s;
756 clusterMap_.insert(std::pair<uint32_t, std::set<const SiStripCluster*> >(detid,
s));
758 std::set<const SiStripCluster*>&
s = it->second;
MonitorElement * pixelLayerwithMeasurementH_
const TrackerGeometry * tkGeom_
int numberOfValidPixelHits() const
MonitorElement * hOnTrkClusChargeThickH_
const edm::InputTag trackTag_
static constexpr auto TEC
unsigned long long m_cacheID_
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
T getParameter(std::string const &) const
MonitorElement * hOnTrkClusChargeThinH_
MonitorElement * trackqOverpH_
MonitorElement * nLostHitsVsPhiH_
MonitorElement * trackPtOver10GeVH_
const std::string trackQuality_
void setCluster(const SiStripCluster &cluster, int detId)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
MonitorElement * nStripTIDH_
std::vector< float > vpu_
virtual void setCurrentFolder(std::string const &fullpath)
StandaloneTrackMonitor(const edm::ParameterSet &)
const bool haveAllHistograms_
MonitorElement * trackChi2bynDOFH_
TrackQuality
track quality
MonitorElement * hOffTrkClusWidthThickH_
const edm::EDGetTokenT< reco::TrackCollection > trackToken_
void processClusters(edm::Event const &iEvent, edm::EventSetup const &iSetup, double wfac=1)
#define DEFINE_FWK_MODULE(type)
int trackerLayersWithMeasurement() const
const edm::EDGetTokenT< std::vector< PileupSummaryInfo > > puSummaryToken_
int stripLayersWithMeasurement() const
std::vector< Track > TrackCollection
collection of Tracks
MonitorElement * beamSpotZposH_
MonitorElement * stripLayerwithMeasurementH_
edm::ParameterSet parameters_
data_type const * const_iterator
void processHit(const TrackingRecHit &recHit, edm::EventSetup const &iSetup, double wfac=1)
Log< level::Error, false > LogError
std::vector< Vertex > VertexCollection
MonitorElement * hOnTrkClusWidthThinH_
MonitorElement * nStripTECH_
MonitorElement * hOffTrkClusWidthThinH_
const std::string puScaleFactorFile_
MonitorElement * hOffTrkClusChargeThinH_
SiStripClusterInfo siStripClusterInfo_
MonitorElement * trackChi2H_
int numberOfValidStripHits() const
const edm::InputTag vertexTag_
virtual float thickness() const =0
MonitorElement * nlostHitsH_
MonitorElement * beamSpotXYposH_
const bool doPUCorrection_
MonitorElement * nTracksH_
MonitorElement * hOnTrkClusWidthThickH_
MonitorElement * trackqOverperrH_
MonitorElement * nHitsVsEtaH_
SiStripCluster const & monoCluster() const
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 * trackThetaerrH_
MonitorElement * bunchCrossingH_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * nStripTIBH_
Cos< T >::type cos(const T &t)
MonitorElement * trackPterrH_
const edm::InputTag puSummaryTag_
MonitorElement * nvalidStripHitsH_
MonitorElement * trackPhiH_
bool getData(T &iHolder) const
MonitorElement * vertexXposH_
static constexpr auto TOB
MonitorElement * beamSpotZposerrH_
MonitorElement * nLostHitsVsCosThetaH_
MonitorElement * trackPtH_
MonitorElement * beamSpotXYposerrH_
MonitorElement * trackChargeH_
MonitorElement * hOffTrkClusChargeThickH_
Log< level::Info, false > LogInfo
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
MonitorElement * trackCosThetaH_
const edm::InputTag clusterTag_
MonitorElement * nvalidTrackerHitsH_
MonitorElement * nHitsVsCosThetaH_
void addClusterToMap(uint32_t detid, const SiStripCluster *cluster)
static TrackQuality qualityByName(const std::string &name)
static constexpr auto TIB
const Plane & surface() const
The nominal surface of the GeomDet.
auto const & tracks
cannot be loose
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
MonitorElement * trkLayerwithMeasurementH_
MonitorElement * trackd0H_
MonitorElement * trackEtaerrH_
MonitorElement * trueNIntH_
std::map< uint32_t, std::set< const SiStripCluster * > > clusterMap_
SiStripCluster const & stereoCluster() const
const edm::InputTag bsTag_
MonitorElement * vertexYposH_
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
MonitorElement * trackPH_
const edm::EDGetTokenT< reco::VertexCollection > vertexToken_
MonitorElement * nPixBarrelH_
MonitorElement * nPixEndcapH_
MonitorElement * nHitsVsPhiH_
MonitorElement * nLostHitsVspTH_
MonitorElement * nvalidPixelHitsH_
int pixelLayersWithMeasurement() const
MonitorElement * tracknDOFH_
MonitorElement * trackPtUpto2GeVH_
void initEvent(const edm::EventSetup &iSetup)
MonitorElement * trackEtaH_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * nLostHitsVsEtaH_
MonitorElement * nHitsVsnVtxH_
static constexpr auto TID
Geom::Theta< T > theta() const
int numberOfValidTrackerHits() const
MonitorElement * nHitsVspTH_
MonitorElement * nVertexH_
MonitorElement * vertexZposH_
MonitorElement * trackPhierrH_
MonitorElement * nStripTOBH_
const Bounds & bounds() const