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 beginJob (DQMStore *dqmStore_)
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
 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, RecoTauCleanerPlugins::pt, 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.getByLabel(primaryVertexInputTag_, pvHandle );
97  iEvent.getByToken(pvToken_, pvHandle );
98  if ( pvHandle.isValid() )
99  {
100  totalNumPV = pvHandle->size();
101  std::cout << "totalNumPV : " << totalNumPV << std::endl;
102  for (reco::VertexCollection::const_iterator pv = pvHandle->begin();
103  pv != pvHandle->end(); ++pv) {
104  //--- count pv w/ ndof < 4
105  if (pv->ndof() < 4.) totalNumBADndofPV++;
106  }
107  } else return;
108  NumberOfPVtx -> Fill( totalNumPV );
109  NumberOfBADndofPVtx -> Fill( totalNumBADndofPV );
110  if ( doPlotsVsBXlumi_ ) {
111  NumberOfPVtxVsBXlumi -> Fill( bxlumi, totalNumPV );
112  NumberOfBADndofPVtxVsBXlumi -> Fill( bxlumi, totalNumBADndofPV );
113  }
114 
115  size_t totalNumGoodPV = 0;
117  // iEvent.getByLabel(selectedPrimaryVertexInputTag_, selpvHandle );
118  iEvent.getByToken(selpvToken_, selpvHandle );
119  if ( selpvHandle.isValid() )
120  totalNumGoodPV = selpvHandle->size();
121  else return;
122  std::cout << "totalNumGoodPV: " << totalNumGoodPV << std::endl;
123  if ( doPlotsVsGoodPVtx_ ) {
124  NumberOfPVtxVsGoodPVtx -> Fill( totalNumGoodPV, totalNumPV );
125  NumberOfBADndofPVtxVsGoodPVtx -> Fill( totalNumGoodPV, totalNumBADndofPV );
126  }
127 
128  double fracGoodPV = double(totalNumGoodPV)/double(totalNumPV);
129  std::cout << "fracGoodPV: " << fracGoodPV << std::endl;
130 
131  NumberOfGoodPVtx -> Fill( totalNumGoodPV );
132  FractionOfGoodPVtx -> Fill( fracGoodPV );
133  if ( doPlotsVsBXlumi_ ) {
134  NumberOfGoodPVtxVsBXlumi -> Fill( bxlumi, totalNumGoodPV );
135  FractionOfGoodPVtxVsBXlumi -> Fill( bxlumi, fracGoodPV );
136  }
137  if ( doPlotsVsGoodPVtx_ ) {
138  FractionOfGoodPVtxVsGoodPVtx -> Fill( totalNumGoodPV, fracGoodPV );
139  FractionOfGoodPVtxVsPVtx -> Fill( totalNumPV, fracGoodPV );
140  }
141 
142  if ( selpvHandle->size() ) {
143  double sumpt = 0;
144  size_t ntracks = 0;
145  double chi2ndf = 0.;
146  double chi2prob = 0.;
147 
148  if (!selpvHandle->at(0).isFake()) {
149 
150  reco::Vertex pv = selpvHandle->at(0);
151 
152  ntracks = pv.tracksSize();
153  chi2ndf = pv.normalizedChi2();
154  chi2prob = TMath::Prob(pv.chi2(),(int)pv.ndof());
155 
157  itrk != pv.tracks_end(); ++itrk) {
158  double pt = (**itrk).pt();
159  sumpt += pt*pt;
160  }
161  GoodPVtxSumPt -> Fill( sumpt );
162  GoodPVtxNumberOfTracks -> Fill( ntracks );
163 
164  if ( doPlotsVsBXlumi_ ) {
165  GoodPVtxSumPtVsBXlumi -> Fill( bxlumi, sumpt );
166  GoodPVtxNumberOfTracksVsBXlumi -> Fill( bxlumi, ntracks );
167  GoodPVtxChi2oNDFVsBXlumi -> Fill( bxlumi, chi2ndf );
168  GoodPVtxChi2ProbVsBXlumi -> Fill( bxlumi, chi2prob );
169  }
170  if ( doPlotsVsGoodPVtx_ ) {
171  GoodPVtxSumPtVsGoodPVtx -> Fill( totalNumGoodPV, sumpt );
172  GoodPVtxNumberOfTracksVsGoodPVtx -> Fill( totalNumGoodPV, ntracks );
173  GoodPVtxChi2oNDFVsGoodPVtx -> Fill( totalNumGoodPV, chi2ndf );
174  GoodPVtxChi2ProbVsGoodPVtx -> Fill( totalNumGoodPV, chi2prob );
175  }
176  }
177  }
178 }
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:434
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:65
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
double chi2() const
chi-squares
Definition: Vertex.h:81
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:76
MonitorElement * FractionOfGoodPVtxVsGoodPVtx
Definition: VertexMonitor.h:68
double ndof() const
Definition: Vertex.h:88
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:90
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::beginJob ( DQMStore dqmStore_)
virtual

Definition at line 183 of file VertexMonitor.cc.

References DQMStore::book1D(), DQMStore::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::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

Definition at line 368 of file VertexMonitor.cc.

369 {
370 }
void VertexMonitor::endLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
virtual

Definition at line 374 of file VertexMonitor.cc.

375 {
376 }
void VertexMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 380 of file VertexMonitor.cc.

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

380  {
381  //The following says we do not know what parameters are allowed so do no validation
382  // Please change this to state exactly what you do use, even if it is no parameters
384  desc.setUnknown();
385  descriptions.addDefault(desc);
386 }
void addDefault(ParameterSetDescription const &psetDescription)

Member Data Documentation

MonitorElement* VertexMonitor::Chi2oNDFVsBXlumi

Definition at line 78 of file VertexMonitor.h.

Referenced by beginJob().

MonitorElement* VertexMonitor::Chi2oNDFVsGoodPVtx

Definition at line 77 of file VertexMonitor.h.

MonitorElement* VertexMonitor::Chi2ProbVsBXlumi

Definition at line 80 of file VertexMonitor.h.

Referenced by beginJob().

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 beginJob().

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(), beginJob(), and VertexMonitor().

bool VertexMonitor::doPlotsVsGoodPVtx_

Definition at line 98 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::FractionOfGoodPVtx

Definition at line 66 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::FractionOfGoodPVtxVsBXlumi

Definition at line 67 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::FractionOfGoodPVtxVsGoodPVtx

Definition at line 68 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::FractionOfGoodPVtxVsPVtx

Definition at line 69 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxChi2oNDFVsBXlumi

Definition at line 92 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxChi2oNDFVsGoodPVtx

Definition at line 91 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxChi2ProbVsBXlumi

Definition at line 94 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxChi2ProbVsGoodPVtx

Definition at line 93 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxNumberOfTracks

Definition at line 86 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxNumberOfTracksVsBXlumi

Definition at line 87 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxNumberOfTracksVsGoodPVtx

Definition at line 88 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

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 beginJob().

MonitorElement* VertexMonitor::GoodPVtxSumPtVsBXlumi

Definition at line 83 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxSumPtVsGoodPVtx

Definition at line 84 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

std::string VertexMonitor::histname

Definition at line 100 of file VertexMonitor.h.

Referenced by beginJob().

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 beginJob().

MonitorElement* VertexMonitor::NumberOfBADndofPVtxVsBXlumi

Definition at line 74 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::NumberOfBADndofPVtxVsGoodPVtx

Definition at line 75 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

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 beginJob().

MonitorElement* VertexMonitor::NumberOfGoodPVtxVsBXlumi

Definition at line 65 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::NumberOfPVtx

Definition at line 61 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::NumberOfPVtxVsBXlumi

Definition at line 62 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::NumberOfPVtxVsGoodPVtx

Definition at line 63 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

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().