55 , NumberOfTracks(
NULL)
56 , NumberOfMeanRecHitsPerTrack(
NULL)
57 , NumberOfMeanLayersPerTrack(
NULL)
58 , NumberOfGoodTracks(
NULL)
59 , FractionOfGoodTracks(
NULL)
61 , NumberOfTrackCandidates(
NULL)
71 , NumberOfGoodTrkVsClus(
NULL)
72 , NumberOfTracksVsLS(
NULL)
73 , NumberOfGoodTracksVsLS(
NULL)
74 , GoodTracksFractionVsLS(
NULL)
75 , GoodTracksNumberOfRecHitsPerTrackVsLS(
NULL)
78 , NumberOfTracksVsGoodPVtx(
NULL)
79 , NumberOfTracksVsBXlumi(
NULL)
80 , NumberOfGoodTracksVsGoodPVtx(
NULL)
81 , NumberOfGoodTracksVsBXlumi(
NULL)
82 , FractionOfGoodTracksVsGoodPVtx(
NULL)
83 , FractionOfGoodTracksVsBXlumi(
NULL)
85 , NumberOfTracks_lumiFlag(
NULL)
86 , NumberOfGoodTracks_lumiFlag(
NULL)
88 , builderName ( conf_.getParameter<std::string>(
"TTRHBuilder"))
89 , doTrackerSpecific_ ( conf_.getParameter<bool>(
"doTrackerSpecific") )
90 , doLumiAnalysis ( conf_.getParameter<bool>(
"doLumiAnalysis"))
91 , doProfilesVsLS_ ( conf_.getParameter<bool>(
"doProfilesVsLS"))
92 , doAllPlots ( conf_.getParameter<bool>(
"doAllPlots"))
93 , doGeneralPropertiesPlots_( conf_.getParameter<bool>(
"doGeneralPropertiesPlots"))
94 , doHitPropertiesPlots_ ( conf_.getParameter<bool>(
"doHitPropertiesPlots"))
95 , doGoodTrackPlots_ ( conf_.getParameter<bool>(
"doGoodTrackPlots") )
96 , doPUmonitoring_ ( conf_.getParameter<bool>(
"doPUmonitoring") )
109 std::vector<edm::InputTag> primaryVertexInputTags =
conf_.
getParameter<std::vector<edm::InputTag> >(
"primaryVertexInputTags");
110 std::vector<edm::InputTag> selPrimaryVertexInputTags =
conf_.
getParameter<std::vector<edm::InputTag> >(
"selPrimaryVertexInputTags");
111 std::vector<std::string> pvLabels =
conf_.
getParameter<std::vector<std::string> > (
"pvLabels");
113 if (primaryVertexInputTags.size()==pvLabels.size() and primaryVertexInputTags.size()==selPrimaryVertexInputTags.size()) {
114 for (
size_t i=0;
i<primaryVertexInputTags.size();
i++) {
117 std::string iPVlabel = pvLabels[
i];
149 if( Quality !=
"highPurity" && Quality !=
"tight" && Quality !=
"loose")
151 edm::LogWarning(
"TrackingMonitor") <<
"Qualty Name is invalid, using no quality criterea by default";
157 std::string CategoryName = Quality !=
"" ? AlgoName +
"_" + Quality : AlgoName;
187 StateName !=
"OuterSurface" &&
188 StateName !=
"InnerSurface" &&
189 StateName !=
"ImpactPoint" &&
190 StateName !=
"default" &&
195 edm::LogWarning(
"TrackingMonitor") <<
"State Name is invalid, using 'ImpactPoint' by default";
207 histname =
"NumberOfTracks_" + CategoryName;
214 histname =
"NumberOfMeanRecHitsPerTrack_" + CategoryName;
219 histname =
"NumberOfMeanLayersPerTrack_" + CategoryName;
226 histname =
"NumberOfGoodTracks_" + CategoryName;
231 histname =
"FractionOfGoodTracks_" + CategoryName;
241 histname =
"NumberOfTracks_lumiFlag_" + CategoryName;
247 histname =
"NumberOfGoodTracks_lumiFlag_" + CategoryName;
263 histname =
"NumberOfTracksVsLS_"+ CategoryName;
272 histname =
"NumberOfGoodTracksVsLS_"+ CategoryName;
278 histname =
"GoodTracksFractionVsLS_"+ CategoryName;
284 histname =
"GoodTracksNumberOfRecHitsPerTrackVsLS_" + CategoryName;
308 histname =
"NumberOfTracksVsGoodPVtx";
314 histname =
"NumberOfGoodTracksVsGoodPVtx";
320 histname =
"FractionOfGoodTracksVsGoodPVtx";
330 int BXlumiBin = BXlumiParameters.
getParameter<
int>(
"BXlumiBin");
331 double BXlumiMin = BXlumiParameters.
getParameter<
double>(
"BXlumiMin");
332 double BXlumiMax = BXlumiParameters.
getParameter<
double>(
"BXlumiMax");
334 histname =
"NumberOfTracksVsBXlumi_"+ CategoryName;
340 histname =
"NumberOfGoodTracksVsBXlumi_"+ CategoryName;
346 histname =
"FractionOfGoodTracksVsBXlumi_"+ CategoryName;
372 histname =
"NumberOfSeeds_"+ seedProducer.
label() +
"_"+ CategoryName;
382 std::vector<double> histoMin,histoMax;
383 std::vector<int> histoBin;
393 setMaxMinBin(histoMin,histoMax,histoBin,NClusStrMin,NClusStrMax,NClusStrBin,NClusPxMin,NClusPxMax,NClusPxBin);
398 TKNoSeedBin, TKNoSeedMin, TKNoSeedMax)));
412 histname =
"NumberOfTrackCandidates_"+ tcProducer.
label() +
"_"+ CategoryName;
435 std::vector<double> histoMin,histoMax;
436 std::vector<int> histoBin;
468 NClusStrMin,NClusStrMax,NClusStrBin,
469 NClusPxMin, NClusPxMax, NClusPxBin);
488 histoBin[
i], histoMin[i], histoMax[i],
489 NTrk2DBin,NTrk2DMin,NTrk2DMax
502 histoBin[i], histoMin[i], histoMax[i],
503 TKNoBin,TKNoMin,TKNoMax
572 iEvent.
getByLabel(trackProducer, trackHandle);
574 if (trackHandle.isValid())
579 int totalNumTracks = 0, totalRecHits = 0, totalLayers = 0;
580 int totalNumHPTracks = 0, totalNumPt1Tracks = 0, totalNumHPPt1Tracks = 0;
582 for (reco::TrackCollection::const_iterator track = trackCollection.begin(); track!=trackCollection.end(); ++track)
587 if ( track->pt() >= 1. ) {
588 ++totalNumHPPt1Tracks;
596 if ( track->pt() >= 1. ) ++totalNumPt1Tracks;
599 if( Quality ==
"highPurity")
603 else if( Quality ==
"tight")
607 else if( Quality ==
"loose")
613 totalRecHits += track->numberOfValidHits();
614 totalLayers += track->hitPattern().trackerLayersWithMeasurement();
620 if (totalNumPt1Tracks > 0) frac =
static_cast<double>(totalNumHPPt1Tracks)/static_cast<double>(totalNumPt1Tracks);
643 if( totalNumTracks > 0 )
645 double meanRecHits =
static_cast<double>(totalRecHits) / static_cast<double>(totalNumTracks);
646 double meanLayers =
static_cast<double>(totalLayers) / static_cast<double>(totalNumTracks);
679 for( TrackCandidateCollection::const_iterator cand = theTCCollection.begin(); cand != theTCCollection.end(); ++cand)
686 edm::LogWarning(
"TrackingMonitor") <<
"No Track Candidates in the event. Not filling associated histograms";
706 std::vector<int> NClus;
726 for(
size_t i=0;
i < seedHandle->size(); ++
i)
736 edm::LogWarning(
"TrackingMonitor") <<
"No Trajectory seeds in the event. Not filling associated histograms";
743 std::vector<int> NClus;
791 size_t totalNumGoodPV = 0;
793 iEvent.
getByLabel(primaryVertexInputTag, pvHandle );
797 for (reco::VertexCollection::const_iterator pv = pvHandle->begin();
798 pv != pvHandle->end(); ++pv) {
801 if (pv->isFake() || pv->tracksSize()==0)
continue;
804 if (pv->ndof() < 4. || pv->z() > 24.)
continue;
847 if(outputMEsInRootFile)
854 void TrackingMonitor::setMaxMinBin(std::vector<double> &arrayMin, std::vector<double> &arrayMax, std::vector<int> &arrayBin,
double smin,
double smax,
int sbin,
double pmin,
double pmax,
int pbin)
866 arrayMin[
i]=smin; arrayMax[
i]=smax; arrayBin[
i]=sbin;}
876 int ncluster_strip=-1;
879 iEvent.
getByLabel(
"siStripClusters", strip_clusters);
881 iEvent.
getByLabel(
"siPixelClusters", pixel_clusters);
885 ncluster_pix = (*pixel_clusters).dataSize();
886 ncluster_strip = (*strip_clusters).dataSize();
896 arrayNclus[
i]=ncluster_strip ;}
T getParameter(std::string const &) const
std::vector< MonitorElement * > NumberOfTrkVsClusters
MonitorElement * FractionOfGoodTracks
virtual void setMaxMinBin(std::vector< double > &, std::vector< double > &, std::vector< int > &, double, double, int, double, double, int)
TrackAnalyzer * theTrackAnalyzer
MonitorElement * NumberOfGoodTracksVsLS
MonitorElement * FractionOfGoodTracksVsGoodPVtx
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
virtual void setNclus(const edm::Event &, std::vector< int > &)
GetLumi * theLumiDetails_
#define DEFINE_FWK_MODULE(type)
MonitorElement * NumberOfGoodTracks
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
std::vector< TrackCandidate > TrackCandidateCollection
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
std::vector< Track > TrackCollection
collection of Tracks
void doReset(DQMStore *dqmStore_)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * NumberOfGoodTrkVsClus
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
MonitorElement * NumberOfMeanRecHitsPerTrack
MonitorElement * FractionOfGoodTracksVsBXlumi
MonitorElement * NumberOfTracksVsGoodPVtx
LuminosityBlockNumber_t luminosityBlock() const
MonitorElement * GoodTracksFractionVsLS
double getValue(const edm::Event &)
virtual void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup, const TrajectorySeed &seed, const reco::BeamSpot &bs, const edm::ESHandle< MagneticField > &theMF, const edm::ESHandle< TransientTrackingRecHitBuilder > &theTTRHBuilder)
virtual void beginJob(DQMStore *dqmStore_)
MonitorElement * NumberOfSeeds
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
virtual void endJob(void)
bool accept(const edm::Event &event, const edm::EventSetup &setup)
To be called from analyze/filter() methods.
MonitorElement * NumberOfGoodTracksVsBXlumi
MonitorElement * NumberOfTracksVsLS
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
bool runTrackBuildingAnalyzerForSeed
std::vector< MonitorElement * > SeedsVsClusters
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void endRun(const edm::Run &, const edm::EventSetup &)
MonitorElement * NumberOfGoodTracksVsGoodPVtx
std::vector< VertexMonitor * > theVertexMonitor
virtual void beginJob(DQMStore *dqmStore_)
MonitorElement * NumberOfTracksVsBXlumi
bool doGeneralPropertiesPlots_
TrackBuildingAnalyzer * theTrackBuildingAnalyzer
virtual void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup, const reco::Track &track)
MonitorElement * NumberOfMeanLayersPerTrack
GenericTriggerEventFlag * genTriggerEventFlag_
TrackingMonitor(const edm::ParameterSet &)
MonitorElement * GoodTracksNumberOfRecHitsPerTrackVsLS
edm::ESHandle< TransientTrackingRecHitBuilder > theTTRHBuilder
MonitorElement * NumberOfGoodTracks_lumiFlag
virtual void beginJob(void)
MonitorElement * NumberOfTrackCandidates
void Reset(std::vector< TH2F > &depth)
void showDirStructure(void) const
void initRun(const edm::Run &run, const edm::EventSetup &setup)
To be called from beginRun() methods.
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
MonitorElement * NumberOfTracks_lumiFlag
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * NumberOfTracks
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &eSetup)
std::vector< std::string > ClusterLabels