|
|
Go to the documentation of this file.
167 moduleName_(parameters_.getUntrackedParameter<
std::
string>(
"moduleName",
"StandaloneTrackMonitor")),
168 folderName_(parameters_.getUntrackedParameter<
std::
string>(
"folderName",
"highPurityTracks")),
169 trackTag_(parameters_.getUntrackedParameter<
edm::
InputTag>(
"trackInputTag",
edm::
InputTag(
"generalTracks"))),
170 bsTag_(parameters_.getUntrackedParameter<
edm::
InputTag>(
"offlineBeamSpot",
edm::
InputTag(
"offlineBeamSpot"))),
174 clusterTag_(parameters_.getUntrackedParameter<
edm::
InputTag>(
"clusterTag",
edm::
InputTag(
"siStripClusters"))),
180 trackQuality_(parameters_.getUntrackedParameter<
std::
string>(
"trackQuality",
"highPurity")),
181 siStripClusterInfo_(consumesCollector()),
182 doPUCorrection_(parameters_.getUntrackedParameter<
bool>(
"doPUCorrection",
false)),
183 isMC_(parameters_.getUntrackedParameter<
bool>(
"isMC",
false)),
184 haveAllHistograms_(parameters_.getUntrackedParameter<
bool>(
"haveAllHistograms",
false)),
186 parameters_.getUntrackedParameter<
std::
string>(
"puScaleFactorFile",
"PileupScaleFactor_run203002.root")),
187 verbose_(parameters_.getUntrackedParameter<
bool>(
"verbose",
false)) {
259 TH1F* h1 = dynamic_cast<TH1F*>(
f1->Get(
"pileupweight"));
260 for (
int i = 1;
i <= h1->GetNbinsX(); ++
i)
261 vpu_.push_back(h1->GetBinContent(
i));
295 trackPH_ = iBook.
book1D(
"trackP",
"Track 4-momentum", 50, 0.0, 10.0);
299 TrackPtHistoPar.getParameter<int32_t>(
"Xbins"),
300 TrackPtHistoPar.getParameter<
double>(
"Xmin"),
301 TrackPtHistoPar.getParameter<
double>(
"Xmax"));
336 iBook.
book1D(
"pixelLayerwithMeasurement",
"No. of Pixel Layers per Track", 10, 0.0, 10.0);
339 iBook.
book1D(
"stripLayerwithMeasurement",
"No. of Strip Layers per Track", 20, 0.0, 20.0);
360 nPixBarrelH_ = iBook.
book1D(
"nHitPixelBarrel",
"No. of hits in Pixel Barrel per Track", 20, 0, 20.0);
362 nPixEndcapH_ = iBook.
book1D(
"nHitPixelEndcap",
"No. of hits in Pixel Endcap per Track", 20, 0, 20.0);
364 nStripTIBH_ = iBook.
book1D(
"nHitStripTIB",
"No. of hits in Strip TIB per Track", 30, 0, 30.0);
366 nStripTOBH_ = iBook.
book1D(
"nHitStripTOB",
"No. of hits in Strip TOB per Track", 30, 0, 30.0);
368 nStripTECH_ = iBook.
book1D(
"nHitStripTEC",
"No. of hits in Strip TEC per Track", 30, 0, 30.0);
370 nStripTIDH_ = iBook.
book1D(
"nHitStripTID",
"No. of hits in Strip TID per Tracks", 30, 0, 30.0);
373 nTracksH_ = iBook.
book1D(
"nTracks",
"No. of Tracks", 100, -0.5, 999.5);
379 nPUH_ = iBook.
book1D(
"nPU",
"No of Pileup", 60, 0, 60.0);
381 trueNIntH_ = iBook.
book1D(
"trueNInt",
"True no of Interactions", 60, 0, 60.0);
386 "Number of Hits Vs pT",
387 TrackPtHistoPar.getParameter<int32_t>(
"Xbins"),
388 TrackPtHistoPar.getParameter<
double>(
"Xmin"),
389 TrackPtHistoPar.getParameter<
double>(
"Xmax"),
394 nHitsVsnVtxH_ = iBook.
bookProfile(
"nHitsVsnVtx",
"Number of Hits Vs Number of Vertex", 100, 0.0, 50, 0.0, 0.0,
"g");
397 "Number of Hits Vs Eta",
406 iBook.
bookProfile(
"nHitsVsCosTheta",
"Number of Hits Vs Cos(Theta)", 50, -1.0, 1.0, 0.0, 0.0,
"g");
412 "Number of Lost Hits Vs pT",
413 TrackPtHistoPar.getParameter<int32_t>(
"Xbins"),
414 TrackPtHistoPar.getParameter<
double>(
"Xmin"),
415 TrackPtHistoPar.getParameter<
double>(
"Xmax"),
421 "Number of Lost Hits Vs Eta",
430 iBook.
bookProfile(
"nLostHitsVsCosTheta",
"Number of Lost Hits Vs Cos(Theta)", 50, -1.0, 1.0, 0.0, 0.0,
"g");
437 iBook.
book1D(
"hOnTrkClusChargeThin",
"On-track Cluster Charge (Thin Sensor)", 100, 0, 1000);
442 iBook.
book1D(
"hOnTrkClusChargeThick",
"On-track Cluster Charge (Thick Sensor)", 100, 0, 1000);
445 iBook.
book1D(
"hOnTrkClusWidthThick",
"On-track Cluster Width (Thick Sensor)", 20, -0.5, 19.5);
449 iBook.
book1D(
"hOffTrkClusChargeThin",
"Off-track Cluster Charge (Thin Sensor)", 100, 0, 1000);
452 iBook.
book1D(
"hOffTrkClusWidthThin",
"Off-track Cluster Width (Thin Sensor)", 20, -0.5, 19.5);
455 iBook.
book1D(
"hOffTrkClusChargeThick",
"Off-track Cluster Charge (Thick Sensor)", 100, 0, 1000);
458 iBook.
book1D(
"hOffTrkClusWidthThick",
"Off-track Cluster Width (Thick Sensor)", 20, -0.5, 19.5);
482 if (!
iEvent.isRealData()) {
487 edm::LogInfo(
"StandaloneTrackMonitor") <<
"nPUColl = " << PupInfo->size();
488 for (
auto const&
v : *PupInfo) {
489 int bx =
v.getBunchCrossing();
495 int ntrueInt =
v.getTrueNumInteractions();
499 if (ntrueInt > -1 && ntrueInt <
int(
vpu_.size()))
500 wfac =
vpu_.at(ntrueInt);
505 edm::LogInfo(
"StandaloneTrackMonitor") <<
"PU reweight factor = " << wfac;
510 int nvtx = (vertexColl.
isValid() ? vertexColl->size() : 0);
539 int nLostHits =
track.numberOfLostHits();
552 double thetaError =
track.thetaError();
555 double ptError =
track.ptError();
556 double qoverp =
track.qoverp();
557 double qoverpError =
track.qoverpError();
563 double dxyError =
track.dxyError();
565 double dzError =
track.dzError();
567 double trkd0 =
track.d0();
570 double vx =
track.vx();
571 double vy =
track.vy();
572 double vz =
track.vz();
614 int nPixBarrel = 0, nPixEndcap = 0, nStripTIB = 0, nStripTOB = 0, nStripTEC = 0, nStripTID = 0;
615 for (
auto it =
track.recHitsBegin(); it !=
track.recHitsEnd(); ++it) {
619 int subdetId =
hit.geographicalId().subdetId();
640 <<
" >>> HITs: nPixBarrel: " << nPixBarrel <<
" nPixEndcap: " << nPixEndcap <<
" nStripTIB: " << nStripTIB
641 <<
" nStripTOB: " << nStripTOB <<
" nStripTEC: " << nStripTEC <<
" nStripTID: " << nStripTID;
671 dsvit != clusterHandle->end();
673 uint32_t detId = dsvit->id();
674 std::map<uint32_t, std::set<const SiStripCluster*> >::iterator jt =
clusterMap_.find(detId);
675 bool detid_found = (jt !=
clusterMap_.end()) ?
true :
false;
680 std::set<const SiStripCluster*>&
s = jt->second;
681 if (
s.find(&*clusit) !=
s.end())
708 uint32_t detid =
recHit.geographicalId();
712 auto const& thit = static_cast<BaseTrackerRecHit const&>(
recHit);
716 auto const& clus = thit.firstClusterRef();
722 if (thit.isMatched()) {
747 auto& cluster = clus.stripCluster();
760 std::map<uint32_t, std::set<const SiStripCluster*> >::iterator it =
clusterMap_.find(detid);
762 std::set<const SiStripCluster*>
s;
764 clusterMap_.insert(std::pair<uint32_t, std::set<const SiStripCluster*> >(detid,
s));
766 std::set<const SiStripCluster*>&
s = it->second;
SiStripClusterInfo siStripClusterInfo_
MonitorElement * nHitsVsEtaH_
MonitorElement * beamSpotZposH_
MonitorElement * nPixEndcapH_
MonitorElement * nHitsVsCosThetaH_
MonitorElement * nVertexH_
MonitorElement * nTracksH_
edm::ParameterSet parameters_
MonitorElement * nvalidPixelHitsH_
SiStripCluster const & stereoCluster() const
MonitorElement * trackChargeH_
MonitorElement * trackPtUpto2GeVH_
MonitorElement * tracknDOFH_
MonitorElement * vertexXposH_
const edm::InputTag clusterTag_
std::vector< Vertex > VertexCollection
collection of Vertex objects
MonitorElement * hOffTrkClusChargeThinH_
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * trackPterrH_
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
MonitorElement * trueNIntH_
TrackQuality
track quality
MonitorElement * trackPhiH_
MonitorElement * trackThetaerrH_
MonitorElement * stripLayerwithMeasurementH_
MonitorElement * vertexZposH_
MonitorElement * trackChi2bynDOFH_
Log< level::Info, false > LogInfo
MonitorElement * trackCosThetaH_
MonitorElement * nPixBarrelH_
MonitorElement * nStripTIBH_
const std::string puScaleFactorFile_
MonitorElement * trackPhierrH_
void addClusterToMap(uint32_t detid, const SiStripCluster *cluster)
MonitorElement * trackd0H_
int pixelLayersWithMeasurement() const
MonitorElement * nStripTOBH_
MonitorElement * trackEtaH_
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
MonitorElement * hOffTrkClusWidthThinH_
const Plane & surface() const
The nominal surface of the GeomDet.
const edm::EDGetTokenT< std::vector< PileupSummaryInfo > > puSummaryToken_
int stripLayersWithMeasurement() const
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
Cos< T >::type cos(const T &t)
#define DEFINE_FWK_MODULE(type)
void processClusters(edm::Event const &iEvent, edm::EventSetup const &iSetup, const TrackerGeometry &tkGeom, double wfac=1)
int trackerLayersWithMeasurement() const
MonitorElement * hOffTrkClusWidthThickH_
MonitorElement * nStripTIDH_
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
std::vector< float > vpu_
MonitorElement * nHitsVsPhiH_
MonitorElement * nvalidTrackerHitsH_
const Bounds & bounds() 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 * trackChi2H_
Geom::Theta< T > theta() const
static constexpr auto TIB
MonitorElement * nLostHitsVsEtaH_
MonitorElement * hOnTrkClusChargeThinH_
MonitorElement * hOffTrkClusChargeThickH_
MonitorElement * hOnTrkClusWidthThinH_
void setCluster(const SiStripCluster &cluster, int detId)
MonitorElement * nStripTECH_
MonitorElement * trackPtH_
virtual float thickness() const =0
MonitorElement * beamSpotXYposH_
MonitorElement * trackPH_
const edm::EDGetTokenT< reco::TrackCollection > trackToken_
MonitorElement * nLostHitsVsCosThetaH_
MonitorElement * trackqOverperrH_
MonitorElement * vertexYposH_
StandaloneTrackMonitor(const edm::ParameterSet &)
const edm::InputTag puSummaryTag_
MonitorElement * nvalidStripHitsH_
Log< level::Error, false > LogError
MonitorElement * bunchCrossingH_
MonitorElement * beamSpotXYposerrH_
MonitorElement * beamSpotZposerrH_
std::map< uint32_t, std::set< const SiStripCluster * > > clusterMap_
const edm::InputTag bsTag_
const bool doPUCorrection_
static TrackQuality qualityByName(const std::string &name)
void initEvent(const edm::EventSetup &iSetup)
MonitorElement * trackPtOver10GeVH_
static constexpr auto TEC
MonitorElement * nLostHitsVsPhiH_
int numberOfValidStripHits() const
int numberOfValidTrackerHits() const
MonitorElement * hOnTrkClusChargeThickH_
MonitorElement * trackqOverpH_
MonitorElement * hOnTrkClusWidthThickH_
SiStripCluster const & monoCluster() const
unsigned long long m_cacheID_
MonitorElement * pixelLayerwithMeasurementH_
const edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
const edm::InputTag trackTag_
MonitorElement * trackEtaerrH_
static constexpr auto TOB
const std::string trackQuality_
T getParameter(std::string const &) const
MonitorElement * nLostHitsVspTH_
int numberOfValidPixelHits() const
const edm::EDGetTokenT< reco::VertexCollection > vertexToken_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * nlostHitsH_
MonitorElement * nHitsVsnVtxH_
std::vector< Track > TrackCollection
collection of Tracks
MonitorElement * trkLayerwithMeasurementH_
static constexpr auto TID
void processHit(const TrackingRecHit &recHit, edm::EventSetup const &iSetup, const TrackerGeometry &tkGeom, double wfac=1)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
const edm::InputTag vertexTag_
MonitorElement * nHitsVspTH_
const data_type * const_iterator
const bool haveAllHistograms_