48 , NumberOfTracks(
NULL)
49 , NumberOfMeanRecHitsPerTrack(
NULL)
50 , NumberOfMeanLayersPerTrack(
NULL)
51 , NumberOfGoodTracks(
NULL)
52 , FractionOfGoodTracks(
NULL)
54 , NumberOfTrackCandidates(
NULL)
55 , builderName( conf_.getParameter<std::string>(
"TTRHBuilder"))
56 , doTrackerSpecific_( conf_.getParameter<bool>(
"doTrackerSpecific") )
82 if( Quality !=
"highPurity" && Quality !=
"tight" && Quality !=
"loose")
84 edm::LogWarning(
"TrackingMonitor") <<
"Qualty Name is invalid, using no quality criterea by default";
90 std::string CatagoryName = Quality !=
"" ? AlgoName +
"_" + Quality :
AlgoName;
116 StateName !=
"OuterSurface" &&
117 StateName !=
"InnerSurface" &&
118 StateName !=
"ImpactPoint" &&
119 StateName !=
"default" &&
124 edm::LogWarning(
"TrackingMonitor") <<
"State Name is invalid, using 'ImpactPoint' by default";
133 histname =
"NumberOfTracks_" + CatagoryName;
138 histname =
"NumberOfMeanRecHitsPerTrack_" + CatagoryName;
143 histname =
"NumberOfMeanLayersPerTrack_" + CatagoryName;
148 histname =
"NumberOfGoodTracks_" + CatagoryName;
153 histname =
"FractionOfGoodTracks_" + CatagoryName;
166 histname =
"NumberOfSeeds_" + CatagoryName;
171 histname =
"NumberOfTrackCandidates_" + CatagoryName;
209 histname =
"NumberOfClustersInPixel_" + CatagoryName;
214 histname =
"NumberOfClustersInStrip_" + CatagoryName;
219 histname =
"PixelClustersVsStripClusters_" + CatagoryName;
221 NClus2DPxBin, NClus2DPxMin, NClus2DPxMax);
225 histname =
"RatioOfPixelAndStripClusters_" + CatagoryName;
230 histname =
"TracksVsClusters_" + CatagoryName;
232 NClus2DTotBin,NClus2DTotMin,NClus2DTotMax);
281 iEvent.
getByLabel(trackProducer, trackHandle);
283 if (trackHandle.isValid())
288 int totalNumTracks = 0, totalRecHits = 0, totalLayers = 0;
289 int totalNumHPTracks = 0, totalNumPt1Tracks = 0, totalNumHPPt1Tracks = 0;
291 for (reco::TrackCollection::const_iterator
track = trackCollection.begin();
track!=trackCollection.end(); ++
track)
296 if (
track->pt() >= 1. ) ++totalNumHPPt1Tracks;
299 if (
track->pt() >= 1. ) ++totalNumPt1Tracks;
302 if( Quality ==
"highPurity")
306 else if( Quality ==
"tight")
310 else if( Quality ==
"loose")
316 totalRecHits +=
track->found();
317 totalLayers +=
track->hitPattern().trackerLayersWithMeasurement();
327 if (totalNumPt1Tracks > 0) frac =
static_cast<double>(totalNumHPPt1Tracks)/static_cast<double>(totalNumPt1Tracks);
330 if( totalNumTracks > 0 )
332 double meanRecHits =
static_cast<double>(totalRecHits) / static_cast<double>(totalNumTracks);
333 double meanLayers =
static_cast<double>(totalLayers) / static_cast<double>(totalNumTracks);
365 for( TrackCandidateCollection::const_iterator cand = theTCCollection.begin(); cand != theTCCollection.end(); ++cand)
372 edm::LogWarning(
"TrackingMonitor") <<
"No Track Candidates in the event. Not filling associated histograms";
386 for(
size_t i=0;
i < seedHandle->size(); ++
i)
394 edm::LogWarning(
"TrackingMonitor") <<
"No Trajectory seeds in the event. Not filling associated histograms";
400 iEvent.
getByLabel(
"siStripClusters", strip_clusters);
402 iEvent.
getByLabel(
"siPixelClusters", pixel_clusters);
405 unsigned int ncluster_pix = (*pixel_clusters).dataSize();
406 unsigned int ncluster_strip = (*strip_clusters).dataSize();
408 if ( ncluster_pix > 0) ratio = atan(ncluster_pix*1.0/ncluster_strip);
439 if(outputMEsInRootFile)
T getParameter(std::string const &) const
MonitorElement * FractionOfGoodTracks
TrackAnalyzer * theTrackAnalyzer
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
#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
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
MonitorElement * NumberOfMeanRecHitsPerTrack
MonitorElement * NumberOfStripVsStripClus
void disableSoftReset(MonitorElement *me)
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)
MonitorElement * NumberOfPixelClus
virtual void beginJob(DQMStore *dqmStore_)
MonitorElement * NumberOfSeeds
virtual void endJob(void)
bool accept(const edm::Event &event, const edm::EventSetup &setup)
To be called from analyze/filter() methods.
void softReset(MonitorElement *me)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void endRun(const edm::Run &, const edm::EventSetup &)
virtual void beginJob(DQMStore *dqmStore_)
TrackBuildingAnalyzer * theTrackBuildingAnalyzer
virtual void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup, const reco::Track &track)
MonitorElement * NumberOfMeanLayersPerTrack
MonitorElement * NumberOfStripClus
MonitorElement * RatioOfPixelAndStripClus
GenericTriggerEventFlag * genTriggerEventFlag_
TrackingMonitor(const edm::ParameterSet &)
edm::ESHandle< TransientTrackingRecHitBuilder > theTTRHBuilder
void doSoftReset(DQMStore *dqmStore_)
virtual void beginJob(void)
MonitorElement * NumberOfTrackCandidates
void showDirStructure(void) const
void initRun(const edm::Run &run, const edm::EventSetup &setup)
To be called from beginedm::Run() methods.
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
MonitorElement * NumberOfTrkVsClus
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
void undoSoftReset(DQMStore *dqmStore_)
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &eSetup)