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 &, edm::InputTag, edm::InputTag, std::string pvLabel)
 
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::InputTag selectedPrimaryVertexInputTag_
 

Detailed Description

Monitoring source for general quantities related to vertex

Definition at line 30 of file VertexMonitor.h.

Constructor & Destructor Documentation

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

Definition at line 23 of file VertexMonitor.cc.

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

24  : conf_( iConfig )
25  , primaryVertexInputTag_ ( primaryVertexInputTag )
26  , selectedPrimaryVertexInputTag_ ( selectedPrimaryVertexInputTag )
27  , label_ ( pvLabel )
51  , doAllPlots_ ( conf_.getParameter<bool>("doAllPlots") )
52  , doPlotsVsBXlumi_ ( conf_.getParameter<bool>("doPlotsVsBXlumi") )
53  , doPlotsVsGoodPVtx_( conf_.getParameter<bool>("doPlotsVsGoodPVtx") )
54 
55 {
56  //now do what ever initialization is needed
57  if ( doPlotsVsBXlumi_ )
58  lumiDetails_ = new GetLumi( iConfig.getParameter<edm::ParameterSet>("BXlumiSetup") );
59 
60 }
T getParameter(std::string const &) const
bool doPlotsVsGoodPVtx_
Definition: VertexMonitor.h:90
MonitorElement * GoodPVtxNumberOfTracks
Definition: VertexMonitor.h:78
std::string label_
Definition: VertexMonitor.h:49
MonitorElement * GoodPVtxChi2oNDFVsBXlumi
Definition: VertexMonitor.h:84
edm::ParameterSet conf_
Definition: VertexMonitor.h:45
MonitorElement * GoodPVtxSumPtVsBXlumi
Definition: VertexMonitor.h:75
MonitorElement * GoodPVtxNumberOfTracksVsBXlumi
Definition: VertexMonitor.h:79
#define NULL
Definition: scimark2.h:8
bool doPlotsVsBXlumi_
Definition: VertexMonitor.h:89
MonitorElement * NumberOfBADndofPVtxVsGoodPVtx
Definition: VertexMonitor.h:67
MonitorElement * GoodPVtxNumberOfTracksVsGoodPVtx
Definition: VertexMonitor.h:80
MonitorElement * GoodPVtxChi2oNDFVsGoodPVtx
Definition: VertexMonitor.h:83
MonitorElement * FractionOfGoodPVtxVsPVtx
Definition: VertexMonitor.h:61
edm::InputTag primaryVertexInputTag_
Definition: VertexMonitor.h:47
MonitorElement * FractionOfGoodPVtx
Definition: VertexMonitor.h:58
MonitorElement * FractionOfGoodPVtxVsBXlumi
Definition: VertexMonitor.h:59
MonitorElement * GoodPVtxSumPtVsGoodPVtx
Definition: VertexMonitor.h:76
MonitorElement * NumberOfPVtxVsBXlumi
Definition: VertexMonitor.h:54
MonitorElement * NumberOfPVtxVsGoodPVtx
Definition: VertexMonitor.h:55
MonitorElement * FractionOfGoodPVtxVsGoodPVtx
Definition: VertexMonitor.h:60
MonitorElement * NumberOfBADndofPVtx
Definition: VertexMonitor.h:65
MonitorElement * GoodPVtxSumPt
Definition: VertexMonitor.h:74
MonitorElement * GoodPVtxChi2ProbVsGoodPVtx
Definition: VertexMonitor.h:85
edm::InputTag selectedPrimaryVertexInputTag_
Definition: VertexMonitor.h:48
MonitorElement * NumberOfGoodPVtxVsBXlumi
Definition: VertexMonitor.h:57
MonitorElement * GoodPVtxChi2ProbVsBXlumi
Definition: VertexMonitor.h:86
MonitorElement * NumberOfBADndofPVtxVsBXlumi
Definition: VertexMonitor.h:66
MonitorElement * NumberOfPVtx
Definition: VertexMonitor.h:53
MonitorElement * GoodPVtxNumberOfTracksVsGoodPVtxNdof
Definition: VertexMonitor.h:81
GetLumi * lumiDetails_
Definition: VertexMonitor.h:51
MonitorElement * NumberOfGoodPVtx
Definition: VertexMonitor.h:56
VertexMonitor::~VertexMonitor ( )
virtual

Definition at line 63 of file VertexMonitor.cc.

64 {
65 
66  // do anything here that needs to be done at desctruction time
67  // (e.g. close files, deallocate resources etc.)
68  // if (lumiDetails_) delete lumiDetails_;
69 }

Member Function Documentation

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

Definition at line 80 of file VertexMonitor.cc.

References reco::Vertex::chi2(), gather_cfg::cout, doPlotsVsBXlumi_, doPlotsVsGoodPVtx_, HcalObjRepresent::Fill(), FractionOfGoodPVtx, FractionOfGoodPVtxVsBXlumi, FractionOfGoodPVtxVsGoodPVtx, FractionOfGoodPVtxVsPVtx, edm::Event::getByLabel(), 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, primaryVertexInputTag_, selectedPrimaryVertexInputTag_, reco::Vertex::tracks_begin(), reco::Vertex::tracks_end(), and reco::Vertex::tracksSize().

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

Definition at line 176 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(), and DQMStore::setCurrentFolder().

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

Definition at line 361 of file VertexMonitor.cc.

362 {
363 }
void VertexMonitor::endLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
virtual

Definition at line 367 of file VertexMonitor.cc.

368 {
369 }
void VertexMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 373 of file VertexMonitor.cc.

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

373  {
374  //The following says we do not know what parameters are allowed so do no validation
375  // Please change this to state exactly what you do use, even if it is no parameters
377  desc.setUnknown();
378  descriptions.addDefault(desc);
379 }
void addDefault(ParameterSetDescription const &psetDescription)

Member Data Documentation

MonitorElement* VertexMonitor::Chi2oNDFVsBXlumi

Definition at line 70 of file VertexMonitor.h.

Referenced by beginJob().

MonitorElement* VertexMonitor::Chi2oNDFVsGoodPVtx

Definition at line 69 of file VertexMonitor.h.

MonitorElement* VertexMonitor::Chi2ProbVsBXlumi

Definition at line 72 of file VertexMonitor.h.

Referenced by beginJob().

MonitorElement* VertexMonitor::Chi2ProbVsGoodPVtx

Definition at line 71 of file VertexMonitor.h.

edm::ParameterSet VertexMonitor::conf_

Definition at line 45 of file VertexMonitor.h.

Referenced by beginJob().

bool VertexMonitor::doAllPlots_

Definition at line 88 of file VertexMonitor.h.

bool VertexMonitor::doPlotsVsBXlumi_

Definition at line 89 of file VertexMonitor.h.

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

bool VertexMonitor::doPlotsVsGoodPVtx_

Definition at line 90 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::FractionOfGoodPVtx

Definition at line 58 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::FractionOfGoodPVtxVsBXlumi

Definition at line 59 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::FractionOfGoodPVtxVsGoodPVtx

Definition at line 60 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::FractionOfGoodPVtxVsPVtx

Definition at line 61 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxChi2oNDFVsBXlumi

Definition at line 84 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxChi2oNDFVsGoodPVtx

Definition at line 83 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxChi2ProbVsBXlumi

Definition at line 86 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxChi2ProbVsGoodPVtx

Definition at line 85 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxNumberOfTracks

Definition at line 78 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxNumberOfTracksVsBXlumi

Definition at line 79 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxNumberOfTracksVsGoodPVtx

Definition at line 80 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxNumberOfTracksVsGoodPVtxNdof

Definition at line 81 of file VertexMonitor.h.

MonitorElement* VertexMonitor::GoodPVtxSumPt

Definition at line 74 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxSumPtVsBXlumi

Definition at line 75 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::GoodPVtxSumPtVsGoodPVtx

Definition at line 76 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

std::string VertexMonitor::histname

Definition at line 92 of file VertexMonitor.h.

Referenced by beginJob().

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

Definition at line 51 of file VertexMonitor.h.

Referenced by analyze(), and VertexMonitor().

MonitorElement* VertexMonitor::NumberOfBADndofPVtx

Definition at line 65 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::NumberOfBADndofPVtxVsBXlumi

Definition at line 66 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::NumberOfBADndofPVtxVsGoodPVtx

Definition at line 67 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::NumberOfFakePVtx

Definition at line 62 of file VertexMonitor.h.

MonitorElement* VertexMonitor::NumberOfFakePVtxVsBXlumi

Definition at line 63 of file VertexMonitor.h.

MonitorElement* VertexMonitor::NumberOfFakePVtxVsGoodPVtx

Definition at line 64 of file VertexMonitor.h.

MonitorElement* VertexMonitor::NumberOfGoodPVtx

Definition at line 56 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::NumberOfGoodPVtxVsBXlumi

Definition at line 57 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::NumberOfPVtx

Definition at line 53 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::NumberOfPVtxVsBXlumi

Definition at line 54 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

MonitorElement* VertexMonitor::NumberOfPVtxVsGoodPVtx

Definition at line 55 of file VertexMonitor.h.

Referenced by analyze(), and beginJob().

edm::InputTag VertexMonitor::primaryVertexInputTag_

Definition at line 47 of file VertexMonitor.h.

Referenced by analyze().

edm::InputTag VertexMonitor::selectedPrimaryVertexInputTag_

Definition at line 48 of file VertexMonitor.h.

Referenced by analyze().