CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
BeamMonitor Class Reference

#include <BeamMonitor.h>

Inheritance diagram for BeamMonitor:
DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks > edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 BeamMonitor (const edm::ParameterSet &)
 
- Public Member Functions inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) 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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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)
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) override
 
void bookHistograms (DQMStore::IBooker &i, const edm::Run &r, const edm::EventSetup &c) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
void dqmEndRun (const edm::Run &r, const edm::EventSetup &c) override
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- 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)
 

Private Member Functions

void FitAndFill (const edm::LuminosityBlock &lumiSeg, int &, int &, int &)
 
void formatFitTime (char *, const std::time_t &)
 
void RestartFitting ()
 
void scrollTH1 (TH1 *, std::time_t)
 
bool testScroll (std::time_t &, std::time_t &)
 

Private Attributes

int beginLumiOfBSFit_
 
int beginLumiOfPVFit_
 
edm::EDGetTokenT< reco::BeamSpotbsSrc_
 
int countEvt_
 
int countGapLumi_
 
int countLumi_
 
MonitorElementcutFlowTable
 
int DBloggerReturn_
 
bool debug_
 
double deltaSigCut_
 
const int dxBin_
 
const double dxMax_
 
const double dxMin_
 
const int dzBin_
 
const double dzMax_
 
const double dzMin_
 
int endLumiOfBSFit_
 
int endLumiOfPVFit_
 
int firstAverageFit_
 
int fitNLumi_
 
int fitPVNLumi_
 
MonitorElementfitResults
 
int frun
 
edm::TimeValue_t ftimestamp
 
MonitorElementh_d0_phi0
 
MonitorElementh_nTrk_lumi
 
MonitorElementh_nVtx
 
MonitorElementh_nVtx_lumi
 
MonitorElementh_nVtx_lumi_all
 
MonitorElementh_nVtx_st
 
MonitorElementh_PVx [2]
 
MonitorElementh_PVxz
 
MonitorElementh_PVy [2]
 
MonitorElementh_PVyz
 
MonitorElementh_PVz [2]
 
MonitorElementh_sigmaX0
 
MonitorElementh_sigmaY0
 
MonitorElementh_sigmaZ0
 
MonitorElementh_trk_z0
 
MonitorElementh_trkPt
 
MonitorElementh_trkVz
 
MonitorElementh_vx_dz
 
MonitorElementh_vx_vy
 
MonitorElementh_vy_dz
 
MonitorElementh_x0
 
MonitorElementh_y0
 
MonitorElementh_z0
 
edm::EDGetTokenT< edm::TriggerResultshltSrc_
 
std::vector< MonitorElement * > hs
 
int intervalInSec_
 
std::vector< std::string > jetTrigger_
 
int lastlumi_
 
int lastNZbin
 
std::map< int, int > mapBeginBSLS
 
std::map< int, std::time_t > mapBeginBSTime
 
std::map< int, int > mapBeginPVLS
 
std::map< int, std::time_t > mapBeginPVTime
 
std::map< int, std::size_t > mapLSBSTrkSize
 
std::map< int, TH1F > mapLSCF
 
std::map< int, size_t > mapLSPVStoreSize
 
std::map< int, std::vector< int > > mapNPV
 
std::map< int, std::vector< float > > mapPVx
 
std::map< int, std::vector< float > > mapPVy
 
std::map< int, std::vector< float > > mapPVz
 
double maxZ_
 
unsigned int min_Ntrks_
 
unsigned int minNrVertices_
 
double minVtxNdf_
 
double minVtxWgt_
 
std::string monitorName_
 
int nextlumi_
 
int nFitElements_
 
int nFits_
 
unsigned int nthBSTrk_
 
edm::Service< cond::service::OnlineDBOutputServiceonlineDbService_
 
bool onlineMode_
 
const int phiBin_
 
const double phiMax_
 
const double phiMin_
 
reco::BeamSpot preBS
 
bool processed_
 
MonitorElementpvResults
 
edm::EDGetTokenT< reco::VertexCollectionpvSrc_
 
std::string recordName_
 
reco::BeamSpot refBS
 
std::time_t refBStime [2]
 
std::time_t refPVtime [2]
 
std::time_t refTime
 
MonitorElementreportSummary
 
Float_t reportSummary_
 
MonitorElementreportSummaryContents [3]
 
MonitorElementreportSummaryMap
 
int resetFitNLumi_
 
bool resetHistos_
 
int resetPVNLumi_
 
bool StartAverage_
 
std::time_t startTime
 
Float_t summaryContent_ [3]
 
Float_t summarySum_
 
std::unique_ptr< BeamFittertheBeamFitter
 
std::time_t tmpTime
 
edm::EDGetTokenT< reco::TrackCollectiontracksLabel_
 
bool useLockRecords_
 
const int vxBin_
 
const double vxMax_
 
const double vxMin_
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 34 of file BeamMonitor.h.

Constructor & Destructor Documentation

◆ BeamMonitor()

BeamMonitor::BeamMonitor ( const edm::ParameterSet ps)

Definition at line 94 of file BeamMonitor.cc.

95  : dxBin_(ps.getParameter<int>("dxBin")),
96  dxMin_(ps.getParameter<double>("dxMin")),
97  dxMax_(ps.getParameter<double>("dxMax")),
98 
99  vxBin_(ps.getParameter<int>("vxBin")),
100  vxMin_(ps.getParameter<double>("vxMin")),
101  vxMax_(ps.getParameter<double>("vxMax")),
102 
103  phiBin_(ps.getParameter<int>("phiBin")),
104  phiMin_(ps.getParameter<double>("phiMin")),
105  phiMax_(ps.getParameter<double>("phiMax")),
106 
107  dzBin_(ps.getParameter<int>("dzBin")),
108  dzMin_(ps.getParameter<double>("dzMin")),
109  dzMax_(ps.getParameter<double>("dzMax")),
110 
111  countEvt_(0),
112  countLumi_(0),
113  nthBSTrk_(0),
114  nFitElements_(3),
115  resetHistos_(false),
116  StartAverage_(false),
117  firstAverageFit_(0),
118  countGapLumi_(0) {
119  monitorName_ = ps.getUntrackedParameter<string>("monitorName", "YourSubsystemName");
120  recordName_ = ps.getUntrackedParameter<string>("recordName");
121  bsSrc_ = consumes<reco::BeamSpot>(ps.getUntrackedParameter<InputTag>("beamSpot"));
122  tracksLabel_ = consumes<reco::TrackCollection>(
123  ps.getParameter<ParameterSet>("BeamFitter").getUntrackedParameter<InputTag>("TrackCollection"));
124  pvSrc_ = consumes<reco::VertexCollection>(ps.getUntrackedParameter<InputTag>("primaryVertex"));
125  hltSrc_ = consumes<TriggerResults>(ps.getParameter<InputTag>("hltResults"));
126  intervalInSec_ = ps.getUntrackedParameter<int>("timeInterval", 920); //40 LS X 23"
127  fitNLumi_ = ps.getUntrackedParameter<int>("fitEveryNLumi", -1);
128  resetFitNLumi_ = ps.getUntrackedParameter<int>("resetEveryNLumi", -1);
129  fitPVNLumi_ = ps.getUntrackedParameter<int>("fitPVEveryNLumi", -1);
130  resetPVNLumi_ = ps.getUntrackedParameter<int>("resetPVEveryNLumi", -1);
131  deltaSigCut_ = ps.getUntrackedParameter<double>("deltaSignificanceCut", 15);
132  debug_ = ps.getUntrackedParameter<bool>("Debug");
133  onlineMode_ = ps.getUntrackedParameter<bool>("OnlineMode");
134  jetTrigger_ = ps.getUntrackedParameter<std::vector<std::string> >("jetTrigger");
135  min_Ntrks_ = ps.getParameter<ParameterSet>("BeamFitter").getUntrackedParameter<int>("MinimumInputTracks");
136  maxZ_ = ps.getParameter<ParameterSet>("BeamFitter").getUntrackedParameter<double>("MaximumZ");
137  minNrVertices_ = ps.getParameter<ParameterSet>("PVFitter").getUntrackedParameter<unsigned int>("minNrVerticesForFit");
138  minVtxNdf_ = ps.getParameter<ParameterSet>("PVFitter").getUntrackedParameter<double>("minVertexNdf");
139  minVtxWgt_ = ps.getParameter<ParameterSet>("PVFitter").getUntrackedParameter<double>("minVertexMeanWeight");
140  useLockRecords_ = ps.getUntrackedParameter<bool>("useLockRecords");
141 
142  if (!monitorName_.empty())
143  monitorName_ = monitorName_ + "/";
144 
145  theBeamFitter = std::make_unique<BeamFitter>(ps, consumesCollector());
146  theBeamFitter->resetTrkVector();
147  theBeamFitter->resetLSRange();
148  theBeamFitter->resetRefTime();
149  theBeamFitter->resetPVFitter();
150 
151  if (fitNLumi_ <= 0)
152  fitNLumi_ = 1;
154  refBStime[0] = refBStime[1] = refPVtime[0] = refPVtime[1] = 0;
155  maxZ_ = std::fabs(maxZ_);
156  lastlumi_ = 0;
157  nextlumi_ = 0;
158  processed_ = false;
159 }

References beginLumiOfBSFit_, beginLumiOfPVFit_, bsSrc_, edm::EDConsumerBase::consumesCollector(), debug_, deltaSigCut_, endLumiOfBSFit_, endLumiOfPVFit_, fitNLumi_, fitPVNLumi_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hltSrc_, intervalInSec_, jetTrigger_, lastlumi_, maxZ_, min_Ntrks_, minNrVertices_, minVtxNdf_, minVtxWgt_, monitorName_, nextlumi_, nFits_, onlineMode_, processed_, pvSrc_, recordName_, refBStime, refPVtime, resetFitNLumi_, resetPVNLumi_, theBeamFitter, tracksLabel_, and useLockRecords_.

Member Function Documentation

◆ analyze()

void BeamMonitor::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotectedvirtual

Reimplemented from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 653 of file BeamMonitor.cc.

653  {
654  const int nthlumi = iEvent.luminosityBlock();
655  if (onlineMode_ && (nthlumi < nextlumi_)) {
656  edm::LogInfo("BeamMonitor") << "analyze:: Spilt event from previous lumi section!" << std::endl;
657  return;
658  }
659  if (onlineMode_ && (nthlumi > nextlumi_)) {
660  edm::LogInfo("BeamMonitor") << "analyze:: Spilt event from next lumi section!!!" << std::endl;
661  return;
662  }
663 
664  countEvt_++;
665  theBeamFitter->readEvent(
666  iEvent); //Remember when track fitter read the event in the same place the PVFitter read the events !!!!!!!!!
667 
668  Handle<reco::BeamSpot> recoBeamSpotHandle;
669  iEvent.getByToken(bsSrc_, recoBeamSpotHandle);
670  refBS = *recoBeamSpotHandle;
671 
672  //------Cut Flow Table filled every event!--------------------------------------
673  {
674  // Make a copy of the cut flow table from the beam fitter.
675  auto tmphisto = static_cast<TH1F*>(theBeamFitter->getCutFlow());
676  cutFlowTable->getTH1()->SetBins(
677  tmphisto->GetNbinsX(), tmphisto->GetXaxis()->GetXmin(), tmphisto->GetXaxis()->GetXmax());
678  // Update the bin labels
679  if (countEvt_ == 1) // SetLabel just once
680  for (int n = 0; n < tmphisto->GetNbinsX(); n++)
681  cutFlowTable->setBinLabel(n + 1, tmphisto->GetXaxis()->GetBinLabel(n + 1), 1);
682  cutFlowTable->Reset();
683  cutFlowTable->getTH1()->Add(tmphisto);
684  }
685 
686  //----Reco tracks -------------------------------------
688  iEvent.getByToken(tracksLabel_, TrackCollection);
689  const reco::TrackCollection* tracks = TrackCollection.product();
690  for (reco::TrackCollection::const_iterator track = tracks->begin(); track != tracks->end(); ++track) {
691  h_trkPt->Fill(track->pt()); //no need to change here for average bs
692  h_trkVz->Fill(track->vz());
693  }
694 
695  //-------HLT Trigger --------------------------------
697  bool JetTrigPass = false;
698  if (iEvent.getByToken(hltSrc_, triggerResults)) {
699  const edm::TriggerNames& trigNames = iEvent.triggerNames(*triggerResults);
700  for (unsigned int i = 0; i < triggerResults->size(); i++) {
701  const std::string& trigName = trigNames.triggerName(i);
702 
703  if (JetTrigPass)
704  continue;
705 
706  for (size_t t = 0; t < jetTrigger_.size(); ++t) {
707  if (JetTrigPass)
708  continue;
709 
710  string string_search(jetTrigger_[t]);
711  size_t found = trigName.find(string_search);
712 
713  if (found != string::npos) {
714  int thisTrigger_ = trigNames.triggerIndex(trigName);
715  if (triggerResults->accept(thisTrigger_))
716  JetTrigPass = true;
717  } //if trigger found
718  } //for(t=0;..)
719  } //for(i=0; ..)
720  } //if trigger colleciton exist)
721 
722  //------ Primary Vertices-------
724 
725  if (iEvent.getByToken(pvSrc_, PVCollection)) {
726  int nPVcount = 0;
727  int nPVcount_ST = 0; //For Single Trigger(hence ST)
728 
729  for (reco::VertexCollection::const_iterator pv = PVCollection->begin(); pv != PVCollection->end(); ++pv) {
730  //--- vertex selection
731  if (pv->isFake() || pv->tracksSize() == 0)
732  continue;
733  nPVcount++; // count non fake pv:
734 
735  if (JetTrigPass)
736  nPVcount_ST++; //non-fake pv with a specific trigger
737 
738  if (pv->ndof() < minVtxNdf_ || (pv->ndof() + 3.) / pv->tracksSize() < 2 * minVtxWgt_)
739  continue;
740 
741  //Fill this map to store xyx for pv so that later we can remove the first one for run aver
742  mapPVx[countLumi_].push_back(pv->x());
743  mapPVy[countLumi_].push_back(pv->y());
744  mapPVz[countLumi_].push_back(pv->z());
745 
746  if (!StartAverage_) { //for first N LS
747  h_PVx[0]->Fill(pv->x());
748  h_PVy[0]->Fill(pv->y());
749  h_PVz[0]->Fill(pv->z());
750  h_PVxz->Fill(pv->z(), pv->x());
751  h_PVyz->Fill(pv->z(), pv->y());
752  } //for first N LiS
753  else {
754  h_PVxz->Fill(pv->z(), pv->x());
755  h_PVyz->Fill(pv->z(), pv->y());
756  }
757 
758  } //loop over pvs
759 
760  h_nVtx->Fill(nPVcount * 1.); //no need to change it for average BS
761 
762  mapNPV[countLumi_].push_back((nPVcount_ST));
763 
764  if (!StartAverage_) {
765  h_nVtx_st->Fill(nPVcount_ST * 1.);
766  }
767 
768  } //if pv collection is availaable
769 
770  if (StartAverage_) {
771  map<int, std::vector<float> >::iterator itpvx = mapPVx.begin();
772  map<int, std::vector<float> >::iterator itpvy = mapPVy.begin();
773  map<int, std::vector<float> >::iterator itpvz = mapPVz.begin();
774 
775  map<int, std::vector<int> >::iterator itbspvinfo = mapNPV.begin();
776 
777  if ((int)mapPVx.size() > resetFitNLumi_) { //sometimes the events is not there but LS is there!
778  mapPVx.erase(itpvx);
779  mapPVy.erase(itpvy);
780  mapPVz.erase(itpvz);
781  mapNPV.erase(itbspvinfo);
782  } //loop over Last N lumi collected
783 
784  } //StartAverage==true
785 
786  processed_ = true;
787 }

References bsSrc_, countEvt_, countLumi_, cutFlowTable, dqm::impl::MonitorElement::Fill(), newFWLiteAna::found, dqm::impl::MonitorElement::getTH1(), h_nVtx, h_nVtx_st, h_PVx, h_PVxz, h_PVy, h_PVyz, h_PVz, h_trkPt, h_trkVz, hltSrc_, mps_fire::i, iEvent, jetTrigger_, mapNPV, mapPVx, mapPVy, mapPVz, minVtxNdf_, minVtxWgt_, dqmiodumpmetadata::n, nextlumi_, onlineMode_, processed_, MetAnalyzer::pv(), L1TEGammaOffline_cfi::PVCollection, pvSrc_, refBS, dqm::impl::MonitorElement::Reset(), resetFitNLumi_, dqm::impl::MonitorElement::setBinLabel(), StartAverage_, AlCaHLTBitMon_QueryRunRegistry::string, submitPVValidationJobs::t, theBeamFitter, HLT_FULL_cff::track, tracks, tracksLabel_, triggerResults, EgHLTOffTrigSelection_cfi::trigName, and trigNames.

◆ beginLuminosityBlock()

void BeamMonitor::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
overrideprotected

Definition at line 524 of file BeamMonitor.cc.

524  {
525  // start DB logger
526  DBloggerReturn_ = 0;
529  onlineDbService_->logger().logInfo() << "BeamMonitor::beginLuminosityBlock - LS: " << lumiSeg.luminosityBlock();
530  }
531 
532  int nthlumi = lumiSeg.luminosityBlock();
533  const edm::TimeValue_t fbegintimestamp = lumiSeg.beginTime().value();
534  const std::time_t ftmptime = fbegintimestamp >> 32;
535 
536  if (countLumi_ == 0 && (!processed_)) {
538  refBStime[0] = refPVtime[0] = ftmptime;
539  mapBeginBSLS[countLumi_] = nthlumi;
540  mapBeginPVLS[countLumi_] = nthlumi;
541  mapBeginBSTime[countLumi_] = ftmptime;
542  mapBeginPVTime[countLumi_] = ftmptime;
543  } //for the first record
544 
545  if (nthlumi > nextlumi_) {
546  if (processed_) {
547  countLumi_++;
548  //store here them will need when we remove the first one of Last N LS
549  mapBeginBSLS[countLumi_] = nthlumi;
550  mapBeginPVLS[countLumi_] = nthlumi;
551  mapBeginBSTime[countLumi_] = ftmptime;
552  mapBeginPVTime[countLumi_] = ftmptime;
553  } //processed passed but not the first lumi
554  if ((!processed_) && countLumi_ != 0) {
555  mapBeginBSLS[countLumi_] = nthlumi;
556  mapBeginPVLS[countLumi_] = nthlumi;
557  mapBeginBSTime[countLumi_] = ftmptime;
558  mapBeginPVTime[countLumi_] = ftmptime;
559  } //processed fails for last lumi
560  } //nthLumi > nextlumi
561 
562  if (StartAverage_) {
563  //Just Make sure it get rest
564  refBStime[0] = 0;
565  refPVtime[0] = 0;
566  beginLumiOfPVFit_ = 0;
567  beginLumiOfBSFit_ = 0;
568 
569  if (debug_)
570  edm::LogInfo("BeamMonitor") << " beginLuminosityBlock: Size of mapBeginBSLS before = " << mapBeginBSLS.size()
571  << endl;
572  if (nthlumi >
573  nextlumi_) { //this make sure that it does not take into account this lumi for fitting and only look forward for new lumi
574  //as countLumi also remains the same so map value get overwritten once return to normal running.
575  //even if few LS are misssing and DQM module do not sees them then it catchs up again
576  map<int, int>::iterator itbs = mapBeginBSLS.begin();
577  map<int, int>::iterator itpv = mapBeginPVLS.begin();
578  map<int, std::time_t>::iterator itbstime = mapBeginBSTime.begin();
579  map<int, std::time_t>::iterator itpvtime = mapBeginPVTime.begin();
580 
581  if (processed_) { // otherwise if false then LS range of fit get messed up because we don't remove trk/pvs but we remove LS begin value . This prevent it as it happened if LS is there but no event are processed for some reason
582  mapBeginBSLS.erase(itbs);
583  mapBeginPVLS.erase(itpv);
584  mapBeginBSTime.erase(itbstime);
585  mapBeginPVTime.erase(itpvtime);
586  }
587  /*//not sure if want this or not ??
588  map<int, int>::iterator itgapb=mapBeginBSLS.begin();
589  map<int, int>::iterator itgape=mapBeginBSLS.end(); itgape--;
590  countGapLumi_ = ( (itgape->second) - (itgapb->second) );
591  //if we see Gap more than then 2*resetNFitLumi !!!!!!!
592  //for example if 10-15 is fitted and if 16-25 are missing then we next fit will be for range 11-26 but BS can change in between
593  // so better start as fresh and reset everything like starting in the begining!
594  if(countGapLumi_ >= 2*resetFitNLumi_){RestartFitting(); mapBeginBSLS[countLumi_] = nthlumi;}
595  */
596  }
597 
598  if (debug_)
599  edm::LogInfo("BeamMonitor") << " beginLuminosityBlock:: Size of mapBeginBSLS After = " << mapBeginBSLS.size()
600  << endl;
601 
602  map<int, int>::iterator bbs = mapBeginBSLS.begin();
603  map<int, int>::iterator bpv = mapBeginPVLS.begin();
604  map<int, std::time_t>::iterator bbst = mapBeginBSTime.begin();
605  map<int, std::time_t>::iterator bpvt = mapBeginPVTime.begin();
606 
607  if (beginLumiOfPVFit_ == 0)
608  beginLumiOfPVFit_ = bpv->second; //new begin time after removing the LS
609  if (beginLumiOfBSFit_ == 0)
610  beginLumiOfBSFit_ = bbs->second;
611  if (refBStime[0] == 0)
612  refBStime[0] = bbst->second;
613  if (refPVtime[0] == 0)
614  refPVtime[0] = bpvt->second;
615 
616  } //same logic for average fit as above commented line
617 
618  map<int, std::time_t>::iterator nbbst = mapBeginBSTime.begin();
619  map<int, std::time_t>::iterator nbpvt = mapBeginPVTime.begin();
620 
621  if (onlineMode_ && (nthlumi < nextlumi_))
622  return;
623 
624  if (onlineMode_) {
625  if (nthlumi > nextlumi_) {
626  if (countLumi_ != 0 && processed_)
627  FitAndFill(lumiSeg, lastlumi_, nextlumi_, nthlumi);
628  nextlumi_ = nthlumi;
629  edm::LogInfo("BeamMonitor") << "beginLuminosityBlock:: Next Lumi to Fit: " << nextlumi_ << endl;
630  if ((StartAverage_) && refBStime[0] == 0)
631  refBStime[0] = nbbst->second;
632  if ((StartAverage_) && refPVtime[0] == 0)
633  refPVtime[0] = nbpvt->second;
634  }
635  } else {
636  if (processed_)
637  FitAndFill(lumiSeg, lastlumi_, nextlumi_, nthlumi);
638  nextlumi_ = nthlumi;
639  edm::LogInfo("BeamMonitor") << " beginLuminosityBlock:: Next Lumi to Fit: " << nextlumi_ << endl;
640  if ((StartAverage_) && refBStime[0] == 0)
641  refBStime[0] = nbbst->second;
642  if ((StartAverage_) && refPVtime[0] == 0)
643  refPVtime[0] = nbpvt->second;
644  }
645 
646  //countLumi_++;
647  if (processed_)
648  processed_ = false;
649  edm::LogInfo("BeamMonitor") << " beginLuminosityBlock:: Begin of Lumi: " << nthlumi << endl;
650 }

References beginLumiOfBSFit_, beginLumiOfPVFit_, edm::LuminosityBlockBase::beginTime(), countLumi_, DBloggerReturn_, debug_, FitAndFill(), edm::Service< T >::isAvailable(), lastlumi_, cond::service::PoolDBOutputService::logger(), cond::persistency::Logger::logInfo(), edm::LuminosityBlockBase::luminosityBlock(), mapBeginBSLS, mapBeginBSTime, mapBeginPVLS, mapBeginPVTime, nextlumi_, onlineDbService_, onlineMode_, processed_, refBStime, refPVtime, cond::persistency::Logger::start(), StartAverage_, and edm::Timestamp::value().

◆ bookHistograms()

void BeamMonitor::bookHistograms ( DQMStore::IBooker i,
const edm::Run r,
const edm::EventSetup c 
)
overrideprotectedvirtual

Implements DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 213 of file BeamMonitor.cc.

213  {
214  frun = iRun.run();
215  ftimestamp = iRun.beginTime().value();
216  tmpTime = ftimestamp >> 32;
218  char eventTime[64];
219  formatFitTime(eventTime, tmpTime);
220  edm::LogInfo("BeamMonitor") << "TimeOffset = " << eventTime << std::endl;
221  TDatime da(eventTime);
222  if (debug_) {
223  edm::LogInfo("BeamMonitor") << "TimeOffset = ";
224  da.Print();
225  }
226  auto daTime = da.Convert(kTRUE);
227 
228  // book some histograms here
229 
230  // create and cd into new folder
231  iBooker.setCurrentFolder(monitorName_ + "Fit");
232 
233  h_nTrk_lumi = iBooker.book1D("nTrk_lumi", "Num. of selected tracks vs lumi (Fit)", 20, 0.5, 20.5);
234  h_nTrk_lumi->setAxisTitle("Lumisection", 1);
235  h_nTrk_lumi->setAxisTitle("Num of Tracks for Fit", 2);
236 
237  //store vtx vs lumi for monitoring why fits fail
238  h_nVtx_lumi = iBooker.book1D("nVtx_lumi", "Num. of selected Vtx vs lumi (Fit)", 20, 0.5, 20.5);
239  h_nVtx_lumi->setAxisTitle("Lumisection", 1);
240  h_nVtx_lumi->setAxisTitle("Num of Vtx for Fit", 2);
241 
242  h_nVtx_lumi_all = iBooker.book1D("nVtx_lumi_all", "Num. of selected Vtx vs lumi (Fit) all", 20, 0.5, 20.5);
243  h_nVtx_lumi_all->getTH1()->SetCanExtend(TH1::kAllAxes);
244  h_nVtx_lumi_all->setAxisTitle("Lumisection", 1);
245  h_nVtx_lumi_all->setAxisTitle("Num of Vtx for Fit", 2);
246 
247  h_d0_phi0 = iBooker.bookProfile(
248  "d0_phi0", "d_{0} vs. #phi_{0} (Selected Tracks)", phiBin_, phiMin_, phiMax_, dxBin_, dxMin_, dxMax_, "");
249  h_d0_phi0->setAxisTitle("#phi_{0} (rad)", 1);
250  h_d0_phi0->setAxisTitle("d_{0} (cm)", 2);
251 
252  h_vx_vy = iBooker.book2D(
253  "trk_vx_vy", "Vertex (PCA) position of selected tracks", vxBin_, vxMin_, vxMax_, vxBin_, vxMin_, vxMax_);
254  h_vx_vy->setOption("COLZ");
255  // h_vx_vy->getTH1()->SetCanExtend(TH1::kAllAxes);
256  h_vx_vy->setAxisTitle("x coordinate of input track at PCA (cm)", 1);
257  h_vx_vy->setAxisTitle("y coordinate of input track at PCA (cm)", 2);
258 
259  {
260  TDatime* da = new TDatime();
261  gStyle->SetTimeOffset(da->Convert(kTRUE));
262  }
263 
264  const int nvar_ = 6;
265  string coord[nvar_] = {"x", "y", "z", "sigmaX", "sigmaY", "sigmaZ"};
266  string label[nvar_] = {
267  "x_{0} (cm)", "y_{0} (cm)", "z_{0} (cm)", "#sigma_{X_{0}} (cm)", "#sigma_{Y_{0}} (cm)", "#sigma_{Z_{0}} (cm)"};
268 
269  hs.reserve(kNumHists);
270  for (int i = 0; i < 4; i++) {
271  iBooker.setCurrentFolder(monitorName_ + "Fit");
272  for (int ic = 0; ic < nvar_; ++ic) {
273  TString histName(coord[ic]);
274  TString histTitle(coord[ic]);
275  string ytitle(label[ic]);
276  string xtitle("");
277  string options("E1");
278  bool createHisto = true;
279  switch (i) {
280  case 1: // BS vs time
281  histName += "0_time";
282  xtitle = "Time [UTC]";
283  if (ic < 3)
284  histTitle += " coordinate of beam spot vs time (Fit)";
285  else
286  histTitle = histTitle.Insert(5, " ") + " of beam spot vs time (Fit)";
287  break;
288  case 2: // PV vs lumi
289  if (ic < 3) {
290  iBooker.setCurrentFolder(monitorName_ + "PrimaryVertex");
291  histName.Insert(0, "PV");
292  histName += "_lumi";
293  histTitle.Insert(0, "Avg. ");
294  histTitle += " position of primary vtx vs lumi";
295  xtitle = "Lumisection";
296  ytitle.insert(0, "PV");
297  ytitle += " #pm #sigma_{PV";
298  ytitle += coord[ic];
299  ytitle += "} (cm)";
300  } else
301  createHisto = false;
302  break;
303  case 3: // PV vs time
304  if (ic < 3) {
305  iBooker.setCurrentFolder(monitorName_ + "PrimaryVertex");
306  histName.Insert(0, "PV");
307  histName += "_time";
308  histTitle.Insert(0, "Avg. ");
309  histTitle += " position of primary vtx vs time";
310  xtitle = "Time [UTC]";
311  ytitle.insert(0, "PV");
312  ytitle += " #pm #sigma_{PV";
313  ytitle += coord[ic];
314  ytitle += "} (cm)";
315  } else
316  createHisto = false;
317  break;
318  default: // BS vs lumi
319  histName += "0_lumi";
320  xtitle = "Lumisection";
321  if (ic < 3)
322  histTitle += " coordinate of beam spot vs lumi (Fit)";
323  else
324  histTitle = histTitle.Insert(5, " ") + " of beam spot vs lumi (Fit)";
325  break;
326  }
327  if (createHisto) {
328  edm::LogInfo("BeamMonitor") << "hitsName = " << histName << "; histTitle = " << histTitle << std::endl;
329  auto tmpHs = iBooker.book1D(histName, histTitle, 40, 0.5, 40.5);
330  hs.push_back(tmpHs);
331  tmpHs->setAxisTitle(xtitle, 1);
332  tmpHs->setAxisTitle(ytitle, 2);
333  tmpHs->getTH1()->SetOption("E1");
334  if (histName.Contains("time")) {
335  //int nbins = (intervalInSec_/23 > 0 ? intervalInSec_/23 : 40);
336  tmpHs->getTH1()->SetBins(intervalInSec_, 0.5, intervalInSec_ + 0.5);
337  tmpHs->setAxisTimeDisplay(1);
338  tmpHs->setAxisTimeFormat("%H:%M:%S", 1);
339  tmpHs->getTH1()->GetXaxis()->SetTimeOffset(daTime);
340  }
341  histName += "_all";
342  histTitle += " all";
343  tmpHs = iBooker.book1D(histName, histTitle, 40, 0.5, 40.5);
344  hs.push_back(tmpHs);
345  tmpHs->getTH1()->SetCanExtend(TH1::kAllAxes);
346  tmpHs->setAxisTitle(xtitle, 1);
347  tmpHs->setAxisTitle(ytitle, 2);
348  tmpHs->getTH1()->SetOption("E1");
349  if (histName.Contains("time")) {
350  //int nbins = (intervalInSec_/23 > 0 ? intervalInSec_/23 : 40);
351  tmpHs->getTH1()->SetBins(intervalInSec_, 0.5, intervalInSec_ + 0.5);
352  tmpHs->setAxisTimeDisplay(1);
353  tmpHs->setAxisTimeFormat("%H:%M:%S", 1);
354  tmpHs->getTH1()->GetXaxis()->SetTimeOffset(daTime);
355  }
356  }
357  }
358  }
359  assert(hs.size() == kNumHists);
360  assert(0 == strcmp(hs[k_sigmaY0_time]->getTH1()->GetName(), "sigmaY0_time"));
361  assert(0 == strcmp(hs[k_PVz_lumi_all]->getTH1()->GetName(), "PVz_lumi_all"));
362 
363  iBooker.setCurrentFolder(monitorName_ + "Fit");
364 
365  h_trk_z0 = iBooker.book1D("trk_z0", "z_{0} of selected tracks", dzBin_, dzMin_, dzMax_);
366  h_trk_z0->setAxisTitle("z_{0} of selected tracks (cm)", 1);
367 
368  h_vx_dz = iBooker.bookProfile(
369  "vx_dz", "v_{x} vs. dz of selected tracks", dzBin_, dzMin_, dzMax_, dxBin_, dxMin_, dxMax_, "");
370  h_vx_dz->setAxisTitle("dz (cm)", 1);
371  h_vx_dz->setAxisTitle("x coordinate of input track at PCA (cm)", 2);
372 
373  h_vy_dz = iBooker.bookProfile(
374  "vy_dz", "v_{y} vs. dz of selected tracks", dzBin_, dzMin_, dzMax_, dxBin_, dxMin_, dxMax_, "");
375  h_vy_dz->setAxisTitle("dz (cm)", 1);
376  h_vy_dz->setAxisTitle("y coordinate of input track at PCA (cm)", 2);
377 
378  h_x0 = iBooker.book1D("BeamMonitorFeedBack_x0", "x coordinate of beam spot (Fit)", 100, -0.01, 0.01);
379  h_x0->setAxisTitle("x_{0} (cm)", 1);
380  h_x0->getTH1()->SetCanExtend(TH1::kAllAxes);
381 
382  h_y0 = iBooker.book1D("BeamMonitorFeedBack_y0", "y coordinate of beam spot (Fit)", 100, -0.01, 0.01);
383  h_y0->setAxisTitle("y_{0} (cm)", 1);
384  h_y0->getTH1()->SetCanExtend(TH1::kAllAxes);
385 
386  h_z0 = iBooker.book1D("BeamMonitorFeedBack_z0", "z coordinate of beam spot (Fit)", dzBin_, dzMin_, dzMax_);
387  h_z0->setAxisTitle("z_{0} (cm)", 1);
388  h_z0->getTH1()->SetCanExtend(TH1::kAllAxes);
389 
390  h_sigmaX0 = iBooker.book1D("BeamMonitorFeedBack_sigmaX0", "sigma x0 of beam spot (Fit)", 100, 0, 0.05);
391  h_sigmaX0->setAxisTitle("#sigma_{X_{0}} (cm)", 1);
392  h_sigmaX0->getTH1()->SetCanExtend(TH1::kAllAxes);
393 
394  h_sigmaY0 = iBooker.book1D("BeamMonitorFeedBack_sigmaY0", "sigma y0 of beam spot (Fit)", 100, 0, 0.05);
395  h_sigmaY0->setAxisTitle("#sigma_{Y_{0}} (cm)", 1);
396  h_sigmaY0->getTH1()->SetCanExtend(TH1::kAllAxes);
397 
398  h_sigmaZ0 = iBooker.book1D("BeamMonitorFeedBack_sigmaZ0", "sigma z0 of beam spot (Fit)", 100, 0, 10);
399  h_sigmaZ0->setAxisTitle("#sigma_{Z_{0}} (cm)", 1);
400  h_sigmaZ0->getTH1()->SetCanExtend(TH1::kAllAxes);
401 
402  // Histograms of all reco tracks (without cuts):
403  h_trkPt = iBooker.book1D("trkPt", "p_{T} of all reco'd tracks (no selection)", 200, 0., 50.);
404  h_trkPt->setAxisTitle("p_{T} (GeV/c)", 1);
405 
406  h_trkVz = iBooker.book1D("trkVz", "Z coordinate of PCA of all reco'd tracks (no selection)", dzBin_, dzMin_, dzMax_);
407  h_trkVz->setAxisTitle("V_{Z} (cm)", 1);
408 
409  cutFlowTable = iBooker.book1D("cutFlowTable", "Cut flow table of track selection", 9, 0, 9);
410 
411  // Results of previous good fit:
412  fitResults = iBooker.book2D("fitResults", "Results of previous good beam fit", 2, 0, 2, 8, 0, 8);
413  fitResults->setAxisTitle("Fitted Beam Spot (cm)", 1);
414  fitResults->setBinLabel(8, "x_{0}", 2);
415  fitResults->setBinLabel(7, "y_{0}", 2);
416  fitResults->setBinLabel(6, "z_{0}", 2);
417  fitResults->setBinLabel(5, "#sigma_{Z}", 2);
418  fitResults->setBinLabel(4, "#frac{dx}{dz} (rad)", 2);
419  fitResults->setBinLabel(3, "#frac{dy}{dz} (rad)", 2);
420  fitResults->setBinLabel(2, "#sigma_{X}", 2);
421  fitResults->setBinLabel(1, "#sigma_{Y}", 2);
422  fitResults->setBinLabel(1, "Mean", 1);
423  fitResults->setBinLabel(2, "Stat. Error", 1);
424  fitResults->getTH1()->SetOption("text");
425 
426  // Histos of PrimaryVertices:
427  iBooker.setCurrentFolder(monitorName_ + "PrimaryVertex");
428 
429  h_nVtx = iBooker.book1D("vtxNbr", "Reconstructed Vertices(non-fake) in all Event", 60, -0.5, 59.5);
430  h_nVtx->setAxisTitle("Num. of reco. vertices", 1);
431 
432  //For one Trigger only
433  h_nVtx_st = iBooker.book1D("vtxNbr_SelectedTriggers", "Reconstructed Vertices(non-fake) in Events", 60, -0.5, 59.5);
434  //h_nVtx_st->setAxisTitle("Num. of reco. vertices for Un-Prescaled Jet Trigger",1);
435 
436  // Monitor only the PV with highest sum pt of assoc. trks:
437  h_PVx[0] = iBooker.book1D("PVX", "x coordinate of Primary Vtx", 50, -0.01, 0.01);
438  h_PVx[0]->setAxisTitle("PVx (cm)", 1);
439  h_PVx[0]->getTH1()->SetCanExtend(TH1::kAllAxes);
440 
441  h_PVy[0] = iBooker.book1D("PVY", "y coordinate of Primary Vtx", 50, -0.01, 0.01);
442  h_PVy[0]->setAxisTitle("PVy (cm)", 1);
443  h_PVy[0]->getTH1()->SetCanExtend(TH1::kAllAxes);
444 
445  h_PVz[0] = iBooker.book1D("PVZ", "z coordinate of Primary Vtx", dzBin_, dzMin_, dzMax_);
446  h_PVz[0]->setAxisTitle("PVz (cm)", 1);
447 
448  h_PVx[1] = iBooker.book1D("PVXFit", "x coordinate of Primary Vtx (Last Fit)", 50, -0.01, 0.01);
449  h_PVx[1]->setAxisTitle("PVx (cm)", 1);
450  h_PVx[1]->getTH1()->SetCanExtend(TH1::kAllAxes);
451 
452  h_PVy[1] = iBooker.book1D("PVYFit", "y coordinate of Primary Vtx (Last Fit)", 50, -0.01, 0.01);
453  h_PVy[1]->setAxisTitle("PVy (cm)", 1);
454  h_PVy[1]->getTH1()->SetCanExtend(TH1::kAllAxes);
455 
456  h_PVz[1] = iBooker.book1D("PVZFit", "z coordinate of Primary Vtx (Last Fit)", dzBin_, dzMin_, dzMax_);
457  h_PVz[1]->setAxisTitle("PVz (cm)", 1);
458 
459  h_PVxz = iBooker.bookProfile("PVxz", "PVx vs. PVz", dzBin_ / 2, dzMin_, dzMax_, dxBin_ / 2, dxMin_, dxMax_, "");
460  h_PVxz->setAxisTitle("PVz (cm)", 1);
461  h_PVxz->setAxisTitle("PVx (cm)", 2);
462 
463  h_PVyz = iBooker.bookProfile("PVyz", "PVy vs. PVz", dzBin_ / 2, dzMin_, dzMax_, dxBin_ / 2, dxMin_, dxMax_, "");
464  h_PVyz->setAxisTitle("PVz (cm)", 1);
465  h_PVyz->setAxisTitle("PVy (cm)", 2);
466 
467  // Results of previous good fit:
468  pvResults = iBooker.book2D("pvResults", "Results of fitting Primary Vertices", 2, 0, 2, 6, 0, 6);
469  pvResults->setAxisTitle("Fitted Primary Vertex (cm)", 1);
470  pvResults->setBinLabel(6, "PVx", 2);
471  pvResults->setBinLabel(5, "PVy", 2);
472  pvResults->setBinLabel(4, "PVz", 2);
473  pvResults->setBinLabel(3, "#sigma_{X}", 2);
474  pvResults->setBinLabel(2, "#sigma_{Y}", 2);
475  pvResults->setBinLabel(1, "#sigma_{Z}", 2);
476  pvResults->setBinLabel(1, "Mean", 1);
477  pvResults->setBinLabel(2, "Stat. Error", 1);
478  pvResults->getTH1()->SetOption("text");
479 
480  // Summary plots:
481  iBooker.setCurrentFolder(monitorName_ + "EventInfo");
482 
483  reportSummary = iBooker.bookFloat("reportSummary");
484  if (reportSummary)
485  reportSummary->Fill(std::numeric_limits<double>::quiet_NaN());
486 
487  char histo[20];
488  iBooker.setCurrentFolder(monitorName_ + "EventInfo/reportSummaryContents");
489  for (int n = 0; n < nFitElements_; n++) {
490  switch (n) {
491  case 0:
492  sprintf(histo, "x0_status");
493  break;
494  case 1:
495  sprintf(histo, "y0_status");
496  break;
497  case 2:
498  sprintf(histo, "z0_status");
499  break;
500  }
501  reportSummaryContents[n] = iBooker.bookFloat(histo);
502  }
503 
504  for (int i = 0; i < nFitElements_; i++) {
505  summaryContent_[i] = 0.;
506  reportSummaryContents[i]->Fill(std::numeric_limits<double>::quiet_NaN());
507  }
508 
509  iBooker.setCurrentFolder(monitorName_ + "EventInfo");
510 
511  reportSummaryMap = iBooker.book2D("reportSummaryMap", "Beam Spot Summary Map", 1, 0, 1, 3, 0, 3);
513  reportSummaryMap->setAxisTitle("Fitted Beam Spot", 2);
514  reportSummaryMap->setBinLabel(1, " ", 1);
515  reportSummaryMap->setBinLabel(1, "x_{0}", 2);
516  reportSummaryMap->setBinLabel(2, "y_{0}", 2);
517  reportSummaryMap->setBinLabel(3, "z_{0}", 2);
518  for (int i = 0; i < nFitElements_; i++) {
519  reportSummaryMap->setBinContent(1, i + 1, -1.);
520  }
521 }

References cms::cuda::assert(), edm::RunBase::beginTime(), dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookFloat(), dqm::implementation::IBooker::bookProfile(), cutFlowTable, Calorimetry_cff::da, debug_, dxBin_, dxMax_, dxMin_, dzBin_, dzMax_, dzMin_, dqm::impl::MonitorElement::Fill(), fitResults, formatFitTime(), frun, ftimestamp, dqm::impl::MonitorElement::getTH1(), h_d0_phi0, h_nTrk_lumi, h_nVtx, h_nVtx_lumi, h_nVtx_lumi_all, h_nVtx_st, h_PVx, h_PVxz, h_PVy, h_PVyz, h_PVz, h_sigmaX0, h_sigmaY0, h_sigmaZ0, h_trk_z0, h_trkPt, h_trkVz, h_vx_dz, h_vx_vy, h_vy_dz, h_x0, h_y0, h_z0, timingPdfMaker::histo, B2GTnPMonitor_cfi::histTitle, hs, mps_fire::i, intervalInSec_, label, monitorName_, dqmiodumpmetadata::n, nFitElements_, AlcaSiPixelAliHarvester0T_cff::options, phiBin_, phiMax_, phiMin_, pvResults, refTime, reportSummary, reportSummaryContents, reportSummaryMap, edm::RunBase::run(), dqm::impl::MonitorElement::setAxisTitle(), dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), dqm::impl::MonitorElement::setOption(), startTime, summaryContent_, tmpTime, edm::Timestamp::value(), vxBin_, vxMax_, vxMin_, hgcalPlots::xtitle, and hgcalPlots::ytitle.

◆ dqmBeginRun()

void BeamMonitor::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

◆ dqmEndRun()

void BeamMonitor::dqmEndRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotectedvirtual

Reimplemented from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 1539 of file BeamMonitor.cc.

1539  {
1540  if (debug_)
1541  edm::LogInfo("BeamMonitor") << "dqmEndRun:: Clearing all the Maps " << endl;
1542  //Clear all the Maps here
1543  mapPVx.clear();
1544  mapPVy.clear();
1545  mapPVz.clear();
1546  mapNPV.clear();
1547  mapBeginBSLS.clear();
1548  mapBeginPVLS.clear();
1549  mapBeginBSTime.clear();
1550  mapBeginPVTime.clear();
1551  mapLSBSTrkSize.clear();
1552  mapLSPVStoreSize.clear();
1553  mapLSCF.clear();
1554 
1557  }
1558 }

References debug_, edm::Service< T >::isAvailable(), mapBeginBSLS, mapBeginBSTime, mapBeginPVLS, mapBeginPVTime, mapLSBSTrkSize, mapLSCF, mapLSPVStoreSize, mapNPV, mapPVx, mapPVy, mapPVz, onlineDbService_, cond::service::PoolDBOutputService::releaseLocks(), and useLockRecords_.

◆ endLuminosityBlock()

void BeamMonitor::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
overrideprotected

Definition at line 790 of file BeamMonitor.cc.

790  {
791  int nthlumi = lumiSeg.id().luminosityBlock();
792  edm::LogInfo("BeamMonitor") << "endLuminosityBlock:: Lumi of the last event before endLuminosityBlock: " << nthlumi
793  << endl;
794 
795  if (onlineMode_ && nthlumi < nextlumi_)
796  return;
797  const edm::TimeValue_t fendtimestamp = lumiSeg.endTime().value();
798  const std::time_t fendtime = fendtimestamp >> 32;
799  tmpTime = refBStime[1] = refPVtime[1] = fendtime;
800 
801  // end DB logger
803  onlineDbService_->logger().logInfo() << "BeamMonitor::endLuminosityBlock";
805  }
806 }

References DBloggerReturn_, cond::persistency::Logger::end(), edm::LuminosityBlockBase::endTime(), edm::LuminosityBlockBase::id(), edm::Service< T >::isAvailable(), cond::service::PoolDBOutputService::logger(), cond::persistency::Logger::logInfo(), edm::LuminosityBlockID::luminosityBlock(), nextlumi_, onlineDbService_, onlineMode_, refBStime, refPVtime, tmpTime, and edm::Timestamp::value().

◆ FitAndFill()

void BeamMonitor::FitAndFill ( const edm::LuminosityBlock lumiSeg,
int &  lastlumi,
int &  nextlumi,
int &  nthlumi 
)
private

Definition at line 809 of file BeamMonitor.cc.

809  {
810  if (onlineMode_ && (nthlumi <= nextlumi))
811  return;
812 
813  //set the correct run number when no event in the LS for fake output
814  if ((processed_) && theBeamFitter->getRunNumber() != frun)
815  theBeamFitter->setRun(frun);
816 
817  int currentlumi = nextlumi;
818  edm::LogInfo("BeamMonitor") << "FitAndFill:: Lumi of the current fit: " << currentlumi << endl;
819  lastlumi = currentlumi;
820  endLumiOfBSFit_ = currentlumi;
821  endLumiOfPVFit_ = currentlumi;
822 
823  //---------Fix for Runninv average-------------
824  mapLSPVStoreSize[countLumi_] = theBeamFitter->getPVvectorSize();
825 
826  if (StartAverage_) {
827  std::map<int, std::size_t>::iterator rmLSPVi = mapLSPVStoreSize.begin();
828  size_t SizeToRemovePV = rmLSPVi->second;
829  for (std::map<int, std::size_t>::iterator rmLSPVe = mapLSPVStoreSize.end(); ++rmLSPVi != rmLSPVe;)
830  rmLSPVi->second -= SizeToRemovePV;
831 
832  theBeamFitter->resizePVvector(SizeToRemovePV);
833 
834  map<int, std::size_t>::iterator tmpItpv = mapLSPVStoreSize.begin();
835  mapLSPVStoreSize.erase(tmpItpv);
836  }
837  if (debug_)
838  edm::LogInfo("BeamMonitor") << "FitAndFill:: Size of thePVvector After removing the PVs = "
839  << theBeamFitter->getPVvectorSize() << endl;
840 
841  //lets filt the PV for GUI here: It was in analyzer in preivous versiton but moved here due to absence of event in some lumis, works OK
842  bool resetHistoFlag_ = false;
843  if ((int)mapPVx.size() >= resetFitNLumi_ && (StartAverage_)) {
844  h_PVx[0]->Reset();
845  h_PVy[0]->Reset();
846  h_PVz[0]->Reset();
847  h_nVtx_st->Reset();
848  resetHistoFlag_ = true;
849  }
850 
851  int MaxPVs = 0;
852  int countEvtLastNLS_ = 0;
853  int countTotPV_ = 0;
854 
855  std::map<int, std::vector<int> >::iterator mnpv = mapNPV.begin();
856  std::map<int, std::vector<float> >::iterator mpv2 = mapPVy.begin();
857  std::map<int, std::vector<float> >::iterator mpv3 = mapPVz.begin();
858 
859  for (std::map<int, std::vector<float> >::iterator mpv1 = mapPVx.begin(); mpv1 != mapPVx.end();
860  ++mpv1, ++mpv2, ++mpv3, ++mnpv) {
861  std::vector<float>::iterator mpvs2 = (mpv2->second).begin();
862  std::vector<float>::iterator mpvs3 = (mpv3->second).begin();
863  for (std::vector<float>::iterator mpvs1 = (mpv1->second).begin(); mpvs1 != (mpv1->second).end();
864  ++mpvs1, ++mpvs2, ++mpvs3) {
865  if (resetHistoFlag_) {
866  h_PVx[0]->Fill(*mpvs1); //these histogram are reset after StartAverage_ flag is ON
867  h_PVy[0]->Fill(*mpvs2);
868  h_PVz[0]->Fill(*mpvs3);
869  }
870  } //loop over second
871 
872  //Do the same here for nPV distr.
873  for (std::vector<int>::iterator mnpvs = (mnpv->second).begin(); mnpvs != (mnpv->second).end(); ++mnpvs) {
874  if ((*mnpvs > 0) && (resetHistoFlag_))
875  h_nVtx_st->Fill((*mnpvs) * (1.0));
876  countEvtLastNLS_++;
877  countTotPV_ += (*mnpvs);
878  if ((*mnpvs) > MaxPVs)
879  MaxPVs = (*mnpvs);
880  } //loop over second of mapNPV
881 
882  } //loop over last N lumis
883 
884  char tmpTitlePV[100];
885  sprintf(tmpTitlePV, "%s %i %s %i", "Num. of reco. vertices for LS: ", beginLumiOfPVFit_, " to ", endLumiOfPVFit_);
886  h_nVtx_st->setAxisTitle(tmpTitlePV, 1);
887 
888  std::vector<float> DipPVInfo_;
889  DipPVInfo_.clear();
890 
891  if (countTotPV_ != 0) {
892  DipPVInfo_.push_back((float)countEvtLastNLS_);
893  DipPVInfo_.push_back(h_nVtx_st->getMean());
894  DipPVInfo_.push_back(h_nVtx_st->getMeanError());
895  DipPVInfo_.push_back(h_nVtx_st->getRMS());
896  DipPVInfo_.push_back(h_nVtx_st->getRMSError());
897  DipPVInfo_.push_back((float)MaxPVs);
898  DipPVInfo_.push_back((float)countTotPV_);
899  MaxPVs = 0;
900  } else {
901  for (size_t i = 0; i < 7; i++) {
902  if (i > 0) {
903  DipPVInfo_.push_back(0.);
904  } else {
905  DipPVInfo_.push_back((float)countEvtLastNLS_);
906  }
907  }
908  }
909  theBeamFitter->SetPVInfo(DipPVInfo_);
910  countEvtLastNLS_ = 0;
911 
912  if (onlineMode_) { // filling LS gap
913  // FIXME: need to add protection for the case if the gap is at the resetting LS!
914  const int countLS_bs = hs[k_x0_lumi]->getTH1()->GetEntries();
915  const int countLS_pv = hs[k_PVx_lumi]->getTH1()->GetEntries();
916  edm::LogInfo("BeamMonitor") << "FitAndFill:: countLS_bs = " << countLS_bs << " ; countLS_pv = " << countLS_pv
917  << std::endl;
918  int LSgap_bs = currentlumi / fitNLumi_ - countLS_bs;
919  int LSgap_pv = currentlumi / fitPVNLumi_ - countLS_pv;
920  if (currentlumi % fitNLumi_ == 0)
921  LSgap_bs--;
922  if (currentlumi % fitPVNLumi_ == 0)
923  LSgap_pv--;
924  edm::LogInfo("BeamMonitor") << "FitAndFill:: LSgap_bs = " << LSgap_bs << " ; LSgap_pv = " << LSgap_pv << std::endl;
925  // filling previous fits if LS gap ever exists
926  for (int ig = 0; ig < LSgap_bs; ig++) {
927  hs[k_x0_lumi]->ShiftFillLast(0., 0., fitNLumi_); //x0 , x0err, fitNLumi_; see DQMCore....
928  hs[k_y0_lumi]->ShiftFillLast(0., 0., fitNLumi_);
929  hs[k_z0_lumi]->ShiftFillLast(0., 0., fitNLumi_);
930  hs[k_sigmaX0_lumi]->ShiftFillLast(0., 0., fitNLumi_);
931  hs[k_sigmaY0_lumi]->ShiftFillLast(0., 0., fitNLumi_);
932  hs[k_sigmaZ0_lumi]->ShiftFillLast(0., 0., fitNLumi_);
934  }
935  for (int ig = 0; ig < LSgap_pv; ig++) {
936  hs[k_PVx_lumi]->ShiftFillLast(0., 0., fitPVNLumi_);
937  hs[k_PVy_lumi]->ShiftFillLast(0., 0., fitPVNLumi_);
938  hs[k_PVz_lumi]->ShiftFillLast(0., 0., fitPVNLumi_);
939  }
940  const int previousLS = h_nTrk_lumi->getTH1()->GetEntries();
941  for (int i = 1; i < (currentlumi - previousLS);
942  i++) //if (current-previoius)= 1 then never go inside the for loop!!!!!!!!!!!
944  }
945 
946  edm::LogInfo("BeamMonitor") << "FitAndFill:: Time lapsed since last scroll = " << tmpTime - refTime << std::endl;
947 
948  if (testScroll(tmpTime, refTime)) {
949  scrollTH1(hs[k_x0_time]->getTH1(), refTime);
950  scrollTH1(hs[k_y0_time]->getTH1(), refTime);
951  scrollTH1(hs[k_z0_time]->getTH1(), refTime);
952  scrollTH1(hs[k_sigmaX0_time]->getTH1(), refTime);
953  scrollTH1(hs[k_sigmaY0_time]->getTH1(), refTime);
954  scrollTH1(hs[k_sigmaZ0_time]->getTH1(), refTime);
955  scrollTH1(hs[k_PVx_time]->getTH1(), refTime);
956  scrollTH1(hs[k_PVy_time]->getTH1(), refTime);
957  scrollTH1(hs[k_PVz_time]->getTH1(), refTime);
958  }
959 
960  bool doPVFit = false;
961 
962  if (fitPVNLumi_ > 0) {
963  if (onlineMode_) {
964  if (currentlumi % fitPVNLumi_ == 0)
965  doPVFit = true;
966  } else if (countLumi_ % fitPVNLumi_ == 0)
967  doPVFit = true;
968  } else
969  doPVFit = true;
970 
971  if (doPVFit) {
972  edm::LogInfo("BeamMonitor") << "FitAndFill:: Do PV Fitting for LS = " << beginLumiOfPVFit_ << " to "
973  << endLumiOfPVFit_ << std::endl;
974  // Primary Vertex Fit:
975  if (h_PVx[0]->getTH1()->GetEntries() > minNrVertices_) {
976  pvResults->Reset();
977  char tmpTitle[50];
978  sprintf(
979  tmpTitle, "%s %i %s %i", "Fitted Primary Vertex (cm) of LS: ", beginLumiOfPVFit_, " to ", endLumiOfPVFit_);
980  pvResults->setAxisTitle(tmpTitle, 1);
981 
982  std::unique_ptr<TF1> fgaus{new TF1("fgaus", "gaus")};
983  double mean, width, meanErr, widthErr;
984  fgaus->SetLineColor(4);
985  h_PVx[0]->getTH1()->Fit(fgaus.get(), "QLM0");
986  mean = fgaus->GetParameter(1);
987  width = fgaus->GetParameter(2);
988  meanErr = fgaus->GetParError(1);
989  widthErr = fgaus->GetParError(2);
990 
991  hs[k_PVx_lumi]->ShiftFillLast(mean, width, fitPVNLumi_);
992  hs[k_PVx_lumi_all]->setBinContent(currentlumi, mean);
993  hs[k_PVx_lumi_all]->setBinError(currentlumi, width);
994  int nthBin = tmpTime - refTime;
995  if (nthBin < 0)
996  edm::LogInfo("BeamMonitor") << "FitAndFill:: Event time outside current range of time histograms!"
997  << std::endl;
998  if (nthBin > 0) {
999  hs[k_PVx_time]->setBinContent(nthBin, mean);
1000  hs[k_PVx_time]->setBinError(nthBin, width);
1001  }
1002  int jthBin = tmpTime - startTime;
1003  if (jthBin > 0) {
1004  hs[k_PVx_time_all]->setBinContent(jthBin, mean);
1005  hs[k_PVx_time_all]->setBinError(jthBin, width);
1006  }
1007  pvResults->setBinContent(1, 6, mean);
1008  pvResults->setBinContent(1, 3, width);
1009  pvResults->setBinContent(2, 6, meanErr);
1010  pvResults->setBinContent(2, 3, widthErr);
1011 
1012  {
1013  // snap shot of the fit
1014  auto tmphisto = h_PVx[0]->getTH1F();
1015  h_PVx[1]->getTH1()->SetBins(
1016  tmphisto->GetNbinsX(), tmphisto->GetXaxis()->GetXmin(), tmphisto->GetXaxis()->GetXmax());
1017  h_PVx[1]->Reset();
1018  h_PVx[1]->getTH1()->Add(tmphisto);
1019  h_PVx[1]->getTH1()->Fit(fgaus.get(), "QLM");
1020  }
1021 
1022  h_PVy[0]->getTH1()->Fit(fgaus.get(), "QLM0");
1023  mean = fgaus->GetParameter(1);
1024  width = fgaus->GetParameter(2);
1025  meanErr = fgaus->GetParError(1);
1026  widthErr = fgaus->GetParError(2);
1027  hs[k_PVy_lumi]->ShiftFillLast(mean, width, fitPVNLumi_);
1028  hs[k_PVy_lumi_all]->setBinContent(currentlumi, mean);
1029  hs[k_PVy_lumi_all]->setBinError(currentlumi, width);
1030  if (nthBin > 0) {
1031  hs[k_PVy_time]->setBinContent(nthBin, mean);
1032  hs[k_PVy_time]->setBinError(nthBin, width);
1033  }
1034  if (jthBin > 0) {
1035  hs[k_PVy_time_all]->setBinContent(jthBin, mean);
1036  hs[k_PVy_time_all]->setBinError(jthBin, width);
1037  }
1038  pvResults->setBinContent(1, 5, mean);
1039  pvResults->setBinContent(1, 2, width);
1040  pvResults->setBinContent(2, 5, meanErr);
1041  pvResults->setBinContent(2, 2, widthErr);
1042  // snap shot of the fit
1043  {
1044  auto tmphisto = h_PVy[0]->getTH1F();
1045  h_PVy[1]->getTH1()->SetBins(
1046  tmphisto->GetNbinsX(), tmphisto->GetXaxis()->GetXmin(), tmphisto->GetXaxis()->GetXmax());
1047  h_PVy[1]->Reset();
1048  h_PVy[1]->getTH1()->Add(tmphisto);
1049  h_PVy[1]->getTH1()->Fit(fgaus.get(), "QLM");
1050  }
1051 
1052  h_PVz[0]->getTH1()->Fit(fgaus.get(), "QLM0");
1053  mean = fgaus->GetParameter(1);
1054  width = fgaus->GetParameter(2);
1055  meanErr = fgaus->GetParError(1);
1056  widthErr = fgaus->GetParError(2);
1057  hs[k_PVz_lumi]->ShiftFillLast(mean, width, fitPVNLumi_);
1058  hs[k_PVz_lumi_all]->setBinContent(currentlumi, mean);
1059  hs[k_PVz_lumi_all]->setBinError(currentlumi, width);
1060  if (nthBin > 0) {
1061  hs[k_PVz_time]->setBinContent(nthBin, mean);
1062  hs[k_PVz_time]->setBinError(nthBin, width);
1063  }
1064  if (jthBin > 0) {
1065  hs[k_PVz_time_all]->setBinContent(jthBin, mean);
1066  hs[k_PVz_time_all]->setBinError(jthBin, width);
1067  }
1068  pvResults->setBinContent(1, 4, mean);
1069  pvResults->setBinContent(1, 1, width);
1070  pvResults->setBinContent(2, 4, meanErr);
1071  pvResults->setBinContent(2, 1, widthErr);
1072  {
1073  // snap shot of the fit
1074  auto tmphisto = h_PVz[0]->getTH1F();
1075  h_PVz[1]->getTH1()->SetBins(
1076  tmphisto->GetNbinsX(), tmphisto->GetXaxis()->GetXmin(), tmphisto->GetXaxis()->GetXmax());
1077  h_PVz[1]->Reset();
1078  h_PVz[1]->getTH1()->Add(tmphisto);
1079  h_PVz[1]->getTH1()->Fit(fgaus.get(), "QLM");
1080  }
1081  } //check if found min Vertices
1082  } //do PVfit
1083 
1084  if ((resetPVNLumi_ > 0 && countLumi_ == resetPVNLumi_) || StartAverage_) {
1085  beginLumiOfPVFit_ = 0;
1086  refPVtime[0] = 0;
1087  }
1088 
1089  //---------Readjustment of theBSvector, RefTime, beginLSofFit---------
1090  vector<BSTrkParameters> theBSvector1 = theBeamFitter->getBSvector();
1091  mapLSBSTrkSize[countLumi_] = (theBSvector1.size());
1092  size_t PreviousRecords = 0; //needed to fill nth record of tracks in GUI
1093 
1094  if (StartAverage_) {
1095  size_t SizeToRemove = 0;
1096  std::map<int, std::size_t>::iterator rmls = mapLSBSTrkSize.begin();
1097  SizeToRemove = rmls->second;
1098  if (debug_)
1099  edm::LogInfo("BeamMonitor") << " The size to remove is = " << SizeToRemove << endl;
1100  int changedAfterThis = 0;
1101  for (std::map<int, std::size_t>::iterator rmLS = mapLSBSTrkSize.begin(); rmLS != mapLSBSTrkSize.end();
1102  ++rmLS, ++changedAfterThis) {
1103  if (changedAfterThis > 0) {
1104  (rmLS->second) = (rmLS->second) - SizeToRemove;
1105  if ((mapLSBSTrkSize.size() - (size_t)changedAfterThis) == 2)
1106  PreviousRecords = (rmLS->second);
1107  }
1108  }
1109 
1110  theBeamFitter->resizeBSvector(SizeToRemove);
1111 
1112  map<int, std::size_t>::iterator tmpIt = mapLSBSTrkSize.begin();
1113  mapLSBSTrkSize.erase(tmpIt);
1114 
1115  std::pair<int, int> checkfitLS = theBeamFitter->getFitLSRange();
1116  std::pair<time_t, time_t> checkfitTime = theBeamFitter->getRefTime();
1117  theBeamFitter->setFitLSRange(beginLumiOfBSFit_, checkfitLS.second);
1118  theBeamFitter->setRefTime(refBStime[0], checkfitTime.second);
1119  }
1120 
1121  //Fill the track for this fit
1122  vector<BSTrkParameters> theBSvector = theBeamFitter->getBSvector();
1123  h_nTrk_lumi->ShiftFillLast(theBSvector.size());
1124 
1125  if (debug_)
1126  edm::LogInfo("BeamMonitor") << "FitAndFill:: Size of theBSViector.size() After =" << theBSvector.size() << endl;
1127 
1128  bool countFitting = false;
1129  if (theBSvector.size() >= PreviousRecords && theBSvector.size() >= min_Ntrks_) {
1130  countFitting = true;
1131  }
1132 
1133  //---Fix for Cut Flow Table for Running average in a same way//the previous code has problem for resetting!!!
1134  mapLSCF[countLumi_] = *theBeamFitter->getCutFlow();
1135  if (StartAverage_ && !mapLSCF.empty()) {
1136  const TH1F& cutFlowToSubtract = mapLSCF.begin()->second;
1137  // Subtract the last cut flow from all of the others.
1138  std::map<int, TH1F>::iterator cf = mapLSCF.begin();
1139  // Start on second entry
1140  for (; cf != mapLSCF.end(); ++cf) {
1141  cf->second.Add(&cutFlowToSubtract, -1);
1142  }
1143  theBeamFitter->subtractFromCutFlow(&cutFlowToSubtract);
1144  // Remove the obsolete lumi section
1145  mapLSCF.erase(mapLSCF.begin());
1146  }
1147 
1148  if (resetHistos_) {
1149  h_d0_phi0->Reset();
1150  h_vx_vy->Reset();
1151  h_vx_dz->Reset();
1152  h_vy_dz->Reset();
1153  h_trk_z0->Reset();
1154  resetHistos_ = false;
1155  }
1156 
1157  if (StartAverage_)
1158  nthBSTrk_ = PreviousRecords; //after average proccess is ON//for 2-6 LS fit PreviousRecords is size from 2-5 LS
1159 
1160  edm::LogInfo("BeamMonitor") << " The Previous Recored for this fit is =" << nthBSTrk_ << endl;
1161 
1162  unsigned int itrk = 0;
1163  for (vector<BSTrkParameters>::const_iterator BSTrk = theBSvector.begin(); BSTrk != theBSvector.end();
1164  ++BSTrk, ++itrk) {
1165  if (itrk >= nthBSTrk_) { //fill for this record only !!
1166  h_d0_phi0->Fill(BSTrk->phi0(), BSTrk->d0());
1167  double vx = BSTrk->vx();
1168  double vy = BSTrk->vy();
1169  double z0 = BSTrk->z0();
1170  h_vx_vy->Fill(vx, vy);
1171  h_vx_dz->Fill(z0, vx);
1172  h_vy_dz->Fill(z0, vy);
1173  h_trk_z0->Fill(z0);
1174  }
1175  }
1176 
1177  nthBSTrk_ = theBSvector.size(); // keep track of num of tracks filled so far
1178 
1179  edm::LogInfo("BeamMonitor") << " The Current Recored for this fit is =" << nthBSTrk_ << endl;
1180 
1181  if (countFitting)
1182  edm::LogInfo("BeamMonitor") << "FitAndFill:: Num of tracks collected = " << nthBSTrk_ << endl;
1183 
1184  if (fitNLumi_ > 0) {
1185  if (onlineMode_) {
1186  if (currentlumi % fitNLumi_ != 0) {
1187  // for (std::map<TString,MonitorElement*>::iterator itAll = hs.begin();
1188  // itAll != hs.end(); ++itAll) {
1189  // if ((*itAll).first.Contains("all")) {
1190  // (*itAll).second->setBinContent(currentlumi,0.);
1191  // (*itAll).second->setBinError(currentlumi,0.);
1192  // }
1193  // }
1194  return;
1195  }
1196  } else if (countLumi_ % fitNLumi_ != 0)
1197  return;
1198  }
1199 
1200  edm::LogInfo("BeamMonitor") << "FitAndFill:: [DebugTime] refBStime[0] = " << refBStime[0]
1201  << "; address = " << &refBStime[0] << std::endl;
1202  edm::LogInfo("BeamMonitor") << "FitAndFill:: [DebugTime] refBStime[1] = " << refBStime[1]
1203  << "; address = " << &refBStime[1] << std::endl;
1204 
1205  //Fill for all LS even if fit fails
1206  h_nVtx_lumi->ShiftFillLast((theBeamFitter->getPVvectorSize()), 0., fitNLumi_);
1207  h_nVtx_lumi_all->setBinContent(currentlumi, (theBeamFitter->getPVvectorSize()));
1208 
1209  if (countFitting) {
1210  nFits_++;
1211  std::pair<int, int> fitLS = theBeamFitter->getFitLSRange();
1212  edm::LogInfo("BeamMonitor") << "FitAndFill:: [BeamFitter] Do BeamSpot Fit for LS = " << fitLS.first << " to "
1213  << fitLS.second << std::endl;
1214  edm::LogInfo("BeamMonitor") << "FitAndFill:: [BeamMonitor] Do BeamSpot Fit for LS = " << beginLumiOfBSFit_
1215  << " to " << endLumiOfBSFit_ << std::endl;
1216 
1217  //Now Run the PV and Track Fitter over the collected tracks and pvs
1218  if (theBeamFitter->runPVandTrkFitter()) {
1219  reco::BeamSpot bs = theBeamFitter->getBeamSpot();
1220  if (bs.type() > 0) // with good beamwidth fit
1221  preBS = bs; // cache good fit results
1222 
1223  edm::LogInfo("BeamMonitor") << "\n RESULTS OF DEFAULT FIT:" << endl;
1224  edm::LogInfo("BeamMonitor") << bs << endl;
1225  edm::LogInfo("BeamMonitor") << "[BeamFitter] fitting done \n" << endl;
1226 
1227  hs[k_x0_lumi]->ShiftFillLast(bs.x0(), bs.x0Error(), fitNLumi_);
1228  hs[k_y0_lumi]->ShiftFillLast(bs.y0(), bs.y0Error(), fitNLumi_);
1229  hs[k_z0_lumi]->ShiftFillLast(bs.z0(), bs.z0Error(), fitNLumi_);
1230  hs[k_sigmaX0_lumi]->ShiftFillLast(bs.BeamWidthX(), bs.BeamWidthXError(), fitNLumi_);
1231  hs[k_sigmaY0_lumi]->ShiftFillLast(bs.BeamWidthY(), bs.BeamWidthYError(), fitNLumi_);
1232  hs[k_sigmaZ0_lumi]->ShiftFillLast(bs.sigmaZ(), bs.sigmaZ0Error(), fitNLumi_);
1233  hs[k_x0_lumi_all]->setBinContent(currentlumi, bs.x0());
1234  hs[k_x0_lumi_all]->setBinError(currentlumi, bs.x0Error());
1235  hs[k_y0_lumi_all]->setBinContent(currentlumi, bs.y0());
1236  hs[k_y0_lumi_all]->setBinError(currentlumi, bs.y0Error());
1237  hs[k_z0_lumi_all]->setBinContent(currentlumi, bs.z0());
1238  hs[k_z0_lumi_all]->setBinError(currentlumi, bs.z0Error());
1239  hs[k_sigmaX0_lumi_all]->setBinContent(currentlumi, bs.BeamWidthX());
1240  hs[k_sigmaX0_lumi_all]->setBinError(currentlumi, bs.BeamWidthXError());
1241  hs[k_sigmaY0_lumi_all]->setBinContent(currentlumi, bs.BeamWidthY());
1242  hs[k_sigmaY0_lumi_all]->setBinError(currentlumi, bs.BeamWidthYError());
1243  hs[k_sigmaZ0_lumi_all]->setBinContent(currentlumi, bs.sigmaZ());
1244  hs[k_sigmaZ0_lumi_all]->setBinError(currentlumi, bs.sigmaZ0Error());
1245 
1246  int nthBin = tmpTime - refTime;
1247  if (nthBin > 0) {
1248  hs[k_x0_time]->setBinContent(nthBin, bs.x0());
1249  hs[k_y0_time]->setBinContent(nthBin, bs.y0());
1250  hs[k_z0_time]->setBinContent(nthBin, bs.z0());
1251  hs[k_sigmaX0_time]->setBinContent(nthBin, bs.BeamWidthX());
1252  hs[k_sigmaY0_time]->setBinContent(nthBin, bs.BeamWidthY());
1253  hs[k_sigmaZ0_time]->setBinContent(nthBin, bs.sigmaZ());
1254  hs[k_x0_time]->setBinError(nthBin, bs.x0Error());
1255  hs[k_y0_time]->setBinError(nthBin, bs.y0Error());
1256  hs[k_z0_time]->setBinError(nthBin, bs.z0Error());
1257  hs[k_sigmaX0_time]->setBinError(nthBin, bs.BeamWidthXError());
1258  hs[k_sigmaY0_time]->setBinError(nthBin, bs.BeamWidthYError());
1259  hs[k_sigmaZ0_time]->setBinError(nthBin, bs.sigmaZ0Error());
1260  }
1261 
1262  int jthBin = tmpTime - startTime;
1263  if (jthBin > 0) {
1264  hs[k_x0_time_all]->setBinContent(jthBin, bs.x0());
1265  hs[k_y0_time_all]->setBinContent(jthBin, bs.y0());
1266  hs[k_z0_time_all]->setBinContent(jthBin, bs.z0());
1267  hs[k_sigmaX0_time_all]->setBinContent(jthBin, bs.BeamWidthX());
1268  hs[k_sigmaY0_time_all]->setBinContent(jthBin, bs.BeamWidthY());
1269  hs[k_sigmaZ0_time_all]->setBinContent(jthBin, bs.sigmaZ());
1270  hs[k_x0_time_all]->setBinError(jthBin, bs.x0Error());
1271  hs[k_y0_time_all]->setBinError(jthBin, bs.y0Error());
1272  hs[k_z0_time_all]->setBinError(jthBin, bs.z0Error());
1273  hs[k_sigmaX0_time_all]->setBinError(jthBin, bs.BeamWidthXError());
1274  hs[k_sigmaY0_time_all]->setBinError(jthBin, bs.BeamWidthYError());
1275  hs[k_sigmaZ0_time_all]->setBinError(jthBin, bs.sigmaZ0Error());
1276  }
1277 
1278  h_x0->Fill(bs.x0());
1279  h_y0->Fill(bs.y0());
1280  h_z0->Fill(bs.z0());
1281  if (bs.type() > 0) { // with good beamwidth fit
1282  h_sigmaX0->Fill(bs.BeamWidthX());
1283  h_sigmaY0->Fill(bs.BeamWidthY());
1284  }
1285  h_sigmaZ0->Fill(bs.sigmaZ());
1286 
1287  if (nthBSTrk_ >= 2 * min_Ntrks_) {
1288  double amp = std::sqrt(bs.x0() * bs.x0() + bs.y0() * bs.y0());
1289  double alpha = std::atan2(bs.y0(), bs.x0());
1290  std::unique_ptr<TF1> f1{new TF1("f1", "[0]*sin(x-[1])", -3.14, 3.14)};
1291  f1->SetParameters(amp, alpha);
1292  f1->SetParLimits(0, amp - 0.1, amp + 0.1);
1293  f1->SetParLimits(1, alpha - 0.577, alpha + 0.577);
1294  f1->SetLineColor(4);
1295  h_d0_phi0->getTProfile()->Fit(f1.get(), "QR");
1296 
1297  double mean = bs.z0();
1298  double width = bs.sigmaZ();
1299  std::unique_ptr<TF1> fgaus{new TF1("fgaus", "gaus")};
1300  fgaus->SetParameters(mean, width);
1301  fgaus->SetLineColor(4);
1302  h_trk_z0->getTH1()->Fit(fgaus.get(), "QLRM", "", mean - 3 * width, mean + 3 * width);
1303  }
1304 
1305  fitResults->Reset();
1306  std::pair<int, int> LSRange = theBeamFitter->getFitLSRange();
1307  char tmpTitle[50];
1308  sprintf(tmpTitle, "%s %i %s %i", "Fitted Beam Spot (cm) of LS: ", LSRange.first, " to ", LSRange.second);
1309  fitResults->setAxisTitle(tmpTitle, 1);
1310  fitResults->setBinContent(1, 8, bs.x0());
1311  fitResults->setBinContent(1, 7, bs.y0());
1312  fitResults->setBinContent(1, 6, bs.z0());
1313  fitResults->setBinContent(1, 5, bs.sigmaZ());
1314  fitResults->setBinContent(1, 4, bs.dxdz());
1315  fitResults->setBinContent(1, 3, bs.dydz());
1316  if (bs.type() > 0) { // with good beamwidth fit
1317  fitResults->setBinContent(1, 2, bs.BeamWidthX());
1318  fitResults->setBinContent(1, 1, bs.BeamWidthY());
1319  } else { // fill cached widths
1322  }
1323 
1324  fitResults->setBinContent(2, 8, bs.x0Error());
1325  fitResults->setBinContent(2, 7, bs.y0Error());
1326  fitResults->setBinContent(2, 6, bs.z0Error());
1327  fitResults->setBinContent(2, 5, bs.sigmaZ0Error());
1328  fitResults->setBinContent(2, 4, bs.dxdzError());
1329  fitResults->setBinContent(2, 3, bs.dydzError());
1330  if (bs.type() > 0) { // with good beamwidth fit
1331  fitResults->setBinContent(2, 2, bs.BeamWidthXError());
1332  fitResults->setBinContent(2, 1, bs.BeamWidthYError());
1333  } else { // fill cached width errors
1336  }
1337 
1338  // count good fit
1339  // if (std::fabs(refBS.x0()-bs.x0())/bs.x0Error() < deltaSigCut_) { // disabled temporarily
1340  summaryContent_[0] += 1.;
1341  // }
1342  // if (std::fabs(refBS.y0()-bs.y0())/bs.y0Error() < deltaSigCut_) { // disabled temporarily
1343  summaryContent_[1] += 1.;
1344  // }
1345  // if (std::fabs(refBS.z0()-bs.z0())/bs.z0Error() < deltaSigCut_) { // disabled temporarily
1346  summaryContent_[2] += 1.;
1347  // }
1348 
1349  // Create the BeamSpotOnlineObjects object
1350  BeamSpotOnlineObjects* BSOnline = new BeamSpotOnlineObjects();
1351  BSOnline->SetLastAnalyzedLumi(fitLS.second);
1352  BSOnline->SetLastAnalyzedRun(theBeamFitter->getRunNumber());
1353  BSOnline->SetLastAnalyzedFill(0); // To be updated with correct LHC Fill number
1354  BSOnline->SetPosition(bs.x0(), bs.y0(), bs.z0());
1355  BSOnline->SetSigmaZ(bs.sigmaZ());
1356  BSOnline->SetBeamWidthX(bs.BeamWidthX());
1357  BSOnline->SetBeamWidthY(bs.BeamWidthY());
1358  BSOnline->SetBeamWidthXError(bs.BeamWidthXError());
1359  BSOnline->SetBeamWidthYError(bs.BeamWidthYError());
1360  BSOnline->Setdxdz(bs.dxdz());
1361  BSOnline->Setdydz(bs.dydz());
1362  BSOnline->SetType(bs.type());
1363  BSOnline->SetEmittanceX(bs.emittanceX());
1364  BSOnline->SetEmittanceY(bs.emittanceY());
1365  BSOnline->SetBetaStar(bs.betaStar());
1366  for (int i = 0; i < 7; ++i) {
1367  for (int j = 0; j < 7; ++j) {
1368  BSOnline->SetCovariance(i, j, bs.covariance(i, j));
1369  }
1370  }
1371  BSOnline->SetNumTracks(theBeamFitter->getNTracks());
1372  BSOnline->SetNumPVs(theBeamFitter->getNPVs());
1373  auto creationTime =
1374  std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch())
1375  .count();
1376  BSOnline->SetCreationTime(creationTime);
1377 
1378  edm::LogInfo("BeamMonitor") << "FitAndFill::[PayloadCreation] BeamSpotOnline object created: \n" << std::endl;
1379  edm::LogInfo("BeamMonitor") << *BSOnline << std::endl;
1380 
1381  // Create the payload for BeamSpotOnlineObjects object
1382  if (onlineDbService_.isAvailable()) {
1383  edm::LogInfo("BeamMonitor") << "FitAndFill::[PayloadCreation] onlineDbService available \n" << std::endl;
1384  onlineDbService_->logger().logInfo() << "BeamMonitor::FitAndFill - Lumi of the current fit: " << currentlumi;
1386  << "BeamMonitor::FitAndFill - Do PV Fitting for LS = " << beginLumiOfPVFit_ << " to " << endLumiOfPVFit_;
1388  << "BeamMonitor::FitAndFill - [BeamFitter] Do BeamSpot Fit for LS = " << fitLS.first << " to "
1389  << fitLS.second;
1391  << "BeamMonitor::FitAndFill - [BeamMonitor] Do BeamSpot Fit for LS = " << beginLumiOfBSFit_ << " to "
1392  << endLumiOfBSFit_;
1393  onlineDbService_->logger().logInfo() << "BeamMonitor - RESULTS OF DEFAULT FIT:";
1394  onlineDbService_->logger().logInfo() << "\n" << bs;
1396  << "BeamMonitor::FitAndFill - [PayloadCreation] BeamSpotOnline object created:";
1397  onlineDbService_->logger().logInfo() << "\n" << *BSOnline;
1398  onlineDbService_->logger().logInfo() << "BeamMonitor::FitAndFill - [PayloadCreation] onlineDbService available";
1400  << "BeamMonitor::FitAndFill - [PayloadCreation] SetCreationTime: " << creationTime
1401  << " [epoch in microseconds]";
1402  try {
1405  << "BeamMonitor::FitAndFill - [PayloadCreation] writeForNextLumisection executed correctly";
1406  } catch (const std::exception& e) {
1407  onlineDbService_->logger().logError() << "BeamMonitor - Error writing record: " << recordName_
1408  << " for Run: " << frun << " - Lumi: " << fitLS.second;
1409  onlineDbService_->logger().logError() << "Error is: " << e.what();
1410  onlineDbService_->logger().logError() << "RESULTS OF DEFAULT FIT WAS:";
1411  onlineDbService_->logger().logError() << "\n" << bs;
1412  DBloggerReturn_ = 2;
1413  }
1414  }
1415  edm::LogInfo("BeamMonitor") << "FitAndFill::[PayloadCreation] BeamSpotOnline payload created \n" << std::endl;
1416 
1417  } //if (theBeamFitter->runPVandTrkFitter())
1418  else { // beam fit fails
1419  reco::BeamSpot bs = theBeamFitter->getBeamSpot();
1420  edm::LogInfo("BeamMonitor") << "FitAndFill:: [BeamMonitor] Beam fit fails!!! \n" << endl;
1421  edm::LogInfo("BeamMonitor") << "FitAndFill:: [BeamMonitor] Output beam spot for DIP \n" << endl;
1422  edm::LogInfo("BeamMonitor") << bs << endl;
1423 
1424  if (onlineDbService_.isAvailable()) {
1425  onlineDbService_->logger().logInfo() << "BeamMonitor::FitAndFill - Beam fit fails!!!";
1426  onlineDbService_->logger().logInfo() << "BeamMonitor::FitAndFill - Output beam spot for DIP";
1427  onlineDbService_->logger().logInfo() << "\n" << bs;
1428  DBloggerReturn_ = 2;
1429  }
1430 
1431  hs[k_sigmaX0_lumi]->ShiftFillLast(bs.BeamWidthX(), bs.BeamWidthXError(), fitNLumi_);
1432  hs[k_sigmaY0_lumi]->ShiftFillLast(bs.BeamWidthY(), bs.BeamWidthYError(), fitNLumi_);
1433  hs[k_sigmaZ0_lumi]->ShiftFillLast(bs.sigmaZ(), bs.sigmaZ0Error(), fitNLumi_);
1434  hs[k_x0_lumi]->ShiftFillLast(bs.x0(), bs.x0Error(), fitNLumi_);
1435  hs[k_y0_lumi]->ShiftFillLast(bs.y0(), bs.y0Error(), fitNLumi_);
1436  hs[k_z0_lumi]->ShiftFillLast(bs.z0(), bs.z0Error(), fitNLumi_);
1437  } // end of beam fit fails
1438 
1439  } //-------- end of countFitting------------------------------------------
1440  else { // no fit
1441  // Overwrite Fit LS and fit time when no event processed or no track selected
1443  theBeamFitter->setRefTime(refBStime[0], refBStime[1]);
1444  if (theBeamFitter->runPVandTrkFitter()) {
1445  } // Dump fake beam spot for DIP
1446  reco::BeamSpot bs = theBeamFitter->getBeamSpot();
1447  edm::LogInfo("BeamMonitor") << "FitAndFill:: [BeamMonitor] No fitting \n" << endl;
1448  edm::LogInfo("BeamMonitor") << "FitAndFill:: [BeamMonitor] Output fake beam spot for DIP \n" << endl;
1449  edm::LogInfo("BeamMonitor") << bs << endl;
1450 
1451  if (onlineDbService_.isAvailable()) {
1452  onlineDbService_->logger().logInfo() << "BeamMonitor::FitAndFill - No fitting";
1453  onlineDbService_->logger().logInfo() << "BeamMonitor::FitAndFill - Output fake beam spot for DIP";
1454  onlineDbService_->logger().logInfo() << "\n" << bs;
1455  DBloggerReturn_ = 2;
1456  }
1457 
1458  hs[k_sigmaX0_lumi]->ShiftFillLast(bs.BeamWidthX(), bs.BeamWidthXError(), fitNLumi_);
1459  hs[k_sigmaY0_lumi]->ShiftFillLast(bs.BeamWidthY(), bs.BeamWidthYError(), fitNLumi_);
1460  hs[k_sigmaZ0_lumi]->ShiftFillLast(bs.sigmaZ(), bs.sigmaZ0Error(), fitNLumi_);
1461  hs[k_x0_lumi]->ShiftFillLast(bs.x0(), bs.x0Error(), fitNLumi_);
1462  hs[k_y0_lumi]->ShiftFillLast(bs.y0(), bs.y0Error(), fitNLumi_);
1463  hs[k_z0_lumi]->ShiftFillLast(bs.z0(), bs.z0Error(), fitNLumi_);
1464  }
1465 
1466  // Fill summary report
1467  if (countFitting) {
1468  for (int n = 0; n < nFitElements_; n++) {
1470  }
1471 
1472  summarySum_ = 0;
1473  for (int ii = 0; ii < nFitElements_; ii++) {
1475  }
1477  if (reportSummary)
1479 
1480  for (int bi = 0; bi < nFitElements_; bi++) {
1481  reportSummaryMap->setBinContent(1, bi + 1, summaryContent_[bi] / (float)nFits_);
1482  }
1483  }
1484 
1485  if ((resetFitNLumi_ > 0 &&
1486  ((onlineMode_ &&
1487  countLumi_ == resetFitNLumi_) || //OR it should be currentLumi_ (if in sequence then does not mattar)
1488  (!onlineMode_ && countLumi_ == resetFitNLumi_))) ||
1489  (StartAverage_)) {
1490  edm::LogInfo("BeamMonitor") << "FitAndFill:: The flag is ON for running average Beam Spot fit" << endl;
1491  StartAverage_ = true;
1492  firstAverageFit_++;
1493  resetHistos_ = true;
1494  nthBSTrk_ = 0;
1495  beginLumiOfBSFit_ = 0;
1496  refBStime[0] = 0;
1497  }
1498 }

References alpha, reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthXError(), reco::BeamSpot::BeamWidthY(), reco::BeamSpot::BeamWidthYError(), beginLumiOfBSFit_, beginLumiOfPVFit_, cms::cuda::bs, countLumi_, BeamSpotPI::creationTime, DBloggerReturn_, debug_, MillePedeFileConverter_cfg::e, mps_fire::end, endLumiOfBSFit_, endLumiOfPVFit_, cppFunctionSkipper::exception, DeadROC_duringRun::f1, dqm::impl::MonitorElement::Fill(), firstAverageFit_, fitNLumi_, fitPVNLumi_, fitResults, frun, dqm::impl::MonitorElement::getMean(), dqm::impl::MonitorElement::getMeanError(), dqm::impl::MonitorElement::getRMS(), dqm::impl::MonitorElement::getRMSError(), dqm::impl::MonitorElement::getTH1(), dqm::impl::MonitorElement::getTH1F(), dqm::impl::MonitorElement::getTProfile(), h_d0_phi0, h_nTrk_lumi, h_nVtx_lumi, h_nVtx_lumi_all, h_nVtx_st, h_PVx, h_PVy, h_PVz, h_sigmaX0, h_sigmaY0, h_sigmaZ0, h_trk_z0, h_vx_dz, h_vx_vy, h_vy_dz, h_x0, h_y0, h_z0, hs, mps_fire::i, cuy::ii, edm::Service< T >::isAvailable(), dqmiolumiharvest::j, cond::persistency::Logger::logError(), cond::service::PoolDBOutputService::logger(), cond::persistency::Logger::logInfo(), genParticles_cff::map, mapLSBSTrkSize, mapLSCF, mapLSPVStoreSize, mapNPV, mapPVx, mapPVy, mapPVz, SiStripPI::mean, min_Ntrks_, minNrVertices_, dqmiodumpmetadata::n, nFitElements_, nFits_, submitPVValidationJobs::now, nthBSTrk_, onlineDbService_, onlineMode_, preBS, processed_, pvResults, recordName_, refBStime, refPVtime, refTime, reportSummary, reportSummary_, reportSummaryContents, reportSummaryMap, dqm::impl::MonitorElement::Reset(), resetFitNLumi_, resetHistos_, resetPVNLumi_, scrollTH1(), dqm::impl::MonitorElement::setAxisTitle(), BeamSpotObjects::SetBeamWidthX(), BeamSpotObjects::SetBeamWidthXError(), BeamSpotObjects::SetBeamWidthY(), BeamSpotObjects::SetBeamWidthYError(), BeamSpotObjects::SetBetaStar(), dqm::impl::MonitorElement::setBinContent(), BeamSpotObjects::SetCovariance(), BeamSpotOnlineObjects::SetCreationTime(), BeamSpotObjects::Setdxdz(), BeamSpotObjects::Setdydz(), BeamSpotObjects::SetEmittanceX(), BeamSpotObjects::SetEmittanceY(), BeamSpotOnlineObjects::SetLastAnalyzedFill(), BeamSpotOnlineObjects::SetLastAnalyzedLumi(), BeamSpotOnlineObjects::SetLastAnalyzedRun(), BeamSpotOnlineObjects::SetNumPVs(), BeamSpotOnlineObjects::SetNumTracks(), BeamSpotObjects::SetPosition(), BeamSpotObjects::SetSigmaZ(), BeamSpotObjects::SetType(), dqm::impl::MonitorElement::ShiftFillLast(), mathSSE::sqrt(), StartAverage_, startTime, summaryContent_, summarySum_, testScroll(), theBeamFitter, tmpTime, ApeEstimator_cff::width, cond::service::OnlineDBOutputService::writeForNextLumisection(), and HLTMuonOfflineAnalyzer_cfi::z0.

Referenced by beginLuminosityBlock().

◆ formatFitTime()

void BeamMonitor::formatFitTime ( char *  ,
const std::time_t &   
)
private

Definition at line 43 of file BeamMonitor.cc.

43  {
44  //constexpr int CET(+1);
45  constexpr int CEST(+2);
46 
47  //tm * ptm;
48  //ptm = gmtime ( &t );
49  //int year = ptm->tm_year;
50 
51  //get correct year from ctime
52  time_t currentTime;
53  struct tm* localTime;
54  time(&currentTime); // Get the current time
55  localTime = localtime(&currentTime); // Convert the current time to the local time
56  int year = localTime->tm_year + 1900;
57 
58  tm* ptm;
59  ptm = gmtime(&t);
60 
61  //check if year is ok
62  if (year <= 37)
63  year += 2000;
64  if (year >= 70 && year <= 137)
65  year += 1900;
66 
67  if (year < 1995) {
68  edm::LogError("BadTimeStamp") << "year reported is " << year << " !!" << std::endl;
69  //year = 2015; //overwritten later by BeamFitter.cc for fits but needed here for TH1
70  //edm::LogError("BadTimeStamp") << "Resetting to " <<year<<std::endl;
71  }
72  sprintf(ts,
73  "%4d-%02d-%02d %02d:%02d:%02d",
74  year,
75  ptm->tm_mon + 1,
76  ptm->tm_mday,
77  (ptm->tm_hour + CEST) % 24,
78  ptm->tm_min,
79  ptm->tm_sec);
80 
81 #ifdef STRIP_TRAILING_BLANKS_IN_TIMEZONE
82  unsigned int b = strlen(ts);
83  while (ts[--b] == ' ') {
84  ts[b] = 0;
85  }
86 #endif
87 }

References b, CEST, plotBeamSpotDB::ptm, submitPVValidationJobs::t, and protons_cff::time.

Referenced by bookHistograms(), and scrollTH1().

◆ RestartFitting()

void BeamMonitor::RestartFitting ( )
private

Definition at line 1501 of file BeamMonitor.cc.

1501  {
1502  if (debug_)
1503  edm::LogInfo("BeamMonitor")
1504  << " RestartingFitting:: Restart Beami everything to a fresh start !!! because Gap is > 10 LS" << endl;
1505  //track based fit reset here
1506  resetHistos_ = true;
1507  nthBSTrk_ = 0;
1508  theBeamFitter->resetTrkVector();
1509  theBeamFitter->resetLSRange();
1510  theBeamFitter->resetRefTime();
1511  theBeamFitter->resetPVFitter();
1512  theBeamFitter->resetCutFlow();
1513  beginLumiOfBSFit_ = 0;
1514  refBStime[0] = 0;
1515  //pv based fit iis reset here
1516  h_PVx[0]->Reset();
1517  h_PVy[0]->Reset();
1518  h_PVz[0]->Reset();
1519  beginLumiOfPVFit_ = 0;
1520  refPVtime[0] = 0;
1521  //Clear all the Maps here
1522  mapPVx.clear();
1523  mapPVy.clear();
1524  mapPVz.clear();
1525  mapNPV.clear();
1526  mapBeginBSLS.clear();
1527  mapBeginPVLS.clear();
1528  mapBeginBSTime.clear();
1529  mapBeginPVTime.clear();
1530  mapLSBSTrkSize.clear();
1531  mapLSPVStoreSize.clear();
1532  mapLSCF.clear();
1533  countGapLumi_ = 0;
1534  countLumi_ = 0;
1535  StartAverage_ = false;
1536 }

References beginLumiOfBSFit_, beginLumiOfPVFit_, countGapLumi_, countLumi_, debug_, h_PVx, h_PVy, h_PVz, mapBeginBSLS, mapBeginBSTime, mapBeginPVLS, mapBeginPVTime, mapLSBSTrkSize, mapLSCF, mapLSPVStoreSize, mapNPV, mapPVx, mapPVy, mapPVz, nthBSTrk_, refBStime, refPVtime, dqm::impl::MonitorElement::Reset(), resetHistos_, StartAverage_, and theBeamFitter.

◆ scrollTH1()

void BeamMonitor::scrollTH1 ( TH1 *  ,
std::time_t   
)
private

Definition at line 1560 of file BeamMonitor.cc.

1560  {
1561  char offsetTime[64];
1562  formatFitTime(offsetTime, ref);
1563  TDatime da(offsetTime);
1564  if (lastNZbin > 0) {
1565  double val = h->GetBinContent(lastNZbin);
1566  double valErr = h->GetBinError(lastNZbin);
1567  h->Reset();
1568  h->GetXaxis()->SetTimeOffset(da.Convert(kTRUE));
1569  int bin = (lastNZbin > buffTime ? buffTime : 1);
1570  h->SetBinContent(bin, val);
1571  h->SetBinError(bin, valErr);
1572  } else {
1573  h->Reset();
1574  h->GetXaxis()->SetTimeOffset(da.Convert(kTRUE));
1575  }
1576 }

References newFWLiteAna::bin, buffTime, Calorimetry_cff::da, formatFitTime(), lastNZbin, and heppy_batch::val.

Referenced by FitAndFill().

◆ testScroll()

bool BeamMonitor::testScroll ( std::time_t &  ,
std::time_t &   
)
private

Definition at line 1580 of file BeamMonitor.cc.

1580  {
1581  bool scroll_ = false;
1582  if (tmpTime_ - refTime_ >= intervalInSec_) {
1583  scroll_ = true;
1584  edm::LogInfo("BeamMonitor") << "testScroll:: Reset Time Offset" << std::endl;
1586  for (int bin = intervalInSec_; bin >= 1; bin--) {
1587  if (hs[k_x0_time]->getBinContent(bin) > 0) {
1588  lastNZbin = bin;
1589  break;
1590  }
1591  }
1592  edm::LogInfo("BeamMonitor") << "testScroll:: Last non zero bin = " << lastNZbin << std::endl;
1593  if (tmpTime_ - refTime_ >= intervalInSec_ + lastNZbin) {
1594  edm::LogInfo("BeamMonitor") << "testScroll:: Time difference too large since last readout" << std::endl;
1595  lastNZbin = 0;
1596  refTime_ = tmpTime_ - buffTime;
1597  } else {
1598  edm::LogInfo("BeamMonitor") << "testScroll:: Offset to last record" << std::endl;
1599  int offset = ((lastNZbin > buffTime) ? (lastNZbin - buffTime) : (lastNZbin - 1));
1600  refTime_ += offset;
1601  }
1602  }
1603  return scroll_;
1604 }

References newFWLiteAna::bin, buffTime, hs, intervalInSec_, lastNZbin, and hltrates_dqm_sourceclient-live_cfg::offset.

Referenced by FitAndFill().

Member Data Documentation

◆ beginLumiOfBSFit_

int BeamMonitor::beginLumiOfBSFit_
private

Definition at line 95 of file BeamMonitor.h.

Referenced by BeamMonitor(), beginLuminosityBlock(), FitAndFill(), and RestartFitting().

◆ beginLumiOfPVFit_

int BeamMonitor::beginLumiOfPVFit_
private

Definition at line 97 of file BeamMonitor.h.

Referenced by BeamMonitor(), beginLuminosityBlock(), FitAndFill(), and RestartFitting().

◆ bsSrc_

edm::EDGetTokenT<reco::BeamSpot> BeamMonitor::bsSrc_
private

Definition at line 75 of file BeamMonitor.h.

Referenced by analyze(), and BeamMonitor().

◆ countEvt_

int BeamMonitor::countEvt_
private

Definition at line 93 of file BeamMonitor.h.

Referenced by analyze().

◆ countGapLumi_

int BeamMonitor::countGapLumi_
private

Definition at line 116 of file BeamMonitor.h.

Referenced by RestartFitting().

◆ countLumi_

int BeamMonitor::countLumi_
private

Definition at line 94 of file BeamMonitor.h.

Referenced by analyze(), beginLuminosityBlock(), FitAndFill(), and RestartFitting().

◆ cutFlowTable

MonitorElement* BeamMonitor::cutFlowTable
private

Definition at line 173 of file BeamMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ DBloggerReturn_

int BeamMonitor::DBloggerReturn_
private

Definition at line 80 of file BeamMonitor.h.

Referenced by beginLuminosityBlock(), endLuminosityBlock(), and FitAndFill().

◆ debug_

bool BeamMonitor::debug_
private

◆ deltaSigCut_

double BeamMonitor::deltaSigCut_
private

Definition at line 106 of file BeamMonitor.h.

Referenced by BeamMonitor().

◆ dxBin_

const int BeamMonitor::dxBin_
private

Definition at line 58 of file BeamMonitor.h.

Referenced by bookHistograms().

◆ dxMax_

const double BeamMonitor::dxMax_
private

Definition at line 60 of file BeamMonitor.h.

Referenced by bookHistograms().

◆ dxMin_

const double BeamMonitor::dxMin_
private

Definition at line 59 of file BeamMonitor.h.

Referenced by bookHistograms().

◆ dzBin_

const int BeamMonitor::dzBin_
private

Definition at line 70 of file BeamMonitor.h.

Referenced by bookHistograms().

◆ dzMax_

const double BeamMonitor::dzMax_
private

Definition at line 72 of file BeamMonitor.h.

Referenced by bookHistograms().

◆ dzMin_

const double BeamMonitor::dzMin_
private

Definition at line 71 of file BeamMonitor.h.

Referenced by bookHistograms().

◆ endLumiOfBSFit_

int BeamMonitor::endLumiOfBSFit_
private

Definition at line 96 of file BeamMonitor.h.

Referenced by BeamMonitor(), and FitAndFill().

◆ endLumiOfPVFit_

int BeamMonitor::endLumiOfPVFit_
private

Definition at line 98 of file BeamMonitor.h.

Referenced by BeamMonitor(), and FitAndFill().

◆ firstAverageFit_

int BeamMonitor::firstAverageFit_
private

Definition at line 115 of file BeamMonitor.h.

Referenced by FitAndFill().

◆ fitNLumi_

int BeamMonitor::fitNLumi_
private

Definition at line 82 of file BeamMonitor.h.

Referenced by BeamMonitor(), and FitAndFill().

◆ fitPVNLumi_

int BeamMonitor::fitPVNLumi_
private

Definition at line 83 of file BeamMonitor.h.

Referenced by BeamMonitor(), and FitAndFill().

◆ fitResults

MonitorElement* BeamMonitor::fitResults
private

Definition at line 137 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ frun

int BeamMonitor::frun
private

Definition at line 182 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ ftimestamp

edm::TimeValue_t BeamMonitor::ftimestamp
private

Definition at line 180 of file BeamMonitor.h.

Referenced by bookHistograms().

◆ h_d0_phi0

MonitorElement* BeamMonitor::h_d0_phi0
private

Definition at line 130 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ h_nTrk_lumi

MonitorElement* BeamMonitor::h_nTrk_lumi
private

Definition at line 127 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ h_nVtx

MonitorElement* BeamMonitor::h_nVtx
private

Definition at line 144 of file BeamMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ h_nVtx_lumi

MonitorElement* BeamMonitor::h_nVtx_lumi
private

Definition at line 128 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ h_nVtx_lumi_all

MonitorElement* BeamMonitor::h_nVtx_lumi_all
private

Definition at line 129 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ h_nVtx_st

MonitorElement* BeamMonitor::h_nVtx_st
private

Definition at line 145 of file BeamMonitor.h.

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

◆ h_PVx

MonitorElement* BeamMonitor::h_PVx[2]
private

Definition at line 146 of file BeamMonitor.h.

Referenced by analyze(), bookHistograms(), FitAndFill(), and RestartFitting().

◆ h_PVxz

MonitorElement* BeamMonitor::h_PVxz
private

Definition at line 149 of file BeamMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ h_PVy

MonitorElement* BeamMonitor::h_PVy[2]
private

Definition at line 147 of file BeamMonitor.h.

Referenced by analyze(), bookHistograms(), FitAndFill(), and RestartFitting().

◆ h_PVyz

MonitorElement* BeamMonitor::h_PVyz
private

Definition at line 150 of file BeamMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ h_PVz

MonitorElement* BeamMonitor::h_PVz[2]
private

Definition at line 148 of file BeamMonitor.h.

Referenced by analyze(), bookHistograms(), FitAndFill(), and RestartFitting().

◆ h_sigmaX0

MonitorElement* BeamMonitor::h_sigmaX0
private

Definition at line 141 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ h_sigmaY0

MonitorElement* BeamMonitor::h_sigmaY0
private

Definition at line 142 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ h_sigmaZ0

MonitorElement* BeamMonitor::h_sigmaZ0
private

Definition at line 143 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ h_trk_z0

MonitorElement* BeamMonitor::h_trk_z0
private

Definition at line 131 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ h_trkPt

MonitorElement* BeamMonitor::h_trkPt
private

Definition at line 135 of file BeamMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ h_trkVz

MonitorElement* BeamMonitor::h_trkVz
private

Definition at line 136 of file BeamMonitor.h.

Referenced by analyze(), and bookHistograms().

◆ h_vx_dz

MonitorElement* BeamMonitor::h_vx_dz
private

Definition at line 133 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ h_vx_vy

MonitorElement* BeamMonitor::h_vx_vy
private

Definition at line 132 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ h_vy_dz

MonitorElement* BeamMonitor::h_vy_dz
private

Definition at line 134 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ h_x0

MonitorElement* BeamMonitor::h_x0
private

Definition at line 138 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ h_y0

MonitorElement* BeamMonitor::h_y0
private

Definition at line 139 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ h_z0

MonitorElement* BeamMonitor::h_z0
private

Definition at line 140 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ hltSrc_

edm::EDGetTokenT<edm::TriggerResults> BeamMonitor::hltSrc_
private

Definition at line 78 of file BeamMonitor.h.

Referenced by analyze(), and BeamMonitor().

◆ hs

std::vector<MonitorElement*> BeamMonitor::hs
private

Definition at line 152 of file BeamMonitor.h.

Referenced by bookHistograms(), FitAndFill(), and testScroll().

◆ intervalInSec_

int BeamMonitor::intervalInSec_
private

Definition at line 86 of file BeamMonitor.h.

Referenced by BeamMonitor(), bookHistograms(), and testScroll().

◆ jetTrigger_

std::vector<std::string> BeamMonitor::jetTrigger_
private

Definition at line 89 of file BeamMonitor.h.

Referenced by analyze(), and BeamMonitor().

◆ lastlumi_

int BeamMonitor::lastlumi_
private

Definition at line 99 of file BeamMonitor.h.

Referenced by BeamMonitor(), and beginLuminosityBlock().

◆ lastNZbin

int BeamMonitor::lastNZbin
private

Definition at line 183 of file BeamMonitor.h.

Referenced by scrollTH1(), and testScroll().

◆ mapBeginBSLS

std::map<int, int> BeamMonitor::mapBeginBSLS
private

Definition at line 158 of file BeamMonitor.h.

Referenced by beginLuminosityBlock(), dqmEndRun(), and RestartFitting().

◆ mapBeginBSTime

std::map<int, std::time_t> BeamMonitor::mapBeginBSTime
private

Definition at line 159 of file BeamMonitor.h.

Referenced by beginLuminosityBlock(), dqmEndRun(), and RestartFitting().

◆ mapBeginPVLS

std::map<int, int> BeamMonitor::mapBeginPVLS
private

Definition at line 158 of file BeamMonitor.h.

Referenced by beginLuminosityBlock(), dqmEndRun(), and RestartFitting().

◆ mapBeginPVTime

std::map<int, std::time_t> BeamMonitor::mapBeginPVTime
private

Definition at line 159 of file BeamMonitor.h.

Referenced by beginLuminosityBlock(), dqmEndRun(), and RestartFitting().

◆ mapLSBSTrkSize

std::map<int, std::size_t> BeamMonitor::mapLSBSTrkSize
private

Definition at line 161 of file BeamMonitor.h.

Referenced by dqmEndRun(), FitAndFill(), and RestartFitting().

◆ mapLSCF

std::map<int, TH1F> BeamMonitor::mapLSCF
private

Definition at line 164 of file BeamMonitor.h.

Referenced by dqmEndRun(), FitAndFill(), and RestartFitting().

◆ mapLSPVStoreSize

std::map<int, size_t> BeamMonitor::mapLSPVStoreSize
private

Definition at line 162 of file BeamMonitor.h.

Referenced by dqmEndRun(), FitAndFill(), and RestartFitting().

◆ mapNPV

std::map<int, std::vector<int> > BeamMonitor::mapNPV
private

Definition at line 156 of file BeamMonitor.h.

Referenced by analyze(), dqmEndRun(), FitAndFill(), and RestartFitting().

◆ mapPVx

std::map<int, std::vector<float> > BeamMonitor::mapPVx
private

Definition at line 155 of file BeamMonitor.h.

Referenced by analyze(), dqmEndRun(), FitAndFill(), and RestartFitting().

◆ mapPVy

std::map<int, std::vector<float> > BeamMonitor::mapPVy
private

Definition at line 155 of file BeamMonitor.h.

Referenced by analyze(), dqmEndRun(), FitAndFill(), and RestartFitting().

◆ mapPVz

std::map<int, std::vector<float> > BeamMonitor::mapPVz
private

Definition at line 155 of file BeamMonitor.h.

Referenced by analyze(), dqmEndRun(), FitAndFill(), and RestartFitting().

◆ maxZ_

double BeamMonitor::maxZ_
private

Definition at line 108 of file BeamMonitor.h.

Referenced by BeamMonitor().

◆ min_Ntrks_

unsigned int BeamMonitor::min_Ntrks_
private

Definition at line 107 of file BeamMonitor.h.

Referenced by BeamMonitor(), and FitAndFill().

◆ minNrVertices_

unsigned int BeamMonitor::minNrVertices_
private

Definition at line 109 of file BeamMonitor.h.

Referenced by BeamMonitor(), and FitAndFill().

◆ minVtxNdf_

double BeamMonitor::minVtxNdf_
private

Definition at line 110 of file BeamMonitor.h.

Referenced by analyze(), and BeamMonitor().

◆ minVtxWgt_

double BeamMonitor::minVtxWgt_
private

Definition at line 111 of file BeamMonitor.h.

Referenced by analyze(), and BeamMonitor().

◆ monitorName_

std::string BeamMonitor::monitorName_
private

Definition at line 73 of file BeamMonitor.h.

Referenced by BeamMonitor(), and bookHistograms().

◆ nextlumi_

int BeamMonitor::nextlumi_
private

Definition at line 100 of file BeamMonitor.h.

Referenced by analyze(), BeamMonitor(), beginLuminosityBlock(), and endLuminosityBlock().

◆ nFitElements_

int BeamMonitor::nFitElements_
private

Definition at line 104 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ nFits_

int BeamMonitor::nFits_
private

Definition at line 105 of file BeamMonitor.h.

Referenced by BeamMonitor(), and FitAndFill().

◆ nthBSTrk_

unsigned int BeamMonitor::nthBSTrk_
private

Definition at line 103 of file BeamMonitor.h.

Referenced by FitAndFill(), and RestartFitting().

◆ onlineDbService_

edm::Service<cond::service::OnlineDBOutputService> BeamMonitor::onlineDbService_
private

◆ onlineMode_

bool BeamMonitor::onlineMode_
private

◆ phiBin_

const int BeamMonitor::phiBin_
private

Definition at line 66 of file BeamMonitor.h.

Referenced by bookHistograms().

◆ phiMax_

const double BeamMonitor::phiMax_
private

Definition at line 68 of file BeamMonitor.h.

Referenced by bookHistograms().

◆ phiMin_

const double BeamMonitor::phiMin_
private

Definition at line 67 of file BeamMonitor.h.

Referenced by bookHistograms().

◆ preBS

reco::BeamSpot BeamMonitor::preBS
private

Definition at line 124 of file BeamMonitor.h.

Referenced by FitAndFill().

◆ processed_

bool BeamMonitor::processed_
private

Definition at line 118 of file BeamMonitor.h.

Referenced by analyze(), BeamMonitor(), beginLuminosityBlock(), and FitAndFill().

◆ pvResults

MonitorElement* BeamMonitor::pvResults
private

Definition at line 151 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ pvSrc_

edm::EDGetTokenT<reco::VertexCollection> BeamMonitor::pvSrc_
private

Definition at line 77 of file BeamMonitor.h.

Referenced by analyze(), and BeamMonitor().

◆ recordName_

std::string BeamMonitor::recordName_
private

Definition at line 74 of file BeamMonitor.h.

Referenced by BeamMonitor(), and FitAndFill().

◆ refBS

reco::BeamSpot BeamMonitor::refBS
private

Definition at line 123 of file BeamMonitor.h.

Referenced by analyze().

◆ refBStime

std::time_t BeamMonitor::refBStime[2]
private

◆ refPVtime

std::time_t BeamMonitor::refPVtime[2]
private

◆ refTime

std::time_t BeamMonitor::refTime
private

Definition at line 179 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ reportSummary

MonitorElement* BeamMonitor::reportSummary
private

Definition at line 170 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ reportSummary_

Float_t BeamMonitor::reportSummary_
private

Definition at line 167 of file BeamMonitor.h.

Referenced by FitAndFill().

◆ reportSummaryContents

MonitorElement* BeamMonitor::reportSummaryContents[3]
private

Definition at line 171 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ reportSummaryMap

MonitorElement* BeamMonitor::reportSummaryMap
private

Definition at line 172 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ resetFitNLumi_

int BeamMonitor::resetFitNLumi_
private

Definition at line 84 of file BeamMonitor.h.

Referenced by analyze(), BeamMonitor(), and FitAndFill().

◆ resetHistos_

bool BeamMonitor::resetHistos_
private

Definition at line 113 of file BeamMonitor.h.

Referenced by FitAndFill(), and RestartFitting().

◆ resetPVNLumi_

int BeamMonitor::resetPVNLumi_
private

Definition at line 85 of file BeamMonitor.h.

Referenced by BeamMonitor(), and FitAndFill().

◆ StartAverage_

bool BeamMonitor::StartAverage_
private

Definition at line 114 of file BeamMonitor.h.

Referenced by analyze(), beginLuminosityBlock(), FitAndFill(), and RestartFitting().

◆ startTime

std::time_t BeamMonitor::startTime
private

Definition at line 178 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ summaryContent_

Float_t BeamMonitor::summaryContent_[3]
private

Definition at line 169 of file BeamMonitor.h.

Referenced by bookHistograms(), and FitAndFill().

◆ summarySum_

Float_t BeamMonitor::summarySum_
private

Definition at line 168 of file BeamMonitor.h.

Referenced by FitAndFill().

◆ theBeamFitter

std::unique_ptr<BeamFitter> BeamMonitor::theBeamFitter
private

Definition at line 91 of file BeamMonitor.h.

Referenced by analyze(), BeamMonitor(), FitAndFill(), and RestartFitting().

◆ tmpTime

std::time_t BeamMonitor::tmpTime
private

Definition at line 177 of file BeamMonitor.h.

Referenced by bookHistograms(), endLuminosityBlock(), and FitAndFill().

◆ tracksLabel_

edm::EDGetTokenT<reco::TrackCollection> BeamMonitor::tracksLabel_
private

Definition at line 76 of file BeamMonitor.h.

Referenced by analyze(), and BeamMonitor().

◆ useLockRecords_

bool BeamMonitor::useLockRecords_
private

Definition at line 119 of file BeamMonitor.h.

Referenced by BeamMonitor(), dqmBeginRun(), and dqmEndRun().

◆ vxBin_

const int BeamMonitor::vxBin_
private

Definition at line 62 of file BeamMonitor.h.

Referenced by bookHistograms().

◆ vxMax_

const double BeamMonitor::vxMax_
private

Definition at line 64 of file BeamMonitor.h.

Referenced by bookHistograms().

◆ vxMin_

const double BeamMonitor::vxMin_
private

Definition at line 63 of file BeamMonitor.h.

Referenced by bookHistograms().

BeamMonitor::recordName_
std::string recordName_
Definition: BeamMonitor.h:74
buffTime
static constexpr int buffTime
Definition: BeamMonitor.cc:89
BeamMonitor::h_vx_vy
MonitorElement * h_vx_vy
Definition: BeamMonitor.h:132
BeamMonitor::refBStime
std::time_t refBStime[2]
Definition: BeamMonitor.h:101
BeamMonitor::lastNZbin
int lastNZbin
Definition: BeamMonitor.h:183
ApeEstimator_cff.width
width
Definition: ApeEstimator_cff.py:24
BeamMonitor::phiMin_
const double phiMin_
Definition: BeamMonitor.h:67
BeamMonitor::tmpTime
std::time_t tmpTime
Definition: BeamMonitor.h:177
mps_fire.i
i
Definition: mps_fire.py:428
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
BeamMonitor::ftimestamp
edm::TimeValue_t ftimestamp
Definition: BeamMonitor.h:180
SiStripPI::mean
Definition: SiStripPayloadInspectorHelper.h:169
BeamMonitor::firstAverageFit_
int firstAverageFit_
Definition: BeamMonitor.h:115
reco::BeamSpot::BeamWidthXError
double BeamWidthXError() const
error on beam width X, assume error in X = Y
Definition: BeamSpot.h:99
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
BeamMonitor::dzMin_
const double dzMin_
Definition: BeamMonitor.h:71
BeamSpotObjects::SetBetaStar
void SetBetaStar(double val)
set beta star
Definition: BeamSpotObjects.h:64
BeamMonitor::monitorName_
std::string monitorName_
Definition: BeamMonitor.h:73
cond::service::OnlineDBOutputService::writeForNextLumisection
bool writeForNextLumisection(const PayloadType *payload, const std::string &recordName)
Definition: OnlineDBOutputService.h:40
trigNames
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:57
BeamMonitor::hs
std::vector< MonitorElement * > hs
Definition: BeamMonitor.h:152
BeamMonitor::beginLumiOfBSFit_
int beginLumiOfBSFit_
Definition: BeamMonitor.h:95
BeamMonitor::minNrVertices_
unsigned int minNrVertices_
Definition: BeamMonitor.h:109
BeamMonitor::cutFlowTable
MonitorElement * cutFlowTable
Definition: BeamMonitor.h:173
dqm::impl::MonitorElement::setOption
virtual void setOption(const char *option)
Definition: MonitorElement.cc:887
BeamSpotOnlineObjects::SetCreationTime
void SetCreationTime(cond::Time_t val)
Definition: BeamSpotOnlineObjects.cc:65
BeamMonitor::mapPVx
std::map< int, std::vector< float > > mapPVx
Definition: BeamMonitor.h:155
BeamMonitor::h_PVxz
MonitorElement * h_PVxz
Definition: BeamMonitor.h:149
submitPVValidationJobs.now
now
Definition: submitPVValidationJobs.py:639
BeamMonitor::frun
int frun
Definition: BeamMonitor.h:182
BeamSpotOnlineObjects::SetNumTracks
void SetNumTracks(int val)
Definition: BeamSpotOnlineObjects.cc:59
BeamMonitor::pvSrc_
edm::EDGetTokenT< reco::VertexCollection > pvSrc_
Definition: BeamMonitor.h:77
BeamMonitor::endLumiOfPVFit_
int endLumiOfPVFit_
Definition: BeamMonitor.h:98
BeamMonitor::onlineMode_
bool onlineMode_
Definition: BeamMonitor.h:88
BeamMonitor::jetTrigger_
std::vector< std::string > jetTrigger_
Definition: BeamMonitor.h:89
edm::LuminosityBlockBase::beginTime
Timestamp const & beginTime() const
Definition: LuminosityBlockBase.h:46
cond::persistency::Logger::end
void end(int retCode)
Definition: Logger.cc:80
CEST
#define CEST
triggerResults
static const std::string triggerResults
Definition: EdmProvDump.cc:45
BeamMonitor::dxBin_
const int dxBin_
Definition: BeamMonitor.h:58
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:279
Calorimetry_cff.da
da
Definition: Calorimetry_cff.py:155
cms::cuda::assert
assert(be >=bs)
protons_cff.time
time
Definition: protons_cff.py:39
BeamMonitor::DBloggerReturn_
int DBloggerReturn_
Definition: BeamMonitor.h:80
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:47
alpha
float alpha
Definition: AMPTWrapper.h:105
BeamMonitor::nFits_
int nFits_
Definition: BeamMonitor.h:105
BeamSpotObjects::SetBeamWidthY
void SetBeamWidthY(double val)
set average transverse beam width Y
Definition: BeamSpotObjects.h:50
BeamMonitor::mapNPV
std::map< int, std::vector< int > > mapNPV
Definition: BeamMonitor.h:156
dqm::impl::MonitorElement::getRMSError
virtual double getRMSError(int axis=1) const
get RMS uncertainty of histogram along x, y or z axis(axis=1,2,3 respectively)
Definition: MonitorElement.cc:568
BeamMonitor::mapLSBSTrkSize
std::map< int, std::size_t > mapLSBSTrkSize
Definition: BeamMonitor.h:161
BeamMonitor::reportSummary
MonitorElement * reportSummary
Definition: BeamMonitor.h:170
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Timestamp::value
TimeValue_t value() const
Definition: Timestamp.h:45
BeamMonitor::vxBin_
const int vxBin_
Definition: BeamMonitor.h:62
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
BeamMonitor::fitResults
MonitorElement * fitResults
Definition: BeamMonitor.h:137
cond::persistency::Logger::logInfo
EchoedLogStream< edm::LogInfo > logInfo()
Definition: Logger.cc:157
BeamMonitor::h_sigmaY0
MonitorElement * h_sigmaY0
Definition: BeamMonitor.h:142
BeamMonitor::h_nVtx
MonitorElement * h_nVtx
Definition: BeamMonitor.h:144
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
edm::Handle< reco::BeamSpot >
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
BeamMonitor::countEvt_
int countEvt_
Definition: BeamMonitor.h:93
BeamMonitor::minVtxWgt_
double minVtxWgt_
Definition: BeamMonitor.h:111
BeamMonitor::h_PVz
MonitorElement * h_PVz[2]
Definition: BeamMonitor.h:148
BeamSpotObjects::SetSigmaZ
void SetSigmaZ(double val)
set sigma Z, RMS bunch length
Definition: BeamSpotObjects.h:42
BeamMonitor::h_nTrk_lumi
MonitorElement * h_nTrk_lumi
Definition: BeamMonitor.h:127
BeamMonitor::testScroll
bool testScroll(std::time_t &, std::time_t &)
Definition: BeamMonitor.cc:1580
BeamMonitor::nextlumi_
int nextlumi_
Definition: BeamMonitor.h:100
BeamMonitor::h_y0
MonitorElement * h_y0
Definition: BeamMonitor.h:139
BeamMonitor::minVtxNdf_
double minVtxNdf_
Definition: BeamMonitor.h:110
BeamMonitor::processed_
bool processed_
Definition: BeamMonitor.h:118
BeamMonitor::h_PVyz
MonitorElement * h_PVyz
Definition: BeamMonitor.h:150
cms::cuda::bs
bs
Definition: HistoContainer.h:127
BeamMonitor::fitPVNLumi_
int fitPVNLumi_
Definition: BeamMonitor.h:83
BeamMonitor::pvResults
MonitorElement * pvResults
Definition: BeamMonitor.h:151
h
edm::LuminosityBlockBase::endTime
Timestamp const & endTime() const
Definition: LuminosityBlockBase.h:47
BeamMonitor::dxMin_
const double dxMin_
Definition: BeamMonitor.h:59
BeamMonitor::refBS
reco::BeamSpot refBS
Definition: BeamMonitor.h:123
BeamMonitor::countGapLumi_
int countGapLumi_
Definition: BeamMonitor.h:116
edm::LuminosityBlockBase::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: LuminosityBlockBase.h:40
L1TEGammaOffline_cfi.PVCollection
PVCollection
Definition: L1TEGammaOffline_cfi.py:34
BeamMonitor::mapPVz
std::map< int, std::vector< float > > mapPVz
Definition: BeamMonitor.h:155
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
mps_fire.end
end
Definition: mps_fire.py:242
BeamMonitor::h_sigmaZ0
MonitorElement * h_sigmaZ0
Definition: BeamMonitor.h:143
reco::BeamSpot
Definition: BeamSpot.h:21
dqm::impl::MonitorElement::Reset
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
Definition: MonitorElement.cc:354
dqm::impl::MonitorElement::ShiftFillLast
DQM_DEPRECATED void ShiftFillLast(double y, double ye=0., int32_t xscale=1)
Definition: MonitorElement.cc:256
BeamMonitor::reportSummary_
Float_t reportSummary_
Definition: BeamMonitor.h:167
BeamMonitor::mapBeginBSTime
std::map< int, std::time_t > mapBeginBSTime
Definition: BeamMonitor.h:159
hgcalPlots.xtitle
xtitle
Definition: hgcalPlots.py:94
dqm::impl::MonitorElement::getRMS
virtual double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:562
BeamSpotObjects::SetEmittanceY
void SetEmittanceY(double val)
set emittance
Definition: BeamSpotObjects.h:62
dqm::impl::MonitorElement::getTH1F
virtual TH1F * getTH1F()
Definition: MonitorElement.cc:986
HLTMuonOfflineAnalyzer_cfi.z0
z0
Definition: HLTMuonOfflineAnalyzer_cfi.py:98
cond::persistency::Logger::start
void start()
Definition: Logger.cc:69
b
double b
Definition: hdecay.h:118
BeamMonitor::h_nVtx_lumi_all
MonitorElement * h_nVtx_lumi_all
Definition: BeamMonitor.h:129
dqm::impl::MonitorElement::getTH1
virtual TH1 * getTH1()
Definition: MonitorElement.cc:981
BeamMonitor::startTime
std::time_t startTime
Definition: BeamMonitor.h:178
BeamSpotObjects::SetPosition
void SetPosition(double x, double y, double z)
set XYZ position
Definition: BeamSpotObjects.h:36
BeamMonitor::tracksLabel_
edm::EDGetTokenT< reco::TrackCollection > tracksLabel_
Definition: BeamMonitor.h:76
BeamMonitor::mapBeginPVTime
std::map< int, std::time_t > mapBeginPVTime
Definition: BeamMonitor.h:159
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
BeamMonitor::h_vy_dz
MonitorElement * h_vy_dz
Definition: BeamMonitor.h:134
EgHLTOffTrigSelection_cfi.trigName
trigName
Definition: EgHLTOffTrigSelection_cfi.py:8
BeamMonitor::h_sigmaX0
MonitorElement * h_sigmaX0
Definition: BeamMonitor.h:141
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
BeamMonitor::vxMin_
const double vxMin_
Definition: BeamMonitor.h:63
BeamMonitor::dzMax_
const double dzMax_
Definition: BeamMonitor.h:72
BeamSpotObjects::SetType
void SetType(int type)
set beam type
Definition: BeamSpotObjects.h:58
edm::ParameterSet
Definition: ParameterSet.h:47
BeamMonitor::refTime
std::time_t refTime
Definition: BeamMonitor.h:179
BeamMonitor::formatFitTime
void formatFitTime(char *, const std::time_t &)
Definition: BeamMonitor.cc:43
BeamMonitor::endLumiOfBSFit_
int endLumiOfBSFit_
Definition: BeamMonitor.h:96
BeamMonitor::intervalInSec_
int intervalInSec_
Definition: BeamMonitor.h:86
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:159
B2GTnPMonitor_cfi.histTitle
histTitle
Definition: B2GTnPMonitor_cfi.py:112
BeamMonitor::h_nVtx_lumi
MonitorElement * h_nVtx_lumi
Definition: BeamMonitor.h:128
BeamMonitor::refPVtime
std::time_t refPVtime[2]
Definition: BeamMonitor.h:102
BeamSpotObjects::SetEmittanceX
void SetEmittanceX(double val)
set emittance
Definition: BeamSpotObjects.h:60
BeamSpotObjects::SetCovariance
void SetCovariance(int i, int j, double val)
set i,j element of the full covariance matrix 7x7
Definition: BeamSpotObjects.h:56
BeamMonitor::vxMax_
const double vxMax_
Definition: BeamMonitor.h:64
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
iEvent
int iEvent
Definition: GenABIO.cc:224
BeamMonitor::StartAverage_
bool StartAverage_
Definition: BeamMonitor.h:114
edm::LuminosityBlockID::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: LuminosityBlockID.h:42
edm::LuminosityBlockBase::id
LuminosityBlockID id() const
Definition: LuminosityBlockBase.h:44
dqm::impl::MonitorElement::setBinLabel
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:771
plotBeamSpotDB.ptm
ptm
Definition: plotBeamSpotDB.py:396
dqm::impl::MonitorElement::getTProfile
virtual TProfile * getTProfile()
Definition: MonitorElement.cc:1028
BeamSpotPI::creationTime
Definition: BeamSpotPayloadInspectorHelper.h:44
reco::BeamSpot::BeamWidthYError
double BeamWidthYError() const
error on beam width Y, assume error in X = Y
Definition: BeamSpot.h:101
BeamMonitor::reportSummaryContents
MonitorElement * reportSummaryContents[3]
Definition: BeamMonitor.h:171
reco::BeamSpot::BeamWidthX
double BeamWidthX() const
beam width X
Definition: BeamSpot.h:82
BeamSpotObjects::Setdxdz
void Setdxdz(double val)
set dxdz slope, crossing angle
Definition: BeamSpotObjects.h:44
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
BeamSpotOnlineObjects::SetLastAnalyzedFill
void SetLastAnalyzedFill(int val)
Definition: BeamSpotOnlineObjects.h:50
BeamMonitor::h_x0
MonitorElement * h_x0
Definition: BeamMonitor.h:138
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
BeamMonitor::bsSrc_
edm::EDGetTokenT< reco::BeamSpot > bsSrc_
Definition: BeamMonitor.h:75
cond::service::PoolDBOutputService::releaseLocks
void releaseLocks()
Definition: PoolDBOutputService.cc:109
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
BeamMonitor::h_z0
MonitorElement * h_z0
Definition: BeamMonitor.h:140
BeamMonitor::mapLSCF
std::map< int, TH1F > mapLSCF
Definition: BeamMonitor.h:164
BeamMonitor::beginLumiOfPVFit_
int beginLumiOfPVFit_
Definition: BeamMonitor.h:97
heppy_batch.val
val
Definition: heppy_batch.py:351
BeamMonitor::deltaSigCut_
double deltaSigCut_
Definition: BeamMonitor.h:106
BeamMonitor::dzBin_
const int dzBin_
Definition: BeamMonitor.h:70
BeamMonitor::h_PVx
MonitorElement * h_PVx[2]
Definition: BeamMonitor.h:146
BeamMonitor::useLockRecords_
bool useLockRecords_
Definition: BeamMonitor.h:119
BeamSpotOnlineObjects::SetLastAnalyzedLumi
void SetLastAnalyzedLumi(int val)
Setters Methods.
Definition: BeamSpotOnlineObjects.h:44
cond::service::PoolDBOutputService::logger
cond::persistency::Logger & logger()
Definition: PoolDBOutputService.h:195
BeamSpotOnlineObjects
Definition: BeamSpotOnlineObjects.h:25
BeamMonitor::maxZ_
double maxZ_
Definition: BeamMonitor.h:108
BeamMonitor::resetPVNLumi_
int resetPVNLumi_
Definition: BeamMonitor.h:85
BeamMonitor::debug_
bool debug_
Definition: BeamMonitor.h:87
BeamSpotObjects::SetBeamWidthX
void SetBeamWidthX(double val)
set average transverse beam width X
Definition: BeamSpotObjects.h:48
BeamMonitor::phiBin_
const int phiBin_
Definition: BeamMonitor.h:66
edm::TriggerNames
Definition: TriggerNames.h:55
BeamMonitor::preBS
reco::BeamSpot preBS
Definition: BeamMonitor.h:124
BeamMonitor::lastlumi_
int lastlumi_
Definition: BeamMonitor.h:99
BeamMonitor::h_nVtx_st
MonitorElement * h_nVtx_st
Definition: BeamMonitor.h:145
BeamMonitor::reportSummaryMap
MonitorElement * reportSummaryMap
Definition: BeamMonitor.h:172
BeamMonitor::summaryContent_
Float_t summaryContent_[3]
Definition: BeamMonitor.h:169
BeamMonitor::onlineDbService_
edm::Service< cond::service::OnlineDBOutputService > onlineDbService_
Definition: BeamMonitor.h:79
BeamMonitor::FitAndFill
void FitAndFill(const edm::LuminosityBlock &lumiSeg, int &, int &, int &)
Definition: BeamMonitor.cc:809
AlcaSiPixelAliHarvester0T_cff.options
options
Definition: AlcaSiPixelAliHarvester0T_cff.py:42
BeamMonitor::fitNLumi_
int fitNLumi_
Definition: BeamMonitor.h:82
BeamMonitor::countLumi_
int countLumi_
Definition: BeamMonitor.h:94
BeamMonitor::scrollTH1
void scrollTH1(TH1 *, std::time_t)
Definition: BeamMonitor.cc:1560
BeamMonitor::dxMax_
const double dxMax_
Definition: BeamMonitor.h:60
dqm::impl::MonitorElement::getMean
virtual double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:549
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
BeamMonitor::resetHistos_
bool resetHistos_
Definition: BeamMonitor.h:113
BeamMonitor::h_PVy
MonitorElement * h_PVy[2]
Definition: BeamMonitor.h:147
BeamMonitor::mapLSPVStoreSize
std::map< int, size_t > mapLSPVStoreSize
Definition: BeamMonitor.h:162
BeamMonitor::h_trkPt
MonitorElement * h_trkPt
Definition: BeamMonitor.h:135
cond::persistency::Logger::logError
EchoedLogStream< edm::LogError > logError()
Definition: Logger.cc:165
BeamSpotOnlineObjects::SetLastAnalyzedRun
void SetLastAnalyzedRun(int val)
Definition: BeamSpotOnlineObjects.h:47
BeamMonitor::h_trkVz
MonitorElement * h_trkVz
Definition: BeamMonitor.h:136
cond::service::PoolDBOutputService::lockRecords
void lockRecords()
Definition: PoolDBOutputService.cc:94
BeamSpotObjects::SetBeamWidthXError
void SetBeamWidthXError(double val)
set beam width X error
Definition: BeamSpotObjects.h:52
BeamMonitor::hltSrc_
edm::EDGetTokenT< edm::TriggerResults > hltSrc_
Definition: BeamMonitor.h:78
BeamMonitor::phiMax_
const double phiMax_
Definition: BeamMonitor.h:68
genParticles_cff.map
map
Definition: genParticles_cff.py:11
BeamSpotObjects::SetBeamWidthYError
void SetBeamWidthYError(double val)
set beam width Y error
Definition: BeamSpotObjects.h:54
BeamMonitor::nthBSTrk_
unsigned int nthBSTrk_
Definition: BeamMonitor.h:103
dqm::impl::MonitorElement::getMeanError
virtual double getMeanError(int axis=1) const
Definition: MonitorElement.cc:556
BeamMonitor::h_trk_z0
MonitorElement * h_trk_z0
Definition: BeamMonitor.h:131
BeamMonitor::h_d0_phi0
MonitorElement * h_d0_phi0
Definition: BeamMonitor.h:130
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
BeamMonitor::min_Ntrks_
unsigned int min_Ntrks_
Definition: BeamMonitor.h:107
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
BeamMonitor::nFitElements_
int nFitElements_
Definition: BeamMonitor.h:104
BeamMonitor::mapBeginBSLS
std::map< int, int > mapBeginBSLS
Definition: BeamMonitor.h:158
BeamMonitor::summarySum_
Float_t summarySum_
Definition: BeamMonitor.h:168
DeadROC_duringRun.f1
f1
Definition: DeadROC_duringRun.py:219
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
BeamSpotObjects::Setdydz
void Setdydz(double val)
set dydz slope, crossing angle in XZ
Definition: BeamSpotObjects.h:46
BeamMonitor::resetFitNLumi_
int resetFitNLumi_
Definition: BeamMonitor.h:84
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
BeamMonitor::h_vx_dz
MonitorElement * h_vx_dz
Definition: BeamMonitor.h:133
cuy.ii
ii
Definition: cuy.py:590
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
label
const char * label
Definition: PFTauDecayModeTools.cc:11
reco::BeamSpot::BeamWidthY
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:84
edm::TimeValue_t
unsigned long long TimeValue_t
Definition: Timestamp.h:28
BeamSpotOnlineObjects::SetNumPVs
void SetNumPVs(int val)
Definition: BeamSpotOnlineObjects.cc:63
BeamMonitor::theBeamFitter
std::unique_ptr< BeamFitter > theBeamFitter
Definition: BeamMonitor.h:91
BeamMonitor::mapBeginPVLS
std::map< int, int > mapBeginPVLS
Definition: BeamMonitor.h:158
BeamMonitor::mapPVy
std::map< int, std::vector< float > > mapPVy
Definition: BeamMonitor.h:155
hgcalPlots.ytitle
ytitle
Definition: hgcalPlots.py:1110
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37