28 moduleName_(parameters_.getUntrackedParameter<
std::
string>(
"moduleName",
"StandaloneTrackMonitor")),
29 folderName_(parameters_.getUntrackedParameter<
std::
string>(
"folderName",
"highPurityTracks")),
30 trackTag_(parameters_.getUntrackedParameter<
edm::InputTag>(
"trackInputTag",
edm::InputTag(
"generalTracks"))),
31 bsTag_(parameters_.getUntrackedParameter<
edm::InputTag>(
"offlineBeamSpot",
edm::InputTag(
"offlineBeamSpot"))),
32 vertexTag_(parameters_.getUntrackedParameter<
edm::InputTag>(
"vertexTag",
edm::InputTag(
"offlinePrimaryVertices"))),
33 puSummaryTag_(parameters_.getUntrackedParameter<
edm::InputTag>(
"puTag",
edm::InputTag(
"addPileupInfo"))),
34 clusterTag_(parameters_.getUntrackedParameter<
edm::InputTag>(
"clusterTag",
edm::InputTag(
"siStripClusters"))),
40 trackQuality_(parameters_.getUntrackedParameter<
std::
string>(
"trackQuality",
"highPurity")),
41 doPUCorrection_(parameters_.getUntrackedParameter<
bool>(
"doPUCorrection",
false)),
42 isMC_(parameters_.getUntrackedParameter<
bool>(
"isMC",
false)),
43 haveAllHistograms_(parameters_.getUntrackedParameter<
bool>(
"haveAllHistograms",
false)),
44 puScaleFactorFile_(parameters_.getUntrackedParameter<
std::
string>(
"puScaleFactorFile",
"PileupScaleFactor_run203002.root")),
45 verbose_(parameters_.getUntrackedParameter<
bool>(
"verbose",
false))
118 TH1F* h1 =
dynamic_cast<TH1F*
>(f1->Get(
"pileupweight"));
119 for (
int i = 1;
i <= h1->GetNbinsX(); ++
i)
vpu_.push_back(h1->GetBinContent(
i));
146 TrackPtHistoPar.getParameter<int32_t>(
"Xbins"),
147 TrackPtHistoPar.getParameter<
double>(
"Xmin"),
148 TrackPtHistoPar.getParameter<
double>(
"Xmax"));
183 nPixBarrelH_ = iBook.
book1D(
"nHitPixelBarrel",
"No. of hits in Pixel Barrel per Track", 20, 0, 20.0);
185 nPixEndcapH_ = iBook.
book1D(
"nHitPixelEndcap",
"No. of hits in Pixel Endcap per Track", 20, 0, 20.0);
187 nStripTIBH_ = iBook.
book1D(
"nHitStripTIB",
"No. of hits in Strip TIB per Track", 30, 0, 30.0);
189 nStripTOBH_ = iBook.
book1D(
"nHitStripTOB",
"No. of hits in Strip TOB per Track", 30, 0, 30.0);
191 nStripTECH_ = iBook.
book1D(
"nHitStripTEC",
"No. of hits in Strip TEC per Track", 30, 0, 30.0);
193 nStripTIDH_ = iBook.
book1D(
"nHitStripTID",
"No. of hits in Strip TID per Tracks", 30, 0, 30.0);
205 TrackPtHistoPar.getParameter<int32_t>(
"Xbins"),
206 TrackPtHistoPar.getParameter<
double>(
"Xmin"),
207 TrackPtHistoPar.getParameter<
double>(
"Xmax"),0.0,0.0,
"g");
214 TrackEtaHistoPar.
getParameter<
double>(
"Xmax"),0.0,0.0,
"g");
222 TrackPtHistoPar.getParameter<int32_t>(
"Xbins"),
223 TrackPtHistoPar.getParameter<
double>(
"Xmin"),
224 TrackPtHistoPar.getParameter<
double>(
"Xmax"),0.0,0.0,
"g");
229 TrackEtaHistoPar.
getParameter<
double>(
"Xmax"),0.0,0.0,
"g");
279 for (
auto const&
v : *PupInfo) {
280 int bx =
v.getBunchCrossing();
284 int ntrueInt =
v.getTrueNumInteractions();
287 if (ntrueInt > -1 && ntrueInt <
int(
vpu_.size())) wfac =
vpu_.at(ntrueInt);
296 int nvtx = (vertexColl.
isValid() ? vertexColl->size() : 0);
302 edm::LogInfo(
"StandaloneTrackMonitor") <<
"Total # of Tracks: " << tracks->size();
305 for (
auto const&
track : *tracks) {
306 if (!
track.quality(quality))
continue;
323 int nLostHits =
track.numberOfLostHits();
336 double thetaError =
track.thetaError();
339 double ptError =
track.ptError();
340 double qoverp =
track.qoverp();
341 double qoverpError =
track.qoverpError();
347 double dxyError =
track.dxyError();
349 double dzError =
track.dzError();
351 double trkd0 =
track.d0();
354 double vx =
track.vx();
355 double vy =
track.vy();
356 double vz =
track.vz();
396 int nPixBarrel = 0, nPixEndcap = 0, nStripTIB = 0, nStripTOB = 0, nStripTEC = 0, nStripTID = 0;
397 for (
auto it =
track.recHitsBegin(); it !=
track.recHitsEnd(); ++it) {
415 <<
" >>> HITs: nPixBarrel: " << nPixBarrel
416 <<
" nPixEndcap: " << nPixEndcap
417 <<
" nStripTIB: " << nStripTIB
418 <<
" nStripTOB: " << nStripTOB
419 <<
" nStripTEC: " << nStripTEC
420 <<
" nStripTID: " << nStripTID;
448 dsvit != clusterHandle->end();
451 uint32_t detId = dsvit->id();
452 std::map<uint32_t, std::set<const SiStripCluster*> >::iterator jt =
clusterMap_.find(detId);
453 bool detid_found = (jt !=
clusterMap_.end()) ?
true :
false;
457 clusit != dsvit->end();
461 std::set<const SiStripCluster*>&
s = jt->second;
462 if (s.find(&*clusit) != s.end())
continue;
471 if (thickness > 0.035) {
493 if (!thit.isValid())
return;
496 if (!clus.isValid())
return;
497 if (!clus.isStrip())
return;
499 if (thit.isMatched()) {
504 if (thickness > 0.035) {
516 if (thickness > 0.035) {
527 auto& cluster = clus.stripCluster();
529 if (thickness > 0.035) {
541 std::map<uint32_t, std::set<const SiStripCluster*> >::iterator it =
clusterMap_.find(detid);
543 std::set<const SiStripCluster*>
s;
545 clusterMap_.insert(std::pair<uint32_t, std::set<const SiStripCluster*> >(detid, s));
548 std::set<const SiStripCluster*>&
s = it->second;
MonitorElement * pixelLayerwithMeasurementH_
MonitorElement * hOnTrkClusChargeThickH_
const edm::InputTag trackTag_
T getParameter(std::string const &) const
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
MonitorElement * hOnTrkClusChargeThinH_
MonitorElement * trackqOverpH_
MonitorElement * nLostHitsVsPhiH_
MonitorElement * trackPtOver10GeVH_
const std::string trackQuality_
const edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
MonitorElement * nStripTIDH_
std::vector< float > vpu_
StandaloneTrackMonitor(const edm::ParameterSet &)
MonitorElement * bookProfile(Args &&...args)
const bool haveAllHistograms_
MonitorElement * trackChi2bynDOFH_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
TrackQuality
track quality
MonitorElement * hOffTrkClusWidthThickH_
const edm::EDGetTokenT< reco::TrackCollection > trackToken_
#define DEFINE_FWK_MODULE(type)
SiStripCluster const & monoCluster() const
const edm::EDGetTokenT< std::vector< PileupSummaryInfo > > puSummaryToken_
std::vector< Track > TrackCollection
collection of Tracks
MonitorElement * beamSpotZposH_
Geom::Theta< T > theta() const
MonitorElement * stripLayerwithMeasurementH_
int numberOfValidStripHits() const
edm::ParameterSet parameters_
std::vector< Vertex > VertexCollection
collection of Vertex objects
const Bounds & bounds() const
data_type const * const_iterator
int pixelLayersWithMeasurement() const
MonitorElement * hOnTrkClusWidthThinH_
MonitorElement * nStripTECH_
int trackerLayersWithMeasurement() const
const Plane & surface() const
The nominal surface of the GeomDet.
MonitorElement * hOffTrkClusWidthThinH_
const std::string puScaleFactorFile_
MonitorElement * hOffTrkClusChargeThinH_
MonitorElement * trackChi2H_
const edm::InputTag vertexTag_
MonitorElement * nlostHitsH_
MonitorElement * beamSpotXYposH_
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const bool doPUCorrection_
MonitorElement * nTracksH_
MonitorElement * hOnTrkClusWidthThickH_
MonitorElement * trackqOverperrH_
MonitorElement * nHitsVsEtaH_
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_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
MonitorElement * book1D(Args &&...args)
MonitorElement * nvalidStripHitsH_
MonitorElement * trackPhiH_
MonitorElement * vertexXposH_
MonitorElement * beamSpotZposerrH_
MonitorElement * nLostHitsVsCosThetaH_
MonitorElement * trackPtH_
MonitorElement * beamSpotXYposerrH_
MonitorElement * trackChargeH_
MonitorElement * hOffTrkClusChargeThickH_
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)
void setCurrentFolder(const std::string &fullpath)
virtual float thickness() const =0
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
MonitorElement * trkLayerwithMeasurementH_
MonitorElement * trackd0H_
MonitorElement * trackEtaerrH_
int stripLayersWithMeasurement() const
MonitorElement * trueNIntH_
std::map< uint32_t, std::set< const SiStripCluster * > > clusterMap_
int numberOfValidTrackerHits() const
MonitorElement * vertexYposH_
SiStripCluster const & stereoCluster() const
MonitorElement * trackPH_
const edm::EDGetTokenT< reco::VertexCollection > vertexToken_
void processClusters(edm::Event const &iEvent, edm::EventSetup const &iSetup, const TrackerGeometry &tkGeom, double wfac=1)
MonitorElement * nPixBarrelH_
virtual OmniClusterRef const & firstClusterRef() const =0
MonitorElement * nPixEndcapH_
MonitorElement * nHitsVsPhiH_
int numberOfValidPixelHits() const
MonitorElement * nLostHitsVspTH_
MonitorElement * nvalidPixelHitsH_
const Point & position() const
position
MonitorElement * tracknDOFH_
MonitorElement * trackPtUpto2GeVH_
DetId geographicalId() const
MonitorElement * trackEtaH_
void processHit(const TrackingRecHit &recHit, edm::EventSetup const &iSetup, const TrackerGeometry &tkGeom, double wfac=1)
MonitorElement * nLostHitsVsEtaH_
MonitorElement * nHitsVsnVtxH_
MonitorElement * nHitsVspTH_
MonitorElement * nVertexH_
MonitorElement * vertexZposH_
MonitorElement * trackPhierrH_
MonitorElement * nStripTOBH_
constexpr Detector det() const
get the detector field from this detid