CMS 3D CMS Logo

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

#include <VertexMonitor.h>

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void initHisto (DQMStore::IBooker &ibooker)
 
 VertexMonitor (const edm::ParameterSet &, const edm::InputTag &, const edm::InputTag &, std::string pvLabel)
 
 VertexMonitor (const edm::ParameterSet &, const edm::InputTag &, const edm::InputTag &, std::string pvLabel, edm::ConsumesCollector &iC)
 
virtual ~VertexMonitor ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Public Attributes

MonitorElementChi2oNDFVsBXlumi
 
MonitorElementChi2oNDFVsGoodPVtx
 
MonitorElementChi2ProbVsBXlumi
 
MonitorElementChi2ProbVsGoodPVtx
 
edm::ParameterSet conf_
 
bool doAllPlots_
 
bool doPlotsVsBXlumi_
 
bool doPlotsVsGoodPVtx_
 
MonitorElementFractionOfGoodPVtx
 
MonitorElementFractionOfGoodPVtxVsBXlumi
 
MonitorElementFractionOfGoodPVtxVsGoodPVtx
 
MonitorElementFractionOfGoodPVtxVsPVtx
 
MonitorElementGoodPVtxChi2oNDFVsBXlumi
 
MonitorElementGoodPVtxChi2oNDFVsGoodPVtx
 
MonitorElementGoodPVtxChi2ProbVsBXlumi
 
MonitorElementGoodPVtxChi2ProbVsGoodPVtx
 
MonitorElementGoodPVtxNumberOfTracks
 
MonitorElementGoodPVtxNumberOfTracksVsBXlumi
 
MonitorElementGoodPVtxNumberOfTracksVsGoodPVtx
 
MonitorElementGoodPVtxNumberOfTracksVsGoodPVtxNdof
 
MonitorElementGoodPVtxSumPt
 
MonitorElementGoodPVtxSumPtVsBXlumi
 
MonitorElementGoodPVtxSumPtVsGoodPVtx
 
std::string histname
 
std::string label_
 
GetLumilumiDetails_
 
MonitorElementNumberOfBADndofPVtx
 
MonitorElementNumberOfBADndofPVtxVsBXlumi
 
MonitorElementNumberOfBADndofPVtxVsGoodPVtx
 
MonitorElementNumberOfFakePVtx
 
MonitorElementNumberOfFakePVtxVsBXlumi
 
MonitorElementNumberOfFakePVtxVsGoodPVtx
 
MonitorElementNumberOfGoodPVtx
 
MonitorElementNumberOfGoodPVtxVsBXlumi
 
MonitorElementNumberOfPVtx
 
MonitorElementNumberOfPVtxVsBXlumi
 
MonitorElementNumberOfPVtxVsGoodPVtx
 
edm::InputTag primaryVertexInputTag_
 
edm::EDGetTokenT
< reco::VertexCollection
pvToken_
 
edm::InputTag selectedPrimaryVertexInputTag_
 
edm::EDGetTokenT
< reco::VertexCollection
selpvToken_
 

Detailed Description

Monitoring source for general quantities related to vertex

Definition at line 32 of file VertexMonitor.h.

Constructor & Destructor Documentation

VertexMonitor::VertexMonitor ( const edm::ParameterSet iConfig,
const edm::InputTag primaryVertexInputTag,
const edm::InputTag selectedPrimaryVertexInputTag,
std::string  pvLabel 
)

Definition at line 19 of file VertexMonitor.cc.

References doPlotsVsBXlumi_, edm::ParameterSet::getParameter(), and lumiDetails_.

20  : conf_( iConfig )
21  , primaryVertexInputTag_ ( primaryVertexInputTag )
22  , selectedPrimaryVertexInputTag_ ( selectedPrimaryVertexInputTag )
23  , label_ ( pvLabel )
47  , doAllPlots_ ( conf_.getParameter<bool>("doAllPlots") )
48  , doPlotsVsBXlumi_ ( conf_.getParameter<bool>("doPlotsVsBXlumi") )
49  , doPlotsVsGoodPVtx_( conf_.getParameter<bool>("doPlotsVsGoodPVtx") )
50 
51 {
52  //now do what ever initialization is needed
53  if ( doPlotsVsBXlumi_ )
54  lumiDetails_ = new GetLumi( iConfig.getParameter<edm::ParameterSet>("BXlumiSetup") );
55 
56 }
T getParameter(std::string const &) const
bool doPlotsVsGoodPVtx_
Definition: VertexMonitor.h:98
MonitorElement * GoodPVtxNumberOfTracks
Definition: VertexMonitor.h:86
std::string label_
Definition: VertexMonitor.h:53
MonitorElement * GoodPVtxChi2oNDFVsBXlumi
Definition: VertexMonitor.h:92
edm::ParameterSet conf_
Definition: VertexMonitor.h:49
MonitorElement * GoodPVtxSumPtVsBXlumi
Definition: VertexMonitor.h:83
MonitorElement * GoodPVtxNumberOfTracksVsBXlumi
Definition: VertexMonitor.h:87
#define NULL
Definition: scimark2.h:8
bool doPlotsVsBXlumi_
Definition: VertexMonitor.h:97
MonitorElement * NumberOfBADndofPVtxVsGoodPVtx
Definition: VertexMonitor.h:75
MonitorElement * GoodPVtxNumberOfTracksVsGoodPVtx
Definition: VertexMonitor.h:88
MonitorElement * GoodPVtxChi2oNDFVsGoodPVtx
Definition: VertexMonitor.h:91
MonitorElement * FractionOfGoodPVtxVsPVtx
Definition: VertexMonitor.h:69
edm::InputTag primaryVertexInputTag_
Definition: VertexMonitor.h:51
MonitorElement * FractionOfGoodPVtx
Definition: VertexMonitor.h:66
MonitorElement * FractionOfGoodPVtxVsBXlumi
Definition: VertexMonitor.h:67
MonitorElement * GoodPVtxSumPtVsGoodPVtx
Definition: VertexMonitor.h:84
MonitorElement * NumberOfPVtxVsBXlumi
Definition: VertexMonitor.h:62
MonitorElement * NumberOfPVtxVsGoodPVtx
Definition: VertexMonitor.h:63
MonitorElement * FractionOfGoodPVtxVsGoodPVtx
Definition: VertexMonitor.h:68
MonitorElement * NumberOfBADndofPVtx
Definition: VertexMonitor.h:73
MonitorElement * GoodPVtxSumPt
Definition: VertexMonitor.h:82
MonitorElement * GoodPVtxChi2ProbVsGoodPVtx
Definition: VertexMonitor.h:93
edm::InputTag selectedPrimaryVertexInputTag_
Definition: VertexMonitor.h:52
MonitorElement * NumberOfGoodPVtxVsBXlumi
Definition: VertexMonitor.h:65
MonitorElement * GoodPVtxChi2ProbVsBXlumi
Definition: VertexMonitor.h:94
MonitorElement * NumberOfBADndofPVtxVsBXlumi
Definition: VertexMonitor.h:74
MonitorElement * NumberOfPVtx
Definition: VertexMonitor.h:61
MonitorElement * GoodPVtxNumberOfTracksVsGoodPVtxNdof
Definition: VertexMonitor.h:89
GetLumi * lumiDetails_
Definition: VertexMonitor.h:59
MonitorElement * NumberOfGoodPVtx
Definition: VertexMonitor.h:64
VertexMonitor::VertexMonitor ( const edm::ParameterSet iConfig,
const edm::InputTag primaryVertexInputTag,
const edm::InputTag selectedPrimaryVertexInputTag,
std::string  pvLabel,
edm::ConsumesCollector iC 
)

Definition at line 58 of file VertexMonitor.cc.

References edm::ConsumesCollector::consumes(), doPlotsVsBXlumi_, edm::ParameterSet::getParameter(), lumiDetails_, primaryVertexInputTag_, pvToken_, selectedPrimaryVertexInputTag_, and selpvToken_.

58  : VertexMonitor(iConfig,primaryVertexInputTag,selectedPrimaryVertexInputTag,pvLabel)
59 {
60 
61  if ( doPlotsVsBXlumi_ )
62  lumiDetails_ = new GetLumi( iConfig.getParameter<edm::ParameterSet>("BXlumiSetup"), iC );
63 
66 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::VertexCollection > pvToken_
Definition: VertexMonitor.h:55
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
bool doPlotsVsBXlumi_
Definition: VertexMonitor.h:97
edm::InputTag primaryVertexInputTag_
Definition: VertexMonitor.h:51
edm::EDGetTokenT< reco::VertexCollection > selpvToken_
Definition: VertexMonitor.h:56
VertexMonitor(const edm::ParameterSet &, const edm::InputTag &, const edm::InputTag &, std::string pvLabel)
edm::InputTag selectedPrimaryVertexInputTag_
Definition: VertexMonitor.h:52
GetLumi * lumiDetails_
Definition: VertexMonitor.h:59
VertexMonitor::~VertexMonitor ( )
virtual

Definition at line 68 of file VertexMonitor.cc.

69 {
70 
71  // do anything here that needs to be done at desctruction time
72  // (e.g. close files, deallocate resources etc.)
73  // if (lumiDetails_) delete lumiDetails_;
74 }

Member Function Documentation

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

Definition at line 85 of file VertexMonitor.cc.

References reco::Vertex::chi2(), gather_cfg::cout, doPlotsVsBXlumi_, doPlotsVsGoodPVtx_, HcalObjRepresent::Fill(), FractionOfGoodPVtx, FractionOfGoodPVtxVsBXlumi, FractionOfGoodPVtxVsGoodPVtx, FractionOfGoodPVtxVsPVtx, edm::Event::getByToken(), GetLumi::getValue(), GoodPVtxChi2oNDFVsBXlumi, GoodPVtxChi2oNDFVsGoodPVtx, GoodPVtxChi2ProbVsBXlumi, GoodPVtxChi2ProbVsGoodPVtx, GoodPVtxNumberOfTracks, GoodPVtxNumberOfTracksVsBXlumi, GoodPVtxNumberOfTracksVsGoodPVtx, GoodPVtxSumPt, GoodPVtxSumPtVsBXlumi, GoodPVtxSumPtVsGoodPVtx, edm::HandleBase::isValid(), lumiDetails_, reco::Vertex::ndof(), reco::Vertex::normalizedChi2(), NumberOfBADndofPVtx, NumberOfBADndofPVtxVsBXlumi, NumberOfBADndofPVtxVsGoodPVtx, NumberOfGoodPVtx, NumberOfGoodPVtxVsBXlumi, NumberOfPVtx, NumberOfPVtxVsBXlumi, NumberOfPVtxVsGoodPVtx, EnergyCorrector::pt, MetAnalyzer::pv(), pvToken_, selpvToken_, reco::Vertex::tracks_begin(), reco::Vertex::tracks_end(), and reco::Vertex::tracksSize().

86 {
87 
88  double bxlumi = 0.;
89  if ( doPlotsVsBXlumi_ )
90  bxlumi = lumiDetails_->getValue(iEvent);
91  std::cout << "bxlumi : " << bxlumi << std::endl;
92 
93  size_t totalNumPV = 0;
94  size_t totalNumBADndofPV = 0;
96  iEvent.getByToken(pvToken_, pvHandle );
97  if ( pvHandle.isValid() )
98  {
99  totalNumPV = pvHandle->size();
100  std::cout << "totalNumPV : " << totalNumPV << std::endl;
101  for (reco::VertexCollection::const_iterator pv = pvHandle->begin();
102  pv != pvHandle->end(); ++pv) {
103  //--- count pv w/ ndof < 4
104  if (pv->ndof() < 4.) totalNumBADndofPV++;
105  }
106  } else return;
107  NumberOfPVtx -> Fill( totalNumPV );
108  NumberOfBADndofPVtx -> Fill( totalNumBADndofPV );
109  if ( doPlotsVsBXlumi_ ) {
110  NumberOfPVtxVsBXlumi -> Fill( bxlumi, totalNumPV );
111  NumberOfBADndofPVtxVsBXlumi -> Fill( bxlumi, totalNumBADndofPV );
112  }
113 
114  size_t totalNumGoodPV = 0;
116  iEvent.getByToken(selpvToken_, selpvHandle );
117  if ( selpvHandle.isValid() )
118  totalNumGoodPV = selpvHandle->size();
119  else return;
120  std::cout << "totalNumGoodPV: " << totalNumGoodPV << std::endl;
121  if ( doPlotsVsGoodPVtx_ ) {
122  NumberOfPVtxVsGoodPVtx -> Fill( totalNumGoodPV, totalNumPV );
123  NumberOfBADndofPVtxVsGoodPVtx -> Fill( totalNumGoodPV, totalNumBADndofPV );
124  }
125 
126  double fracGoodPV = double(totalNumGoodPV)/double(totalNumPV);
127  std::cout << "fracGoodPV: " << fracGoodPV << std::endl;
128 
129  NumberOfGoodPVtx -> Fill( totalNumGoodPV );
130  FractionOfGoodPVtx -> Fill( fracGoodPV );
131  if ( doPlotsVsBXlumi_ ) {
132  NumberOfGoodPVtxVsBXlumi -> Fill( bxlumi, totalNumGoodPV );
133  FractionOfGoodPVtxVsBXlumi -> Fill( bxlumi, fracGoodPV );
134  }
135  if ( doPlotsVsGoodPVtx_ ) {
136  FractionOfGoodPVtxVsGoodPVtx -> Fill( totalNumGoodPV, fracGoodPV );
137  FractionOfGoodPVtxVsPVtx -> Fill( totalNumPV, fracGoodPV );
138  }
139 
140  if ( selpvHandle->size() ) {
141  double sumpt = 0;
142  size_t ntracks = 0;
143  double chi2ndf = 0.;
144  double chi2prob = 0.;
145 
146  if (!selpvHandle->at(0).isFake()) {
147 
148  reco::Vertex pv = selpvHandle->at(0);
149 
150  ntracks = pv.tracksSize();
151  chi2ndf = pv.normalizedChi2();
152  chi2prob = TMath::Prob(pv.chi2(),(int)pv.ndof());
153 
155  itrk != pv.tracks_end(); ++itrk) {
156  double pt = (**itrk).pt();
157  sumpt += pt*pt;
158  }
159  GoodPVtxSumPt -> Fill( sumpt );
160  GoodPVtxNumberOfTracks -> Fill( ntracks );
161 
162  if ( doPlotsVsBXlumi_ ) {
163  GoodPVtxSumPtVsBXlumi -> Fill( bxlumi, sumpt );
164  GoodPVtxNumberOfTracksVsBXlumi -> Fill( bxlumi, ntracks );
165  GoodPVtxChi2oNDFVsBXlumi -> Fill( bxlumi, chi2ndf );
166  GoodPVtxChi2ProbVsBXlumi -> Fill( bxlumi, chi2prob );
167  }
168  if ( doPlotsVsGoodPVtx_ ) {
169  GoodPVtxSumPtVsGoodPVtx -> Fill( totalNumGoodPV, sumpt );
170  GoodPVtxNumberOfTracksVsGoodPVtx -> Fill( totalNumGoodPV, ntracks );
171  GoodPVtxChi2oNDFVsGoodPVtx -> Fill( totalNumGoodPV, chi2ndf );
172  GoodPVtxChi2ProbVsGoodPVtx -> Fill( totalNumGoodPV, chi2prob );
173  }
174  }
175  }
176 }
bool doPlotsVsGoodPVtx_
Definition: VertexMonitor.h:98
edm::EDGetTokenT< reco::VertexCollection > pvToken_
Definition: VertexMonitor.h:55
MonitorElement * GoodPVtxNumberOfTracks
Definition: VertexMonitor.h:86
trackRef_iterator tracks_end() const
last iterator over tracks
Definition: Vertex.cc:44
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
MonitorElement * GoodPVtxChi2oNDFVsBXlumi
Definition: VertexMonitor.h:92
MonitorElement * GoodPVtxSumPtVsBXlumi
Definition: VertexMonitor.h:83
MonitorElement * GoodPVtxNumberOfTracksVsBXlumi
Definition: VertexMonitor.h:87
bool doPlotsVsBXlumi_
Definition: VertexMonitor.h:97
MonitorElement * NumberOfBADndofPVtxVsGoodPVtx
Definition: VertexMonitor.h:75
MonitorElement * GoodPVtxNumberOfTracksVsGoodPVtx
Definition: VertexMonitor.h:88
MonitorElement * GoodPVtxChi2oNDFVsGoodPVtx
Definition: VertexMonitor.h:91
MonitorElement * FractionOfGoodPVtxVsPVtx
Definition: VertexMonitor.h:69
double getValue(const edm::Event &)
Definition: GetLumi.cc:64
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
double chi2() const
chi-squares
Definition: Vertex.h:95
MonitorElement * FractionOfGoodPVtx
Definition: VertexMonitor.h:66
MonitorElement * FractionOfGoodPVtxVsBXlumi
Definition: VertexMonitor.h:67
MonitorElement * GoodPVtxSumPtVsGoodPVtx
Definition: VertexMonitor.h:84
MonitorElement * NumberOfPVtxVsBXlumi
Definition: VertexMonitor.h:62
MonitorElement * NumberOfPVtxVsGoodPVtx
Definition: VertexMonitor.h:63
edm::EDGetTokenT< reco::VertexCollection > selpvToken_
Definition: VertexMonitor.h:56
bool isValid() const
Definition: HandleBase.h:75
MonitorElement * FractionOfGoodPVtxVsGoodPVtx
Definition: VertexMonitor.h:68
double ndof() const
Definition: Vertex.h:102
MonitorElement * NumberOfBADndofPVtx
Definition: VertexMonitor.h:73
MonitorElement * GoodPVtxSumPt
Definition: VertexMonitor.h:82
MonitorElement * GoodPVtxChi2ProbVsGoodPVtx
Definition: VertexMonitor.h:93
MonitorElement * NumberOfGoodPVtxVsBXlumi
Definition: VertexMonitor.h:65
MonitorElement * GoodPVtxChi2ProbVsBXlumi
Definition: VertexMonitor.h:94
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector&lt;TrackRef&gt;
Definition: Vertex.h:37
tuple cout
Definition: gather_cfg.py:121
double normalizedChi2() const
chi-squared divided by n.d.o.f.
Definition: Vertex.h:104
MonitorElement * NumberOfBADndofPVtxVsBXlumi
Definition: VertexMonitor.h:74
trackRef_iterator tracks_begin() const
first iterator over tracks
Definition: Vertex.cc:39
MonitorElement * NumberOfPVtx
Definition: VertexMonitor.h:61
GetLumi * lumiDetails_
Definition: VertexMonitor.h:59
size_t tracksSize() const
number of tracks
Definition: Vertex.cc:34
MonitorElement * NumberOfGoodPVtx
Definition: VertexMonitor.h:64
void VertexMonitor::beginLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
virtual

Definition at line 366 of file VertexMonitor.cc.

367 {
368 }
void VertexMonitor::endLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
virtual

Definition at line 372 of file VertexMonitor.cc.

373 {
374 }
void VertexMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 378 of file VertexMonitor.cc.

References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().

378  {
379  //The following says we do not know what parameters are allowed so do no validation
380  // Please change this to state exactly what you do use, even if it is no parameters
382  desc.setUnknown();
383  descriptions.addDefault(desc);
384 }
void addDefault(ParameterSetDescription const &psetDescription)
void VertexMonitor::initHisto ( DQMStore::IBooker ibooker)
virtual

Definition at line 181 of file VertexMonitor.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::bookProfile(), Chi2oNDFVsBXlumi, Chi2ProbVsBXlumi, conf_, doPlotsVsBXlumi_, doPlotsVsGoodPVtx_, FractionOfGoodPVtx, FractionOfGoodPVtxVsBXlumi, FractionOfGoodPVtxVsGoodPVtx, FractionOfGoodPVtxVsPVtx, edm::ParameterSet::getParameter(), MonitorElement::getTH1(), GoodPVtxChi2oNDFVsBXlumi, GoodPVtxChi2oNDFVsGoodPVtx, GoodPVtxChi2ProbVsBXlumi, GoodPVtxChi2ProbVsGoodPVtx, GoodPVtxNumberOfTracks, GoodPVtxNumberOfTracksVsBXlumi, GoodPVtxNumberOfTracksVsGoodPVtx, GoodPVtxSumPt, GoodPVtxSumPtVsBXlumi, GoodPVtxSumPtVsGoodPVtx, histname, label_, NumberOfBADndofPVtx, NumberOfBADndofPVtxVsBXlumi, NumberOfBADndofPVtxVsGoodPVtx, NumberOfGoodPVtx, NumberOfGoodPVtxVsBXlumi, NumberOfPVtx, NumberOfPVtxVsBXlumi, NumberOfPVtxVsGoodPVtx, MonitorElement::setAxisTitle(), DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

182 {
183  // parameters from the configuration
184  std::string MEFolderName = conf_.getParameter<std::string>("PVFolderName");
185 
186  // get binning from the configuration
187  int GoodPVtxBin = conf_.getParameter<int>("GoodPVtxBin");
188  double GoodPVtxMin = conf_.getParameter<double>("GoodPVtxMin");
189  double GoodPVtxMax = conf_.getParameter<double>("GoodPVtxMax");
190 
191  // book histo
192  // ----------------------//
193  ibooker.setCurrentFolder(MEFolderName+"/"+label_);
194 
195  histname = "NumberOfPVtx_" + label_;
196  NumberOfPVtx = ibooker.book1D(histname,histname, GoodPVtxBin,GoodPVtxMin,GoodPVtxMax);
197  NumberOfPVtx->setAxisTitle("Number of PV",1);
198  NumberOfPVtx->setAxisTitle("Number of Events",2);
199 
200  histname = "NumberOfGoodPVtx_" + label_;
201  NumberOfGoodPVtx = ibooker.book1D(histname,histname, GoodPVtxBin,GoodPVtxMin,GoodPVtxMax);
202  NumberOfGoodPVtx->setAxisTitle("Number of Good PV",1);
203  NumberOfGoodPVtx->setAxisTitle("Number of Events",2);
204 
205  histname = "FractionOfGoodPVtx_" + label_;
206  FractionOfGoodPVtx = ibooker.book1D(histname,histname, 100,0.,1.);
207  FractionOfGoodPVtx->setAxisTitle("fraction of Good PV",1);
208  FractionOfGoodPVtx->setAxisTitle("Number of Events",2);
209 
210  histname = "NumberOfBADndofPVtx_" + label_;
211  NumberOfBADndofPVtx = ibooker.book1D(histname,histname,GoodPVtxBin,GoodPVtxMin,GoodPVtxMax);
212  NumberOfBADndofPVtx->setAxisTitle("Number of BADndof #PV",1);
213  NumberOfBADndofPVtx->setAxisTitle("Number of Events",2);
214 
215  histname = "GoodPVtxSumPt_" + label_;
216  GoodPVtxSumPt = ibooker.book1D(histname,histname,100,0.,500.);
217  GoodPVtxSumPt->setAxisTitle("primary vertex #Sum p_{T}^{2} [GeV^{2}/c^{2}]",1);
218  GoodPVtxSumPt->setAxisTitle("Number of events",2);
219 
220  histname = "GoodPVtxNumberOfTracks_" + label_;
221  GoodPVtxNumberOfTracks = ibooker.book1D(histname,histname,100,0.,100.);
222  GoodPVtxNumberOfTracks->setAxisTitle("primary vertex number of tracks",1);
223  GoodPVtxNumberOfTracks->setAxisTitle("Number of events",2);
224 
225  if ( doPlotsVsBXlumi_ ) {
226  // get binning from the configuration
227  edm::ParameterSet BXlumiParameters = conf_.getParameter<edm::ParameterSet>("BXlumiSetup");
228  int BXlumiBin = BXlumiParameters.getParameter<int>("BXlumiBin");
229  double BXlumiMin = BXlumiParameters.getParameter<double>("BXlumiMin");
230  double BXlumiMax = BXlumiParameters.getParameter<double>("BXlumiMax");
231 
232  ibooker.setCurrentFolder(MEFolderName+"/"+label_+"/PUmonitoring/");
233 
234  histname = "NumberOfPVtxVsBXlumi_" + label_;
235  NumberOfPVtxVsBXlumi = ibooker.bookProfile(histname,histname, BXlumiBin,BXlumiMin,BXlumiMax,0.,60.,"");
236  NumberOfPVtxVsBXlumi->getTH1()->SetCanExtend(TH1::kAllAxes);
237  NumberOfPVtxVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]",1);
238  NumberOfPVtxVsBXlumi->setAxisTitle("Mean number of PV",2);
239 
240  histname = "NumberOfGoodPVtxVsBXlumi_" + label_;
241  NumberOfGoodPVtxVsBXlumi = ibooker.bookProfile(histname,histname, BXlumiBin,BXlumiMin,BXlumiMax,0.,60.,"");
242  NumberOfGoodPVtxVsBXlumi->getTH1()->SetCanExtend(TH1::kAllAxes);
243  NumberOfGoodPVtxVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]",1);
244  NumberOfGoodPVtxVsBXlumi->setAxisTitle("Mean number of PV",2);
245 
246  histname = "FractionOfGoodPVtxVsBXlumi_" + label_;
247  FractionOfGoodPVtxVsBXlumi = ibooker.bookProfile(histname,histname, BXlumiBin,BXlumiMin,BXlumiMax,0.,1.5,"");
248  FractionOfGoodPVtxVsBXlumi->getTH1()->SetCanExtend(TH1::kAllAxes);
249  FractionOfGoodPVtxVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]",1);
250  FractionOfGoodPVtxVsBXlumi->setAxisTitle("Mean number of PV",2);
251 
252  histname = "NumberOfBADndofPVtxVsBXlumi_" + label_;
253  NumberOfBADndofPVtxVsBXlumi = ibooker.bookProfile(histname,histname, BXlumiBin,BXlumiMin,BXlumiMax,0.,60.,"");
254  NumberOfBADndofPVtxVsBXlumi->getTH1()->SetCanExtend(TH1::kAllAxes);
255  NumberOfBADndofPVtxVsBXlumi->setAxisTitle("BADndof #PV",1);
256  NumberOfBADndofPVtxVsBXlumi->setAxisTitle("Number of Events",2);
257 
258  histname = "GoodPVtxSumPtVsBXlumi_" + label_;
259  GoodPVtxSumPtVsBXlumi = ibooker.bookProfile(histname,histname, BXlumiBin,BXlumiMin,BXlumiMax,0.,500.,"");
260  GoodPVtxSumPtVsBXlumi->getTH1()->SetCanExtend(TH1::kAllAxes);
261  GoodPVtxSumPtVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]",1);
262  GoodPVtxSumPtVsBXlumi->setAxisTitle("Mean pv #Sum p_{T}^{2} [GeV^{2}/c]^{2}",2);
263 
264  histname = "GoodPVtxNumberOfTracksVsBXlumi_" + label_;
265  GoodPVtxNumberOfTracksVsBXlumi = ibooker.bookProfile(histname,histname, BXlumiBin,BXlumiMin,BXlumiMax,0.,100.,"");
266  GoodPVtxNumberOfTracksVsBXlumi->getTH1()->SetCanExtend(TH1::kAllAxes);
267  GoodPVtxNumberOfTracksVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]",1);
268  GoodPVtxNumberOfTracksVsBXlumi->setAxisTitle("Mean pv number of tracks",2);
269 
270  // get binning from the configuration
271  double Chi2NDFMin = conf_.getParameter<double>("Chi2NDFMin");
272  double Chi2NDFMax = conf_.getParameter<double>("Chi2NDFMax");
273 
274  double Chi2ProbMin = conf_.getParameter<double>("Chi2ProbMin");
275  double Chi2ProbMax = conf_.getParameter<double>("Chi2ProbMax");
276 
277  histname = "Chi2oNDFVsBXlumi_" + label_;
278  Chi2oNDFVsBXlumi = ibooker.bookProfile(histname,histname,BXlumiBin, BXlumiMin,BXlumiMax,Chi2NDFMin,Chi2NDFMax,"");
279  Chi2oNDFVsBXlumi -> getTH1()->SetCanExtend(TH1::kAllAxes);
280  Chi2oNDFVsBXlumi -> setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]",1);
281  Chi2oNDFVsBXlumi -> setAxisTitle("Mean #chi^{2}/ndof",2);
282 
283  histname = "Chi2ProbVsBXlumi_" + label_;
284  Chi2ProbVsBXlumi = ibooker.bookProfile(histname,histname,BXlumiBin, BXlumiMin,BXlumiMax,Chi2ProbMin,Chi2ProbMax,"");
285  Chi2ProbVsBXlumi -> getTH1()->SetCanExtend(TH1::kAllAxes);
286  Chi2ProbVsBXlumi -> setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]",1);
287  Chi2ProbVsBXlumi -> setAxisTitle("Mean #chi^{2}/prob",2);
288 
289  histname = "GoodPVtxChi2oNDFVsBXlumi_" + label_;
290  GoodPVtxChi2oNDFVsBXlumi = ibooker.bookProfile(histname,histname,BXlumiBin, BXlumiMin,BXlumiMax,Chi2NDFMin,Chi2NDFMax,"");
291  GoodPVtxChi2oNDFVsBXlumi -> getTH1()->SetCanExtend(TH1::kAllAxes);
292  GoodPVtxChi2oNDFVsBXlumi -> setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]",1);
293  GoodPVtxChi2oNDFVsBXlumi -> setAxisTitle("Mean PV #chi^{2}/ndof",2);
294 
295  histname = "GoodPVtxChi2ProbVsBXlumi_" + label_;
296  GoodPVtxChi2ProbVsBXlumi = ibooker.bookProfile(histname,histname,BXlumiBin, BXlumiMin,BXlumiMax,Chi2ProbMin,Chi2ProbMax,"");
297  GoodPVtxChi2ProbVsBXlumi -> getTH1()->SetCanExtend(TH1::kAllAxes);
298  GoodPVtxChi2ProbVsBXlumi -> setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]",1);
299  GoodPVtxChi2ProbVsBXlumi -> setAxisTitle("Mean PV #chi^{2}/prob",2);
300  }
301 
302  if ( doPlotsVsGoodPVtx_ ) {
303 
304  ibooker.setCurrentFolder(MEFolderName+"/"+label_+"/PUmonitoring/VsGoodPVtx");
305 
306  histname = "NumberOfPVtxVsGoodPVtx_" + label_;
307  NumberOfPVtxVsGoodPVtx = ibooker.bookProfile(histname,histname, GoodPVtxBin,GoodPVtxMin,GoodPVtxMax,0.,60.,"");
308  NumberOfPVtxVsGoodPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
309  NumberOfPVtxVsGoodPVtx->setAxisTitle("Number of Good PV",1);
310  NumberOfPVtxVsGoodPVtx->setAxisTitle("Mean number of PV",2);
311 
312  histname = "FractionOfGoodPVtxVsGoodPVtx_" + label_;
313  FractionOfGoodPVtxVsGoodPVtx = ibooker.bookProfile(histname,histname, GoodPVtxBin,GoodPVtxMin,GoodPVtxMax,0.,60.,"");
314  FractionOfGoodPVtxVsGoodPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
315  FractionOfGoodPVtxVsGoodPVtx->setAxisTitle("Number of Good PV",1);
316  FractionOfGoodPVtxVsGoodPVtx->setAxisTitle("Mean fraction of Good PV",2);
317 
318  histname = "FractionOfGoodPVtxVsPVtx_" + label_;
319  FractionOfGoodPVtxVsPVtx = ibooker.bookProfile(histname,histname, GoodPVtxBin,GoodPVtxMin,GoodPVtxMax,0.,60.,"");
320  FractionOfGoodPVtxVsPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
321  FractionOfGoodPVtxVsPVtx->setAxisTitle("Number of Good PV",1);
322  FractionOfGoodPVtxVsPVtx->setAxisTitle("Mean number of Good PV",2);
323 
324  histname = "NumberOfBADndofPVtxVsGoodPVtx_" + label_;
325  NumberOfBADndofPVtxVsGoodPVtx = ibooker.bookProfile(histname,histname, GoodPVtxBin,GoodPVtxMin,GoodPVtxMax,0.,60.,"");
326  NumberOfBADndofPVtxVsGoodPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
327  NumberOfBADndofPVtxVsGoodPVtx->setAxisTitle("Number of Good PV",1);
328  NumberOfBADndofPVtxVsGoodPVtx->setAxisTitle("Mean Number of BAD PV",2);
329 
330  histname = "GoodPVtxSumPtVsGoodPVtx_" + label_;
331  GoodPVtxSumPtVsGoodPVtx = ibooker.bookProfile(histname,histname, GoodPVtxBin,GoodPVtxMin,GoodPVtxMax,0.,500.,"");
332  GoodPVtxSumPtVsGoodPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
333  GoodPVtxSumPtVsGoodPVtx->setAxisTitle("Number of Good PV",1);
334  GoodPVtxSumPtVsGoodPVtx->setAxisTitle("Mean pv #Sum p_{T}^{2} [GeV^{2}/c]^{2}",2);
335 
336  histname = "GoodPVtxNumberOfTracksVsGoodPVtx_" + label_;
337  GoodPVtxNumberOfTracksVsGoodPVtx = ibooker.bookProfile(histname,histname, GoodPVtxBin,GoodPVtxMin,GoodPVtxMax,0.,100.,"");
338  GoodPVtxNumberOfTracksVsGoodPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
339  GoodPVtxNumberOfTracksVsGoodPVtx->setAxisTitle("Number of Good PV",1);
340  GoodPVtxNumberOfTracksVsGoodPVtx->setAxisTitle("Mean pv number of tracks",2);
341 
342  // get binning from the configuration
343  double Chi2NDFMin = conf_.getParameter<double>("Chi2NDFMin");
344  double Chi2NDFMax = conf_.getParameter<double>("Chi2NDFMax");
345 
346  double Chi2ProbMin = conf_.getParameter<double>("Chi2ProbMin");
347  double Chi2ProbMax = conf_.getParameter<double>("Chi2ProbMax");
348 
349  histname = "GoodPVtxChi2oNDFVsGoodPVtx_" + label_;
350  GoodPVtxChi2oNDFVsGoodPVtx = ibooker.bookProfile(histname,histname,GoodPVtxBin, GoodPVtxMin,GoodPVtxMax,Chi2NDFMin,Chi2NDFMax,"");
351  GoodPVtxChi2oNDFVsGoodPVtx -> getTH1()->SetCanExtend(TH1::kAllAxes);
352  GoodPVtxChi2oNDFVsGoodPVtx -> setAxisTitle("Number of Good PV",1);
353  GoodPVtxChi2oNDFVsGoodPVtx -> setAxisTitle("Mean PV #chi^{2}/ndof",2);
354 
355  histname = "GoodPVtxChi2ProbVsGoodPVtx_" + label_;
356  GoodPVtxChi2ProbVsGoodPVtx = ibooker.bookProfile(histname,histname,GoodPVtxBin, GoodPVtxMin,GoodPVtxMax,Chi2ProbMin,Chi2ProbMax,"");
357  GoodPVtxChi2ProbVsGoodPVtx -> getTH1()->SetCanExtend(TH1::kAllAxes);
358  GoodPVtxChi2ProbVsGoodPVtx -> setAxisTitle("Number of Good PV",1);
359  GoodPVtxChi2ProbVsGoodPVtx -> setAxisTitle("Mean PV #chi^{2}/prob",2);
360 
361  }
362 }
T getParameter(std::string const &) const
bool doPlotsVsGoodPVtx_
Definition: VertexMonitor.h:98
MonitorElement * GoodPVtxNumberOfTracks
Definition: VertexMonitor.h:86
std::string label_
Definition: VertexMonitor.h:53
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
MonitorElement * GoodPVtxChi2oNDFVsBXlumi
Definition: VertexMonitor.h:92
edm::ParameterSet conf_
Definition: VertexMonitor.h:49
std::string histname
MonitorElement * GoodPVtxSumPtVsBXlumi
Definition: VertexMonitor.h:83
MonitorElement * GoodPVtxNumberOfTracksVsBXlumi
Definition: VertexMonitor.h:87
bool doPlotsVsBXlumi_
Definition: VertexMonitor.h:97
MonitorElement * NumberOfBADndofPVtxVsGoodPVtx
Definition: VertexMonitor.h:75
MonitorElement * GoodPVtxNumberOfTracksVsGoodPVtx
Definition: VertexMonitor.h:88
MonitorElement * GoodPVtxChi2oNDFVsGoodPVtx
Definition: VertexMonitor.h:91
MonitorElement * FractionOfGoodPVtxVsPVtx
Definition: VertexMonitor.h:69
MonitorElement * Chi2oNDFVsBXlumi
Definition: VertexMonitor.h:78
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * FractionOfGoodPVtx
Definition: VertexMonitor.h:66
TH1 * getTH1(void) const
MonitorElement * FractionOfGoodPVtxVsBXlumi
Definition: VertexMonitor.h:67
MonitorElement * GoodPVtxSumPtVsGoodPVtx
Definition: VertexMonitor.h:84
MonitorElement * NumberOfPVtxVsBXlumi
Definition: VertexMonitor.h:62
MonitorElement * NumberOfPVtxVsGoodPVtx
Definition: VertexMonitor.h:63
MonitorElement * FractionOfGoodPVtxVsGoodPVtx
Definition: VertexMonitor.h:68
MonitorElement * NumberOfBADndofPVtx
Definition: VertexMonitor.h:73
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * GoodPVtxSumPt
Definition: VertexMonitor.h:82
MonitorElement * Chi2ProbVsBXlumi
Definition: VertexMonitor.h:80
MonitorElement * GoodPVtxChi2ProbVsGoodPVtx
Definition: VertexMonitor.h:93
MonitorElement * NumberOfGoodPVtxVsBXlumi
Definition: VertexMonitor.h:65
MonitorElement * GoodPVtxChi2ProbVsBXlumi
Definition: VertexMonitor.h:94
MonitorElement * NumberOfBADndofPVtxVsBXlumi
Definition: VertexMonitor.h:74
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * NumberOfPVtx
Definition: VertexMonitor.h:61
MonitorElement * NumberOfGoodPVtx
Definition: VertexMonitor.h:64

Member Data Documentation

MonitorElement* VertexMonitor::Chi2oNDFVsBXlumi

Definition at line 78 of file VertexMonitor.h.

Referenced by initHisto().

MonitorElement* VertexMonitor::Chi2oNDFVsGoodPVtx

Definition at line 77 of file VertexMonitor.h.

MonitorElement* VertexMonitor::Chi2ProbVsBXlumi

Definition at line 80 of file VertexMonitor.h.

Referenced by initHisto().

MonitorElement* VertexMonitor::Chi2ProbVsGoodPVtx

Definition at line 79 of file VertexMonitor.h.

edm::ParameterSet VertexMonitor::conf_

Definition at line 49 of file VertexMonitor.h.

Referenced by initHisto().

bool VertexMonitor::doAllPlots_

Definition at line 96 of file VertexMonitor.h.

bool VertexMonitor::doPlotsVsBXlumi_

Definition at line 97 of file VertexMonitor.h.

Referenced by analyze(), initHisto(), and VertexMonitor().

bool VertexMonitor::doPlotsVsGoodPVtx_

Definition at line 98 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::FractionOfGoodPVtx

Definition at line 66 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::FractionOfGoodPVtxVsBXlumi

Definition at line 67 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::FractionOfGoodPVtxVsGoodPVtx

Definition at line 68 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::FractionOfGoodPVtxVsPVtx

Definition at line 69 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::GoodPVtxChi2oNDFVsBXlumi

Definition at line 92 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::GoodPVtxChi2oNDFVsGoodPVtx

Definition at line 91 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::GoodPVtxChi2ProbVsBXlumi

Definition at line 94 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::GoodPVtxChi2ProbVsGoodPVtx

Definition at line 93 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::GoodPVtxNumberOfTracks

Definition at line 86 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::GoodPVtxNumberOfTracksVsBXlumi

Definition at line 87 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::GoodPVtxNumberOfTracksVsGoodPVtx

Definition at line 88 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::GoodPVtxNumberOfTracksVsGoodPVtxNdof

Definition at line 89 of file VertexMonitor.h.

MonitorElement* VertexMonitor::GoodPVtxSumPt

Definition at line 82 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::GoodPVtxSumPtVsBXlumi

Definition at line 83 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::GoodPVtxSumPtVsGoodPVtx

Definition at line 84 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

std::string VertexMonitor::histname

Definition at line 100 of file VertexMonitor.h.

Referenced by initHisto().

std::string VertexMonitor::label_
GetLumi* VertexMonitor::lumiDetails_

Definition at line 59 of file VertexMonitor.h.

Referenced by analyze(), and VertexMonitor().

MonitorElement* VertexMonitor::NumberOfBADndofPVtx

Definition at line 73 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::NumberOfBADndofPVtxVsBXlumi

Definition at line 74 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::NumberOfBADndofPVtxVsGoodPVtx

Definition at line 75 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::NumberOfFakePVtx

Definition at line 70 of file VertexMonitor.h.

MonitorElement* VertexMonitor::NumberOfFakePVtxVsBXlumi

Definition at line 71 of file VertexMonitor.h.

MonitorElement* VertexMonitor::NumberOfFakePVtxVsGoodPVtx

Definition at line 72 of file VertexMonitor.h.

MonitorElement* VertexMonitor::NumberOfGoodPVtx

Definition at line 64 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::NumberOfGoodPVtxVsBXlumi

Definition at line 65 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::NumberOfPVtx

Definition at line 61 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::NumberOfPVtxVsBXlumi

Definition at line 62 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

MonitorElement* VertexMonitor::NumberOfPVtxVsGoodPVtx

Definition at line 63 of file VertexMonitor.h.

Referenced by analyze(), and initHisto().

edm::InputTag VertexMonitor::primaryVertexInputTag_

Definition at line 51 of file VertexMonitor.h.

Referenced by VertexMonitor().

edm::EDGetTokenT<reco::VertexCollection> VertexMonitor::pvToken_

Definition at line 55 of file VertexMonitor.h.

Referenced by analyze(), and VertexMonitor().

edm::InputTag VertexMonitor::selectedPrimaryVertexInputTag_

Definition at line 52 of file VertexMonitor.h.

Referenced by VertexMonitor().

edm::EDGetTokenT<reco::VertexCollection> VertexMonitor::selpvToken_

Definition at line 56 of file VertexMonitor.h.

Referenced by analyze(), and VertexMonitor().