CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
SplitVertexResolution Class Reference

#include <Alignment/OfflineValidation/plugins/SplitVertexResolution.cc>

Inheritance diagram for SplitVertexResolution:
edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 SplitVertexResolution (const edm::ParameterSet &)
 
 ~SplitVertexResolution () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources >
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
static bool mysorter (reco::Track i, reco::Track j)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
virtual void beginEvent () final
 
void beginJob () override
 
void beginRun (edm::Run const &iEvent, edm::EventSetup const &) override
 
std::vector< TH1F * > bookResidualsHistogram (TFileDirectory dir, unsigned int theNOfBins, TString resType, TString varType)
 
template<std::size_t SIZE>
bool checkBinOrdering (std::array< float, SIZE > &bins)
 
void endJob () override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void fillTrendPlotByIndex (TH1F *trendPlot, std::vector< TH1F * > &h, PVValHelper::estimator fitPar_)
 
statmode::fitParams fitResiduals (TH1 *hist, bool singleTime=false)
 
statmode::fitParams fitResiduals_v0 (TH1 *hist)
 
std::pair< long long, long long > getRunTime (const edm::EventSetup &iSetup) const
 

Private Attributes

const int compressionSettings_
 
bool debug_
 
std::mt19937 engine_
 
pvEvent event_
 
TH1D * evtsByTrigger_
 
TH1F * h_avgSumPt
 
TH1F * h_diffX
 
TH1F * h_diffY
 
TH1F * h_diffZ
 
TH1F * h_errX
 
TH1F * h_errY
 
TH1F * h_errZ
 
TH1F * h_lumiFromConfig
 
TH1F * h_minWTrks1
 
TH1F * h_minWTrks2
 
TH1I * h_nFinalVertices
 
TH1I * h_nNonFakeVertices
 
TH1I * h_nOfflineVertices
 
TH1F * h_ntrks
 
TH1I * h_nVertices
 
TH1F * h_OrigVertexErrX
 
TH1F * h_OrigVertexErrY
 
TH1F * h_OrigVertexErrZ
 
TH1F * h_pullX
 
std::vector< TH1F * > h_pullX_Ntracks_
 
std::vector< TH1F * > h_pullX_Nvtx_
 
std::vector< TH1F * > h_pullX_sumPt_
 
TH1F * h_pullY
 
std::vector< TH1F * > h_pullY_Ntracks_
 
std::vector< TH1F * > h_pullY_Nvtx_
 
std::vector< TH1F * > h_pullY_sumPt_
 
TH1F * h_pullZ
 
std::vector< TH1F * > h_pullZ_Ntracks_
 
std::vector< TH1F * > h_pullZ_Nvtx_
 
std::vector< TH1F * > h_pullZ_sumPt_
 
TH1F * h_PVCL_subVtx1
 
TH1F * h_PVCL_subVtx2
 
std::vector< TH1F * > h_resolX_Ntracks_
 
std::vector< TH1F * > h_resolX_Nvtx_
 
std::vector< TH1F * > h_resolX_sumPt_
 
std::vector< TH1F * > h_resolY_Ntracks_
 
std::vector< TH1F * > h_resolY_Nvtx_
 
std::vector< TH1F * > h_resolY_sumPt_
 
std::vector< TH1F * > h_resolZ_Ntracks_
 
std::vector< TH1F * > h_resolZ_Nvtx_
 
std::vector< TH1F * > h_resolZ_sumPt_
 
TH1I * h_runEndTimes
 
TH1I * h_runFromConfig
 
TH1F * h_runNumber
 
TH1I * h_runStartTimes
 
TH1F * h_sumPt
 
TH1F * h_sumPt1
 
TH1F * h_sumPt2
 
TH1F * h_wTrks1
 
TH1F * h_wTrks2
 
int ievt
 
double intLumi_
 
int itrks
 
double minVtxNdf_
 
double minVtxWgt_
 
std::array< float, nTrackBins_+1 > myNTrack_bins_
 
std::array< float, nVtxBins_+1 > myNVtx_bins_
 
std::array< float, nPtBins_+1 > mypT_bins_ = PVValHelper::makeLogBins<float, nPtBins_>(1., 1e3)
 
edm::Service< TFileServiceoutfile_
 
TH1F * p_pullX_vsNtracks
 
TH1F * p_pullX_vsNvtx
 
TH1F * p_pullX_vsSumPt
 
TH1F * p_pullY_vsNtracks
 
TH1F * p_pullY_vsNvtx
 
TH1F * p_pullY_vsSumPt
 
TH1F * p_pullZ_vsNtracks
 
TH1F * p_pullZ_vsNvtx
 
TH1F * p_pullZ_vsSumPt
 
TH1F * p_resolX_vsNtracks
 
TH1F * p_resolX_vsNvtx
 
TH1F * p_resolX_vsSumPt
 
TH1F * p_resolY_vsNtracks
 
TH1F * p_resolY_vsNvtx
 
TH1F * p_resolY_vsSumPt
 
TH1F * p_resolZ_vsNtracks
 
TH1F * p_resolZ_vsNvtx
 
TH1F * p_resolZ_vsSumPt
 
edm::InputTag pvsTag_
 
edm::EDGetTokenT< reco::VertexCollectionpvsToken_
 
bool runControl_
 
std::vector< unsigned int > runControlNumbers_
 
edm::ESGetToken< RunInfo, RunInfoRcdrunInfoToken_
 
std::map< unsigned int, std::pair< long long, long long > > runNumbersTimesLog_
 
bool storeNtuple_
 
TH1D * tksByTrigger_
 
edm::InputTag tracksTag_
 
edm::EDGetTokenT< reco::TrackCollectiontracksToken_
 
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecordtransientTrackBuilderToken_
 
TTree * tree_
 
std::map< std::string, std::pair< int, int > > triggerMap_
 
edm::InputTag triggerResultsTag_ = edm::InputTag("TriggerResults", "", "HLT")
 
edm::EDGetTokenT< edm::TriggerResultstriggerResultsToken_
 

Static Private Attributes

static constexpr double cmToUm = 10000.
 
static const int nPtBins_ = 30
 
static const int nTrackBins_ = 60
 
static const int nVtxBins_ = 40
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 75 of file SplitVertexResolution.cc.

Constructor & Destructor Documentation

◆ SplitVertexResolution()

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

Definition at line 263 of file SplitVertexResolution.cc.

264  : compressionSettings_(iConfig.getUntrackedParameter<int>("compressionSettings", -1)),
265  storeNtuple_(iConfig.getParameter<bool>("storeNtuple")),
266  intLumi_(iConfig.getUntrackedParameter<double>("intLumi", 0.)),
267  debug_(iConfig.getUntrackedParameter<bool>("Debug", false)),
268  pvsTag_(iConfig.getParameter<edm::InputTag>("vtxCollection")),
269  pvsToken_(consumes<reco::VertexCollection>(pvsTag_)),
270  tracksTag_(iConfig.getParameter<edm::InputTag>("trackCollection")),
271  tracksToken_(consumes<reco::TrackCollection>(tracksTag_)),
272  triggerResultsToken_(consumes<edm::TriggerResults>(triggerResultsTag_)),
274  esConsumes<TransientTrackBuilder, TransientTrackRecord>(edm::ESInputTag("", "TransientTrackBuilder"))),
275  runInfoToken_(esConsumes<RunInfo, RunInfoRcd, edm::Transition::BeginRun>()),
276  minVtxNdf_(iConfig.getUntrackedParameter<double>("minVertexNdf")),
277  minVtxWgt_(iConfig.getUntrackedParameter<double>("minVertexMeanWeight")),
278  runControl_(iConfig.getUntrackedParameter<bool>("runControl", false)) {
279  usesResource(TFileService::kSharedResource);
280 
281  std::vector<unsigned int> defaultRuns;
282  defaultRuns.push_back(0);
283  runControlNumbers_ = iConfig.getUntrackedParameter<std::vector<unsigned int> >("runControlNumber", defaultRuns);
284 
285  std::vector<float> vect = PVValHelper::generateBins(nTrackBins_ + 1, -0.5, 120.);
286  std::copy(vect.begin(), vect.begin() + nTrackBins_ + 1, myNTrack_bins_.begin());
287 
288  vect.clear();
289  vect = PVValHelper::generateBins(nVtxBins_ + 1, 1., 40.);
290  std::copy(vect.begin(), vect.begin() + nVtxBins_ + 1, myNVtx_bins_.begin());
291 }

References filterCSVwithJSON::copy, PVValHelper::generateBins(), edm::ParameterSet::getUntrackedParameter(), TFileService::kSharedResource, myNTrack_bins_, myNVtx_bins_, nTrackBins_, nVtxBins_, and runControlNumbers_.

◆ ~SplitVertexResolution()

SplitVertexResolution::~SplitVertexResolution ( )
override

Definition at line 293 of file SplitVertexResolution.cc.

293 {}

Member Function Documentation

◆ analyze()

void SplitVertexResolution::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 296 of file SplitVertexResolution.cc.

296  {
297  using namespace edm;
298 
299  // deterministic seed from the event number
300  // should not bias the result as the event number is already
301  // assigned randomly-enough
302  engine_.seed(iEvent.id().event() + (iEvent.id().luminosityBlock() << 10) + (iEvent.id().run() << 20));
303 
304  // first check if the event passes the run control
305  bool passesRunControl = false;
306 
307  if (runControl_) {
308  for (const auto& runControlNumber : runControlNumbers_) {
309  if (iEvent.eventAuxiliary().run() == runControlNumber) {
310  if (debug_) {
311  edm::LogInfo("SplitVertexResolution")
312  << " run number: " << iEvent.eventAuxiliary().run() << " keeping run:" << runControlNumber;
313  }
314  passesRunControl = true;
315  break;
316  }
317  }
318  if (!passesRunControl)
319  return;
320  }
321 
322  // Fill general info
323  h_runNumber->Fill(iEvent.id().run());
324 
325  ievt++;
328 
329  const edm::TriggerNames& triggerNames_ = iEvent.triggerNames(*hltresults);
330  int ntrigs = hltresults->size();
331  //const std::vector<std::string>& triggernames = triggerNames_.triggerNames();
332 
333  beginEvent();
334 
335  // Fill general info
336  event_.runNumber = iEvent.id().run();
337  event_.luminosityBlockNumber = iEvent.id().luminosityBlock();
338  event_.eventNumber = iEvent.id().event();
339 
341 
343  iEvent.getByToken(pvsToken_, vertices);
344  const reco::VertexCollection pvtx = *(vertices.product());
345 
346  event_.nVtx = pvtx.size();
347  int nOfflineVtx = pvtx.size();
348  h_nOfflineVertices->Fill(nOfflineVtx);
349 
351  iEvent.getByToken(tracksToken_, tracks);
352  itrks += tracks.product()->size();
353 
354  for (int itrig = 0; itrig != ntrigs; ++itrig) {
355  const std::string& trigName = triggerNames_.triggerName(itrig);
356  bool accept = hltresults->accept(itrig);
357  if (accept == 1) {
358  triggerMap_[trigName].first += 1;
359  triggerMap_[trigName].second += tracks.product()->size();
360  // triggerInfo.push_back(pair <string, int> (trigName, accept));
361  }
362  }
363 
364  int counter = 0;
365  int noFakecounter = 0;
366  int goodcounter = 0;
367 
368  for (auto pvIt = pvtx.cbegin(); pvIt != pvtx.cend(); ++pvIt) {
369  reco::Vertex iPV = *pvIt;
370  counter++;
371  if (iPV.isFake())
372  continue;
373  noFakecounter++;
374 
375  // vertex selection as in bs code
376  if (iPV.ndof() < minVtxNdf_ || (iPV.ndof() + 3.) / iPV.tracksSize() < 2 * minVtxWgt_)
377  continue;
378 
379  goodcounter++;
381  reco::TrackCollection groupOne, groupTwo;
382  for (auto trki = iPV.tracks_begin(); trki != iPV.tracks_end(); ++trki) {
383  if (trki->isNonnull()) {
384  reco::TrackRef trk_now(tracks, (*trki).key());
385  allTracks.push_back(*trk_now);
386  }
387  }
388 
389  if (goodcounter > 1)
390  continue;
391 
392  // order with decreasing pt
393  std::sort(allTracks.begin(), allTracks.end(), mysorter);
394 
395  int ntrks = allTracks.size();
396  h_ntrks->Fill(ntrks);
397 
398  // discard lowest pt track
399  uint even_ntrks;
400  ntrks % 2 == 0 ? even_ntrks = ntrks : even_ntrks = ntrks - 1;
401 
402  // split into two sets equally populated
403  for (uint tracksIt = 0; tracksIt < even_ntrks; tracksIt = tracksIt + 2) {
404  reco::Track firstTrk = allTracks.at(tracksIt);
405  reco::Track secondTrk = allTracks.at(tracksIt + 1);
406  auto dis = std::uniform_int_distribution<>(0, 1); // [0, 1]
407 
408  if (dis(engine_) > 0.5) {
409  groupOne.push_back(firstTrk);
410  groupTwo.push_back(secondTrk);
411  } else {
412  groupOne.push_back(secondTrk);
413  groupTwo.push_back(firstTrk);
414  }
415  }
416 
417  if (!(groupOne.size() >= 2 && groupTwo.size() >= 2))
418  continue;
419 
420  h_OrigVertexErrX->Fill(iPV.xError() * cmToUm);
421  h_OrigVertexErrY->Fill(iPV.yError() * cmToUm);
422  h_OrigVertexErrZ->Fill(iPV.zError() * cmToUm);
423 
424  float sumPt = 0, sumPt1 = 0, sumPt2 = 0, avgSumPt = 0;
425 
426  // refit the two sets of tracks
427  std::vector<reco::TransientTrack> groupOne_ttks;
428  groupOne_ttks.clear();
429  for (auto itrk = groupOne.cbegin(); itrk != groupOne.cend(); itrk++) {
430  reco::TransientTrack tmpTransientTrack = theB.build(*itrk);
431  groupOne_ttks.push_back(tmpTransientTrack);
432  sumPt1 += itrk->pt();
433  sumPt += itrk->pt();
434  }
435 
436  AdaptiveVertexFitter pvFitter;
437  TransientVertex pvOne = pvFitter.vertex(groupOne_ttks);
438  if (!pvOne.isValid())
439  continue;
440 
441  reco::Vertex onePV = pvOne;
442 
443  std::vector<reco::TransientTrack> groupTwo_ttks;
444  groupTwo_ttks.clear();
445  for (auto itrk = groupTwo.cbegin(); itrk != groupTwo.cend(); itrk++) {
446  reco::TransientTrack tmpTransientTrack = theB.build(*itrk);
447  groupTwo_ttks.push_back(tmpTransientTrack);
448  sumPt2 += itrk->pt();
449  sumPt += itrk->pt();
450  }
451 
452  // average sumPt
453  avgSumPt = (sumPt1 + sumPt2) / 2.;
454  h_avgSumPt->Fill(avgSumPt);
455 
456  TransientVertex pvTwo = pvFitter.vertex(groupTwo_ttks);
457  if (!pvTwo.isValid())
458  continue;
459 
460  reco::Vertex twoPV = pvTwo;
461 
462  float theminW1 = 1.;
463  float theminW2 = 1.;
464  for (auto otrk = pvOne.originalTracks().cbegin(); otrk != pvOne.originalTracks().cend(); ++otrk) {
465  h_wTrks1->Fill(pvOne.trackWeight(*otrk));
466  if (pvOne.trackWeight(*otrk) < theminW1) {
467  theminW1 = pvOne.trackWeight(*otrk);
468  }
469  }
470  for (auto otrk = pvTwo.originalTracks().cbegin(); otrk != pvTwo.originalTracks().end(); ++otrk) {
471  h_wTrks2->Fill(pvTwo.trackWeight(*otrk));
472  if (pvTwo.trackWeight(*otrk) < theminW2) {
473  theminW2 = pvTwo.trackWeight(*otrk);
474  }
475  }
476 
477  h_sumPt->Fill(sumPt);
478 
479  int half_trks = twoPV.nTracks();
480 
481  const double invSqrt2 = 1. / std::sqrt(2.);
482 
483  double deltaX = (twoPV.x() - onePV.x());
484  double deltaY = (twoPV.y() - onePV.y());
485  double deltaZ = (twoPV.z() - onePV.z());
486 
487  double resX = deltaX * invSqrt2;
488  double resY = deltaY * invSqrt2;
489  double resZ = deltaZ * invSqrt2;
490 
491  h_diffX->Fill(resX * cmToUm);
492  h_diffY->Fill(resY * cmToUm);
493  h_diffZ->Fill(resZ * cmToUm);
494 
495  double errX = sqrt(pow(twoPV.xError(), 2) + pow(onePV.xError(), 2));
496  double errY = sqrt(pow(twoPV.yError(), 2) + pow(onePV.yError(), 2));
497  double errZ = sqrt(pow(twoPV.zError(), 2) + pow(onePV.zError(), 2));
498 
499  h_errX->Fill(errX * cmToUm);
500  h_errY->Fill(errY * cmToUm);
501  h_errZ->Fill(errZ * cmToUm);
502 
503  h_pullX->Fill(deltaX / errX);
504  h_pullY->Fill(deltaY / errY);
505  h_pullZ->Fill(deltaZ / errZ);
506 
507  // filling the pT-binned distributions
508 
509  for (int ipTBin = 0; ipTBin < nPtBins_; ipTBin++) {
510  float pTF = mypT_bins_[ipTBin];
511  float pTL = mypT_bins_[ipTBin + 1];
512 
513  if (avgSumPt >= pTF && avgSumPt < pTL) {
514  PVValHelper::fillByIndex(h_resolX_sumPt_, ipTBin, resX * cmToUm, "1");
515  PVValHelper::fillByIndex(h_resolY_sumPt_, ipTBin, resY * cmToUm, "2");
516  PVValHelper::fillByIndex(h_resolZ_sumPt_, ipTBin, resZ * cmToUm, "3");
517 
518  PVValHelper::fillByIndex(h_pullX_sumPt_, ipTBin, deltaX / errX, "4");
519  PVValHelper::fillByIndex(h_pullY_sumPt_, ipTBin, deltaY / errY, "5");
520  PVValHelper::fillByIndex(h_pullZ_sumPt_, ipTBin, deltaZ / errZ, "6");
521  }
522  }
523 
524  // filling the track multeplicity binned distributions
525 
526  for (int inTrackBin = 0; inTrackBin < nTrackBins_; inTrackBin++) {
527  float nTrackF = myNTrack_bins_[inTrackBin];
528  float nTrackL = myNTrack_bins_[inTrackBin + 1];
529 
530  if (ntrks >= nTrackF && ntrks < nTrackL) {
531  PVValHelper::fillByIndex(h_resolX_Ntracks_, inTrackBin, resX * cmToUm, "7");
532  PVValHelper::fillByIndex(h_resolY_Ntracks_, inTrackBin, resY * cmToUm, "8");
533  PVValHelper::fillByIndex(h_resolZ_Ntracks_, inTrackBin, resZ * cmToUm, "9");
534 
535  PVValHelper::fillByIndex(h_pullX_Ntracks_, inTrackBin, deltaX / errX, "10");
536  PVValHelper::fillByIndex(h_pullY_Ntracks_, inTrackBin, deltaY / errY, "11");
537  PVValHelper::fillByIndex(h_pullZ_Ntracks_, inTrackBin, deltaZ / errZ, "12");
538  }
539  }
540 
541  // filling the vertex multeplicity binned distributions
542 
543  for (int inVtxBin = 0; inVtxBin < nVtxBins_; inVtxBin++) {
544  /*
545  float nVtxF = myNVtx_bins_[inVtxBin];
546  float nVtxL = myNVtx_bins_[inVtxBin+1];
547  if(nOfflineVtx >= nVtxF && nOfflineVtx < nVtxL){
548  */
549 
550  if (nOfflineVtx == inVtxBin) {
551  PVValHelper::fillByIndex(h_resolX_Nvtx_, inVtxBin, deltaX * cmToUm, "7");
552  PVValHelper::fillByIndex(h_resolY_Nvtx_, inVtxBin, deltaY * cmToUm, "8");
553  PVValHelper::fillByIndex(h_resolZ_Nvtx_, inVtxBin, deltaZ * cmToUm, "9");
554 
555  PVValHelper::fillByIndex(h_pullX_Nvtx_, inVtxBin, deltaX / errX, "10");
556  PVValHelper::fillByIndex(h_pullY_Nvtx_, inVtxBin, deltaY / errY, "11");
557  PVValHelper::fillByIndex(h_pullZ_Nvtx_, inVtxBin, deltaZ / errZ, "12");
558  }
559  }
560 
561  h_sumPt1->Fill(sumPt1);
562  h_sumPt2->Fill(sumPt2);
563 
564  h_minWTrks1->Fill(theminW1);
565  h_minWTrks2->Fill(theminW2);
566 
567  h_PVCL_subVtx1->Fill(TMath::Prob(pvOne.totalChiSquared(), (int)(pvOne.degreesOfFreedom())));
568  h_PVCL_subVtx2->Fill(TMath::Prob(pvTwo.totalChiSquared(), (int)(pvTwo.degreesOfFreedom())));
569 
570  // fill ntuples
571  pvCand thePV;
572  thePV.ipos = counter;
573  thePV.nTrks = ntrks;
574 
575  thePV.x_origVtx = iPV.x();
576  thePV.y_origVtx = iPV.y();
577  thePV.z_origVtx = iPV.z();
578 
579  thePV.xErr_origVtx = iPV.xError();
580  thePV.yErr_origVtx = iPV.yError();
581  thePV.zErr_origVtx = iPV.zError();
582 
583  thePV.n_subVtx1 = half_trks;
584  thePV.x_subVtx1 = onePV.x();
585  thePV.y_subVtx1 = onePV.y();
586  thePV.z_subVtx1 = onePV.z();
587 
588  thePV.xErr_subVtx1 = onePV.xError();
589  thePV.yErr_subVtx1 = onePV.yError();
590  thePV.zErr_subVtx1 = onePV.zError();
591  thePV.sumPt_subVtx1 = sumPt1;
592 
593  thePV.n_subVtx2 = half_trks;
594  thePV.x_subVtx2 = twoPV.x();
595  thePV.y_subVtx2 = twoPV.y();
596  thePV.z_subVtx2 = twoPV.z();
597 
598  thePV.xErr_subVtx2 = twoPV.xError();
599  thePV.yErr_subVtx2 = twoPV.yError();
600  thePV.zErr_subVtx2 = twoPV.zError();
601  thePV.sumPt_subVtx2 = sumPt2;
602 
603  thePV.CL_subVtx1 = TMath::Prob(pvOne.totalChiSquared(), (int)(pvOne.degreesOfFreedom()));
604  thePV.CL_subVtx2 = TMath::Prob(pvTwo.totalChiSquared(), (int)(pvTwo.degreesOfFreedom()));
605 
606  thePV.minW_subVtx1 = theminW1;
607  thePV.minW_subVtx2 = theminW2;
608 
609  event_.pvs.push_back(thePV);
610 
611  } // loop on the vertices
612 
613  // fill the histogram of vertices per event
614  h_nVertices->Fill(counter);
615  h_nNonFakeVertices->Fill(noFakecounter);
616  h_nFinalVertices->Fill(goodcounter);
617 
618  if (storeNtuple_) {
619  tree_->Fill();
620  }
621 }

References accept(), muonTagProbeFilters_cff::allTracks, beginEvent(), TransientTrackBuilder::build(), pvCand::CL_subVtx1, pvCand::CL_subVtx2, cmToUm, counter, debug_, engine_, fftjetvertexadder_cfi::errX, fftjetvertexadder_cfi::errY, fftjetvertexadder_cfi::errZ, event_, pvEvent::eventNumber, PVValHelper::fillByIndex(), edm::EventSetup::getData(), h_avgSumPt, h_diffX, h_diffY, h_diffZ, h_errX, h_errY, h_errZ, h_minWTrks1, h_minWTrks2, h_nFinalVertices, h_nNonFakeVertices, h_nOfflineVertices, h_ntrks, h_nVertices, h_OrigVertexErrX, h_OrigVertexErrY, h_OrigVertexErrZ, h_pullX, h_pullX_Ntracks_, h_pullX_Nvtx_, h_pullX_sumPt_, h_pullY, h_pullY_Ntracks_, h_pullY_Nvtx_, h_pullY_sumPt_, h_pullZ, h_pullZ_Ntracks_, h_pullZ_Nvtx_, h_pullZ_sumPt_, h_PVCL_subVtx1, h_PVCL_subVtx2, h_resolX_Ntracks_, h_resolX_Nvtx_, h_resolX_sumPt_, h_resolY_Ntracks_, h_resolY_Nvtx_, h_resolY_sumPt_, h_resolZ_Ntracks_, h_resolZ_Nvtx_, h_resolZ_sumPt_, h_runNumber, h_sumPt, h_sumPt1, h_sumPt2, h_wTrks1, h_wTrks2, HLTBitAnalyser_cfi::hltresults, iEvent, ievt, createfilelist::int, pvCand::ipos, reco::Vertex::isFake(), TransientVertex::isValid(), itrks, pvEvent::luminosityBlockNumber, minVtxNdf_, minVtxWgt_, pvCand::minW_subVtx1, pvCand::minW_subVtx2, myNTrack_bins_, mypT_bins_, mysorter(), pvCand::n_subVtx1, pvCand::n_subVtx2, reco::Vertex::ndof(), nPtBins_, nTrackBins_, reco::Vertex::nTracks(), pvCand::nTrks, pvEvent::nVtx, nVtxBins_, TransientVertex::originalTracks(), funct::pow(), pvEvent::pvs, pvsToken_, runControl_, runControlNumbers_, pvEvent::runNumber, mathSSE::sqrt(), storeNtuple_, AlCaHLTBitMon_QueryRunRegistry::string, TtFullHadEvtBuilder_cfi::sumPt, pvCand::sumPt_subVtx1, pvCand::sumPt_subVtx2, PDWG_EXOHSCP_cff::tracks, reco::Vertex::tracks_begin(), reco::Vertex::tracks_end(), reco::Vertex::tracksSize(), tracksToken_, TransientVertex::trackWeight(), transientTrackBuilderToken_, tree_, triggerMap_, edm::TriggerNames::triggerName(), triggerResultsToken_, EgHLTOffTrigSelection_cfi::trigName, parallelization::uint, AdaptiveVertexFitter::vertex(), pwdgSkimBPark_cfi::vertices, reco::Vertex::x(), pvCand::x_origVtx, pvCand::x_subVtx1, pvCand::x_subVtx2, pvCand::xErr_origVtx, pvCand::xErr_subVtx1, pvCand::xErr_subVtx2, reco::Vertex::xError(), reco::Vertex::y(), pvCand::y_origVtx, pvCand::y_subVtx1, pvCand::y_subVtx2, pvCand::yErr_origVtx, pvCand::yErr_subVtx1, pvCand::yErr_subVtx2, reco::Vertex::yError(), reco::Vertex::z(), pvCand::z_origVtx, pvCand::z_subVtx1, pvCand::z_subVtx2, pvCand::zErr_origVtx, pvCand::zErr_subVtx1, pvCand::zErr_subVtx2, and reco::Vertex::zError().

◆ beginEvent()

void SplitVertexResolution::beginEvent ( )
finalprivatevirtual

Definition at line 623 of file SplitVertexResolution.cc.

623  {
624  event_.pvs.clear();
625  event_.nVtx = -1;
626 }

References event_, pvEvent::nVtx, and pvEvent::pvs.

Referenced by analyze().

◆ beginJob()

void SplitVertexResolution::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 646 of file SplitVertexResolution.cc.

646  {
647  ievt = 0;
648  itrks = 0;
649 
650  if (compressionSettings_ > 0) {
651  outfile_->file().SetCompressionSettings(compressionSettings_);
652  }
653 
654  // luminosity histo
655  TFileDirectory EventFeatures = outfile_->mkdir("EventFeatures");
657  EventFeatures.make<TH1F>("h_lumiFromConfig", "luminosity from config;;luminosity of present run", 1, -0.5, 0.5);
658  h_lumiFromConfig->SetBinContent(1, intLumi_);
659 
660  h_runFromConfig = EventFeatures.make<TH1I>("h_runFromConfig",
661  "run number from config;;run number (from configuration)",
662  runControlNumbers_.size(),
663  0.,
664  runControlNumbers_.size());
665 
666  for (const auto& run : runControlNumbers_ | boost::adaptors::indexed(1)) {
667  h_runFromConfig->SetBinContent(run.index(), run.value());
668  }
669 
670  // resolutions
671 
673  edm::LogError("SplitVertexResolution") << " Warning - the vector of pT bins is not ordered " << std::endl;
674  }
675 
677  edm::LogError("SplitVertexResolution") << " Warning -the vector of n. tracks bins is not ordered " << std::endl;
678  }
679 
681  edm::LogError("SplitVertexResolution") << " Warning -the vector of n. vertices bins is not ordered " << std::endl;
682  }
683 
684  TFileDirectory xResolSumPt = outfile_->mkdir("xResolSumPt");
685  h_resolX_sumPt_ = bookResidualsHistogram(xResolSumPt, nPtBins_, "resolX", "sumPt");
686 
687  TFileDirectory yResolSumPt = outfile_->mkdir("yResolSumPt");
688  h_resolY_sumPt_ = bookResidualsHistogram(yResolSumPt, nPtBins_, "resolY", "sumPt");
689 
690  TFileDirectory zResolSumPt = outfile_->mkdir("zResolSumPt");
691  h_resolZ_sumPt_ = bookResidualsHistogram(zResolSumPt, nPtBins_, "resolZ", "sumPt");
692 
693  TFileDirectory xResolNtracks_ = outfile_->mkdir("xResolNtracks");
694  h_resolX_Ntracks_ = bookResidualsHistogram(xResolNtracks_, nTrackBins_, "resolX", "Ntracks");
695 
696  TFileDirectory yResolNtracks_ = outfile_->mkdir("yResolNtracks");
697  h_resolY_Ntracks_ = bookResidualsHistogram(yResolNtracks_, nTrackBins_, "resolY", "Ntracks");
698 
699  TFileDirectory zResolNtracks_ = outfile_->mkdir("zResolNtracks");
700  h_resolZ_Ntracks_ = bookResidualsHistogram(zResolNtracks_, nTrackBins_, "resolZ", "Ntracks");
701 
702  TFileDirectory xResolNvtx_ = outfile_->mkdir("xResolNvtx");
703  h_resolX_Nvtx_ = bookResidualsHistogram(xResolNvtx_, nVtxBins_, "resolX", "Nvtx");
704 
705  TFileDirectory yResolNvtx_ = outfile_->mkdir("yResolNvtx");
706  h_resolY_Nvtx_ = bookResidualsHistogram(yResolNvtx_, nVtxBins_, "resolY", "Nvtx");
707 
708  TFileDirectory zResolNvtx_ = outfile_->mkdir("zResolNvtx");
709  h_resolZ_Nvtx_ = bookResidualsHistogram(zResolNvtx_, nVtxBins_, "resolZ", "Nvtx");
710 
711  // pulls
712 
713  TFileDirectory xPullSumPt = outfile_->mkdir("xPullSumPt");
714  h_pullX_sumPt_ = bookResidualsHistogram(xPullSumPt, nPtBins_, "pullX", "sumPt");
715 
716  TFileDirectory yPullSumPt = outfile_->mkdir("yPullSumPt");
717  h_pullY_sumPt_ = bookResidualsHistogram(yPullSumPt, nPtBins_, "pullY", "sumPt");
718 
719  TFileDirectory zPullSumPt = outfile_->mkdir("zPullSumPt");
720  h_pullZ_sumPt_ = bookResidualsHistogram(zPullSumPt, nPtBins_, "pullZ", "sumPt");
721 
722  TFileDirectory xPullNtracks_ = outfile_->mkdir("xPullNtracks");
723  h_pullX_Ntracks_ = bookResidualsHistogram(xPullNtracks_, nTrackBins_, "pullX", "Ntracks");
724 
725  TFileDirectory yPullNtracks_ = outfile_->mkdir("yPullNtracks");
726  h_pullY_Ntracks_ = bookResidualsHistogram(yPullNtracks_, nTrackBins_, "pullY", "Ntracks");
727 
728  TFileDirectory zPullNtracks_ = outfile_->mkdir("zPullNtracks");
729  h_pullZ_Ntracks_ = bookResidualsHistogram(zPullNtracks_, nTrackBins_, "pullZ", "Ntracks");
730 
731  TFileDirectory xPullNvtx_ = outfile_->mkdir("xPullNvtx");
732  h_pullX_Nvtx_ = bookResidualsHistogram(xPullNvtx_, nVtxBins_, "pullX", "Nvtx");
733 
734  TFileDirectory yPullNvtx_ = outfile_->mkdir("yPullNvtx");
735  h_pullY_Nvtx_ = bookResidualsHistogram(yPullNvtx_, nVtxBins_, "pullY", "Nvtx");
736 
737  TFileDirectory zPullNvtx_ = outfile_->mkdir("zPullNvtx");
738  h_pullZ_Nvtx_ = bookResidualsHistogram(zPullNvtx_, nVtxBins_, "pullZ", "Nvtx");
739 
740  // control plots
741  h_runNumber = outfile_->make<TH1F>("h_runNumber", "run number;run number;n_{events}", 100000, 250000., 350000.);
742 
743  h_nOfflineVertices = outfile_->make<TH1I>("h_nOfflineVertices", "n. of vertices;n. vertices; events", 100, 0, 100);
744  h_nVertices = outfile_->make<TH1I>("h_nVertices", "n. of vertices;n. vertices; events", 100, 0, 100);
746  outfile_->make<TH1I>("h_nRealVertices", "n. of non-fake vertices;n. vertices; events", 100, 0, 100);
748  outfile_->make<TH1I>("h_nSelectedVertices", "n. of selected vertices vertices;n. vertices; events", 100, 0, 100);
749 
750  h_diffX = outfile_->make<TH1F>(
751  "h_diffX", "x-coordinate vertex resolution;vertex resolution (x) [#mum];vertices", 100, -300, 300.);
752  h_diffY = outfile_->make<TH1F>(
753  "h_diffY", "y-coordinate vertex resolution;vertex resolution (y) [#mum];vertices", 100, -300, 300.);
754  h_diffZ = outfile_->make<TH1F>(
755  "h_diffZ", "z-coordinate vertex resolution;vertex resolution (z) [#mum];vertices", 100, -500, 500.);
756 
757  h_OrigVertexErrX = outfile_->make<TH1F>(
758  "h_OrigVertexErrX", "x-coordinate vertex error;vertex error (x) [#mum];vertices", 300, 0., 300.);
759  h_OrigVertexErrY = outfile_->make<TH1F>(
760  "h_OrigVertexErrY", "y-coordinate vertex error;vertex error (y) [#mum];vertices", 300, 0., 300.);
761  h_OrigVertexErrZ = outfile_->make<TH1F>(
762  "h_OrigVertexErrZ", "z-coordinate vertex error;vertex error (z) [#mum];vertices", 500, 0., 500.);
763 
764  h_errX = outfile_->make<TH1F>(
765  "h_errX", "x-coordinate vertex resolution error;vertex resoltuion error (x) [#mum];vertices", 300, 0., 300.);
766  h_errY = outfile_->make<TH1F>(
767  "h_errY", "y-coordinate vertex resolution error;vertex resolution error (y) [#mum];vertices", 300, 0., 300.);
768  h_errZ = outfile_->make<TH1F>(
769  "h_errZ", "z-coordinate vertex resolution error;vertex resolution error (z) [#mum];vertices", 500, 0., 500.);
770 
771  h_pullX = outfile_->make<TH1F>("h_pullX", "x-coordinate vertex pull;vertex pull (x);vertices", 500, -10, 10.);
772  h_pullY = outfile_->make<TH1F>("h_pullY", "y-coordinate vertex pull;vertex pull (y);vertices", 500, -10, 10.);
773  h_pullZ = outfile_->make<TH1F>("h_pullZ", "z-coordinate vertex pull;vertex pull (z);vertices", 500, -10, 10.);
774 
775  h_ntrks = outfile_->make<TH1F>("h_ntrks",
776  "number of tracks in vertex;vertex multeplicity;vertices",
777  myNTrack_bins_.size() - 1,
778  myNTrack_bins_.data());
779 
780  h_sumPt = outfile_->make<TH1F>(
781  "h_sumPt", "#Sigma p_{T};#sum p_{T} [GeV];vertices", mypT_bins_.size() - 1, mypT_bins_.data());
782 
783  h_avgSumPt = outfile_->make<TH1F>(
784  "h_avgSumPt", "#LT #Sigma p_{T} #GT;#LT #sum p_{T} #GT [GeV];vertices", mypT_bins_.size() - 1, mypT_bins_.data());
785 
786  h_sumPt1 = outfile_->make<TH1F>("h_sumPt1",
787  "#Sigma p_{T} sub-vertex 1;#sum p_{T} sub-vertex 1 [GeV];subvertices",
788  mypT_bins_.size() - 1,
789  mypT_bins_.data());
790  h_sumPt2 = outfile_->make<TH1F>("h_sumPt2",
791  "#Sigma p_{T} sub-vertex 2;#sum p_{T} sub-vertex 2 [GeV];subvertices",
792  mypT_bins_.size() - 1,
793  mypT_bins_.data());
794 
795  h_wTrks1 = outfile_->make<TH1F>("h_wTrks1", "weight of track for sub-vertex 1;track weight;subvertices", 500, 0., 1.);
796  h_wTrks2 = outfile_->make<TH1F>("h_wTrks2", "weithg of track for sub-vertex 2;track weight;subvertices", 500, 0., 1.);
797 
798  h_minWTrks1 = outfile_->make<TH1F>(
799  "h_minWTrks1", "minimum weight of track for sub-vertex 1;minimum track weight;subvertices", 500, 0., 1.);
800  h_minWTrks2 = outfile_->make<TH1F>(
801  "h_minWTrks2", "minimum weithg of track for sub-vertex 2;minimum track weight;subvertices", 500, 0., 1.);
802 
804  outfile_->make<TH1F>("h_PVCL_subVtx1",
805  "#chi^{2} probability for sub-vertex 1;Prob(#chi^{2},ndof) for sub-vertex 1;subvertices",
806  100,
807  0.,
808  1);
810  outfile_->make<TH1F>("h_PVCL_subVtx2",
811  "#chi^{2} probability for sub-vertex 2;Prob(#chi^{2},ndof) for sub-vertex 2;subvertices",
812  100,
813  0.,
814  1);
815 
816  // resolutions
817 
818  p_resolX_vsSumPt = outfile_->make<TH1F>("p_resolX_vsSumPt",
819  "x-resolution vs #Sigma p_{T};#sum p_{T}; x vertex resolution [#mum]",
820  mypT_bins_.size() - 1,
821  mypT_bins_.data());
822  p_resolY_vsSumPt = outfile_->make<TH1F>("p_resolY_vsSumPt",
823  "y-resolution vs #Sigma p_{T};#sum p_{T}; y vertex resolution [#mum]",
824  mypT_bins_.size() - 1,
825  mypT_bins_.data());
826  p_resolZ_vsSumPt = outfile_->make<TH1F>("p_resolZ_vsSumPt",
827  "z-resolution vs #Sigma p_{T};#sum p_{T}; z vertex resolution [#mum]",
828  mypT_bins_.size() - 1,
829  mypT_bins_.data());
830 
831  p_resolX_vsNtracks = outfile_->make<TH1F>("p_resolX_vsNtracks",
832  "x-resolution vs n_{tracks};n_{tracks}; x vertex resolution [#mum]",
833  myNTrack_bins_.size() - 1,
834  myNTrack_bins_.data());
835  p_resolY_vsNtracks = outfile_->make<TH1F>("p_resolY_vsNtracks",
836  "y-resolution vs n_{tracks};n_{tracks}; y vertex resolution [#mum]",
837  myNTrack_bins_.size() - 1,
838  myNTrack_bins_.data());
839  p_resolZ_vsNtracks = outfile_->make<TH1F>("p_resolZ_vsNtracks",
840  "z-resolution vs n_{tracks};n_{tracks}; z vertex resolution [#mum]",
841  myNTrack_bins_.size() - 1,
842  myNTrack_bins_.data());
843 
844  p_resolX_vsNvtx = outfile_->make<TH1F>("p_resolX_vsNvtx",
845  "x-resolution vs n_{vertices};n_{vertices}; x vertex resolution [#mum]",
846  myNVtx_bins_.size() - 1,
847  myNVtx_bins_.data());
848  p_resolY_vsNvtx = outfile_->make<TH1F>("p_resolY_vsNvtx",
849  "y-resolution vs n_{vertices};n_{vertices}; y vertex resolution [#mum]",
850  myNVtx_bins_.size() - 1,
851  myNVtx_bins_.data());
852  p_resolZ_vsNvtx = outfile_->make<TH1F>("p_resolZ_vsNvtx",
853  "z-resolution vs n_{vertices};n_{vertices}; z vertex resolution [#mum]",
854  myNVtx_bins_.size() - 1,
855  myNVtx_bins_.data());
856 
857  // pulls
858 
859  p_pullX_vsSumPt = outfile_->make<TH1F>(
860  "p_pullX_vsSumPt", "x-pull vs #Sigma p_{T};#sum p_{T}; x vertex pull", mypT_bins_.size() - 1, mypT_bins_.data());
861  p_pullY_vsSumPt = outfile_->make<TH1F>(
862  "p_pullY_vsSumPt", "y-pull vs #Sigma p_{T};#sum p_{T}; y vertex pull", mypT_bins_.size() - 1, mypT_bins_.data());
863  p_pullZ_vsSumPt = outfile_->make<TH1F>(
864  "p_pullZ_vsSumPt", "z-pull vs #Sigma p_{T};#sum p_{T}; z vertex pull", mypT_bins_.size() - 1, mypT_bins_.data());
865 
866  p_pullX_vsNtracks = outfile_->make<TH1F>("p_pullX_vsNtracks",
867  "x-pull vs n_{tracks};n_{tracks}; x vertex pull",
868  myNTrack_bins_.size() - 1,
869  myNTrack_bins_.data());
870  p_pullY_vsNtracks = outfile_->make<TH1F>("p_pullY_vsNtracks",
871  "y-pull vs n_{tracks};n_{tracks}; y vertex pull",
872  myNTrack_bins_.size() - 1,
873  myNTrack_bins_.data());
874  p_pullZ_vsNtracks = outfile_->make<TH1F>("p_pullZ_vsNtracks",
875  "z-pull vs n_{tracks};n_{tracks}; z vertex pull",
876  myNTrack_bins_.size() - 1,
877  myNTrack_bins_.data());
878 
879  p_pullX_vsNvtx = outfile_->make<TH1F>("p_pullX_vsNvtx",
880  "x-pull vs n_{vertices};n_{vertices}; x vertex pull",
881  myNVtx_bins_.size() - 1,
882  myNVtx_bins_.data());
883  p_pullY_vsNvtx = outfile_->make<TH1F>("p_pullY_vsNvtx",
884  "y-pull vs n_{vertices};n_{vertices}; y vertex pull",
885  myNVtx_bins_.size() - 1,
886  myNVtx_bins_.data());
887  p_pullZ_vsNvtx = outfile_->make<TH1F>("p_pullZ_vsNvtx",
888  "z-pull vs n_{vertices};n_{vertices}; z vertex pull",
889  myNVtx_bins_.size() - 1,
890  myNVtx_bins_.data());
891 
892  tree_ = outfile_->make<TTree>("pvTree", "pvTree");
893  tree_->Branch("event", &event_, 64000, 2);
894 }

References bookResidualsHistogram(), checkBinOrdering(), compressionSettings_, event_, TFileService::file(), h_avgSumPt, h_diffX, h_diffY, h_diffZ, h_errX, h_errY, h_errZ, h_lumiFromConfig, h_minWTrks1, h_minWTrks2, h_nFinalVertices, h_nNonFakeVertices, h_nOfflineVertices, h_ntrks, h_nVertices, h_OrigVertexErrX, h_OrigVertexErrY, h_OrigVertexErrZ, h_pullX, h_pullX_Ntracks_, h_pullX_Nvtx_, h_pullX_sumPt_, h_pullY, h_pullY_Ntracks_, h_pullY_Nvtx_, h_pullY_sumPt_, h_pullZ, h_pullZ_Ntracks_, h_pullZ_Nvtx_, h_pullZ_sumPt_, h_PVCL_subVtx1, h_PVCL_subVtx2, h_resolX_Ntracks_, h_resolX_Nvtx_, h_resolX_sumPt_, h_resolY_Ntracks_, h_resolY_Nvtx_, h_resolY_sumPt_, h_resolZ_Ntracks_, h_resolZ_Nvtx_, h_resolZ_sumPt_, h_runFromConfig, h_runNumber, h_sumPt, h_sumPt1, h_sumPt2, h_wTrks1, h_wTrks2, ievt, intLumi_, itrks, TFileDirectory::make(), TFileService::make(), TFileService::mkdir(), myNTrack_bins_, myNVtx_bins_, mypT_bins_, nPtBins_, nTrackBins_, nVtxBins_, outfile_, p_pullX_vsNtracks, p_pullX_vsNvtx, p_pullX_vsSumPt, p_pullY_vsNtracks, p_pullY_vsNvtx, p_pullY_vsSumPt, p_pullZ_vsNtracks, p_pullZ_vsNvtx, p_pullZ_vsSumPt, p_resolX_vsNtracks, p_resolX_vsNvtx, p_resolX_vsSumPt, p_resolY_vsNtracks, p_resolY_vsNvtx, p_resolY_vsSumPt, p_resolZ_vsNtracks, p_resolZ_vsNvtx, p_resolZ_vsSumPt, writedatasetfile::run, runControlNumbers_, and tree_.

◆ beginRun()

void SplitVertexResolution::beginRun ( edm::Run const &  iEvent,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 628 of file SplitVertexResolution.cc.

628  {
629  unsigned int RunNumber_ = run.run();
630 
631  if (!runNumbersTimesLog_.count(RunNumber_)) {
632  auto times = getRunTime(iSetup);
633 
634  if (debug_) {
635  const time_t start_time = times.first / 1.0e+6;
636  edm::LogInfo("SplitVertexResolution")
637  << RunNumber_ << " has start time: " << times.first << " - " << times.second << std::endl;
638  edm::LogInfo("SplitVertexResolution")
639  << "human readable time: " << std::asctime(std::gmtime(&start_time)) << std::endl;
640  }
641  runNumbersTimesLog_[RunNumber_] = times;
642  }
643 }

References debug_, getRunTime(), writedatasetfile::run, and runNumbersTimesLog_.

◆ bookResidualsHistogram()

std::vector< TH1F * > SplitVertexResolution::bookResidualsHistogram ( TFileDirectory  dir,
unsigned int  theNOfBins,
TString  resType,
TString  varType 
)
private

Definition at line 899 of file SplitVertexResolution.cc.

902  {
903  TH1F::SetDefaultSumw2(kTRUE);
904 
905  double up = 500.;
906  double down = -500.;
907 
908  if (resType.Contains("pull")) {
909  up *= 0.01;
910  down *= 0.01;
911  }
912 
913  std::vector<TH1F*> h;
914  h.reserve(theNOfBins);
915 
916  const char* auxResType = (resType.ReplaceAll("_", "")).Data();
917 
918  for (unsigned int i = 0; i < theNOfBins; i++) {
919  TH1F* htemp = dir.make<TH1F>(Form("histo_%s_%s_plot%i", resType.Data(), varType.Data(), i),
920  Form("%s vs %s - bin %i;%s;vertices", auxResType, varType.Data(), i, auxResType),
921  250,
922  down,
923  up);
924  h.push_back(htemp);
925  }
926 
927  return h;
928 }

References DeadROC_duringRun::dir, down, h, mps_fire::i, up, and dumpRecoGeometry_cfg::varType.

Referenced by beginJob().

◆ checkBinOrdering()

template<std::size_t SIZE>
bool SplitVertexResolution::checkBinOrdering ( std::array< float, SIZE > &  bins)
private

Definition at line 1168 of file SplitVertexResolution.cc.

1170 {
1171  int i = 1;
1172 
1173  if (std::is_sorted(bins.begin(), bins.end())) {
1174  return true;
1175  } else {
1176  for (const auto& bin : bins) {
1177  edm::LogInfo("SplitVertexResolution") << "bin: " << i << " : " << bin << std::endl;
1178  i++;
1179  }
1180  edm::LogInfo("SplitVertexResolution") << "--------------------------------" << std::endl;
1181  return false;
1182  }
1183 }

References newFWLiteAna::bin, trigObjTnPSource_cfi::bins, and mps_fire::i.

Referenced by beginJob().

◆ endJob()

void SplitVertexResolution::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 931 of file SplitVertexResolution.cc.

931  {
932  edm::LogVerbatim("SplitVertexResolution") << "*******************************" << std::endl;
933  edm::LogVerbatim("SplitVertexResolution") << "Events run in total: " << ievt << std::endl;
934  edm::LogVerbatim("SplitVertexResolution") << "n. tracks: " << itrks << std::endl;
935  edm::LogVerbatim("SplitVertexResolution") << "*******************************" << std::endl;
936 
937  int nFiringTriggers = triggerMap_.size();
938  edm::LogVerbatim("SplitVertexResolution") << "firing triggers: " << nFiringTriggers << std::endl;
939  edm::LogVerbatim("SplitVertexResolution") << "*******************************" << std::endl;
940 
941  tksByTrigger_ = outfile_->make<TH1D>(
942  "tksByTrigger", "tracks by HLT path;;% of # traks", nFiringTriggers, -0.5, nFiringTriggers - 0.5);
943  evtsByTrigger_ = outfile_->make<TH1D>(
944  "evtsByTrigger", "events by HLT path;;% of # events", nFiringTriggers, -0.5, nFiringTriggers - 0.5);
945 
946  int i = 0;
947  for (std::map<std::string, std::pair<int, int> >::iterator it = triggerMap_.begin(); it != triggerMap_.end(); ++it) {
948  i++;
949 
950  double trkpercent = ((it->second).second) * 100. / double(itrks);
951  double evtpercent = ((it->second).first) * 100. / double(ievt);
952 
953  edm::LogVerbatim("SplitVertexResolution")
954  << "HLT path: " << std::setw(60) << std::left << it->first << " | events firing: " << std::right << std::setw(8)
955  << (it->second).first << " (" << std::setw(8) << std::fixed << std::setprecision(4) << evtpercent << "%)"
956  << " | tracks collected: " << std::setw(8) << (it->second).second << " (" << std::setw(8) << std::fixed
957  << std::setprecision(4) << trkpercent << "%)";
958 
959  tksByTrigger_->SetBinContent(i, trkpercent);
960  tksByTrigger_->GetXaxis()->SetBinLabel(i, (it->first).c_str());
961 
962  evtsByTrigger_->SetBinContent(i, evtpercent);
963  evtsByTrigger_->GetXaxis()->SetBinLabel(i, (it->first).c_str());
964  }
965 
966  TFileDirectory RunFeatures = outfile_->mkdir("RunFeatures");
967  h_runStartTimes = RunFeatures.make<TH1I>(
968  "runStartTimes", "run start times", runNumbersTimesLog_.size(), 0, runNumbersTimesLog_.size());
969  h_runEndTimes =
970  RunFeatures.make<TH1I>("runEndTimes", "run end times", runNumbersTimesLog_.size(), 0, runNumbersTimesLog_.size());
971 
972  unsigned int count = 1;
973  for (const auto& run : runNumbersTimesLog_) {
974  // strip down the microseconds
975  h_runStartTimes->SetBinContent(count, run.second.first / 10e6);
976  h_runStartTimes->GetXaxis()->SetBinLabel(count, (std::to_string(run.first)).c_str());
977 
978  h_runEndTimes->SetBinContent(count, run.second.second / 10e6);
979  h_runEndTimes->GetXaxis()->SetBinLabel(count, (std::to_string(run.first)).c_str());
980 
981  count++;
982  }
983 
984  // resolutions
985 
989 
993 
997 
998  // pulls
999 
1003 
1007 
1011 }

References submitPVResolutionJobs::count, evtsByTrigger_, fillTrendPlotByIndex(), dqmdumpme::first, alignBH_cfg::fixed, h_pullX_Ntracks_, h_pullX_Nvtx_, h_pullX_sumPt_, h_pullY_Ntracks_, h_pullY_Nvtx_, h_pullY_sumPt_, h_pullZ_Ntracks_, h_pullZ_Nvtx_, h_pullZ_sumPt_, h_resolX_Ntracks_, h_resolX_Nvtx_, h_resolX_sumPt_, h_resolY_Ntracks_, h_resolY_Nvtx_, h_resolY_sumPt_, h_resolZ_Ntracks_, h_resolZ_Nvtx_, h_resolZ_sumPt_, h_runEndTimes, h_runStartTimes, mps_fire::i, ievt, itrks, TFileDirectory::make(), TFileService::make(), genParticles_cff::map, TFileService::mkdir(), outfile_, p_pullX_vsNtracks, p_pullX_vsNvtx, p_pullX_vsSumPt, p_pullY_vsNtracks, p_pullY_vsNvtx, p_pullY_vsSumPt, p_pullZ_vsNtracks, p_pullZ_vsNvtx, p_pullZ_vsSumPt, p_resolX_vsNtracks, p_resolX_vsNvtx, p_resolX_vsSumPt, p_resolY_vsNtracks, p_resolY_vsNvtx, p_resolY_vsSumPt, p_resolZ_vsNtracks, p_resolZ_vsNvtx, p_resolZ_vsSumPt, writedatasetfile::run, runNumbersTimesLog_, edm::second(), AlCaHLTBitMon_QueryRunRegistry::string, tksByTrigger_, triggerMap_, and PVValHelper::WIDTH.

Referenced by o2olib.O2ORunMgr::executeJob().

◆ endRun()

void SplitVertexResolution::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverrideprivate

Definition at line 89 of file SplitVertexResolution.cc.

89 {};

◆ fillDescriptions()

void SplitVertexResolution::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 1014 of file SplitVertexResolution.cc.

1014  {
1015  //The following says we do not know what parameters are allowed so do no validation
1016  // Please change this to state exactly what you do use, even if it is no parameters
1018  desc.setUnknown();
1019  descriptions.addDefault(desc);
1020 }

References edm::ConfigurationDescriptions::addDefault(), and submitPVResolutionJobs::desc.

◆ fillTrendPlotByIndex()

void SplitVertexResolution::fillTrendPlotByIndex ( TH1F *  trendPlot,
std::vector< TH1F * > &  h,
PVValHelper::estimator  fitPar_ 
)
private

Definition at line 1034 of file SplitVertexResolution.cc.

1036 {
1037  for (auto iterator = h.begin(); iterator != h.end(); iterator++) {
1038  unsigned int bin = std::distance(h.begin(), iterator) + 1;
1039  statmode::fitParams myFit = fitResiduals((*iterator));
1040 
1041  switch (fitPar_) {
1042  case PVValHelper::MEAN: {
1043  float mean_ = myFit.first.value();
1044  float meanErr_ = myFit.first.error();
1045  trendPlot->SetBinContent(bin, mean_);
1046  trendPlot->SetBinError(bin, meanErr_);
1047  break;
1048  }
1049  case PVValHelper::WIDTH: {
1050  float width_ = myFit.second.value();
1051  float widthErr_ = myFit.second.error();
1052  trendPlot->SetBinContent(bin, width_);
1053  trendPlot->SetBinError(bin, widthErr_);
1054  break;
1055  }
1056  case PVValHelper::MEDIAN: {
1057  float median_ = PVValHelper::getMedian((*iterator)).value();
1058  float medianErr_ = PVValHelper::getMedian((*iterator)).error();
1059  trendPlot->SetBinContent(bin, median_);
1060  trendPlot->SetBinError(bin, medianErr_);
1061  break;
1062  }
1063  case PVValHelper::MAD: {
1064  float mad_ = PVValHelper::getMAD((*iterator)).value();
1065  float madErr_ = PVValHelper::getMAD((*iterator)).error();
1066  trendPlot->SetBinContent(bin, mad_);
1067  trendPlot->SetBinError(bin, madErr_);
1068  break;
1069  }
1070  default:
1071  edm::LogWarning("SplitVertexResolution")
1072  << "fillTrendPlotByIndex() " << fitPar_ << " unknown estimator!" << std::endl;
1073  break;
1074  }
1075  }
1076 }

References newFWLiteAna::bin, HLT_FULL_cff::distance, Measurement1D::error(), fitResiduals(), PVValHelper::getMAD(), PVValHelper::getMedian(), PVValHelper::MAD, PVValHelper::MEAN, PVValHelper::MEDIAN, Measurement1D::value(), and PVValHelper::WIDTH.

Referenced by endJob().

◆ fitResiduals()

statmode::fitParams SplitVertexResolution::fitResiduals ( TH1 *  hist,
bool  singleTime = false 
)
private

Definition at line 1079 of file SplitVertexResolution.cc.

1081 {
1082  if (hist->GetEntries() < 10) {
1083  LogDebug("SplitVertexResolution") << "hist name: " << hist->GetName() << " has less than 10 entries" << std::endl;
1084  return std::make_pair(Measurement1D(0., 0.), Measurement1D(0., 0.));
1085  }
1086 
1087  float maxHist = hist->GetXaxis()->GetXmax();
1088  float minHist = hist->GetXaxis()->GetXmin();
1089  float mean = hist->GetMean();
1090  float sigma = hist->GetRMS();
1091 
1092  if (edm::isNotFinite(mean) || edm::isNotFinite(sigma)) {
1093  mean = 0;
1094  //sigma= - hist->GetXaxis()->GetBinLowEdge(1) + hist->GetXaxis()->GetBinLowEdge(hist->GetNbinsX()+1);
1095  sigma = -minHist + maxHist;
1096  edm::LogWarning("SplitVertexResolution")
1097  << "FitPVResiduals::fitResiduals(): histogram" << hist->GetName() << " mean or sigma are NaN!!" << std::endl;
1098  }
1099 
1100  TF1 func("tmp", "gaus", mean - 2. * sigma, mean + 2. * sigma);
1101  if (0 == hist->Fit(&func, "QNR")) { // N: do not blow up file by storing fit!
1102  mean = func.GetParameter(1);
1103  sigma = func.GetParameter(2);
1104 
1105  if (!singleTime) {
1106  // second fit: three sigma of first fit around mean of first fit
1107  func.SetRange(std::max(mean - 3 * sigma, minHist), std::min(mean + 3 * sigma, maxHist));
1108  // I: integral gives more correct results if binning is too wide
1109  // L: Likelihood can treat empty bins correctly (if hist not weighted...)
1110  if (0 == hist->Fit(&func, "Q0LR")) {
1111  if (hist->GetFunction(func.GetName())) { // Take care that it is later on drawn:
1112  hist->GetFunction(func.GetName())->ResetBit(TF1::kNotDraw);
1113  }
1114  }
1115  }
1116  }
1117 
1118  float res_mean = func.GetParameter(1);
1119  float res_width = func.GetParameter(2);
1120 
1121  float res_mean_err = func.GetParError(1);
1122  float res_width_err = func.GetParError(2);
1123 
1124  Measurement1D resultM(res_mean, res_mean_err);
1125  Measurement1D resultW(res_width, res_width_err);
1126 
1127  statmode::fitParams result = std::make_pair(resultM, resultW);
1128  return result;
1129 }

References TrackCollections2monitor_cff::func, compare::hist, edm::isNotFinite(), LogDebug, SiStripPI::max, SiStripPI::mean, min(), mps_fire::result, and tools::TF1.

Referenced by fillTrendPlotByIndex().

◆ fitResiduals_v0()

statmode::fitParams SplitVertexResolution::fitResiduals_v0 ( TH1 *  hist)
private

Definition at line 1132 of file SplitVertexResolution.cc.

1134 {
1135  float mean = hist->GetMean();
1136  float sigma = hist->GetRMS();
1137 
1138  TF1 func("tmp", "gaus", mean - 1.5 * sigma, mean + 1.5 * sigma);
1139  if (0 == hist->Fit(&func, "QNR")) { // N: do not blow up file by storing fit!
1140  mean = func.GetParameter(1);
1141  sigma = func.GetParameter(2);
1142  // second fit: three sigma of first fit around mean of first fit
1143  func.SetRange(mean - 2 * sigma, mean + 2 * sigma);
1144  // I: integral gives more correct results if binning is too wide
1145  // L: Likelihood can treat empty bins correctly (if hist not weighted...)
1146  if (0 == hist->Fit(&func, "Q0LR")) {
1147  if (hist->GetFunction(func.GetName())) { // Take care that it is later on drawn:
1148  hist->GetFunction(func.GetName())->ResetBit(TF1::kNotDraw);
1149  }
1150  }
1151  }
1152 
1153  float res_mean = func.GetParameter(1);
1154  float res_width = func.GetParameter(2);
1155 
1156  float res_mean_err = func.GetParError(1);
1157  float res_width_err = func.GetParError(2);
1158 
1159  Measurement1D resultM(res_mean, res_mean_err);
1160  Measurement1D resultW(res_width, res_width_err);
1161 
1162  statmode::fitParams result = std::make_pair(resultM, resultW);
1163  return result;
1164 }

References TrackCollections2monitor_cff::func, compare::hist, SiStripPI::mean, mps_fire::result, and tools::TF1.

◆ getRunTime()

std::pair< long long, long long > SplitVertexResolution::getRunTime ( const edm::EventSetup iSetup) const
private

Definition at line 1023 of file SplitVertexResolution.cc.

1025 {
1026  const auto& runInfo = iSetup.getData(runInfoToken_);
1027  if (debug_) {
1028  edm::LogInfo("SplitVertexResolution") << runInfo.m_start_time_str << " " << runInfo.m_stop_time_str << std::endl;
1029  }
1030  return std::make_pair(runInfo.m_start_time_ll, runInfo.m_stop_time_ll);
1031 }

References debug_, submitPVValidationJobs::runInfo, and runInfoToken_.

Referenced by beginRun().

◆ mysorter()

static bool SplitVertexResolution::mysorter ( reco::Track  i,
reco::Track  j 
)
inlinestatic

Definition at line 81 of file SplitVertexResolution.cc.

81 { return (i.pt() > j.pt()); }

References mps_fire::i, and dqmiolumiharvest::j.

Referenced by analyze().

Member Data Documentation

◆ cmToUm

constexpr double SplitVertexResolution::cmToUm = 10000.
staticconstexprprivate

Definition at line 139 of file SplitVertexResolution.cc.

Referenced by analyze().

◆ compressionSettings_

const int SplitVertexResolution::compressionSettings_
private

Definition at line 109 of file SplitVertexResolution.cc.

Referenced by beginJob().

◆ debug_

bool SplitVertexResolution::debug_
private

Definition at line 116 of file SplitVertexResolution.cc.

Referenced by analyze(), beginRun(), and getRunTime().

◆ engine_

std::mt19937 SplitVertexResolution::engine_
private

Definition at line 245 of file SplitVertexResolution.cc.

Referenced by analyze().

◆ event_

pvEvent SplitVertexResolution::event_
private

Definition at line 247 of file SplitVertexResolution.cc.

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

◆ evtsByTrigger_

TH1D* SplitVertexResolution::evtsByTrigger_
private

Definition at line 192 of file SplitVertexResolution.cc.

Referenced by endJob().

◆ h_avgSumPt

TH1F* SplitVertexResolution::h_avgSumPt
private

Definition at line 168 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_diffX

TH1F* SplitVertexResolution::h_diffX
private

Definition at line 150 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_diffY

TH1F* SplitVertexResolution::h_diffY
private

Definition at line 151 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_diffZ

TH1F* SplitVertexResolution::h_diffZ
private

Definition at line 152 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_errX

TH1F* SplitVertexResolution::h_errX
private

Definition at line 158 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_errY

TH1F* SplitVertexResolution::h_errY
private

Definition at line 159 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_errZ

TH1F* SplitVertexResolution::h_errZ
private

Definition at line 160 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_lumiFromConfig

TH1F* SplitVertexResolution::h_lumiFromConfig
private

Definition at line 143 of file SplitVertexResolution.cc.

Referenced by beginJob().

◆ h_minWTrks1

TH1F* SplitVertexResolution::h_minWTrks1
private

Definition at line 176 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_minWTrks2

TH1F* SplitVertexResolution::h_minWTrks2
private

Definition at line 177 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_nFinalVertices

TH1I* SplitVertexResolution::h_nFinalVertices
private

Definition at line 187 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_nNonFakeVertices

TH1I* SplitVertexResolution::h_nNonFakeVertices
private

Definition at line 186 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_nOfflineVertices

TH1I* SplitVertexResolution::h_nOfflineVertices
private

Definition at line 184 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_ntrks

TH1F* SplitVertexResolution::h_ntrks
private

Definition at line 166 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_nVertices

TH1I* SplitVertexResolution::h_nVertices
private

Definition at line 185 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_OrigVertexErrX

TH1F* SplitVertexResolution::h_OrigVertexErrX
private

Definition at line 154 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_OrigVertexErrY

TH1F* SplitVertexResolution::h_OrigVertexErrY
private

Definition at line 155 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_OrigVertexErrZ

TH1F* SplitVertexResolution::h_OrigVertexErrZ
private

Definition at line 156 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_pullX

TH1F* SplitVertexResolution::h_pullX
private

Definition at line 162 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_pullX_Ntracks_

std::vector<TH1F*> SplitVertexResolution::h_pullX_Ntracks_
private

Definition at line 225 of file SplitVertexResolution.cc.

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

◆ h_pullX_Nvtx_

std::vector<TH1F*> SplitVertexResolution::h_pullX_Nvtx_
private

Definition at line 229 of file SplitVertexResolution.cc.

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

◆ h_pullX_sumPt_

std::vector<TH1F*> SplitVertexResolution::h_pullX_sumPt_
private

Definition at line 221 of file SplitVertexResolution.cc.

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

◆ h_pullY

TH1F* SplitVertexResolution::h_pullY
private

Definition at line 163 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_pullY_Ntracks_

std::vector<TH1F*> SplitVertexResolution::h_pullY_Ntracks_
private

Definition at line 226 of file SplitVertexResolution.cc.

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

◆ h_pullY_Nvtx_

std::vector<TH1F*> SplitVertexResolution::h_pullY_Nvtx_
private

Definition at line 230 of file SplitVertexResolution.cc.

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

◆ h_pullY_sumPt_

std::vector<TH1F*> SplitVertexResolution::h_pullY_sumPt_
private

Definition at line 222 of file SplitVertexResolution.cc.

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

◆ h_pullZ

TH1F* SplitVertexResolution::h_pullZ
private

Definition at line 164 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_pullZ_Ntracks_

std::vector<TH1F*> SplitVertexResolution::h_pullZ_Ntracks_
private

Definition at line 227 of file SplitVertexResolution.cc.

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

◆ h_pullZ_Nvtx_

std::vector<TH1F*> SplitVertexResolution::h_pullZ_Nvtx_
private

Definition at line 231 of file SplitVertexResolution.cc.

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

◆ h_pullZ_sumPt_

std::vector<TH1F*> SplitVertexResolution::h_pullZ_sumPt_
private

Definition at line 223 of file SplitVertexResolution.cc.

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

◆ h_PVCL_subVtx1

TH1F* SplitVertexResolution::h_PVCL_subVtx1
private

Definition at line 179 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_PVCL_subVtx2

TH1F* SplitVertexResolution::h_PVCL_subVtx2
private

Definition at line 180 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_resolX_Ntracks_

std::vector<TH1F*> SplitVertexResolution::h_resolX_Ntracks_
private

Definition at line 200 of file SplitVertexResolution.cc.

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

◆ h_resolX_Nvtx_

std::vector<TH1F*> SplitVertexResolution::h_resolX_Nvtx_
private

Definition at line 204 of file SplitVertexResolution.cc.

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

◆ h_resolX_sumPt_

std::vector<TH1F*> SplitVertexResolution::h_resolX_sumPt_
private

Definition at line 196 of file SplitVertexResolution.cc.

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

◆ h_resolY_Ntracks_

std::vector<TH1F*> SplitVertexResolution::h_resolY_Ntracks_
private

Definition at line 201 of file SplitVertexResolution.cc.

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

◆ h_resolY_Nvtx_

std::vector<TH1F*> SplitVertexResolution::h_resolY_Nvtx_
private

Definition at line 205 of file SplitVertexResolution.cc.

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

◆ h_resolY_sumPt_

std::vector<TH1F*> SplitVertexResolution::h_resolY_sumPt_
private

Definition at line 197 of file SplitVertexResolution.cc.

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

◆ h_resolZ_Ntracks_

std::vector<TH1F*> SplitVertexResolution::h_resolZ_Ntracks_
private

Definition at line 202 of file SplitVertexResolution.cc.

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

◆ h_resolZ_Nvtx_

std::vector<TH1F*> SplitVertexResolution::h_resolZ_Nvtx_
private

Definition at line 206 of file SplitVertexResolution.cc.

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

◆ h_resolZ_sumPt_

std::vector<TH1F*> SplitVertexResolution::h_resolZ_sumPt_
private

Definition at line 198 of file SplitVertexResolution.cc.

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

◆ h_runEndTimes

TH1I* SplitVertexResolution::h_runEndTimes
private

Definition at line 148 of file SplitVertexResolution.cc.

Referenced by endJob().

◆ h_runFromConfig

TH1I* SplitVertexResolution::h_runFromConfig
private

Definition at line 144 of file SplitVertexResolution.cc.

Referenced by beginJob().

◆ h_runNumber

TH1F* SplitVertexResolution::h_runNumber
private

Definition at line 182 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_runStartTimes

TH1I* SplitVertexResolution::h_runStartTimes
private

Definition at line 147 of file SplitVertexResolution.cc.

Referenced by endJob().

◆ h_sumPt

TH1F* SplitVertexResolution::h_sumPt
private

Definition at line 167 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_sumPt1

TH1F* SplitVertexResolution::h_sumPt1
private

Definition at line 170 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_sumPt2

TH1F* SplitVertexResolution::h_sumPt2
private

Definition at line 171 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_wTrks1

TH1F* SplitVertexResolution::h_wTrks1
private

Definition at line 173 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ h_wTrks2

TH1F* SplitVertexResolution::h_wTrks2
private

Definition at line 174 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ ievt

int SplitVertexResolution::ievt
private

Definition at line 105 of file SplitVertexResolution.cc.

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

◆ intLumi_

double SplitVertexResolution::intLumi_
private

Definition at line 115 of file SplitVertexResolution.cc.

Referenced by beginJob().

◆ itrks

int SplitVertexResolution::itrks
private

Definition at line 106 of file SplitVertexResolution.cc.

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

◆ minVtxNdf_

double SplitVertexResolution::minVtxNdf_
private

Definition at line 131 of file SplitVertexResolution.cc.

Referenced by analyze().

◆ minVtxWgt_

double SplitVertexResolution::minVtxWgt_
private

Definition at line 132 of file SplitVertexResolution.cc.

Referenced by analyze().

◆ myNTrack_bins_

std::array<float, nTrackBins_ + 1> SplitVertexResolution::myNTrack_bins_
private

Definition at line 255 of file SplitVertexResolution.cc.

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

◆ myNVtx_bins_

std::array<float, nVtxBins_ + 1> SplitVertexResolution::myNVtx_bins_
private

Definition at line 258 of file SplitVertexResolution.cc.

Referenced by beginJob(), and SplitVertexResolution().

◆ mypT_bins_

std::array<float, nPtBins_ + 1> SplitVertexResolution::mypT_bins_ = PVValHelper::makeLogBins<float, nPtBins_>(1., 1e3)
private

Definition at line 252 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ nPtBins_

const int SplitVertexResolution::nPtBins_ = 30
staticprivate

Definition at line 251 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ nTrackBins_

const int SplitVertexResolution::nTrackBins_ = 60
staticprivate

Definition at line 254 of file SplitVertexResolution.cc.

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

◆ nVtxBins_

const int SplitVertexResolution::nVtxBins_ = 40
staticprivate

Definition at line 257 of file SplitVertexResolution.cc.

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

◆ outfile_

edm::Service<TFileService> SplitVertexResolution::outfile_
private

Definition at line 141 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_pullX_vsNtracks

TH1F* SplitVertexResolution::p_pullX_vsNtracks
private

Definition at line 237 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_pullX_vsNvtx

TH1F* SplitVertexResolution::p_pullX_vsNvtx
private

Definition at line 241 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_pullX_vsSumPt

TH1F* SplitVertexResolution::p_pullX_vsSumPt
private

Definition at line 233 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_pullY_vsNtracks

TH1F* SplitVertexResolution::p_pullY_vsNtracks
private

Definition at line 238 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_pullY_vsNvtx

TH1F* SplitVertexResolution::p_pullY_vsNvtx
private

Definition at line 242 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_pullY_vsSumPt

TH1F* SplitVertexResolution::p_pullY_vsSumPt
private

Definition at line 234 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_pullZ_vsNtracks

TH1F* SplitVertexResolution::p_pullZ_vsNtracks
private

Definition at line 239 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_pullZ_vsNvtx

TH1F* SplitVertexResolution::p_pullZ_vsNvtx
private

Definition at line 243 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_pullZ_vsSumPt

TH1F* SplitVertexResolution::p_pullZ_vsSumPt
private

Definition at line 235 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_resolX_vsNtracks

TH1F* SplitVertexResolution::p_resolX_vsNtracks
private

Definition at line 212 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_resolX_vsNvtx

TH1F* SplitVertexResolution::p_resolX_vsNvtx
private

Definition at line 216 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_resolX_vsSumPt

TH1F* SplitVertexResolution::p_resolX_vsSumPt
private

Definition at line 208 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_resolY_vsNtracks

TH1F* SplitVertexResolution::p_resolY_vsNtracks
private

Definition at line 213 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_resolY_vsNvtx

TH1F* SplitVertexResolution::p_resolY_vsNvtx
private

Definition at line 217 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_resolY_vsSumPt

TH1F* SplitVertexResolution::p_resolY_vsSumPt
private

Definition at line 209 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_resolZ_vsNtracks

TH1F* SplitVertexResolution::p_resolZ_vsNtracks
private

Definition at line 214 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_resolZ_vsNvtx

TH1F* SplitVertexResolution::p_resolZ_vsNvtx
private

Definition at line 218 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ p_resolZ_vsSumPt

TH1F* SplitVertexResolution::p_resolZ_vsSumPt
private

Definition at line 210 of file SplitVertexResolution.cc.

Referenced by beginJob(), and endJob().

◆ pvsTag_

edm::InputTag SplitVertexResolution::pvsTag_
private

Definition at line 118 of file SplitVertexResolution.cc.

◆ pvsToken_

edm::EDGetTokenT<reco::VertexCollection> SplitVertexResolution::pvsToken_
private

Definition at line 119 of file SplitVertexResolution.cc.

Referenced by analyze().

◆ runControl_

bool SplitVertexResolution::runControl_
private

Definition at line 136 of file SplitVertexResolution.cc.

Referenced by analyze().

◆ runControlNumbers_

std::vector<unsigned int> SplitVertexResolution::runControlNumbers_
private

Definition at line 137 of file SplitVertexResolution.cc.

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

◆ runInfoToken_

edm::ESGetToken<RunInfo, RunInfoRcd> SplitVertexResolution::runInfoToken_
private

Definition at line 129 of file SplitVertexResolution.cc.

Referenced by getRunTime().

◆ runNumbersTimesLog_

std::map<unsigned int, std::pair<long long, long long> > SplitVertexResolution::runNumbersTimesLog_
private

Definition at line 146 of file SplitVertexResolution.cc.

Referenced by beginRun(), and endJob().

◆ storeNtuple_

bool SplitVertexResolution::storeNtuple_
private

Definition at line 112 of file SplitVertexResolution.cc.

Referenced by analyze().

◆ tksByTrigger_

TH1D* SplitVertexResolution::tksByTrigger_
private

Definition at line 191 of file SplitVertexResolution.cc.

Referenced by endJob().

◆ tracksTag_

edm::InputTag SplitVertexResolution::tracksTag_
private

Definition at line 121 of file SplitVertexResolution.cc.

◆ tracksToken_

edm::EDGetTokenT<reco::TrackCollection> SplitVertexResolution::tracksToken_
private

Definition at line 122 of file SplitVertexResolution.cc.

Referenced by analyze().

◆ transientTrackBuilderToken_

edm::ESGetToken<TransientTrackBuilder, TransientTrackRecord> SplitVertexResolution::transientTrackBuilderToken_
private

Definition at line 128 of file SplitVertexResolution.cc.

Referenced by analyze().

◆ tree_

TTree* SplitVertexResolution::tree_
private

Definition at line 248 of file SplitVertexResolution.cc.

Referenced by analyze(), and beginJob().

◆ triggerMap_

std::map<std::string, std::pair<int, int> > SplitVertexResolution::triggerMap_
private

Definition at line 260 of file SplitVertexResolution.cc.

Referenced by analyze(), and endJob().

◆ triggerResultsTag_

edm::InputTag SplitVertexResolution::triggerResultsTag_ = edm::InputTag("TriggerResults", "", "HLT")
private

Definition at line 124 of file SplitVertexResolution.cc.

◆ triggerResultsToken_

edm::EDGetTokenT<edm::TriggerResults> SplitVertexResolution::triggerResultsToken_
private

Definition at line 125 of file SplitVertexResolution.cc.

Referenced by analyze().

AdaptiveVertexFitter
Definition: AdaptiveVertexFitter.h:29
SplitVertexResolution::outfile_
edm::Service< TFileService > outfile_
Definition: SplitVertexResolution.cc:141
pvCand::zErr_subVtx2
float zErr_subVtx2
Definition: pvTree.h:39
fftjetvertexadder_cfi.errZ
errZ
Definition: fftjetvertexadder_cfi.py:39
SplitVertexResolution::h_runFromConfig
TH1I * h_runFromConfig
Definition: SplitVertexResolution.cc:144
counter
Definition: counter.py:1
SplitVertexResolution::p_pullX_vsNvtx
TH1F * p_pullX_vsNvtx
Definition: SplitVertexResolution.cc:241
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
SplitVertexResolution::triggerResultsTag_
edm::InputTag triggerResultsTag_
Definition: SplitVertexResolution.cc:124
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
Measurement1D
Definition: Measurement1D.h:11
mps_fire.i
i
Definition: mps_fire.py:428
edm::ESInputTag
Definition: ESInputTag.h:87
SplitVertexResolution::checkBinOrdering
bool checkBinOrdering(std::array< float, SIZE > &bins)
Definition: SplitVertexResolution.cc:1168
SplitVertexResolution::h_pullX_sumPt_
std::vector< TH1F * > h_pullX_sumPt_
Definition: SplitVertexResolution.cc:221
SplitVertexResolution::h_PVCL_subVtx2
TH1F * h_PVCL_subVtx2
Definition: SplitVertexResolution.cc:180
SplitVertexResolution::h_diffX
TH1F * h_diffX
Definition: SplitVertexResolution.cc:150
SiStripPI::mean
Definition: SiStripPayloadInspectorHelper.h:169
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
HLTBitAnalyser_cfi.hltresults
hltresults
Definition: HLTBitAnalyser_cfi.py:13
edm::isNotFinite
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
fftjetvertexadder_cfi.errY
errY
Definition: fftjetvertexadder_cfi.py:38
TransientVertex::isValid
bool isValid() const
Definition: TransientVertex.h:195
SplitVertexResolution::p_resolY_vsNvtx
TH1F * p_resolY_vsNvtx
Definition: SplitVertexResolution.cc:217
PVValHelper::WIDTH
Definition: PVValidationHelpers.h:44
min
T min(T a, T b)
Definition: MathUtil.h:58
reco::Vertex::z
double z() const
z coordinate
Definition: Vertex.h:120
SplitVertexResolution::p_resolY_vsNtracks
TH1F * p_resolY_vsNtracks
Definition: SplitVertexResolution.cc:213
SplitVertexResolution::tracksToken_
edm::EDGetTokenT< reco::TrackCollection > tracksToken_
Definition: SplitVertexResolution.cc:122
SplitVertexResolution::h_runNumber
TH1F * h_runNumber
Definition: SplitVertexResolution.cc:182
TFileDirectory::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileDirectory.h:53
edm
HLT enums.
Definition: AlignableModifier.h:19
Measurement1D::value
double value() const
Definition: Measurement1D.h:25
pvCand::y_subVtx2
float y_subVtx2
Definition: pvTree.h:34
SplitVertexResolution::nVtxBins_
static const int nVtxBins_
Definition: SplitVertexResolution.cc:257
pvEvent::pvs
std::vector< pvCand > pvs
Definition: pvTree.h:62
SplitVertexResolution::minVtxNdf_
double minVtxNdf_
Definition: SplitVertexResolution.cc:131
SplitVertexResolution::h_ntrks
TH1F * h_ntrks
Definition: SplitVertexResolution.cc:166
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition: L1TUtmAlgorithmRcd.h:4
TFileService::file
TFile & file() const
return opened TFile
Definition: TFileService.h:37
pvCand::CL_subVtx2
float CL_subVtx2
Definition: pvTree.h:43
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
SplitVertexResolution::bookResidualsHistogram
std::vector< TH1F * > bookResidualsHistogram(TFileDirectory dir, unsigned int theNOfBins, TString resType, TString varType)
Definition: SplitVertexResolution.cc:899
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
pvCand::x_subVtx1
float x_subVtx1
Definition: pvTree.h:23
pvCand::minW_subVtx2
float minW_subVtx2
Definition: pvTree.h:46
SplitVertexResolution::compressionSettings_
const int compressionSettings_
Definition: SplitVertexResolution.cc:109
SplitVertexResolution::triggerMap_
std::map< std::string, std::pair< int, int > > triggerMap_
Definition: SplitVertexResolution.cc:260
PVValHelper::fillByIndex
void fillByIndex(std::vector< TH1F * > &h, unsigned int index, double x, std::string tag="")
Definition: PVValidationHelpers.cc:42
pvCand::n_subVtx2
int n_subVtx2
Definition: pvTree.h:32
SplitVertexResolution::h_PVCL_subVtx1
TH1F * h_PVCL_subVtx1
Definition: SplitVertexResolution.cc:179
muonTagProbeFilters_cff.allTracks
allTracks
Definition: muonTagProbeFilters_cff.py:22
SplitVertexResolution::p_pullZ_vsNvtx
TH1F * p_pullZ_vsNvtx
Definition: SplitVertexResolution.cc:243
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
SplitVertexResolution::h_OrigVertexErrZ
TH1F * h_OrigVertexErrZ
Definition: SplitVertexResolution.cc:156
pvEvent::nVtx
int nVtx
Definition: pvTree.h:60
SplitVertexResolution::h_resolX_Nvtx_
std::vector< TH1F * > h_resolX_Nvtx_
Definition: SplitVertexResolution.cc:204
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
SplitVertexResolution::h_sumPt1
TH1F * h_sumPt1
Definition: SplitVertexResolution.cc:170
SplitVertexResolution::mypT_bins_
std::array< float, nPtBins_+1 > mypT_bins_
Definition: SplitVertexResolution.cc:252
TFileDirectory
Definition: TFileDirectory.h:24
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
tools.TF1
TF1
Definition: tools.py:23
SplitVertexResolution::p_resolX_vsNvtx
TH1F * p_resolX_vsNvtx
Definition: SplitVertexResolution.cc:216
AdaptiveVertexFitter::vertex
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &) const override
Definition: AdaptiveVertexFitter.cc:158
edm::Handle< edm::TriggerResults >
pvCand::z_origVtx
float z_origVtx
Definition: pvTree.h:16
parallelization.uint
uint
Definition: parallelization.py:124
SplitVertexResolution::h_resolZ_Ntracks_
std::vector< TH1F * > h_resolZ_Ntracks_
Definition: SplitVertexResolution.cc:202
SplitVertexResolution::h_errY
TH1F * h_errY
Definition: SplitVertexResolution.cc:159
pvCand::zErr_origVtx
float zErr_origVtx
Definition: pvTree.h:20
dqmdumpme.first
first
Definition: dqmdumpme.py:55
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
SplitVertexResolution::h_pullZ_sumPt_
std::vector< TH1F * > h_pullZ_sumPt_
Definition: SplitVertexResolution.cc:223
SplitVertexResolution::p_pullZ_vsNtracks
TH1F * p_pullZ_vsNtracks
Definition: SplitVertexResolution.cc:239
SplitVertexResolution::p_resolZ_vsSumPt
TH1F * p_resolZ_vsSumPt
Definition: SplitVertexResolution.cc:210
pvCand::sumPt_subVtx2
float sumPt_subVtx2
Definition: pvTree.h:40
edm::Ref< TrackCollection >
TtFullHadEvtBuilder_cfi.sumPt
sumPt
Definition: TtFullHadEvtBuilder_cfi.py:38
SplitVertexResolution::h_resolZ_Nvtx_
std::vector< TH1F * > h_resolZ_Nvtx_
Definition: SplitVertexResolution.cc:206
SplitVertexResolution::runNumbersTimesLog_
std::map< unsigned int, std::pair< long long, long long > > runNumbersTimesLog_
Definition: SplitVertexResolution.cc:146
SplitVertexResolution::h_pullY_Nvtx_
std::vector< TH1F * > h_pullY_Nvtx_
Definition: SplitVertexResolution.cc:230
SplitVertexResolution::ievt
int ievt
Definition: SplitVertexResolution.cc:105
SplitVertexResolution::p_pullY_vsNvtx
TH1F * p_pullY_vsNvtx
Definition: SplitVertexResolution.cc:242
SplitVertexResolution::h_errX
TH1F * h_errX
Definition: SplitVertexResolution.cc:158
SplitVertexResolution::h_runStartTimes
TH1I * h_runStartTimes
Definition: SplitVertexResolution.cc:147
SplitVertexResolution::p_pullX_vsNtracks
TH1F * p_pullX_vsNtracks
Definition: SplitVertexResolution.cc:237
accept
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
pvCand::n_subVtx1
int n_subVtx1
Definition: pvTree.h:22
pvCand::y_origVtx
float y_origVtx
Definition: pvTree.h:15
down
Definition: BitonicSort.h:7
h
pvEvent::eventNumber
int eventNumber
Definition: pvTree.h:58
SplitVertexResolution::h_wTrks1
TH1F * h_wTrks1
Definition: SplitVertexResolution.cc:173
pvCand::sumPt_subVtx1
float sumPt_subVtx1
Definition: pvTree.h:30
reco::Vertex::isFake
bool isFake() const
Definition: Vertex.h:76
pvCand::zErr_subVtx1
float zErr_subVtx1
Definition: pvTree.h:29
SplitVertexResolution::itrks
int itrks
Definition: SplitVertexResolution.cc:106
reco::Vertex::xError
double xError() const
error on x
Definition: Vertex.h:124
SplitVertexResolution::h_lumiFromConfig
TH1F * h_lumiFromConfig
Definition: SplitVertexResolution.cc:143
compare.hist
hist
Definition: compare.py:376
SplitVertexResolution::h_minWTrks1
TH1F * h_minWTrks1
Definition: SplitVertexResolution.cc:176
SplitVertexResolution::h_resolZ_sumPt_
std::vector< TH1F * > h_resolZ_sumPt_
Definition: SplitVertexResolution.cc:198
SplitVertexResolution::tree_
TTree * tree_
Definition: SplitVertexResolution.cc:248
SplitVertexResolution::p_resolX_vsNtracks
TH1F * p_resolX_vsNtracks
Definition: SplitVertexResolution.cc:212
pvEvent::luminosityBlockNumber
int luminosityBlockNumber
Definition: pvTree.h:57
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
SplitVertexResolution::myNVtx_bins_
std::array< float, nVtxBins_+1 > myNVtx_bins_
Definition: SplitVertexResolution.cc:258
SplitVertexResolution::transientTrackBuilderToken_
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transientTrackBuilderToken_
Definition: SplitVertexResolution.cc:128
reco::Vertex::tracks_end
trackRef_iterator tracks_end() const
last iterator over tracks
Definition: Vertex.cc:73
SplitVertexResolution::runControl_
bool runControl_
Definition: SplitVertexResolution.cc:136
reco::Track
Definition: Track.h:27
pvCand::minW_subVtx1
float minW_subVtx1
Definition: pvTree.h:45
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
pvCand
Definition: pvTree.h:9
SplitVertexResolution::fillTrendPlotByIndex
void fillTrendPlotByIndex(TH1F *trendPlot, std::vector< TH1F * > &h, PVValHelper::estimator fitPar_)
Definition: SplitVertexResolution.cc:1034
SplitVertexResolution::mysorter
static bool mysorter(reco::Track i, reco::Track j)
Definition: SplitVertexResolution.cc:81
SplitVertexResolution::h_nOfflineVertices
TH1I * h_nOfflineVertices
Definition: SplitVertexResolution.cc:184
SplitVertexResolution::h_pullY_Ntracks_
std::vector< TH1F * > h_pullY_Ntracks_
Definition: SplitVertexResolution.cc:226
pvCand::z_subVtx1
float z_subVtx1
Definition: pvTree.h:25
SplitVertexResolution::debug_
bool debug_
Definition: SplitVertexResolution.cc:116
dumpRecoGeometry_cfg.varType
varType
Definition: dumpRecoGeometry_cfg.py:8
pvCand::x_origVtx
float x_origVtx
Definition: pvTree.h:14
Measurement1D::error
double error() const
Definition: Measurement1D.h:27
reco::Vertex::zError
double zError() const
error on z
Definition: Vertex.h:128
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EgHLTOffTrigSelection_cfi.trigName
trigName
Definition: EgHLTOffTrigSelection_cfi.py:8
SplitVertexResolution::p_pullY_vsNtracks
TH1F * p_pullY_vsNtracks
Definition: SplitVertexResolution.cc:238
SplitVertexResolution::fitResiduals
statmode::fitParams fitResiduals(TH1 *hist, bool singleTime=false)
Definition: SplitVertexResolution.cc:1079
TFileService::mkdir
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
SplitVertexResolution::h_resolY_Ntracks_
std::vector< TH1F * > h_resolY_Ntracks_
Definition: SplitVertexResolution.cc:201
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
PVValHelper::getMedian
Measurement1D getMedian(TH1F *histo)
Definition: PVValidationHelpers.cc:178
SplitVertexResolution::runInfoToken_
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: SplitVertexResolution.cc:129
SplitVertexResolution::runControlNumbers_
std::vector< unsigned int > runControlNumbers_
Definition: SplitVertexResolution.cc:137
SplitVertexResolution::h_diffZ
TH1F * h_diffZ
Definition: SplitVertexResolution.cc:152
SplitVertexResolution::h_pullX_Ntracks_
std::vector< TH1F * > h_pullX_Ntracks_
Definition: SplitVertexResolution.cc:225
SplitVertexResolution::h_resolY_Nvtx_
std::vector< TH1F * > h_resolY_Nvtx_
Definition: SplitVertexResolution.cc:205
SplitVertexResolution::p_resolZ_vsNtracks
TH1F * p_resolZ_vsNtracks
Definition: SplitVertexResolution.cc:214
SplitVertexResolution::h_minWTrks2
TH1F * h_minWTrks2
Definition: SplitVertexResolution.cc:177
SplitVertexResolution::nTrackBins_
static const int nTrackBins_
Definition: SplitVertexResolution.cc:254
SplitVertexResolution::p_resolZ_vsNvtx
TH1F * p_resolZ_vsNvtx
Definition: SplitVertexResolution.cc:218
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
reco::Vertex::tracks_begin
trackRef_iterator tracks_begin() const
first iterator over tracks
Definition: Vertex.cc:71
pvCand::z_subVtx2
float z_subVtx2
Definition: pvTree.h:35
SplitVertexResolution::h_pullZ_Ntracks_
std::vector< TH1F * > h_pullZ_Ntracks_
Definition: SplitVertexResolution.cc:227
SplitVertexResolution::intLumi_
double intLumi_
Definition: SplitVertexResolution.cc:115
reco::Vertex::x
double x() const
x coordinate
Definition: Vertex.h:116
SplitVertexResolution::h_sumPt2
TH1F * h_sumPt2
Definition: SplitVertexResolution.cc:171
SplitVertexResolution::nPtBins_
static const int nPtBins_
Definition: SplitVertexResolution.cc:251
PVValHelper::MAD
Definition: PVValidationHelpers.h:44
createfilelist.int
int
Definition: createfilelist.py:10
SplitVertexResolution::h_OrigVertexErrY
TH1F * h_OrigVertexErrY
Definition: SplitVertexResolution.cc:155
reco::Vertex::tracksSize
size_t tracksSize() const
number of tracks
Definition: Vertex.cc:69
iEvent
int iEvent
Definition: GenABIO.cc:224
SplitVertexResolution::triggerResultsToken_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
Definition: SplitVertexResolution.cc:125
SplitVertexResolution::myNTrack_bins_
std::array< float, nTrackBins_+1 > myNTrack_bins_
Definition: SplitVertexResolution.cc:255
SplitVertexResolution::p_pullY_vsSumPt
TH1F * p_pullY_vsSumPt
Definition: SplitVertexResolution.cc:234
TransientTrackBuilder
Definition: TransientTrackBuilder.h:16
SplitVertexResolution::h_sumPt
TH1F * h_sumPt
Definition: SplitVertexResolution.cc:167
SplitVertexResolution::h_runEndTimes
TH1I * h_runEndTimes
Definition: SplitVertexResolution.cc:148
counter
static std::atomic< unsigned int > counter
Definition: SharedResourceNames.cc:17
SplitVertexResolution::h_OrigVertexErrX
TH1F * h_OrigVertexErrX
Definition: SplitVertexResolution.cc:154
TransientVertex
Definition: TransientVertex.h:18
PVValHelper::generateBins
std::vector< float > generateBins(int n, float start, float range)
Definition: PVValidationHelpers.cc:161
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
TrackCollections2monitor_cff.func
func
Definition: TrackCollections2monitor_cff.py:359
SplitVertexResolution::tracksTag_
edm::InputTag tracksTag_
Definition: SplitVertexResolution.cc:121
PVValHelper::MEAN
Definition: PVValidationHelpers.h:44
SplitVertexResolution::h_pullY_sumPt_
std::vector< TH1F * > h_pullY_sumPt_
Definition: SplitVertexResolution.cc:222
pvCand::x_subVtx2
float x_subVtx2
Definition: pvTree.h:33
SplitVertexResolution::getRunTime
std::pair< long long, long long > getRunTime(const edm::EventSetup &iSetup) const
Definition: SplitVertexResolution.cc:1023
edm::TriggerNames::triggerName
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:22
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:120
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
SplitVertexResolution::event_
pvEvent event_
Definition: SplitVertexResolution.cc:247
SplitVertexResolution::p_resolY_vsSumPt
TH1F * p_resolY_vsSumPt
Definition: SplitVertexResolution.cc:209
SplitVertexResolution::h_resolX_Ntracks_
std::vector< TH1F * > h_resolX_Ntracks_
Definition: SplitVertexResolution.cc:200
pvCand::xErr_origVtx
float xErr_origVtx
Definition: pvTree.h:18
SplitVertexResolution::h_resolX_sumPt_
std::vector< TH1F * > h_resolX_sumPt_
Definition: SplitVertexResolution.cc:196
pvCand::yErr_subVtx1
float yErr_subVtx1
Definition: pvTree.h:28
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
writedatasetfile.run
run
Definition: writedatasetfile.py:27
reco::Vertex::y
double y() const
y coordinate
Definition: Vertex.h:118
reco::TransientTrack
Definition: TransientTrack.h:19
pvCand::nTrks
int nTrks
Definition: pvTree.h:11
SplitVertexResolution::h_resolY_sumPt_
std::vector< TH1F * > h_resolY_sumPt_
Definition: SplitVertexResolution.cc:197
TransientVertex::trackWeight
float trackWeight(const reco::TransientTrack &track) const
Definition: TransientVertex.cc:241
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
SplitVertexResolution::p_pullX_vsSumPt
TH1F * p_pullX_vsSumPt
Definition: SplitVertexResolution.cc:233
pvCand::xErr_subVtx1
float xErr_subVtx1
Definition: pvTree.h:27
PVValHelper::MEDIAN
Definition: PVValidationHelpers.h:44
SplitVertexResolution::h_pullX
TH1F * h_pullX
Definition: SplitVertexResolution.cc:162
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
TransientVertex::originalTracks
std::vector< reco::TransientTrack > const & originalTracks() const
Definition: TransientVertex.h:200
PVValHelper::getMAD
Measurement1D getMAD(TH1F *histo)
Definition: PVValidationHelpers.cc:194
SplitVertexResolution::h_avgSumPt
TH1F * h_avgSumPt
Definition: SplitVertexResolution.cc:168
edm::TriggerNames
Definition: TriggerNames.h:55
SplitVertexResolution::h_nFinalVertices
TH1I * h_nFinalVertices
Definition: SplitVertexResolution.cc:187
pvCand::ipos
int ipos
Definition: pvTree.h:12
SplitVertexResolution::minVtxWgt_
double minVtxWgt_
Definition: SplitVertexResolution.cc:132
submitPVValidationJobs.runInfo
dictionary runInfo
Definition: submitPVValidationJobs.py:1013
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
SplitVertexResolution::p_resolX_vsSumPt
TH1F * p_resolX_vsSumPt
Definition: SplitVertexResolution.cc:208
SplitVertexResolution::h_diffY
TH1F * h_diffY
Definition: SplitVertexResolution.cc:151
SplitVertexResolution::h_nNonFakeVertices
TH1I * h_nNonFakeVertices
Definition: SplitVertexResolution.cc:186
TransientTrackBuilder::build
reco::TransientTrack build(const reco::Track *p) const
Definition: TransientTrackBuilder.cc:20
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
reco::Vertex::nTracks
unsigned int nTracks(float minWeight=0.5) const
Returns the number of tracks in the vertex with weight above minWeight.
Definition: Vertex.cc:146
mps_fire.result
result
Definition: mps_fire.py:311
reco::Vertex::yError
double yError() const
error on y
Definition: Vertex.h:126
SplitVertexResolution::h_pullX_Nvtx_
std::vector< TH1F * > h_pullX_Nvtx_
Definition: SplitVertexResolution.cc:229
genParticles_cff.map
map
Definition: genParticles_cff.py:11
trigObjTnPSource_cfi.bins
bins
Definition: trigObjTnPSource_cfi.py:20
pvCand::yErr_subVtx2
float yErr_subVtx2
Definition: pvTree.h:38
SplitVertexResolution::pvsTag_
edm::InputTag pvsTag_
Definition: SplitVertexResolution.cc:118
pvCand::CL_subVtx1
float CL_subVtx1
Definition: pvTree.h:42
SplitVertexResolution::h_nVertices
TH1I * h_nVertices
Definition: SplitVertexResolution.cc:185
pvCand::xErr_subVtx2
float xErr_subVtx2
Definition: pvTree.h:37
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
SplitVertexResolution::h_pullZ
TH1F * h_pullZ
Definition: SplitVertexResolution.cc:164
SplitVertexResolution::beginEvent
virtual void beginEvent() final
Definition: SplitVertexResolution.cc:623
SplitVertexResolution::h_pullY
TH1F * h_pullY
Definition: SplitVertexResolution.cc:163
SplitVertexResolution::engine_
std::mt19937 engine_
Definition: SplitVertexResolution.cc:245
HLT_FULL_cff.distance
distance
Definition: HLT_FULL_cff.py:7799
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
pvCand::y_subVtx1
float y_subVtx1
Definition: pvTree.h:24
reco::Vertex::ndof
double ndof() const
Definition: Vertex.h:110
SplitVertexResolution::p_pullZ_vsSumPt
TH1F * p_pullZ_vsSumPt
Definition: SplitVertexResolution.cc:235
fftjetvertexadder_cfi.errX
errX
Definition: fftjetvertexadder_cfi.py:37
edm::InputTag
Definition: InputTag.h:15
pvCand::yErr_origVtx
float yErr_origVtx
Definition: pvTree.h:19
SplitVertexResolution::h_wTrks2
TH1F * h_wTrks2
Definition: SplitVertexResolution.cc:174
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
SplitVertexResolution::h_pullZ_Nvtx_
std::vector< TH1F * > h_pullZ_Nvtx_
Definition: SplitVertexResolution.cc:231
up
Definition: BitonicSort.h:7
statmode::fitParams
std::pair< Measurement1D, Measurement1D > fitParams
Definition: SplitVertexResolution.cc:68
reco::Vertex
Definition: Vertex.h:35
pvEvent::runNumber
int runNumber
Definition: pvTree.h:56
SplitVertexResolution::h_errZ
TH1F * h_errZ
Definition: SplitVertexResolution.cc:160
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64
SplitVertexResolution::storeNtuple_
bool storeNtuple_
Definition: SplitVertexResolution.cc:112
SplitVertexResolution::tksByTrigger_
TH1D * tksByTrigger_
Definition: SplitVertexResolution.cc:191
SplitVertexResolution::evtsByTrigger_
TH1D * evtsByTrigger_
Definition: SplitVertexResolution.cc:192
SplitVertexResolution::pvsToken_
edm::EDGetTokenT< reco::VertexCollection > pvsToken_
Definition: SplitVertexResolution.cc:119
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
pwdgSkimBPark_cfi.vertices
vertices
Definition: pwdgSkimBPark_cfi.py:7
SplitVertexResolution::cmToUm
static constexpr double cmToUm
Definition: SplitVertexResolution.cc:139