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
 
MonitorElementNumberOfGoodPVtxWO0VsBX
 
MonitorElementNumberOfGoodPVtxWO0VsLS
 
MonitorElementNumberOfGoodPVtxWO0VsLUMI
 
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
81  // , NumberOfGoodTracks_lumiFlag(NULL)
82 
83  , builderName ( conf_.getParameter<std::string>("TTRHBuilder"))
84  , doTrackerSpecific_ ( conf_.getParameter<bool>("doTrackerSpecific") )
85  , doLumiAnalysis ( conf_.getParameter<bool>("doLumiAnalysis"))
86  , doProfilesVsLS_ ( conf_.getParameter<bool>("doProfilesVsLS"))
87  , doAllPlots ( conf_.getParameter<bool>("doAllPlots"))
88  , doGeneralPropertiesPlots_( conf_.getParameter<bool>("doGeneralPropertiesPlots"))
89  , doHitPropertiesPlots_ ( conf_.getParameter<bool>("doHitPropertiesPlots"))
90  , doPUmonitoring_ ( conf_.getParameter<bool>("doPUmonitoring") )
91  , genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter<edm::ParameterSet>("genericTriggerEventPSet"),consumesCollector(), *this))
94  , pvNDOF_ ( conf_.getParameter<int> ("pvNDOF") )
95 {
96 
99 
100  // input tags for collections from the configuration
101  bsSrc_ = conf_.getParameter<edm::InputTag>("beamSpot");
102  pvSrc_ = conf_.getParameter<edm::InputTag>("primaryVertex");
103  bsSrcToken_ = consumes<reco::BeamSpot>(bsSrc_);
104  pvSrcToken_ = mayConsume<reco::VertexCollection>(pvSrc_);
105 
106  lumiscalersToken_ = consumes<LumiScalersCollection>(conf_.getParameter<edm::InputTag>("scal") );
107 
108  edm::InputTag alltrackProducer = conf_.getParameter<edm::InputTag>("allTrackProducer");
110  edm::InputTag tcProducer = conf_.getParameter<edm::InputTag>("TCProducer");
111  edm::InputTag seedProducer = conf_.getParameter<edm::InputTag>("SeedProducer");
112  allTrackToken_ = consumes<reco::TrackCollection>(alltrackProducer);
113  trackToken_ = consumes<reco::TrackCollection>(trackProducer);
114  trackCandidateToken_ = consumes<TrackCandidateCollection>(tcProducer);
115  seedToken_ = consumes<edm::View<TrajectorySeed> >(seedProducer);
116 
119  stripClustersToken_ = mayConsume<edmNew::DetSetVector<SiStripCluster> > (stripClusterInputTag_);
120  pixelClustersToken_ = mayConsume<edmNew::DetSetVector<SiPixelCluster> > (pixelClusterInputTag_);
121 
122  doFractionPlot_ = true;
123  if (alltrackProducer.label()==trackProducer.label()) doFractionPlot_ = false;
124 
125  Quality_ = conf_.getParameter<std::string>("Quality");
126  AlgoName_ = conf_.getParameter<std::string>("AlgoName");
127 
128  // get flag from the configuration
129  doPlotsVsBXlumi_ = conf_.getParameter<bool>("doPlotsVsBXlumi");
130  if ( doPlotsVsBXlumi_ )
131  theLumiDetails_ = new GetLumi( iConfig.getParameter<edm::ParameterSet>("BXlumiSetup"), c );
132  doPlotsVsGoodPVtx_ = conf_.getParameter<bool>("doPlotsVsGoodPVtx");
133  doPlotsVsLUMI_ = conf_.getParameter<bool>("doPlotsVsLUMI");
134  doPlotsVsBX_ = conf_.getParameter<bool>("doPlotsVsBX");
135 
136  if ( doPUmonitoring_ ) {
137 
138  std::vector<edm::InputTag> primaryVertexInputTags = conf_.getParameter<std::vector<edm::InputTag> >("primaryVertexInputTags");
139  std::vector<edm::InputTag> selPrimaryVertexInputTags = conf_.getParameter<std::vector<edm::InputTag> >("selPrimaryVertexInputTags");
140  std::vector<std::string> pvLabels = conf_.getParameter<std::vector<std::string> > ("pvLabels");
141 
142  if (primaryVertexInputTags.size()==pvLabels.size() and primaryVertexInputTags.size()==selPrimaryVertexInputTags.size()) {
143  for (size_t i=0; i<primaryVertexInputTags.size(); i++) {
144  edm::InputTag iPVinputTag = primaryVertexInputTags[i];
145  edm::InputTag iSelPVinputTag = selPrimaryVertexInputTags[i];
146  std::string iPVlabel = pvLabels[i];
147 
148  theVertexMonitor.push_back(new VertexMonitor(conf_,iPVinputTag,iSelPVinputTag,iPVlabel,c) );
149  }
150  }
151  }
152 
153 }
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_
MonitorElement * NumberOfGoodPVtxWO0VsLUMI
edm::InputTag bsSrc_
MonitorElement * NumberOfSeeds
MonitorElement * NumberOfGoodPVtxVsLS
MonitorElement * NumberOfGoodPVtxVsLUMI
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
MonitorElement * NumberOfTracksVsLS
MonitorElement * NumberOfGoodPVtxWO0VsLS
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
MonitorElement * NumberOfGoodPVtxWO0VsBX
std::string builderName
TrackingMonitor::~TrackingMonitor ( )

Definition at line 156 of file TrackingMonitor.cc.

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

157 {
160  if ( doPUmonitoring_ )
161  for (size_t i=0; i<theVertexMonitor.size(); i++)
162  if (theVertexMonitor[i]) delete theVertexMonitor[i];
164 }
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 651 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, NumberOfGoodPVtxWO0VsBX, NumberOfGoodPVtxWO0VsLS, NumberOfGoodPVtxWO0VsLUMI, 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().

652 {
653 
654  // Filter out events if Trigger Filtering is requested
655  if (genTriggerEventFlag_->on()&& ! genTriggerEventFlag_->accept( iEvent, iSetup) ) return;
656 
657  float lumi = -1.;
659  iEvent.getByToken(lumiscalersToken_, lumiScalers);
660  if ( lumiScalers.isValid() && lumiScalers->size() ) {
661  LumiScalersCollection::const_iterator scalit = lumiScalers->begin();
662  lumi = scalit->instantLumi();
663  } else
664  lumi = -1.;
665 
666  if (doPlotsVsLUMI_ || doAllPlots)
667  NumberEventsOfVsLUMI->Fill(lumi);
668 
669  // Analyse the tracks
670  // if the collection is empty, do not fill anything
671  // ---------------------------------------------------------------------------------//
672 
673  size_t bx = iEvent.bunchCrossing();
674  if ( doPlotsVsBX_ || doAllPlots )
676 
677  // get the track collection
679  iEvent.getByToken(trackToken_, trackHandle);
680 
681  int numberOfTracks_den = 0;
682  edm::Handle<reco::TrackCollection> allTrackHandle;
683  iEvent.getByToken(allTrackToken_,allTrackHandle);
684  if (allTrackHandle.isValid()) {
685  for (reco::TrackCollection::const_iterator track = allTrackHandle->begin();
686  track!=allTrackHandle->end(); ++track) {
687  if ( denSelection_(*track) )
688  numberOfTracks_den++;
689  }
690  }
691 
693  iEvent.getByToken(pvSrcToken_, pvHandle );
694  reco::Vertex const * pv0 = nullptr;
695  if (pvHandle.isValid()) {
696  pv0 = &pvHandle->front();
697  //--- pv fake (the pv collection should have size==1 and the pv==beam spot)
698  if ( pv0->isFake() || pv0->tracksSize()==0
699  // definition of goodOfflinePrimaryVertex
700  || pv0->ndof() < pvNDOF_ || pv0->z() > 24.) pv0 = nullptr;
701  }
702 
703 
704  if (trackHandle.isValid()) {
705 
706  int numberOfTracks = trackHandle->size();
707  int numberOfTracks_num = 0;
708  int numberOfTracks_pv0 = 0;
709 
710  reco::TrackCollection trackCollection = *trackHandle;
711  // calculate the mean # rechits and layers
712  int totalRecHits = 0, totalLayers = 0;
713 
715  theTrackAnalyzer->setBX(iEvent);
716  theTrackAnalyzer->setLumi(iEvent,iSetup);
717  for (reco::TrackCollection::const_iterator track = trackCollection.begin();
718  track!=trackCollection.end(); ++track) {
719 
720  if ( doPlotsVsBX_ || doAllPlots )
721  NumberOfRecHitsPerTrackVsBX->Fill(bx,track->numberOfValidHits());
722  if ( numSelection_(*track) ) {
723  numberOfTracks_num++;
724  if (pv0 && std::abs(track->dz(pv0->position()))<0.15) ++numberOfTracks_pv0;
725  }
726 
727  if ( doProfilesVsLS_ || doAllPlots)
728  NumberOfRecHitsPerTrackVsLS->Fill(static_cast<double>(iEvent.id().luminosityBlock()),track->numberOfValidHits());
729 
730  if (doPlotsVsLUMI_ || doAllPlots)
731  NumberOfRecHitsPerTrackVsLUMI->Fill(lumi,track->numberOfValidHits());
732 
733  totalRecHits += track->numberOfValidHits();
734  totalLayers += track->hitPattern().trackerLayersWithMeasurement();
735 
736  // do analysis per track
737  theTrackAnalyzer->analyze(iEvent, iSetup, *track);
738  }
739 
740  double frac = -1.;
741  // if (numberOfAllTracks > 0) frac = static_cast<double>(numberOfTracks)/static_cast<double>(numberOfAllTracks);
742  if (numberOfTracks_den > 0) frac = static_cast<double>(numberOfTracks_num)/static_cast<double>(numberOfTracks_den);
743 
745  NumberOfTracks -> Fill(numberOfTracks);
746  if ( doPlotsVsBX_ || doAllPlots )
747  NumberOfTracksVsBX -> Fill(bx,numberOfTracks);
748  if (doPlotsVsLUMI_ || doAllPlots)
749  NumberOfTracksVsLUMI -> Fill(lumi,numberOfTracks);
750  if (doFractionPlot_) {
751  FractionOfGoodTracks -> Fill(frac);
752 
753  if (doFractionPlot_) {
754  if ( doPlotsVsBX_ || doAllPlots )
755  GoodTracksFractionVsBX -> Fill(bx, frac);
756  if (doPlotsVsLUMI_ || doAllPlots)
757  GoodTracksFractionVsLUMI -> Fill(lumi,frac);
758  }
759  }
760  if( numberOfTracks > 0 ) {
761  double meanRecHits = static_cast<double>(totalRecHits) / static_cast<double>(numberOfTracks);
762  double meanLayers = static_cast<double>(totalLayers) / static_cast<double>(numberOfTracks);
763  NumberOfMeanRecHitsPerTrack -> Fill(meanRecHits);
764  NumberOfMeanLayersPerTrack -> Fill(meanLayers);
765  }
766  }
767 
768  if ( doProfilesVsLS_ || doAllPlots) {
769  float nLS = static_cast<double>(iEvent.id().luminosityBlock());
770  NumberEventsOfVsLS ->Fill(nLS);
771  NumberOfTracksVsLS ->Fill(nLS,numberOfTracks);
772  if (doFractionPlot_)
773  GoodTracksFractionVsLS->Fill(nLS,frac);
774  }
775 
776  if ( doLumiAnalysis ) {
777  NumberOfTracks_lumiFlag -> Fill(numberOfTracks);
778  }
779 
780 
781  // Analyse the Track Building variables
782  // if the collection is empty, do not fill anything
783  // ---------------------------------------------------------------------------------//
784 
785 
786  // fill the TrackCandidate info
787  if (doTkCandPlots) {
788  // magnetic field
790  iSetup.get<IdealMagneticFieldRecord>().get(theMF);
791 
792  // get the candidate collection
794  iEvent.getByToken( trackCandidateToken_, theTCHandle );
795  const TrackCandidateCollection& theTCCollection = *theTCHandle;
796 
797  if (theTCHandle.isValid()) {
798 
799  // get the beam spot
800  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
801  iEvent.getByToken(bsSrcToken_, recoBeamSpotHandle );
802  const reco::BeamSpot& bs = *recoBeamSpotHandle;
803 
804  NumberOfTrackCandidates->Fill(theTCCollection.size());
806  for( TrackCandidateCollection::const_iterator cand = theTCCollection.begin(); cand != theTCCollection.end(); ++cand) {
807 
808  theTrackBuildingAnalyzer->analyze(iEvent, iSetup, *cand, bs, theMF, theTTRHBuilder);
809  }
810  } else {
811  edm::LogWarning("TrackingMonitor") << "No Track Candidates in the event. Not filling associated histograms";
812  }
813  }
814 
815  //plots for trajectory seeds
816 
818 
819  // get the seed collection
821  iEvent.getByToken(seedToken_, seedHandle );
822  const edm::View<TrajectorySeed>& seedCollection = *seedHandle;
823 
824  // fill the seed info
825  if (seedHandle.isValid()) {
826 
828  NumberOfSeeds->Fill(seedCollection.size());
829  if ( doSeedLumiAnalysis_ )
830  NumberOfSeeds_lumiFlag->Fill(seedCollection.size());
831  }
832 
834 
835  std::vector<int> NClus;
836  setNclus(iEvent,NClus);
837  for (uint i=0; i< ClusterLabels.size(); i++){
838  SeedsVsClusters[i]->Fill(NClus[i],seedCollection.size());
839  }
840  }
841 
843 
844  //here duplication of mag field and be informations is needed to allow seed and track cand histos to be independent
845  // magnetic field
847  iSetup.get<IdealMagneticFieldRecord>().get(theMF);
848 
849  // get the beam spot
850  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
851  iEvent.getByToken(bsSrcToken_, recoBeamSpotHandle );
852  const reco::BeamSpot& bs = *recoBeamSpotHandle;
853 
855  for(size_t i=0; i < seedHandle->size(); ++i) {
856 
858  theTrackBuildingAnalyzer->analyze(iEvent, iSetup, *seed, bs, theMF, theTTRHBuilder);
859  }
860  }
861 
862  } else {
863  edm::LogWarning("TrackingMonitor") << "No Trajectory seeds in the event. Not filling associated histograms";
864  }
865  }
866 
867 
869 
870  std::vector<int> NClus;
871  setNclus(iEvent,NClus);
872  for (uint i=0; i< ClusterLabels.size(); i++) {
873  NumberOfTrkVsClusters[i]->Fill(NClus[i],numberOfTracks);
874  }
875  }
876 
877  if ( doPUmonitoring_ ) {
878 
879  // do vertex monitoring
880  for (size_t i=0; i<theVertexMonitor.size(); i++)
881  theVertexMonitor[i]->analyze(iEvent, iSetup);
882  }
883  if ( doPlotsVsGoodPVtx_ ) {
884 
885  size_t totalNumGoodPV = 0;
886  if (pvHandle.isValid()) {
887 
888  for (reco::VertexCollection::const_iterator pv = pvHandle->begin();
889  pv != pvHandle->end(); ++pv) {
890 
891  //--- pv fake (the pv collection should have size==1 and the pv==beam spot)
892  if (pv->isFake() || pv->tracksSize()==0) continue;
893 
894  // definition of goodOfflinePrimaryVertex
895  if (pv->ndof() < pvNDOF_ || pv->z() > 24.) continue;
896  totalNumGoodPV++;
897  }
898 
899  NumberEventsOfVsGoodPVtx -> Fill( float(totalNumGoodPV) );
900  NumberOfTracksVsGoodPVtx -> Fill( float(totalNumGoodPV), numberOfTracks );
901  if (totalNumGoodPV>1) NumberOfTracksVsPUPVtx-> Fill( totalNumGoodPV-1, double(numberOfTracks-numberOfTracks_pv0)/double(totalNumGoodPV-1) );
902  NumberOfPVtxVsGoodPVtx -> Fill(float(totalNumGoodPV),pvHandle->size());
903 
904  for (reco::TrackCollection::const_iterator track = trackCollection.begin();
905  track!=trackCollection.end(); ++track) {
906  NumberOfRecHitsPerTrackVsGoodPVtx -> Fill(float(totalNumGoodPV), track->numberOfValidHits());
907  }
908 
909  if ( doProfilesVsLS_ || doAllPlots)
910  NumberOfGoodPVtxVsLS->Fill(static_cast<double>(iEvent.id().luminosityBlock()),totalNumGoodPV);
911  if ( doPlotsVsBX_ || doAllPlots )
912  NumberOfGoodPVtxVsBX->Fill(bx, float(totalNumGoodPV));
913 
914  if (doFractionPlot_)
915  GoodTracksFractionVsGoodPVtx->Fill(float(totalNumGoodPV),frac);
916 
917  if ( doPlotsVsLUMI_ || doAllPlots )
918  NumberOfGoodPVtxVsLUMI->Fill(lumi,float(totalNumGoodPV));
919  }
920 
921 
922  if ( doPlotsVsBXlumi_ ) {
923  double bxlumi = theLumiDetails_->getValue(iEvent);
924  NumberOfTracksVsBXlumi -> Fill( bxlumi, numberOfTracks );
925  }
926 
927  if ( doProfilesVsLS_ || doAllPlots ) if ( totalNumGoodPV != 0 ) NumberOfGoodPVtxWO0VsLS -> Fill(static_cast<double>(iEvent.id().luminosityBlock()),float(totalNumGoodPV));
928  if ( doPlotsVsBX_ || doAllPlots ) if ( totalNumGoodPV != 0 ) NumberOfGoodPVtxWO0VsBX -> Fill(bx, float(totalNumGoodPV));
929  if ( doPlotsVsLUMI_ || doAllPlots ) if ( totalNumGoodPV != 0 ) NumberOfGoodPVtxWO0VsLUMI-> Fill(lumi,float(totalNumGoodPV));
930 
931  } // PU monitoring
932 
933  } // trackHandle is valid
934 
935 }
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
MonitorElement * NumberOfGoodPVtxWO0VsLUMI
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
MonitorElement * NumberOfGoodPVtxWO0VsLS
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
MonitorElement * NumberOfGoodPVtxWO0VsBX
std::string builderName
void TrackingMonitor::beginJob ( void  )
virtual

Definition at line 167 of file TrackingMonitor.cc.

168 {
169 
170 
171 }
void TrackingMonitor::beginLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup eSetup 
)
virtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 637 of file TrackingMonitor.cc.

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

637  {
638 
639  if (doLumiAnalysis) {
642  }
644  if ( doSeedLumiAnalysis_ )
646  }
647 }
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 173 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, NumberOfGoodPVtxWO0VsBX, NumberOfGoodPVtxWO0VsLS, NumberOfGoodPVtxWO0VsLUMI, 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.

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

939 {
940 }
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 942 of file TrackingMonitor.cc.

References ClusterLabels, compare_using_db::compare, and i.

Referenced by bookHistograms().

943 {
944  arrayMin.resize(ClusterLabels.size());
945  arrayMax.resize(ClusterLabels.size());
946  arrayBin.resize(ClusterLabels.size());
947 
948  for (uint i=0; i<ClusterLabels.size(); ++i) {
949 
950  if (ClusterLabels[i].compare("Pix")==0 ) {arrayMin[i]=pmin; arrayMax[i]=pmax; arrayBin[i]=pbin;}
951  else if(ClusterLabels[i].compare("Strip")==0) {arrayMin[i]=smin; arrayMax[i]=smax; arrayBin[i]=sbin;}
952  else if(ClusterLabels[i].compare("Tot")==0 ) {arrayMin[i]=smin; arrayMax[i]=smax+pmax; arrayBin[i]=sbin;}
953  else {edm::LogWarning("TrackingMonitor") << "Cluster Label " << ClusterLabels[i] << " not defined, using strip parameters ";
954  arrayMin[i]=smin; arrayMax[i]=smax; arrayBin[i]=sbin;}
955 
956  }
957 
958 }
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 960 of file TrackingMonitor.cc.

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

Referenced by analyze().

961 {
962 
963  int ncluster_pix=-1;
964  int ncluster_strip=-1;
965 
967  iEvent.getByToken(stripClustersToken_, strip_clusters );
969  iEvent.getByToken(pixelClustersToken_, pixel_clusters );
970 
971  if (strip_clusters.isValid() && pixel_clusters.isValid()) {
972  ncluster_pix = (*pixel_clusters).dataSize();
973  ncluster_strip = (*strip_clusters).dataSize();
974  }
975 
976  arrayNclus.resize(ClusterLabels.size());
977  for (uint i=0; i<ClusterLabels.size(); ++i){
978 
979  if (ClusterLabels[i].compare("Pix")==0 ) arrayNclus[i]=ncluster_pix ;
980  else if(ClusterLabels[i].compare("Strip")==0) arrayNclus[i]=ncluster_strip;
981  else if(ClusterLabels[i].compare("Tot")==0 ) arrayNclus[i]=ncluster_pix+ncluster_strip;
982  else {edm::LogWarning("TrackingMonitor") << "Cluster Label " << ClusterLabels[i] << " not defined using stri parametrs ";
983  arrayNclus[i]=ncluster_strip ;}
984  }
985 
986 }
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 166 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 193 of file TrackingMonitor.h.

Referenced by analyze().

bool TrackingMonitor::doAllPlots
private

Definition at line 173 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

bool TrackingMonitor::doAllSeedPlots
private

Definition at line 172 of file TrackingMonitor.h.

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

bool TrackingMonitor::doDCAPlots_
private

Definition at line 174 of file TrackingMonitor.h.

bool TrackingMonitor::doFractionPlot_
private

Definition at line 188 of file TrackingMonitor.h.

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

bool TrackingMonitor::doGeneralPropertiesPlots_
private

Definition at line 175 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

bool TrackingMonitor::doHitPropertiesPlots_
private

Definition at line 176 of file TrackingMonitor.h.

bool TrackingMonitor::doLumiAnalysis
private

Definition at line 170 of file TrackingMonitor.h.

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

bool TrackingMonitor::doPlotsVsBX_
private

Definition at line 187 of file TrackingMonitor.h.

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

bool TrackingMonitor::doPlotsVsBXlumi_
private

Definition at line 184 of file TrackingMonitor.h.

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

bool TrackingMonitor::doPlotsVsGoodPVtx_
private

Definition at line 185 of file TrackingMonitor.h.

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

bool TrackingMonitor::doPlotsVsLUMI_
private

Definition at line 186 of file TrackingMonitor.h.

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

bool TrackingMonitor::doProfilesVsLS_
private

Definition at line 171 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

bool TrackingMonitor::doPUmonitoring_
private

Definition at line 183 of file TrackingMonitor.h.

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

bool TrackingMonitor::doSeedLumiAnalysis_
private

Definition at line 179 of file TrackingMonitor.h.

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

bool TrackingMonitor::doSeedNumberPlot
private

Definition at line 178 of file TrackingMonitor.h.

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

bool TrackingMonitor::doSeedVsClusterPlot
private

Definition at line 180 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

bool TrackingMonitor::doTkCandPlots
private

Definition at line 177 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

bool TrackingMonitor::doTrackerSpecific_
private

Definition at line 169 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 190 of file TrackingMonitor.h.

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

MonitorElement* TrackingMonitor::GoodTracksFractionVsBX
private

Definition at line 140 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::GoodTracksFractionVsGoodPVtx
private

Definition at line 151 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 158 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 138 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberEventsOfVsGoodPVtx
private

Definition at line 150 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 156 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfGoodPVtxVsBX
private

Definition at line 142 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 160 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfGoodPVtxWO0VsBX
private

Definition at line 143 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfGoodPVtxWO0VsLS
private

Definition at line 135 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfGoodPVtxWO0VsLUMI
private

Definition at line 161 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 153 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfRecHitsPerTrackVsBX
private

Definition at line 141 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfRecHitsPerTrackVsGoodPVtx
private

Definition at line 152 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 159 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 164 of file TrackingMonitor.h.

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

MonitorElement* TrackingMonitor::NumberOfTracksVsBX
private

Definition at line 139 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfTracksVsBXlumi
private

Definition at line 145 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfTracksVsGoodPVtx
private

Definition at line 148 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 157 of file TrackingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingMonitor::NumberOfTracksVsPUPVtx
private

Definition at line 149 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 192 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 194 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 181 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 167 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().