test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
TrackingMonitor Class Reference

#include <DQM/TrackerMonitorTrack/src/TrackingMonitor.cc>

Inheritance diagram for TrackingMonitor:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob (void)
 
virtual void beginLuminosityBlock (const edm::LuminosityBlock &lumi, const edm::EventSetup &eSetup)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
virtual void endRun (const edm::Run &, const edm::EventSetup &)
 
virtual void setMaxMinBin (std::vector< double > &, std::vector< double > &, std::vector< int > &, double, double, int, double, double, int)
 
virtual void setNclus (const edm::Event &, std::vector< int > &)
 
 TrackingMonitor (const edm::ParameterSet &)
 
 ~TrackingMonitor ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void doProfileX (TH2 *th2, MonitorElement *me)
 
void doProfileX (MonitorElement *th2m, MonitorElement *me)
 

Private Attributes

std::string AlgoName_
 
edm::EDGetTokenT
< reco::TrackCollection
allTrackToken_
 
edm::InputTag bsSrc_
 
edm::EDGetTokenT< reco::BeamSpotbsSrcToken_
 
std::string builderName
 
std::vector< std::string > ClusterLabels
 
edm::ParameterSet conf_
 
StringCutObjectSelector
< reco::Track, true > 
denSelection_
 
bool doAllPlots
 
bool doAllSeedPlots
 
bool doDCAPlots_
 
bool doFractionPlot_
 
bool doGeneralPropertiesPlots_
 
bool doHitPropertiesPlots_
 
bool doLumiAnalysis
 
bool doPlotsVsBX_
 
bool doPlotsVsBXlumi_
 
bool doPlotsVsGoodPVtx_
 
bool doPlotsVsLUMI_
 
bool doProfilesVsLS_
 
bool doPUmonitoring_
 
bool doSeedLumiAnalysis_
 
bool doSeedNumberPlot
 
bool doSeedVsClusterPlot
 
bool doTkCandPlots
 
bool doTrackerSpecific_
 
MonitorElementFractionOfGoodTracks
 
GenericTriggerEventFlaggenTriggerEventFlag_
 
MonitorElementGoodTracksFractionVsBX
 
MonitorElementGoodTracksFractionVsGoodPVtx
 
MonitorElementGoodTracksFractionVsLS
 
MonitorElementGoodTracksFractionVsLUMI
 
std::string histname
 
edm::EDGetTokenT
< LumiScalersCollection
lumiscalersToken_
 
MonitorElementNumberEventsOfVsBX
 
MonitorElementNumberEventsOfVsGoodPVtx
 
MonitorElementNumberEventsOfVsLS
 
MonitorElementNumberEventsOfVsLUMI
 
MonitorElementNumberOfGoodPVtxVsBX
 
MonitorElementNumberOfGoodPVtxVsLS
 
MonitorElementNumberOfGoodPVtxVsLUMI
 
MonitorElementNumberOfMeanLayersPerTrack
 
MonitorElementNumberOfMeanRecHitsPerTrack
 
MonitorElementNumberOfPVtxVsGoodPVtx
 
MonitorElementNumberOfRecHitsPerTrackVsBX
 
MonitorElementNumberOfRecHitsPerTrackVsGoodPVtx
 
MonitorElementNumberOfRecHitsPerTrackVsLS
 
MonitorElementNumberOfRecHitsPerTrackVsLUMI
 
MonitorElementNumberOfSeeds
 
MonitorElementNumberOfSeeds_lumiFlag
 
MonitorElementNumberOfTrackCandidates
 
MonitorElementNumberOfTracks
 
MonitorElementNumberOfTracks_lumiFlag
 
MonitorElementNumberOfTracksVsBX
 
MonitorElementNumberOfTracksVsBXlumi
 
MonitorElementNumberOfTracksVsGoodPVtx
 
MonitorElementNumberOfTracksVsLS
 
MonitorElementNumberOfTracksVsLUMI
 
MonitorElementNumberOfTracksVsPUPVtx
 
MonitorElementNumberOfTrkVsClus
 
std::vector< MonitorElement * > NumberOfTrkVsClusters
 
MonitorElementNumberOfTrkVsPixelClus
 
MonitorElementNumberOfTrkVsStripClus
 
StringCutObjectSelector
< reco::Track, true > 
numSelection_
 
edm::InputTag pixelClusterInputTag_
 
edm::EDGetTokenT
< edmNew::DetSetVector
< SiPixelCluster > > 
pixelClustersToken_
 
int pvNDOF_
 
edm::InputTag pvSrc_
 
edm::EDGetTokenT
< reco::VertexCollection
pvSrcToken_
 
std::string Quality_
 
bool runTrackBuildingAnalyzerForSeed
 
std::vector< MonitorElement * > SeedsVsClusters
 
edm::EDGetTokenT< edm::View
< TrajectorySeed > > 
seedToken_
 
edm::InputTag stripClusterInputTag_
 
edm::EDGetTokenT
< edmNew::DetSetVector
< SiStripCluster > > 
stripClustersToken_
 
GetLumitheLumiDetails_
 
TrackAnalyzertheTrackAnalyzer
 
TrackBuildingAnalyzertheTrackBuildingAnalyzer
 
edm::ESHandle
< TransientTrackingRecHitBuilder
theTTRHBuilder
 
std::vector< VertexMonitor * > theVertexMonitor
 
edm::EDGetTokenT
< TrackCandidateCollection
trackCandidateToken_
 
edm::EDGetTokenT
< reco::TrackCollection
trackToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Monitoring source for general quantities related to tracks.

Definition at line 49 of file TrackingMonitor.h.

Constructor & Destructor Documentation

TrackingMonitor::TrackingMonitor ( const edm::ParameterSet iConfig)
explicit

Definition at line 40 of file TrackingMonitor.cc.

References AlgoName_, allTrackToken_, bsSrc_, bsSrcToken_, EnergyCorrector::c, conf_, edm::EDConsumerBase::consumesCollector(), doFractionPlot_, doPlotsVsBX_, doPlotsVsBXlumi_, doPlotsVsGoodPVtx_, doPlotsVsLUMI_, doPUmonitoring_, edm::ParameterSet::getParameter(), i, edm::InputTag::label(), lumiscalersToken_, pixelClusterInputTag_, pixelClustersToken_, pvSrc_, pvSrcToken_, Quality_, seedToken_, AlCaHLTBitMon_QueryRunRegistry::string, stripClusterInputTag_, stripClustersToken_, theLumiDetails_, theTrackAnalyzer, theVertexMonitor, trackCandidateToken_, HLT_25ns10e33_v2_cff::trackProducer, and trackToken_.

41  : conf_ ( iConfig )
46  // , NumberOfGoodTracks(NULL)
51  // , NumberOfGoodTrkVsClus(NULL)
54  // , NumberOfGoodTracksVsLS(NULL)
56  // , GoodTracksNumberOfRecHitsPerTrackVsLS(NULL)
57  // ADD by Mia for PU monitoring
58  // vertex plots to be moved in ad hoc class
78  // , NumberOfGoodTracks_lumiFlag(NULL)
79 
80  , builderName ( conf_.getParameter<std::string>("TTRHBuilder"))
81  , doTrackerSpecific_ ( conf_.getParameter<bool>("doTrackerSpecific") )
82  , doLumiAnalysis ( conf_.getParameter<bool>("doLumiAnalysis"))
83  , doProfilesVsLS_ ( conf_.getParameter<bool>("doProfilesVsLS"))
84  , doAllPlots ( conf_.getParameter<bool>("doAllPlots"))
85  , doGeneralPropertiesPlots_( conf_.getParameter<bool>("doGeneralPropertiesPlots"))
86  , doHitPropertiesPlots_ ( conf_.getParameter<bool>("doHitPropertiesPlots"))
87  , doPUmonitoring_ ( conf_.getParameter<bool>("doPUmonitoring") )
88  , genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter<edm::ParameterSet>("genericTriggerEventPSet"),consumesCollector(), *this))
91  , pvNDOF_ ( conf_.getParameter<int> ("pvNDOF") )
92 {
93 
96 
97  // input tags for collections from the configuration
98  bsSrc_ = conf_.getParameter<edm::InputTag>("beamSpot");
99  pvSrc_ = conf_.getParameter<edm::InputTag>("primaryVertex");
100  bsSrcToken_ = consumes<reco::BeamSpot>(bsSrc_);
101  pvSrcToken_ = mayConsume<reco::VertexCollection>(pvSrc_);
102 
103  lumiscalersToken_ = consumes<LumiScalersCollection>(conf_.getParameter<edm::InputTag>("scal") );
104 
105  edm::InputTag alltrackProducer = conf_.getParameter<edm::InputTag>("allTrackProducer");
107  edm::InputTag tcProducer = conf_.getParameter<edm::InputTag>("TCProducer");
108  edm::InputTag seedProducer = conf_.getParameter<edm::InputTag>("SeedProducer");
109  allTrackToken_ = consumes<reco::TrackCollection>(alltrackProducer);
110  trackToken_ = consumes<reco::TrackCollection>(trackProducer);
111  trackCandidateToken_ = consumes<TrackCandidateCollection>(tcProducer);
112  seedToken_ = consumes<edm::View<TrajectorySeed> >(seedProducer);
113 
116  stripClustersToken_ = mayConsume<edmNew::DetSetVector<SiStripCluster> > (stripClusterInputTag_);
117  pixelClustersToken_ = mayConsume<edmNew::DetSetVector<SiPixelCluster> > (pixelClusterInputTag_);
118 
119  doFractionPlot_ = true;
120  if (alltrackProducer.label()==trackProducer.label()) doFractionPlot_ = false;
121 
122  Quality_ = conf_.getParameter<std::string>("Quality");
123  AlgoName_ = conf_.getParameter<std::string>("AlgoName");
124 
125  // get flag from the configuration
126  doPlotsVsBXlumi_ = conf_.getParameter<bool>("doPlotsVsBXlumi");
127  if ( doPlotsVsBXlumi_ )
128  theLumiDetails_ = new GetLumi( iConfig.getParameter<edm::ParameterSet>("BXlumiSetup"), c );
129  doPlotsVsGoodPVtx_ = conf_.getParameter<bool>("doPlotsVsGoodPVtx");
130  doPlotsVsLUMI_ = conf_.getParameter<bool>("doPlotsVsLUMI");
131  doPlotsVsBX_ = conf_.getParameter<bool>("doPlotsVsBX");
132 
133  if ( doPUmonitoring_ ) {
134 
135  std::vector<edm::InputTag> primaryVertexInputTags = conf_.getParameter<std::vector<edm::InputTag> >("primaryVertexInputTags");
136  std::vector<edm::InputTag> selPrimaryVertexInputTags = conf_.getParameter<std::vector<edm::InputTag> >("selPrimaryVertexInputTags");
137  std::vector<std::string> pvLabels = conf_.getParameter<std::vector<std::string> > ("pvLabels");
138 
139  if (primaryVertexInputTags.size()==pvLabels.size() and primaryVertexInputTags.size()==selPrimaryVertexInputTags.size()) {
140  for (size_t i=0; i<primaryVertexInputTags.size(); i++) {
141  edm::InputTag iPVinputTag = primaryVertexInputTags[i];
142  edm::InputTag iSelPVinputTag = selPrimaryVertexInputTags[i];
143  std::string iPVlabel = pvLabels[i];
144 
145  theVertexMonitor.push_back(new VertexMonitor(conf_,iPVinputTag,iSelPVinputTag,iPVlabel,c) );
146  }
147  }
148  }
149 
150 }
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedToken_
int i
Definition: DBlmapReader.cc:9
MonitorElement * FractionOfGoodTracks
MonitorElement * NumberOfTracksVsBX
TrackAnalyzer * theTrackAnalyzer
MonitorElement * NumberOfRecHitsPerTrackVsBX
MonitorElement * NumberOfRecHitsPerTrackVsLUMI
edm::ParameterSet conf_
edm::EDGetTokenT< reco::TrackCollection > allTrackToken_
MonitorElement * NumberEventsOfVsGoodPVtx
GetLumi * theLumiDetails_
edm::InputTag pvSrc_
#define NULL
Definition: scimark2.h:8
MonitorElement * GoodTracksFractionVsLUMI
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
MonitorElement * NumberOfPVtxVsGoodPVtx
MonitorElement * NumberOfMeanRecHitsPerTrack
MonitorElement * NumberOfTracksVsGoodPVtx
MonitorElement * GoodTracksFractionVsLS
std::string Quality_
edm::InputTag bsSrc_
MonitorElement * NumberOfSeeds
MonitorElement * NumberOfGoodPVtxVsLS
MonitorElement * NumberOfGoodPVtxVsLUMI
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
MonitorElement * NumberOfTracksVsLS
MonitorElement * NumberOfTracksVsPUPVtx
edm::EDGetTokenT< LumiScalersCollection > lumiscalersToken_
MonitorElement * NumberEventsOfVsBX
MonitorElement * GoodTracksFractionVsGoodPVtx
MonitorElement * NumberOfRecHitsPerTrackVsGoodPVtx
std::vector< VertexMonitor * > theVertexMonitor
MonitorElement * NumberOfTracksVsBXlumi
edm::InputTag stripClusterInputTag_
bool doGeneralPropertiesPlots_
TrackBuildingAnalyzer * theTrackBuildingAnalyzer
std::string AlgoName_
edm::EDGetTokenT< reco::TrackCollection > trackToken_
edm::EDGetTokenT< TrackCandidateCollection > trackCandidateToken_
MonitorElement * NumberOfMeanLayersPerTrack
StringCutObjectSelector< reco::Track, true > denSelection_
StringCutObjectSelector< reco::Track, true > numSelection_
GenericTriggerEventFlag * genTriggerEventFlag_
MonitorElement * GoodTracksFractionVsBX
edm::InputTag pixelClusterInputTag_
std::string const & label() const
Definition: InputTag.h:36
MonitorElement * NumberOfSeeds_lumiFlag
MonitorElement * NumberOfTrackCandidates
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelClustersToken_
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > stripClustersToken_
MonitorElement * NumberOfGoodPVtxVsBX
MonitorElement * NumberEventsOfVsLUMI
MonitorElement * NumberOfTracks_lumiFlag
edm::EDGetTokenT< reco::BeamSpot > bsSrcToken_
MonitorElement * NumberOfTracks
edm::EDGetTokenT< reco::VertexCollection > pvSrcToken_
MonitorElement * NumberEventsOfVsLS
MonitorElement * NumberOfTracksVsLUMI
std::string builderName
TrackingMonitor::~TrackingMonitor ( )

Definition at line 153 of file TrackingMonitor.cc.

References doPUmonitoring_, genTriggerEventFlag_, i, theTrackAnalyzer, theTrackBuildingAnalyzer, and theVertexMonitor.

154 {
157  if ( doPUmonitoring_ )
158  for (size_t i=0; i<theVertexMonitor.size(); i++)
159  if (theVertexMonitor[i]) delete theVertexMonitor[i];
161 }
int i
Definition: DBlmapReader.cc:9
TrackAnalyzer * theTrackAnalyzer
std::vector< VertexMonitor * > theVertexMonitor
TrackBuildingAnalyzer * theTrackBuildingAnalyzer
GenericTriggerEventFlag * genTriggerEventFlag_

Member Function Documentation

void TrackingMonitor::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 628 of file TrackingMonitor.cc.

References funct::abs(), GenericTriggerEventFlag::accept(), allTrackToken_, TrackBuildingAnalyzer::analyze(), TrackAnalyzer::analyze(), bsSrcToken_, builderName, edm::EventBase::bunchCrossing(), ClusterLabels, denSelection_, doAllPlots, doAllSeedPlots, doFractionPlot_, doGeneralPropertiesPlots_, doLumiAnalysis, doPlotsVsBX_, doPlotsVsBXlumi_, doPlotsVsGoodPVtx_, doPlotsVsLUMI_, doProfilesVsLS_, doPUmonitoring_, doSeedLumiAnalysis_, doSeedNumberPlot, doSeedVsClusterPlot, doTkCandPlots, doTrackerSpecific_, MonitorElement::Fill(), HcalObjRepresent::Fill(), cropTnPTrees::frac, FractionOfGoodTracks, genTriggerEventFlag_, edm::EventSetup::get(), edm::Event::getByToken(), GetLumi::getValue(), GoodTracksFractionVsBX, GoodTracksFractionVsGoodPVtx, GoodTracksFractionVsLS, GoodTracksFractionVsLUMI, i, edm::EventBase::id(), reco::Vertex::isFake(), edm::HandleBase::isValid(), fjr2json::lumi, edm::EventID::luminosityBlock(), lumiscalersToken_, reco::Vertex::ndof(), NumberEventsOfVsBX, NumberEventsOfVsGoodPVtx, NumberEventsOfVsLS, NumberEventsOfVsLUMI, NumberOfGoodPVtxVsBX, NumberOfGoodPVtxVsLS, NumberOfGoodPVtxVsLUMI, NumberOfMeanLayersPerTrack, NumberOfMeanRecHitsPerTrack, NumberOfPVtxVsGoodPVtx, NumberOfRecHitsPerTrackVsBX, NumberOfRecHitsPerTrackVsGoodPVtx, NumberOfRecHitsPerTrackVsLS, NumberOfRecHitsPerTrackVsLUMI, NumberOfSeeds, NumberOfSeeds_lumiFlag, NumberOfTrackCandidates, NumberOfTracks, NumberOfTracks_lumiFlag, NumberOfTracksVsBX, NumberOfTracksVsBXlumi, NumberOfTracksVsGoodPVtx, NumberOfTracksVsLS, NumberOfTracksVsLUMI, NumberOfTracksVsPUPVtx, NumberOfTrkVsClusters, numSelection_, GenericTriggerEventFlag::on(), reco::Vertex::position(), MetAnalyzer::pv(), pvNDOF_, pvSrcToken_, runTrackBuildingAnalyzerForSeed, fileCollector::seed, SeedsVsClusters, seedToken_, TrackAnalyzer::setBX(), TrackAnalyzer::setLumi(), setNclus(), TrackAnalyzer::setNumberOfGoodVertices(), edm::View< T >::size(), theLumiDetails_, theTrackAnalyzer, theTrackBuildingAnalyzer, theTTRHBuilder, theVertexMonitor, trackCandidateToken_, HLT_25ns10e33_v2_cff::trackCollection, reco::Vertex::tracksSize(), trackToken_, and reco::Vertex::z().

629 {
630 
631  // Filter out events if Trigger Filtering is requested
632  if (genTriggerEventFlag_->on()&& ! genTriggerEventFlag_->accept( iEvent, iSetup) ) return;
633 
634  float lumi = -1.;
636  iEvent.getByToken(lumiscalersToken_, lumiScalers);
637  if ( lumiScalers.isValid() && lumiScalers->size() ) {
638  LumiScalersCollection::const_iterator scalit = lumiScalers->begin();
639  lumi = scalit->instantLumi();
640  } else
641  lumi = -1.;
642 
643  if (doPlotsVsLUMI_ || doAllPlots)
644  NumberEventsOfVsLUMI->Fill(lumi);
645 
646  // Analyse the tracks
647  // if the collection is empty, do not fill anything
648  // ---------------------------------------------------------------------------------//
649 
650  size_t bx = iEvent.bunchCrossing();
651  if ( doPlotsVsBX_ || doAllPlots )
653 
654  // get the track collection
656  iEvent.getByToken(trackToken_, trackHandle);
657 
658  int numberOfTracks_den = 0;
659  edm::Handle<reco::TrackCollection> allTrackHandle;
660  iEvent.getByToken(allTrackToken_,allTrackHandle);
661  if (allTrackHandle.isValid()) {
662  for (reco::TrackCollection::const_iterator track = allTrackHandle->begin();
663  track!=allTrackHandle->end(); ++track) {
664  if ( denSelection_(*track) )
665  numberOfTracks_den++;
666  }
667  }
668 
670  iEvent.getByToken(pvSrcToken_, pvHandle );
671  reco::Vertex const * pv0 = nullptr;
672  if (pvHandle.isValid()) {
673  pv0 = &pvHandle->front();
674  //--- pv fake (the pv collection should have size==1 and the pv==beam spot)
675  if ( pv0->isFake() || pv0->tracksSize()==0
676  // definition of goodOfflinePrimaryVertex
677  || pv0->ndof() < pvNDOF_ || pv0->z() > 24.) pv0 = nullptr;
678  }
679 
680 
681  if (trackHandle.isValid()) {
682 
683  int numberOfTracks = trackHandle->size();
684  int numberOfTracks_num = 0;
685  int numberOfTracks_pv0 = 0;
686 
687  reco::TrackCollection trackCollection = *trackHandle;
688  // calculate the mean # rechits and layers
689  int totalRecHits = 0, totalLayers = 0;
690 
692  theTrackAnalyzer->setBX(iEvent);
693  theTrackAnalyzer->setLumi(iEvent,iSetup);
694  for (reco::TrackCollection::const_iterator track = trackCollection.begin();
695  track!=trackCollection.end(); ++track) {
696 
697  if ( doPlotsVsBX_ || doAllPlots )
698  NumberOfRecHitsPerTrackVsBX->Fill(bx,track->numberOfValidHits());
699  if ( numSelection_(*track) ) {
700  numberOfTracks_num++;
701  if (pv0 && std::abs(track->dz(pv0->position()))<0.15) ++numberOfTracks_pv0;
702  }
703 
704  if ( doProfilesVsLS_ || doAllPlots)
705  NumberOfRecHitsPerTrackVsLS->Fill(static_cast<double>(iEvent.id().luminosityBlock()),track->numberOfValidHits());
706 
707  if (doPlotsVsLUMI_ || doAllPlots)
708  NumberOfRecHitsPerTrackVsLUMI->Fill(lumi,track->numberOfValidHits());
709 
710  totalRecHits += track->numberOfValidHits();
711  totalLayers += track->hitPattern().trackerLayersWithMeasurement();
712 
713  // do analysis per track
714  theTrackAnalyzer->analyze(iEvent, iSetup, *track);
715  }
716 
717  double frac = -1.;
718  // if (numberOfAllTracks > 0) frac = static_cast<double>(numberOfTracks)/static_cast<double>(numberOfAllTracks);
719  if (numberOfTracks_den > 0) frac = static_cast<double>(numberOfTracks_num)/static_cast<double>(numberOfTracks_den);
720 
722  NumberOfTracks -> Fill(numberOfTracks);
723  if ( doPlotsVsBX_ || doAllPlots )
724  NumberOfTracksVsBX -> Fill(bx,numberOfTracks);
725  if (doPlotsVsLUMI_ || doAllPlots)
726  NumberOfTracksVsLUMI -> Fill(lumi,numberOfTracks);
727  if (doFractionPlot_) {
728  FractionOfGoodTracks -> Fill(frac);
729 
730  if (doFractionPlot_) {
731  if ( doPlotsVsBX_ || doAllPlots )
732  GoodTracksFractionVsBX -> Fill(bx, frac);
733  if (doPlotsVsLUMI_ || doAllPlots)
734  GoodTracksFractionVsLUMI -> Fill(lumi,frac);
735  }
736  }
737  if( numberOfTracks > 0 ) {
738  double meanRecHits = static_cast<double>(totalRecHits) / static_cast<double>(numberOfTracks);
739  double meanLayers = static_cast<double>(totalLayers) / static_cast<double>(numberOfTracks);
740  NumberOfMeanRecHitsPerTrack -> Fill(meanRecHits);
741  NumberOfMeanLayersPerTrack -> Fill(meanLayers);
742  }
743  }
744 
745  if ( doProfilesVsLS_ || doAllPlots) {
746  float nLS = static_cast<double>(iEvent.id().luminosityBlock());
747  NumberEventsOfVsLS ->Fill(nLS);
748  NumberOfTracksVsLS ->Fill(nLS,numberOfTracks);
749  if (doFractionPlot_)
750  GoodTracksFractionVsLS->Fill(nLS,frac);
751  }
752 
753  if ( doLumiAnalysis ) {
754  NumberOfTracks_lumiFlag -> Fill(numberOfTracks);
755  }
756 
757 
758  // Analyse the Track Building variables
759  // if the collection is empty, do not fill anything
760  // ---------------------------------------------------------------------------------//
761 
762 
763  // fill the TrackCandidate info
764  if (doTkCandPlots) {
765  // magnetic field
767  iSetup.get<IdealMagneticFieldRecord>().get(theMF);
768 
769  // get the candidate collection
771  iEvent.getByToken( trackCandidateToken_, theTCHandle );
772  const TrackCandidateCollection& theTCCollection = *theTCHandle;
773 
774  if (theTCHandle.isValid()) {
775 
776  // get the beam spot
777  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
778  iEvent.getByToken(bsSrcToken_, recoBeamSpotHandle );
779  const reco::BeamSpot& bs = *recoBeamSpotHandle;
780 
781  NumberOfTrackCandidates->Fill(theTCCollection.size());
783  for( TrackCandidateCollection::const_iterator cand = theTCCollection.begin(); cand != theTCCollection.end(); ++cand) {
784 
785  theTrackBuildingAnalyzer->analyze(iEvent, iSetup, *cand, bs, theMF, theTTRHBuilder);
786  }
787  } else {
788  edm::LogWarning("TrackingMonitor") << "No Track Candidates in the event. Not filling associated histograms";
789  }
790  }
791 
792  //plots for trajectory seeds
793 
795 
796  // get the seed collection
798  iEvent.getByToken(seedToken_, seedHandle );
799  const edm::View<TrajectorySeed>& seedCollection = *seedHandle;
800 
801  // fill the seed info
802  if (seedHandle.isValid()) {
803 
805  NumberOfSeeds->Fill(seedCollection.size());
806  if ( doSeedLumiAnalysis_ )
807  NumberOfSeeds_lumiFlag->Fill(seedCollection.size());
808  }
809 
811 
812  std::vector<int> NClus;
813  setNclus(iEvent,NClus);
814  for (uint i=0; i< ClusterLabels.size(); i++){
815  SeedsVsClusters[i]->Fill(NClus[i],seedCollection.size());
816  }
817  }
818 
820 
821  //here duplication of mag field and be informations is needed to allow seed and track cand histos to be independent
822  // magnetic field
824  iSetup.get<IdealMagneticFieldRecord>().get(theMF);
825 
826  // get the beam spot
827  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
828  iEvent.getByToken(bsSrcToken_, recoBeamSpotHandle );
829  const reco::BeamSpot& bs = *recoBeamSpotHandle;
830 
832  for(size_t i=0; i < seedHandle->size(); ++i) {
833 
835  theTrackBuildingAnalyzer->analyze(iEvent, iSetup, *seed, bs, theMF, theTTRHBuilder);
836  }
837  }
838 
839  } else {
840  edm::LogWarning("TrackingMonitor") << "No Trajectory seeds in the event. Not filling associated histograms";
841  }
842  }
843 
844 
846 
847  std::vector<int> NClus;
848  setNclus(iEvent,NClus);
849  for (uint i=0; i< ClusterLabels.size(); i++) {
850  NumberOfTrkVsClusters[i]->Fill(NClus[i],numberOfTracks);
851  }
852  }
853 
854  if ( doPUmonitoring_ ) {
855 
856  // do vertex monitoring
857  for (size_t i=0; i<theVertexMonitor.size(); i++)
858  theVertexMonitor[i]->analyze(iEvent, iSetup);
859  }
860  if ( doPlotsVsGoodPVtx_ ) {
861 
862  size_t totalNumGoodPV = 0;
863  if (pvHandle.isValid()) {
864 
865  for (reco::VertexCollection::const_iterator pv = pvHandle->begin();
866  pv != pvHandle->end(); ++pv) {
867 
868  //--- pv fake (the pv collection should have size==1 and the pv==beam spot)
869  if (pv->isFake() || pv->tracksSize()==0) continue;
870 
871  // definition of goodOfflinePrimaryVertex
872  if (pv->ndof() < pvNDOF_ || pv->z() > 24.) continue;
873  totalNumGoodPV++;
874  }
875 
876  NumberEventsOfVsGoodPVtx -> Fill( float(totalNumGoodPV) );
877  NumberOfTracksVsGoodPVtx -> Fill( float(totalNumGoodPV), numberOfTracks );
878  if (totalNumGoodPV>1) NumberOfTracksVsPUPVtx-> Fill( totalNumGoodPV-1, double(numberOfTracks-numberOfTracks_pv0)/double(totalNumGoodPV-1) );
879  NumberOfPVtxVsGoodPVtx -> Fill(float(totalNumGoodPV),pvHandle->size());
880 
881  for (reco::TrackCollection::const_iterator track = trackCollection.begin();
882  track!=trackCollection.end(); ++track) {
883  NumberOfRecHitsPerTrackVsGoodPVtx -> Fill(float(totalNumGoodPV), track->numberOfValidHits());
884  }
885 
886  if ( doProfilesVsLS_ || doAllPlots)
887  NumberOfGoodPVtxVsLS->Fill(static_cast<double>(iEvent.id().luminosityBlock()),totalNumGoodPV);
888  if ( doPlotsVsBX_ || doAllPlots )
889  NumberOfGoodPVtxVsBX->Fill(bx, float(totalNumGoodPV));
890 
891  if (doFractionPlot_)
892  GoodTracksFractionVsGoodPVtx->Fill(float(totalNumGoodPV),frac);
893 
894  if ( doPlotsVsLUMI_ || doAllPlots )
895  NumberOfGoodPVtxVsLUMI->Fill(lumi,float(totalNumGoodPV));
896  }
897 
898 
899  if ( doPlotsVsBXlumi_ ) {
900  double bxlumi = theLumiDetails_->getValue(iEvent);
901  NumberOfTracksVsBXlumi -> Fill( bxlumi, numberOfTracks );
902  }
903 
904  } // PU monitoring
905 
906  } // trackHandle is valid
907 
908 }
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedToken_
int i
Definition: DBlmapReader.cc:9
std::vector< MonitorElement * > NumberOfTrkVsClusters
MonitorElement * FractionOfGoodTracks
MonitorElement * NumberOfTracksVsBX
TrackAnalyzer * theTrackAnalyzer
MonitorElement * NumberOfRecHitsPerTrackVsBX
MonitorElement * NumberOfRecHitsPerTrackVsLUMI
virtual void setNclus(const edm::Event &, std::vector< int > &)
edm::EDGetTokenT< reco::TrackCollection > allTrackToken_
MonitorElement * NumberEventsOfVsGoodPVtx
GetLumi * theLumiDetails_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
tuple lumi
Definition: fjr2json.py:35
std::vector< TrackCandidate > TrackCandidateCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
int bunchCrossing() const
Definition: EventBase.h:65
size_type size() const
MonitorElement * GoodTracksFractionVsLUMI
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * NumberOfPVtxVsGoodPVtx
MonitorElement * NumberOfMeanRecHitsPerTrack
MonitorElement * NumberOfTracksVsGoodPVtx
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:40
const Point & position() const
position
Definition: Vertex.h:99
MonitorElement * GoodTracksFractionVsLS
void setLumi(const edm::Event &, const edm::EventSetup &iSetup)
void Fill(long long x)
double getValue(const edm::Event &)
Definition: GetLumi.cc:64
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 * NumberOfSeeds
MonitorElement * NumberOfGoodPVtxVsLS
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * NumberOfGoodPVtxVsLUMI
bool accept(const edm::Event &event, const edm::EventSetup &setup)
To be called from analyze/filter() methods.
void setBX(const edm::Event &)
MonitorElement * NumberOfTracksVsLS
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double z() const
y coordinate
Definition: Vertex.h:105
MonitorElement * NumberOfTracksVsPUPVtx
edm::EDGetTokenT< LumiScalersCollection > lumiscalersToken_
MonitorElement * NumberEventsOfVsBX
bool runTrackBuildingAnalyzerForSeed
bool isValid() const
Definition: HandleBase.h:75
std::vector< MonitorElement * > SeedsVsClusters
MonitorElement * NumberOfRecHitsPerTrackVsLS
MonitorElement * GoodTracksFractionVsGoodPVtx
double ndof() const
Definition: Vertex.h:95
MonitorElement * NumberOfRecHitsPerTrackVsGoodPVtx
std::vector< VertexMonitor * > theVertexMonitor
MonitorElement * NumberOfTracksVsBXlumi
bool doGeneralPropertiesPlots_
TrackBuildingAnalyzer * theTrackBuildingAnalyzer
bool isFake() const
Definition: Vertex.h:64
virtual void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup, const reco::Track &track)
edm::EDGetTokenT< reco::TrackCollection > trackToken_
edm::EDGetTokenT< TrackCandidateCollection > trackCandidateToken_
MonitorElement * NumberOfMeanLayersPerTrack
StringCutObjectSelector< reco::Track, true > denSelection_
const T & get() const
Definition: EventSetup.h:56
StringCutObjectSelector< reco::Track, true > numSelection_
GenericTriggerEventFlag * genTriggerEventFlag_
MonitorElement * GoodTracksFractionVsBX
MonitorElement * NumberOfSeeds_lumiFlag
edm::EventID id() const
Definition: EventBase.h:59
edm::ESHandle< TransientTrackingRecHitBuilder > theTTRHBuilder
MonitorElement * NumberOfTrackCandidates
MonitorElement * NumberOfGoodPVtxVsBX
MonitorElement * NumberEventsOfVsLUMI
void setNumberOfGoodVertices(const edm::Event &)
MonitorElement * NumberOfTracks_lumiFlag
edm::EDGetTokenT< reco::BeamSpot > bsSrcToken_
MonitorElement * NumberOfTracks
size_t tracksSize() const
number of tracks
Definition: Vertex.cc:34
edm::EDGetTokenT< reco::VertexCollection > pvSrcToken_
MonitorElement * NumberEventsOfVsLS
MonitorElement * NumberOfTracksVsLUMI
std::vector< std::string > ClusterLabels
std::string builderName
void TrackingMonitor::beginJob ( void  )
virtual

Definition at line 164 of file TrackingMonitor.cc.

165 {
166 
167 
168 }
void TrackingMonitor::beginLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup eSetup 
)
virtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 614 of file TrackingMonitor.cc.

References doAllSeedPlots, doLumiAnalysis, TrackAnalyzer::doReset(), doSeedLumiAnalysis_, doSeedNumberPlot, NumberOfSeeds_lumiFlag, NumberOfTracks_lumiFlag, MonitorElement::Reset(), HcalObjRepresent::Reset(), and theTrackAnalyzer.

614  {
615 
616  if (doLumiAnalysis) {
619  }
621  if ( doSeedLumiAnalysis_ )
623  }
624 }
TrackAnalyzer * theTrackAnalyzer
MonitorElement * NumberOfSeeds_lumiFlag
void Reset(std::vector< TH2F > &depth)
MonitorElement * NumberOfTracks_lumiFlag
void Reset(void)
reset ME (ie. contents, errors, etc)
void TrackingMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 170 of file TrackingMonitor.cc.

References HLT_25ns10e33_v2_cff::AlgoName, AlgoName_, DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookProfile(), ClusterLabels, compare_using_db::compare, conf_, doAllPlots, doAllSeedPlots, doFractionPlot_, doGeneralPropertiesPlots_, doLumiAnalysis, doPlotsVsBX_, doPlotsVsBXlumi_, doPlotsVsGoodPVtx_, doPlotsVsLUMI_, doProfilesVsLS_, doPUmonitoring_, doSeedLumiAnalysis_, doSeedNumberPlot, doSeedVsClusterPlot, doTkCandPlots, doTrackerSpecific_, FractionOfGoodTracks, genTriggerEventFlag_, edm::ParameterSet::getParameter(), MonitorElement::getTH1(), GoodTracksFractionVsBX, GoodTracksFractionVsGoodPVtx, GoodTracksFractionVsLS, GoodTracksFractionVsLUMI, histname, i, TrackBuildingAnalyzer::initHisto(), TrackAnalyzer::initHisto(), GenericTriggerEventFlag::initRun(), edm::InputTag::label(), NumberEventsOfVsBX, NumberEventsOfVsGoodPVtx, NumberEventsOfVsLS, NumberEventsOfVsLUMI, NumberOfGoodPVtxVsBX, NumberOfGoodPVtxVsLS, NumberOfGoodPVtxVsLUMI, NumberOfMeanLayersPerTrack, NumberOfMeanRecHitsPerTrack, NumberOfPVtxVsGoodPVtx, NumberOfRecHitsPerTrackVsBX, NumberOfRecHitsPerTrackVsGoodPVtx, NumberOfRecHitsPerTrackVsLS, NumberOfRecHitsPerTrackVsLUMI, NumberOfSeeds, NumberOfSeeds_lumiFlag, NumberOfTrackCandidates, NumberOfTracks, NumberOfTracks_lumiFlag, NumberOfTracksVsBX, NumberOfTracksVsBXlumi, NumberOfTracksVsGoodPVtx, NumberOfTracksVsLS, NumberOfTracksVsLUMI, NumberOfTracksVsPUPVtx, NumberOfTrkVsClusters, GenericTriggerEventFlag::on(), Quality_, runTrackBuildingAnalyzerForSeed, SeedsVsClusters, MonitorElement::setAxisTitle(), DQMStore::IBooker::setCurrentFolder(), TrackAnalyzer::setLumiFlag(), MonitorElement::setLumiFlag(), setMaxMinBin(), AlCaHLTBitMon_QueryRunRegistry::string, theTrackAnalyzer, theTrackBuildingAnalyzer, theVertexMonitor, and indexGen::title.

173 {
174  // parameters from the configuration
177  std::string MEFolderName = conf_.getParameter<std::string>("FolderName");
178 
179  // test for the Quality veriable validity
180  if( Quality_ != "") {
181  if( Quality_ != "highPurity" && Quality_ != "tight" && Quality_ != "loose") {
182  edm::LogWarning("TrackingMonitor") << "Qualty Name is invalid, using no quality criterea by default";
183  Quality_ = "";
184  }
185  }
186 
187  // use the AlgoName and Quality Name
188  std::string CategoryName = Quality_ != "" ? AlgoName_ + "_" + Quality_ : AlgoName_;
189 
190  // get binning from the configuration
191  int TKNoBin = conf_.getParameter<int>( "TkSizeBin");
192  double TKNoMin = conf_.getParameter<double>("TkSizeMin");
193  double TKNoMax = conf_.getParameter<double>("TkSizeMax");
194 
195  int TCNoBin = conf_.getParameter<int>( "TCSizeBin");
196  double TCNoMin = conf_.getParameter<double>("TCSizeMin");
197  double TCNoMax = conf_.getParameter<double>("TCSizeMax");
198 
199  int TKNoSeedBin = conf_.getParameter<int>( "TkSeedSizeBin");
200  double TKNoSeedMin = conf_.getParameter<double>("TkSeedSizeMin");
201  double TKNoSeedMax = conf_.getParameter<double>("TkSeedSizeMax");
202 
203  int MeanHitBin = conf_.getParameter<int>( "MeanHitBin");
204  double MeanHitMin = conf_.getParameter<double>("MeanHitMin");
205  double MeanHitMax = conf_.getParameter<double>("MeanHitMax");
206 
207  int MeanLayBin = conf_.getParameter<int>( "MeanLayBin");
208  double MeanLayMin = conf_.getParameter<double>("MeanLayMin");
209  double MeanLayMax = conf_.getParameter<double>("MeanLayMax");
210 
211  int LSBin = conf_.getParameter<int>( "LSBin");
212  int LSMin = conf_.getParameter<double>("LSMin");
213  int LSMax = conf_.getParameter<double>("LSMax");
214 
215  std::string StateName = conf_.getParameter<std::string>("MeasurementState");
216  if (
217  StateName != "OuterSurface" &&
218  StateName != "InnerSurface" &&
219  StateName != "ImpactPoint" &&
220  StateName != "default" &&
221  StateName != "All"
222  ) {
223  // print warning
224  edm::LogWarning("TrackingMonitor") << "State Name is invalid, using 'ImpactPoint' by default";
225  }
226 
227  ibooker.setCurrentFolder(MEFolderName);
228 
229  // book the General Property histograms
230  // ---------------------------------------------------------------------------------//
231 
233 
234  ibooker.setCurrentFolder(MEFolderName+"/GeneralProperties");
235 
236  histname = "NumberOfTracks_" + CategoryName;
237  // MODIFY by Mia in order to cope w/ high multiplicity
238  NumberOfTracks = ibooker.book1D(histname, histname, 3*TKNoBin, TKNoMin, (TKNoMax+0.5)*3.-0.5);
239  NumberOfTracks->setAxisTitle("Number of Tracks per Event", 1);
240  NumberOfTracks->setAxisTitle("Number of Events", 2);
241 
242  histname = "NumberOfMeanRecHitsPerTrack_" + CategoryName;
243  NumberOfMeanRecHitsPerTrack = ibooker.book1D(histname, histname, MeanHitBin, MeanHitMin, MeanHitMax);
244  NumberOfMeanRecHitsPerTrack->setAxisTitle("Mean number of valid RecHits per Track", 1);
246 
247  histname = "NumberOfMeanLayersPerTrack_" + CategoryName;
248  NumberOfMeanLayersPerTrack = ibooker.book1D(histname, histname, MeanLayBin, MeanLayMin, MeanLayMax);
249  NumberOfMeanLayersPerTrack->setAxisTitle("Mean number of Layers per Track", 1);
251 
252  if (doFractionPlot_) {
253  histname = "FractionOfGoodTracks_" + CategoryName;
254  FractionOfGoodTracks = ibooker.book1D(histname, histname, 101, -0.005, 1.005);
255  FractionOfGoodTracks->setAxisTitle("Fraction of Tracks (w.r.t. generalTracks)", 1);
256  FractionOfGoodTracks->setAxisTitle("Entries", 2);
257  }
258  }
259 
260  if ( doLumiAnalysis ) {
261  // add by Mia in order to deal with LS transitions
262  ibooker.setCurrentFolder(MEFolderName+"/LSanalysis");
263 
264  histname = "NumberOfTracks_lumiFlag_" + CategoryName;
265  NumberOfTracks_lumiFlag = ibooker.book1D(histname, histname, 3*TKNoBin, TKNoMin, (TKNoMax+0.5)*3.-0.5);
266  NumberOfTracks_lumiFlag->setAxisTitle("Number of Tracks per Event", 1);
267  NumberOfTracks_lumiFlag->setAxisTitle("Number of Events", 2);
268 
269  }
270 
271  // book profile plots vs LS :
272  //---------------------------
273 
274 
275  if ( doProfilesVsLS_ || doAllPlots) {
276 
277  ibooker.setCurrentFolder(MEFolderName+"/GeneralProperties");
278 
279  histname = "NumberOfTracksVsLS_"+ CategoryName;
280  NumberOfTracksVsLS = ibooker.bookProfile(histname,histname, LSBin,LSMin,LSMax, TKNoMin, (TKNoMax+0.5)*3.-0.5,"");
281  NumberOfTracksVsLS->getTH1()->SetCanExtend(TH1::kAllAxes);
282  NumberOfTracksVsLS->setAxisTitle("#Lumi section",1);
283  NumberOfTracksVsLS->setAxisTitle("Number of Tracks",2);
284 
285  histname = "NumberOfRecHitsPerTrackVsLS_" + CategoryName;
286  NumberOfRecHitsPerTrackVsLS = ibooker.bookProfile(histname,histname, LSBin,LSMin,LSMax,0.,40.,"");
287  NumberOfRecHitsPerTrackVsLS->getTH1()->SetCanExtend(TH1::kAllAxes);
288  NumberOfRecHitsPerTrackVsLS->setAxisTitle("#Lumi section",1);
289  NumberOfRecHitsPerTrackVsLS->setAxisTitle("Mean number of Valid RecHits per track",2);
290 
291  histname = "NumberEventsVsLS_" + CategoryName;
292  NumberEventsOfVsLS = ibooker.book1D(histname,histname, LSBin,LSMin,LSMax);
293  NumberEventsOfVsLS->getTH1()->SetCanExtend(TH1::kAllAxes);
294  NumberEventsOfVsLS->setAxisTitle("#Lumi section",1);
295  NumberEventsOfVsLS->setAxisTitle("Number of events",2);
296 
297  double GoodPVtxMin = conf_.getParameter<double>("GoodPVtxMin");
298  double GoodPVtxMax = conf_.getParameter<double>("GoodPVtxMax");
299 
300  histname = "NumberOfGoodPVtxVsLS_" + CategoryName;
301  NumberOfGoodPVtxVsLS = ibooker.bookProfile(histname,histname, LSBin,LSMin,LSMax,GoodPVtxMin,GoodPVtxMax,"");
302  NumberOfGoodPVtxVsLS->getTH1()->SetCanExtend(TH1::kAllAxes);
303  NumberOfGoodPVtxVsLS->setAxisTitle("#Lumi section",1);
304  NumberOfGoodPVtxVsLS->setAxisTitle("Mean number of good PV",2);
305 
306  if (doFractionPlot_) {
307  histname = "GoodTracksFractionVsLS_"+ CategoryName;
308  GoodTracksFractionVsLS = ibooker.bookProfile(histname,histname, LSBin,LSMin,LSMax,0,1.1,"");
309  GoodTracksFractionVsLS->getTH1()->SetCanExtend(TH1::kAllAxes);
310  GoodTracksFractionVsLS->setAxisTitle("#Lumi section",1);
311  GoodTracksFractionVsLS->setAxisTitle("Fraction of Good Tracks",2);
312  }
313 
314  if ( doPlotsVsBX_ || doAllPlots ) {
315  ibooker.setCurrentFolder(MEFolderName+"/BXanalysis");
316  int BXBin = 3564; double BXMin = 0.5; double BXMax = 3564.5;
317 
318  histname = "NumberEventsVsBX_" + CategoryName;
319  NumberEventsOfVsBX = ibooker.book1D(histname,histname, BXBin,BXMin,BXMax);
320  NumberEventsOfVsBX->getTH1()->SetCanExtend(TH1::kAllAxes);
322  NumberEventsOfVsBX->setAxisTitle("Number of events",2);
323 
324  histname = "NumberOfTracksVsBX_"+ CategoryName;
325  NumberOfTracksVsBX = ibooker.bookProfile(histname,histname, BXBin,BXMin,BXMax, TKNoMin, (TKNoMax+0.5)*3.-0.5,"");
326  NumberOfTracksVsBX->getTH1()->SetCanExtend(TH1::kAllAxes);
328  NumberOfTracksVsBX->setAxisTitle("Number of Tracks",2);
329 
330  histname = "NumberOfRecHitsPerTrackVsBX_" + CategoryName;
331  NumberOfRecHitsPerTrackVsBX = ibooker.bookProfile(histname,histname, BXBin,BXMin,BXMax,0.,40.,"");
332  NumberOfRecHitsPerTrackVsBX->getTH1()->SetCanExtend(TH1::kAllAxes);
334  NumberOfRecHitsPerTrackVsBX->setAxisTitle("Mean number of Valid RecHits per track",2);
335 
336  histname = "NumberOfGoodPVtxVsBX_" + CategoryName;
337  NumberOfGoodPVtxVsBX = ibooker.bookProfile(histname,histname, BXBin,BXMin,BXMax,GoodPVtxMin,GoodPVtxMax,"");
338  NumberOfGoodPVtxVsBX->getTH1()->SetCanExtend(TH1::kAllAxes);
340  NumberOfGoodPVtxVsBX->setAxisTitle("Mean number of good PV",2);
341 
342  if (doFractionPlot_) {
343  histname = "GoodTracksFractionVsBX_"+ CategoryName;
344  GoodTracksFractionVsBX = ibooker.bookProfile(histname,histname, BXBin,BXMin,BXMax,0,1.1,"");
345  GoodTracksFractionVsBX->getTH1()->SetCanExtend(TH1::kAllAxes);
347  GoodTracksFractionVsBX->setAxisTitle("Fraction of Good Tracks",2);
348  }
349  }
350 
351  }
352 
353  // book PU monitoring plots :
354  //---------------------------
355 
356  if ( doPUmonitoring_ ) {
357 
358  for (size_t i=0; i<theVertexMonitor.size(); i++)
359  theVertexMonitor[i]->initHisto(ibooker);
360  }
361 
362  if ( doPlotsVsGoodPVtx_ ) {
363  ibooker.setCurrentFolder(MEFolderName+"/PUmonitoring");
364  // get binning from the configuration
365  int GoodPVtxBin = conf_.getParameter<int>("GoodPVtxBin");
366  double GoodPVtxMin = conf_.getParameter<double>("GoodPVtxMin");
367  double GoodPVtxMax = conf_.getParameter<double>("GoodPVtxMax");
368 
369  histname = "NumberOfTracksVsGoodPVtx";
370  NumberOfTracksVsGoodPVtx = ibooker.bookProfile(histname,histname,GoodPVtxBin,GoodPVtxMin,GoodPVtxMax,TKNoMin, (TKNoMax+0.5)*3.-0.5,"");
371  NumberOfTracksVsGoodPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
372  NumberOfTracksVsGoodPVtx->setAxisTitle("Number of PV",1);
373  NumberOfTracksVsGoodPVtx->setAxisTitle("Mean number of Tracks per Event",2);
374 
375  histname = "NumberOfTracksVsPUPVtx";
376  NumberOfTracksVsPUPVtx = ibooker.bookProfile(histname,histname,GoodPVtxBin,GoodPVtxMin,GoodPVtxMax,0., 100.,"");
377  NumberOfTracksVsPUPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
378  NumberOfTracksVsPUPVtx->setAxisTitle("Number of PU",1);
379  NumberOfTracksVsPUPVtx->setAxisTitle("Mean number of Tracks per PUvtx",2);
380 
381  histname = "NumberEventsVsGoodPVtx";
382  NumberEventsOfVsGoodPVtx = ibooker.book1D(histname,histname,GoodPVtxBin,GoodPVtxMin,GoodPVtxMax);
383  NumberEventsOfVsGoodPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
384  NumberEventsOfVsGoodPVtx->setAxisTitle("Number of good PV (PU)",1);
385  NumberEventsOfVsGoodPVtx->setAxisTitle("Number of events",2);
386 
387  if (doFractionPlot_) {
388  histname = "GoodTracksFractionVsGoodPVtx";
389  GoodTracksFractionVsGoodPVtx = ibooker.bookProfile(histname,histname,GoodPVtxBin,GoodPVtxMin,GoodPVtxMax,0., 400.,"");
390  GoodTracksFractionVsGoodPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
391  GoodTracksFractionVsGoodPVtx->setAxisTitle("Number of good PV (PU)",1);
392  GoodTracksFractionVsGoodPVtx->setAxisTitle("Mean fraction of good tracks",2);
393  }
394 
395  histname = "NumberOfRecHitsPerTrackVsGoodPVtx";
396  NumberOfRecHitsPerTrackVsGoodPVtx = ibooker.bookProfile(histname,histname,GoodPVtxBin,GoodPVtxMin,GoodPVtxMax,0., 100.,"");
397  NumberOfRecHitsPerTrackVsGoodPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
398  NumberOfRecHitsPerTrackVsGoodPVtx->setAxisTitle("Number of good PV (PU)",1);
399  NumberOfRecHitsPerTrackVsGoodPVtx->setAxisTitle("Mean number of valid rechits per Tracks",2);
400 
401  histname = "NumberOfPVtxVsGoodPVtx";
402  NumberOfPVtxVsGoodPVtx = ibooker.bookProfile(histname,histname,GoodPVtxBin,GoodPVtxMin,GoodPVtxMax,0., 100.,"");
403  NumberOfPVtxVsGoodPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
404  NumberOfPVtxVsGoodPVtx->setAxisTitle("Number of good PV (PU)",1);
405  NumberOfPVtxVsGoodPVtx->setAxisTitle("Mean number of vertices",2);
406  }
407 
408 
409  if ( doPlotsVsLUMI_ || doAllPlots ) {
410  ibooker.setCurrentFolder(MEFolderName+"/LUMIanalysis");
411  int LUMIBin = conf_.getParameter<int>("LUMIBin");
412  float LUMIMin = conf_.getParameter<double>("LUMIMin");
413  float LUMIMax = conf_.getParameter<double>("LUMIMax");
414 
415  histname = "NumberEventsVsLUMI";
416  NumberEventsOfVsLUMI = ibooker.book1D(histname,histname,LUMIBin,LUMIMin,LUMIMax);
417  NumberEventsOfVsLUMI->getTH1()->SetCanExtend(TH1::kAllAxes);
418  NumberEventsOfVsLUMI->setAxisTitle("scal lumi [10e30 Hz cm^{-2}]",1);
419  NumberEventsOfVsLUMI->setAxisTitle("Number of events",2);
420 
421  histname = "NumberOfTracksVsLUMI";
422  NumberOfTracksVsLUMI = ibooker.bookProfile(histname,histname,LUMIBin,LUMIMin,LUMIMax,0., 400.,"");
423  NumberOfTracksVsLUMI->getTH1()->SetCanExtend(TH1::kAllAxes);
424  NumberOfTracksVsLUMI->setAxisTitle("scal lumi [10e30 Hz cm^{-2}]",1);
425  NumberOfTracksVsLUMI->setAxisTitle("Mean number of vertices",2);
426 
427  if (doFractionPlot_) {
428  histname = "GoodTracksFractionVsLUMI";
429  GoodTracksFractionVsLUMI = ibooker.bookProfile(histname,histname,LUMIBin,LUMIMin,LUMIMax,0., 100.,"");
430  GoodTracksFractionVsLUMI->getTH1()->SetCanExtend(TH1::kAllAxes);
431  GoodTracksFractionVsLUMI->setAxisTitle("scal lumi [10e30 Hz cm^{-2}]",1);
432  GoodTracksFractionVsLUMI->setAxisTitle("Mean number of vertices",2);
433  }
434 
435  histname = "NumberOfRecHitsPerTrackVsLUMI";
436  NumberOfRecHitsPerTrackVsLUMI = ibooker.bookProfile(histname,histname,LUMIBin,LUMIMin,LUMIMax,0., 20.,"");
437  NumberOfRecHitsPerTrackVsLUMI->getTH1()->SetCanExtend(TH1::kAllAxes);
438  NumberOfRecHitsPerTrackVsLUMI->setAxisTitle("scal lumi [10e30 Hz cm^{-2}]",1);
439  NumberOfRecHitsPerTrackVsLUMI->setAxisTitle("Mean number of vertices",2);
440 
441  double GoodPVtxMin = conf_.getParameter<double>("GoodPVtxMin");
442  double GoodPVtxMax = conf_.getParameter<double>("GoodPVtxMax");
443 
444  histname = "NumberOfGoodPVtxVsLUMI";
445  NumberOfGoodPVtxVsLUMI = ibooker.bookProfile(histname,histname,LUMIBin,LUMIMin,LUMIMax,GoodPVtxMin,GoodPVtxMax,"");
446  NumberOfGoodPVtxVsLUMI->getTH1()->SetCanExtend(TH1::kAllAxes);
447  NumberOfGoodPVtxVsLUMI->setAxisTitle("scal lumi [10e30 Hz cm^{-2}]",1);
448  NumberOfGoodPVtxVsLUMI->setAxisTitle("Mean number of vertices",2);
449  }
450 
451 
452  if ( doPlotsVsBXlumi_ ) {
453  ibooker.setCurrentFolder(MEFolderName+"/PUmonitoring");
454  // get binning from the configuration
455  edm::ParameterSet BXlumiParameters = conf_.getParameter<edm::ParameterSet>("BXlumiSetup");
456  int BXlumiBin = BXlumiParameters.getParameter<int>("BXlumiBin");
457  double BXlumiMin = BXlumiParameters.getParameter<double>("BXlumiMin");
458  double BXlumiMax = BXlumiParameters.getParameter<double>("BXlumiMax");
459 
460  histname = "NumberOfTracksVsBXlumi_"+ CategoryName;
461  NumberOfTracksVsBXlumi = ibooker.bookProfile(histname,histname, BXlumiBin,BXlumiMin,BXlumiMax, TKNoMin, TKNoMax,"");
462  NumberOfTracksVsBXlumi->getTH1()->SetCanExtend(TH1::kAllAxes);
463  NumberOfTracksVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]",1);
464  NumberOfTracksVsBXlumi->setAxisTitle("Mean number of Tracks",2);
465 
466  }
467 
468 
469  theTrackAnalyzer->initHisto(ibooker, iSetup);
470 
471  // book the Seed Property histograms
472  // ---------------------------------------------------------------------------------//
473 
474  ibooker.setCurrentFolder(MEFolderName+"/TrackBuilding");
475 
476  doAllSeedPlots = conf_.getParameter<bool>("doSeedParameterHistos");
477  doSeedNumberPlot = conf_.getParameter<bool>("doSeedNumberHisto");
478  doSeedLumiAnalysis_ = conf_.getParameter<bool>("doSeedLumiAnalysis");
479  doSeedVsClusterPlot = conf_.getParameter<bool>("doSeedVsClusterHisto");
480  // if (doAllPlots) doAllSeedPlots=true;
481 
482  runTrackBuildingAnalyzerForSeed=(doAllSeedPlots || conf_.getParameter<bool>("doSeedPTHisto") ||conf_.getParameter<bool>("doSeedETAHisto") || conf_.getParameter<bool>("doSeedPHIHisto") || conf_.getParameter<bool>("doSeedPHIVsETAHisto") || conf_.getParameter<bool>("doSeedThetaHisto") || conf_.getParameter<bool>("doSeedQHisto") || conf_.getParameter<bool>("doSeedDxyHisto") || conf_.getParameter<bool>("doSeedDzHisto") || conf_.getParameter<bool>("doSeedNRecHitsHisto") || conf_.getParameter<bool>("doSeedNVsPhiProf")|| conf_.getParameter<bool>("doSeedNVsEtaProf"));
483 
484  edm::InputTag seedProducer = conf_.getParameter<edm::InputTag>("SeedProducer");
485 
486  if (doAllSeedPlots || doSeedNumberPlot){
487  ibooker.setCurrentFolder(MEFolderName+"/TrackBuilding");
488  histname = "NumberOfSeeds_"+ seedProducer.label() + "_"+ CategoryName;
489  NumberOfSeeds = ibooker.book1D(histname, histname, TKNoSeedBin, TKNoSeedMin, TKNoSeedMax);
490  NumberOfSeeds->setAxisTitle("Number of Seeds per Event", 1);
491  NumberOfSeeds->setAxisTitle("Number of Events", 2);
492 
493  if ( doSeedLumiAnalysis_ ) {
494  ibooker.setCurrentFolder(MEFolderName+"/LSanalysis");
495  histname = "NumberOfSeeds_lumiFlag_"+ seedProducer.label() + "_"+ CategoryName;
496  NumberOfSeeds_lumiFlag = ibooker.book1D(histname, histname, TKNoSeedBin, TKNoSeedMin, TKNoSeedMax);
497  NumberOfSeeds_lumiFlag->setAxisTitle("Number of Seeds per Event", 1);
498  NumberOfSeeds_lumiFlag->setAxisTitle("Number of Events", 2);
499  }
500 
501  }
502 
503  if (doAllSeedPlots || doSeedVsClusterPlot){
504  ibooker.setCurrentFolder(MEFolderName+"/TrackBuilding");
505 
506  ClusterLabels= conf_.getParameter<std::vector<std::string> >("ClusterLabels");
507 
508  std::vector<double> histoMin,histoMax;
509  std::vector<int> histoBin; //these vectors are for max min and nbins in histograms
510 
511  int NClusPxBin = conf_.getParameter<int>( "NClusPxBin");
512  double NClusPxMin = conf_.getParameter<double>("NClusPxMin");
513  double NClusPxMax = conf_.getParameter<double>("NClusPxMax");
514 
515  int NClusStrBin = conf_.getParameter<int>( "NClusStrBin");
516  double NClusStrMin = conf_.getParameter<double>("NClusStrMin");
517  double NClusStrMax = conf_.getParameter<double>("NClusStrMax");
518 
519  setMaxMinBin(histoMin,histoMax,histoBin,NClusStrMin,NClusStrMax,NClusStrBin,NClusPxMin,NClusPxMax,NClusPxBin);
520 
521  for (uint i=0; i<ClusterLabels.size(); i++){
522  histname = "SeedsVsClusters_" + seedProducer.label() + "_Vs_" + ClusterLabels[i] + "_" + CategoryName;
523  SeedsVsClusters.push_back(dynamic_cast<MonitorElement*>(ibooker.book2D(histname, histname, histoBin[i], histoMin[i], histoMax[i],
524  TKNoSeedBin, TKNoSeedMin, TKNoSeedMax)));
525  SeedsVsClusters[i]->setAxisTitle("Number of Clusters", 1);
526  SeedsVsClusters[i]->setAxisTitle("Number of Seeds", 2);
527  }
528  }
529 
530  doTkCandPlots=conf_.getParameter<bool>("doTrackCandHistos");
531  // if (doAllPlots) doTkCandPlots=true;
532 
533  if (doTkCandPlots){
534  ibooker.setCurrentFolder(MEFolderName+"/TrackBuilding");
535 
536  edm::InputTag tcProducer = conf_.getParameter<edm::InputTag>("TCProducer");
537 
538  histname = "NumberOfTrackCandidates_"+ tcProducer.label() + "_"+ CategoryName;
539  NumberOfTrackCandidates = ibooker.book1D(histname, histname, TCNoBin, TCNoMin, TCNoMax);
540  NumberOfTrackCandidates->setAxisTitle("Number of Track Candidates per Event", 1);
541  NumberOfTrackCandidates->setAxisTitle("Number of Event", 2);
542  }
543 
545 
546 
547  if (doLumiAnalysis) {
548  if ( NumberOfTracks_lumiFlag ) NumberOfTracks_lumiFlag -> setLumiFlag();
550  }
551 
552  if(doAllSeedPlots || doSeedNumberPlot){
553  if ( doSeedLumiAnalysis_ )
555  }
556 
558 
559  ClusterLabels= conf_.getParameter<std::vector<std::string> >("ClusterLabels");
560 
561  std::vector<double> histoMin,histoMax;
562  std::vector<int> histoBin; //these vectors are for max min and nbins in histograms
563 
564  int NClusStrBin = conf_.getParameter<int>( "NClusStrBin");
565  double NClusStrMin = conf_.getParameter<double>("NClusStrMin");
566  double NClusStrMax = conf_.getParameter<double>("NClusStrMax");
567 
568  int NClusPxBin = conf_.getParameter<int>( "NClusPxBin");
569  double NClusPxMin = conf_.getParameter<double>("NClusPxMin");
570  double NClusPxMax = conf_.getParameter<double>("NClusPxMax");
571 
572  int NTrk2DBin = conf_.getParameter<int>( "NTrk2DBin");
573  double NTrk2DMin = conf_.getParameter<double>("NTrk2DMin");
574  double NTrk2DMax = conf_.getParameter<double>("NTrk2DMax");
575 
576  setMaxMinBin(histoMin,histoMax,histoBin,
577  NClusStrMin,NClusStrMax,NClusStrBin,
578  NClusPxMin, NClusPxMax, NClusPxBin);
579 
580  ibooker.setCurrentFolder(MEFolderName+"/HitProperties");
581 
582  for (uint i=0; i<ClusterLabels.size(); i++){
583 
584  ibooker.setCurrentFolder(MEFolderName+"/HitProperties");
585  histname = "TracksVs" + ClusterLabels[i] + "Cluster_" + CategoryName;
586  NumberOfTrkVsClusters.push_back(dynamic_cast<MonitorElement*>(ibooker.book2D(histname, histname,
587  histoBin[i], histoMin[i], histoMax[i],
588  NTrk2DBin,NTrk2DMin,NTrk2DMax
589  )));
590  std::string title = "Number of " + ClusterLabels[i] + " Clusters";
591  if(ClusterLabels[i].compare("Tot")==0)
592  title = "# of Clusters in (Pixel+Strip) Detectors";
593  NumberOfTrkVsClusters[i]->setAxisTitle(title, 1);
594  NumberOfTrkVsClusters[i]->setAxisTitle("Number of Tracks", 2);
595  }
596  }
597 
598  // Initialize the GenericTriggerEventFlag
599  if ( genTriggerEventFlag_->on() ) genTriggerEventFlag_->initRun( iRun, iSetup );
600 
601 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
std::vector< MonitorElement * > NumberOfTrkVsClusters
MonitorElement * FractionOfGoodTracks
virtual void setMaxMinBin(std::vector< double > &, std::vector< double > &, std::vector< int > &, double, double, int, double, double, int)
MonitorElement * NumberOfTracksVsBX
TrackAnalyzer * theTrackAnalyzer
MonitorElement * NumberOfRecHitsPerTrackVsBX
MonitorElement * NumberOfRecHitsPerTrackVsLUMI
edm::ParameterSet conf_
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
MonitorElement * NumberEventsOfVsGoodPVtx
MonitorElement * GoodTracksFractionVsLUMI
MonitorElement * NumberOfPVtxVsGoodPVtx
MonitorElement * NumberOfMeanRecHitsPerTrack
MonitorElement * NumberOfTracksVsGoodPVtx
MonitorElement * GoodTracksFractionVsLS
std::string Quality_
MonitorElement * NumberOfSeeds
MonitorElement * NumberOfGoodPVtxVsLS
MonitorElement * NumberOfGoodPVtxVsLUMI
virtual void initHisto(DQMStore::IBooker &ibooker)
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * NumberOfTracksVsLS
TH1 * getTH1(void) const
MonitorElement * NumberOfTracksVsPUPVtx
MonitorElement * NumberEventsOfVsBX
bool runTrackBuildingAnalyzerForSeed
std::vector< MonitorElement * > SeedsVsClusters
MonitorElement * NumberOfRecHitsPerTrackVsLS
MonitorElement * GoodTracksFractionVsGoodPVtx
MonitorElement * NumberOfRecHitsPerTrackVsGoodPVtx
std::string histname
std::vector< VertexMonitor * > theVertexMonitor
MonitorElement * NumberOfTracksVsBXlumi
bool doGeneralPropertiesPlots_
TrackBuildingAnalyzer * theTrackBuildingAnalyzer
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
std::string AlgoName_
MonitorElement * NumberOfMeanLayersPerTrack
GenericTriggerEventFlag * genTriggerEventFlag_
MonitorElement * GoodTracksFractionVsBX
std::string const & label() const
Definition: InputTag.h:36
MonitorElement * NumberOfSeeds_lumiFlag
MonitorElement * NumberOfTrackCandidates
virtual void initHisto(DQMStore::IBooker &ibooker, const edm::EventSetup &)
void initRun(const edm::Run &run, const edm::EventSetup &setup)
To be called from beginRun() methods.
MonitorElement * NumberOfGoodPVtxVsBX
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
MonitorElement * NumberEventsOfVsLUMI
MonitorElement * NumberOfTracks_lumiFlag
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * NumberOfTracks
MonitorElement * NumberEventsOfVsLS
MonitorElement * NumberOfTracksVsLUMI
std::vector< std::string > ClusterLabels
void TrackingMonitor::doProfileX ( TH2 *  th2,
MonitorElement me 
)
private
void TrackingMonitor::doProfileX ( MonitorElement th2m,
MonitorElement me 
)
private
void TrackingMonitor::endRun ( const edm::Run ,
const edm::EventSetup  
)
virtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 911 of file TrackingMonitor.cc.

912 {
913 }
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 
)
virtual

Definition at line 915 of file TrackingMonitor.cc.

References ClusterLabels, compare_using_db::compare, and i.

Referenced by bookHistograms().

916 {
917  arrayMin.resize(ClusterLabels.size());
918  arrayMax.resize(ClusterLabels.size());
919  arrayBin.resize(ClusterLabels.size());
920 
921  for (uint i=0; i<ClusterLabels.size(); ++i) {
922 
923  if (ClusterLabels[i].compare("Pix")==0 ) {arrayMin[i]=pmin; arrayMax[i]=pmax; arrayBin[i]=pbin;}
924  else if(ClusterLabels[i].compare("Strip")==0) {arrayMin[i]=smin; arrayMax[i]=smax; arrayBin[i]=sbin;}
925  else if(ClusterLabels[i].compare("Tot")==0 ) {arrayMin[i]=smin; arrayMax[i]=smax+pmax; arrayBin[i]=sbin;}
926  else {edm::LogWarning("TrackingMonitor") << "Cluster Label " << ClusterLabels[i] << " not defined, using strip parameters ";
927  arrayMin[i]=smin; arrayMax[i]=smax; arrayBin[i]=sbin;}
928 
929  }
930 
931 }
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > ClusterLabels
void TrackingMonitor::setNclus ( const edm::Event iEvent,
std::vector< int > &  arrayNclus 
)
virtual

Definition at line 933 of file TrackingMonitor.cc.

References ClusterLabels, compare_using_db::compare, edm::Event::getByToken(), i, edm::HandleBase::isValid(), pixelClustersToken_, and stripClustersToken_.

Referenced by analyze().

934 {
935 
936  int ncluster_pix=-1;
937  int ncluster_strip=-1;
938 
940  iEvent.getByToken(stripClustersToken_, strip_clusters );
942  iEvent.getByToken(pixelClustersToken_, pixel_clusters );
943 
944  if (strip_clusters.isValid() && pixel_clusters.isValid()) {
945  ncluster_pix = (*pixel_clusters).dataSize();
946  ncluster_strip = (*strip_clusters).dataSize();
947  }
948 
949  arrayNclus.resize(ClusterLabels.size());
950  for (uint i=0; i<ClusterLabels.size(); ++i){
951 
952  if (ClusterLabels[i].compare("Pix")==0 ) arrayNclus[i]=ncluster_pix ;
953  else if(ClusterLabels[i].compare("Strip")==0) arrayNclus[i]=ncluster_strip;
954  else if(ClusterLabels[i].compare("Tot")==0 ) arrayNclus[i]=ncluster_pix+ncluster_strip;
955  else {edm::LogWarning("TrackingMonitor") << "Cluster Label " << ClusterLabels[i] << " not defined using stri parametrs ";
956  arrayNclus[i]=ncluster_strip ;}
957  }
958 
959 }
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelClustersToken_
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > stripClustersToken_
std::vector< std::string > ClusterLabels

Member Data Documentation

std::string TrackingMonitor::AlgoName_
private

Definition at line 97 of file TrackingMonitor.h.

Referenced by bookHistograms(), and TrackingMonitor().

edm::EDGetTokenT<reco::TrackCollection> TrackingMonitor::allTrackToken_
private

Definition at line 84 of file TrackingMonitor.h.

Referenced by analyze(), and TrackingMonitor().

edm::InputTag TrackingMonitor::bsSrc_
private

Definition at line 79 of file TrackingMonitor.h.

Referenced by TrackingMonitor().

edm::EDGetTokenT<reco::BeamSpot> TrackingMonitor::bsSrcToken_
private

Definition at line 81 of file TrackingMonitor.h.

Referenced by analyze(), and TrackingMonitor().

std::string TrackingMonitor::builderName
private

Definition at line 163 of file TrackingMonitor.h.

Referenced by analyze().

std::vector<std::string> TrackingMonitor::ClusterLabels
private

Definition at line 117 of file TrackingMonitor.h.

Referenced by analyze(), bookHistograms(), setMaxMinBin(), and setNclus().

edm::ParameterSet TrackingMonitor::conf_
private

Definition at line 76 of file TrackingMonitor.h.

Referenced by bookHistograms(), and TrackingMonitor().

StringCutObjectSelector<reco::Track,true> TrackingMonitor::denSelection_
private

Definition at line 190 of file TrackingMonitor.h.

Referenced by analyze().

bool TrackingMonitor::doAllPlots
private

Definition at line 170 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

bool TrackingMonitor::doAllSeedPlots
private

Definition at line 169 of file TrackingMonitor.h.

Referenced by analyze(), beginLuminosityBlock(), and bookHistograms().

bool TrackingMonitor::doDCAPlots_
private

Definition at line 171 of file TrackingMonitor.h.

bool TrackingMonitor::doFractionPlot_
private

Definition at line 185 of file TrackingMonitor.h.

Referenced by analyze(), bookHistograms(), and TrackingMonitor().

bool TrackingMonitor::doGeneralPropertiesPlots_
private

Definition at line 172 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

bool TrackingMonitor::doHitPropertiesPlots_
private

Definition at line 173 of file TrackingMonitor.h.

bool TrackingMonitor::doLumiAnalysis
private

Definition at line 167 of file TrackingMonitor.h.

Referenced by analyze(), beginLuminosityBlock(), and bookHistograms().

bool TrackingMonitor::doPlotsVsBX_
private

Definition at line 184 of file TrackingMonitor.h.

Referenced by analyze(), bookHistograms(), and TrackingMonitor().

bool TrackingMonitor::doPlotsVsBXlumi_
private

Definition at line 181 of file TrackingMonitor.h.

Referenced by analyze(), bookHistograms(), and TrackingMonitor().

bool TrackingMonitor::doPlotsVsGoodPVtx_
private

Definition at line 182 of file TrackingMonitor.h.

Referenced by analyze(), bookHistograms(), and TrackingMonitor().

bool TrackingMonitor::doPlotsVsLUMI_
private

Definition at line 183 of file TrackingMonitor.h.

Referenced by analyze(), bookHistograms(), and TrackingMonitor().

bool TrackingMonitor::doProfilesVsLS_
private

Definition at line 168 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

bool TrackingMonitor::doPUmonitoring_
private

Definition at line 180 of file TrackingMonitor.h.

Referenced by analyze(), bookHistograms(), TrackingMonitor(), and ~TrackingMonitor().

bool TrackingMonitor::doSeedLumiAnalysis_
private

Definition at line 176 of file TrackingMonitor.h.

Referenced by analyze(), beginLuminosityBlock(), and bookHistograms().

bool TrackingMonitor::doSeedNumberPlot
private

Definition at line 175 of file TrackingMonitor.h.

Referenced by analyze(), beginLuminosityBlock(), and bookHistograms().

bool TrackingMonitor::doSeedVsClusterPlot
private

Definition at line 177 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

bool TrackingMonitor::doTkCandPlots
private

Definition at line 174 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

bool TrackingMonitor::doTrackerSpecific_
private

Definition at line 166 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::FractionOfGoodTracks
private

Definition at line 111 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

GenericTriggerEventFlag* TrackingMonitor::genTriggerEventFlag_
private

Definition at line 187 of file TrackingMonitor.h.

Referenced by analyze(), bookHistograms(), and ~TrackingMonitor().

MonitorElement* TrackingMonitor::GoodTracksFractionVsBX
private

Definition at line 139 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::GoodTracksFractionVsGoodPVtx
private

Definition at line 149 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::GoodTracksFractionVsLS
private

Definition at line 132 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::GoodTracksFractionVsLUMI
private

Definition at line 156 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

std::string TrackingMonitor::histname
private

Definition at line 72 of file TrackingMonitor.h.

Referenced by bookHistograms().

edm::EDGetTokenT<LumiScalersCollection> TrackingMonitor::lumiscalersToken_
private

Definition at line 89 of file TrackingMonitor.h.

Referenced by analyze(), and TrackingMonitor().

MonitorElement* TrackingMonitor::NumberEventsOfVsBX
private

Definition at line 137 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberEventsOfVsGoodPVtx
private

Definition at line 148 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberEventsOfVsLS
private

Definition at line 130 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberEventsOfVsLUMI
private

Definition at line 154 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfGoodPVtxVsBX
private

Definition at line 141 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfGoodPVtxVsLS
private

Definition at line 134 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfGoodPVtxVsLUMI
private

Definition at line 158 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfMeanLayersPerTrack
private

Definition at line 108 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfMeanRecHitsPerTrack
private

Definition at line 107 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfPVtxVsGoodPVtx
private

Definition at line 151 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfRecHitsPerTrackVsBX
private

Definition at line 140 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfRecHitsPerTrackVsGoodPVtx
private

Definition at line 150 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfRecHitsPerTrackVsLS
private

Definition at line 133 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfRecHitsPerTrackVsLUMI
private

Definition at line 157 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfSeeds
private

Definition at line 114 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfSeeds_lumiFlag
private

Definition at line 115 of file TrackingMonitor.h.

Referenced by analyze(), beginLuminosityBlock(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfTrackCandidates
private

Definition at line 121 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfTracks
private

Definition at line 106 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfTracks_lumiFlag
private

Definition at line 161 of file TrackingMonitor.h.

Referenced by analyze(), beginLuminosityBlock(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfTracksVsBX
private

Definition at line 138 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfTracksVsBXlumi
private

Definition at line 143 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfTracksVsGoodPVtx
private

Definition at line 146 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfTracksVsLS
private

Definition at line 131 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfTracksVsLUMI
private

Definition at line 155 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfTracksVsPUPVtx
private

Definition at line 147 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfTrkVsClus
private

Definition at line 125 of file TrackingMonitor.h.

std::vector<MonitorElement*> TrackingMonitor::NumberOfTrkVsClusters
private

Definition at line 124 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfTrkVsPixelClus
private

Definition at line 127 of file TrackingMonitor.h.

MonitorElement* TrackingMonitor::NumberOfTrkVsStripClus
private

Definition at line 126 of file TrackingMonitor.h.

StringCutObjectSelector<reco::Track,true> TrackingMonitor::numSelection_
private

Definition at line 189 of file TrackingMonitor.h.

Referenced by analyze().

edm::InputTag TrackingMonitor::pixelClusterInputTag_
private

Definition at line 92 of file TrackingMonitor.h.

Referenced by TrackingMonitor().

edm::EDGetTokenT<edmNew::DetSetVector<SiPixelCluster> > TrackingMonitor::pixelClustersToken_
private

Definition at line 94 of file TrackingMonitor.h.

Referenced by setNclus(), and TrackingMonitor().

int TrackingMonitor::pvNDOF_
private

Definition at line 191 of file TrackingMonitor.h.

Referenced by analyze().

edm::InputTag TrackingMonitor::pvSrc_
private

Definition at line 80 of file TrackingMonitor.h.

Referenced by TrackingMonitor().

edm::EDGetTokenT<reco::VertexCollection> TrackingMonitor::pvSrcToken_
private

Definition at line 82 of file TrackingMonitor.h.

Referenced by analyze(), and TrackingMonitor().

std::string TrackingMonitor::Quality_
private

Definition at line 96 of file TrackingMonitor.h.

Referenced by bookHistograms(), and TrackingMonitor().

bool TrackingMonitor::runTrackBuildingAnalyzerForSeed
private

Definition at line 178 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

std::vector<MonitorElement *> TrackingMonitor::SeedsVsClusters
private

Definition at line 116 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<edm::View<TrajectorySeed> > TrackingMonitor::seedToken_
private

Definition at line 87 of file TrackingMonitor.h.

Referenced by analyze(), and TrackingMonitor().

edm::InputTag TrackingMonitor::stripClusterInputTag_
private

Definition at line 91 of file TrackingMonitor.h.

Referenced by TrackingMonitor().

edm::EDGetTokenT<edmNew::DetSetVector<SiStripCluster> > TrackingMonitor::stripClustersToken_
private

Definition at line 93 of file TrackingMonitor.h.

Referenced by setNclus(), and TrackingMonitor().

GetLumi* TrackingMonitor::theLumiDetails_
private

Definition at line 103 of file TrackingMonitor.h.

Referenced by analyze(), and TrackingMonitor().

TrackAnalyzer* TrackingMonitor::theTrackAnalyzer
private
TrackBuildingAnalyzer* TrackingMonitor::theTrackBuildingAnalyzer
private

Definition at line 101 of file TrackingMonitor.h.

Referenced by analyze(), bookHistograms(), and ~TrackingMonitor().

edm::ESHandle<TransientTrackingRecHitBuilder> TrackingMonitor::theTTRHBuilder
private

Definition at line 164 of file TrackingMonitor.h.

Referenced by analyze().

std::vector<VertexMonitor*> TrackingMonitor::theVertexMonitor
private

Definition at line 102 of file TrackingMonitor.h.

Referenced by analyze(), bookHistograms(), TrackingMonitor(), and ~TrackingMonitor().

edm::EDGetTokenT<TrackCandidateCollection> TrackingMonitor::trackCandidateToken_
private

Definition at line 86 of file TrackingMonitor.h.

Referenced by analyze(), and TrackingMonitor().

edm::EDGetTokenT<reco::TrackCollection> TrackingMonitor::trackToken_
private

Definition at line 85 of file TrackingMonitor.h.

Referenced by analyze(), and TrackingMonitor().