|
|
Go to the documentation of this file.
27 moduleName_(parameters_.getUntrackedParameter<
std::
string>(
"moduleName",
"StandaloneTrackMonitor")),
28 folderName_(parameters_.getUntrackedParameter<
std::
string>(
"folderName",
"highPurityTracks")),
29 trackTag_(parameters_.getUntrackedParameter<
edm::
InputTag>(
"trackInputTag",
edm::
InputTag(
"generalTracks"))),
30 bsTag_(parameters_.getUntrackedParameter<
edm::
InputTag>(
"offlineBeamSpot",
edm::
InputTag(
"offlineBeamSpot"))),
34 clusterTag_(parameters_.getUntrackedParameter<
edm::
InputTag>(
"clusterTag",
edm::
InputTag(
"siStripClusters"))),
40 trackQuality_(parameters_.getUntrackedParameter<
std::
string>(
"trackQuality",
"highPurity")),
41 siStripClusterInfo_(consumesCollector()),
42 doPUCorrection_(parameters_.getUntrackedParameter<
bool>(
"doPUCorrection",
false)),
43 isMC_(parameters_.getUntrackedParameter<
bool>(
"isMC",
false)),
44 haveAllHistograms_(parameters_.getUntrackedParameter<
bool>(
"haveAllHistograms",
false)),
46 parameters_.getUntrackedParameter<
std::
string>(
"puScaleFactorFile",
"PileupScaleFactor_run203002.root")),
47 verbose_(parameters_.getUntrackedParameter<
bool>(
"verbose",
false)) {
119 TH1F* h1 = dynamic_cast<TH1F*>(
f1->Get(
"pileupweight"));
120 for (
int i = 1;
i <= h1->GetNbinsX(); ++
i)
121 vpu_.push_back(h1->GetBinContent(
i));
155 trackPH_ = iBook.
book1D(
"trackP",
"Track 4-momentum", 50, 0.0, 10.0);
159 TrackPtHistoPar.getParameter<int32_t>(
"Xbins"),
160 TrackPtHistoPar.getParameter<
double>(
"Xmin"),
161 TrackPtHistoPar.getParameter<
double>(
"Xmax"));
196 iBook.
book1D(
"pixelLayerwithMeasurement",
"No. of Pixel Layers per Track", 10, 0.0, 10.0);
199 iBook.
book1D(
"stripLayerwithMeasurement",
"No. of Strip Layers per Track", 20, 0.0, 20.0);
220 nPixBarrelH_ = iBook.
book1D(
"nHitPixelBarrel",
"No. of hits in Pixel Barrel per Track", 20, 0, 20.0);
222 nPixEndcapH_ = iBook.
book1D(
"nHitPixelEndcap",
"No. of hits in Pixel Endcap per Track", 20, 0, 20.0);
224 nStripTIBH_ = iBook.
book1D(
"nHitStripTIB",
"No. of hits in Strip TIB per Track", 30, 0, 30.0);
226 nStripTOBH_ = iBook.
book1D(
"nHitStripTOB",
"No. of hits in Strip TOB per Track", 30, 0, 30.0);
228 nStripTECH_ = iBook.
book1D(
"nHitStripTEC",
"No. of hits in Strip TEC per Track", 30, 0, 30.0);
230 nStripTIDH_ = iBook.
book1D(
"nHitStripTID",
"No. of hits in Strip TID per Tracks", 30, 0, 30.0);
233 nTracksH_ = iBook.
book1D(
"nTracks",
"No. of Tracks", 100, -0.5, 999.5);
239 nPUH_ = iBook.
book1D(
"nPU",
"No of Pileup", 60, 0, 60.0);
241 trueNIntH_ = iBook.
book1D(
"trueNInt",
"True no of Interactions", 60, 0, 60.0);
246 "Number of Hits Vs pT",
247 TrackPtHistoPar.getParameter<int32_t>(
"Xbins"),
248 TrackPtHistoPar.getParameter<
double>(
"Xmin"),
249 TrackPtHistoPar.getParameter<
double>(
"Xmax"),
254 nHitsVsnVtxH_ = iBook.
bookProfile(
"nHitsVsnVtx",
"Number of Hits Vs Number of Vertex", 100, 0.0, 50, 0.0, 0.0,
"g");
257 "Number of Hits Vs Eta",
266 iBook.
bookProfile(
"nHitsVsCosTheta",
"Number of Hits Vs Cos(Theta)", 50, -1.0, 1.0, 0.0, 0.0,
"g");
272 "Number of Lost Hits Vs pT",
273 TrackPtHistoPar.getParameter<int32_t>(
"Xbins"),
274 TrackPtHistoPar.getParameter<
double>(
"Xmin"),
275 TrackPtHistoPar.getParameter<
double>(
"Xmax"),
281 "Number of Lost Hits Vs Eta",
290 iBook.
bookProfile(
"nLostHitsVsCosTheta",
"Number of Lost Hits Vs Cos(Theta)", 50, -1.0, 1.0, 0.0, 0.0,
"g");
297 iBook.
book1D(
"hOnTrkClusChargeThin",
"On-track Cluster Charge (Thin Sensor)", 100, 0, 1000);
302 iBook.
book1D(
"hOnTrkClusChargeThick",
"On-track Cluster Charge (Thick Sensor)", 100, 0, 1000);
305 iBook.
book1D(
"hOnTrkClusWidthThick",
"On-track Cluster Width (Thick Sensor)", 20, -0.5, 19.5);
309 iBook.
book1D(
"hOffTrkClusChargeThin",
"Off-track Cluster Charge (Thin Sensor)", 100, 0, 1000);
312 iBook.
book1D(
"hOffTrkClusWidthThin",
"Off-track Cluster Width (Thin Sensor)", 20, -0.5, 19.5);
315 iBook.
book1D(
"hOffTrkClusChargeThick",
"Off-track Cluster Charge (Thick Sensor)", 100, 0, 1000);
318 iBook.
book1D(
"hOffTrkClusWidthThick",
"Off-track Cluster Width (Thick Sensor)", 20, -0.5, 19.5);
342 if (!
iEvent.isRealData()) {
347 edm::LogInfo(
"StandaloneTrackMonitor") <<
"nPUColl = " << PupInfo->size();
348 for (
auto const&
v : *PupInfo) {
349 int bx =
v.getBunchCrossing();
355 int ntrueInt =
v.getTrueNumInteractions();
359 if (ntrueInt > -1 && ntrueInt <
int(
vpu_.size()))
360 wfac =
vpu_.at(ntrueInt);
365 edm::LogInfo(
"StandaloneTrackMonitor") <<
"PU reweight factor = " << wfac;
370 int nvtx = (vertexColl.
isValid() ? vertexColl->size() : 0);
399 int nLostHits =
track.numberOfLostHits();
412 double thetaError =
track.thetaError();
415 double ptError =
track.ptError();
416 double qoverp =
track.qoverp();
417 double qoverpError =
track.qoverpError();
423 double dxyError =
track.dxyError();
425 double dzError =
track.dzError();
427 double trkd0 =
track.d0();
430 double vx =
track.vx();
431 double vy =
track.vy();
432 double vz =
track.vz();
474 int nPixBarrel = 0, nPixEndcap = 0, nStripTIB = 0, nStripTOB = 0, nStripTEC = 0, nStripTID = 0;
475 for (
auto it =
track.recHitsBegin(); it !=
track.recHitsEnd(); ++it) {
479 int subdetId =
hit.geographicalId().subdetId();
500 <<
" >>> HITs: nPixBarrel: " << nPixBarrel <<
" nPixEndcap: " << nPixEndcap <<
" nStripTIB: " << nStripTIB
501 <<
" nStripTOB: " << nStripTOB <<
" nStripTEC: " << nStripTEC <<
" nStripTID: " << nStripTID;
531 dsvit != clusterHandle->end();
533 uint32_t detId = dsvit->id();
534 std::map<uint32_t, std::set<const SiStripCluster*> >::iterator jt =
clusterMap_.find(detId);
535 bool detid_found = (jt !=
clusterMap_.end()) ?
true :
false;
540 std::set<const SiStripCluster*>&
s = jt->second;
541 if (
s.find(&*clusit) !=
s.end())
568 uint32_t detid =
recHit.geographicalId();
572 auto const& thit = static_cast<BaseTrackerRecHit const&>(
recHit);
576 auto const& clus = thit.firstClusterRef();
582 if (thit.isMatched()) {
607 auto& cluster = clus.stripCluster();
620 std::map<uint32_t, std::set<const SiStripCluster*> >::iterator it =
clusterMap_.find(detid);
622 std::set<const SiStripCluster*>
s;
624 clusterMap_.insert(std::pair<uint32_t, std::set<const SiStripCluster*> >(detid,
s));
626 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_
MonitorElement * hOffTrkClusChargeThinH_
std::vector< Vertex > VertexCollection
collection of Vertex objects
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_
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 &)
MonitorElement * nvalidStripHitsH_
MonitorElement * bunchCrossingH_
MonitorElement * beamSpotXYposerrH_
MonitorElement * beamSpotZposerrH_
std::map< uint32_t, std::set< const SiStripCluster * > > clusterMap_
const bool doPUCorrection_
static TrackQuality qualityByName(const std::string &name)
T getParameter(std::string const &) const
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
MonitorElement * pixelLayerwithMeasurementH_
const edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
const edm::InputTag trackTag_
MonitorElement * trackEtaerrH_
static constexpr auto TOB
const std::string trackQuality_
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_