CMS 3D CMS Logo

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

#include <BeamMonitorBx.h>

Inheritance diagram for BeamMonitorBx:
edm::EDAnalyzer edm::EDConsumerBase

Public Types

typedef std::map< BxNum, reco::BeamSpotBeamSpotMapBx
 
typedef int BxNum
 
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 BeamMonitorBx (const edm::ParameterSet &)
 
 ~BeamMonitorBx () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
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 beginJob () override
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) override
 
void beginRun (const edm::Run &r, const edm::EventSetup &c) override
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
 
void endRun (const edm::Run &r, const edm::EventSetup &c) override
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
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<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Private Member Functions

void BookTables (int, std::map< std::string, std::string > &, std::string)
 
void BookTrendHistos (bool, int, std::map< std::string, std::string > &, std::string, const TString &, const TString &)
 
void FillTables (int, int, std::map< std::string, std::string > &, reco::BeamSpot &, std::string)
 
void FillTrendHistos (int, int, std::map< std::string, std::string > &, reco::BeamSpot &, const TString &)
 
void FitAndFill (const edm::LuminosityBlock &lumiSeg, int &, int &, int &)
 
void formatFitTime (char *, const std::time_t &)
 
void weight (BeamSpotMapBx &, const BeamSpotMapBx &)
 
void weight (double &mean, double &meanError, const double &val, const double &valError)
 

Private Attributes

int beginLumiOfBSFit_
 
edm::InputTag bsSrc_
 
unsigned int countBx_
 
int countEvt_
 
int countGoodFit_
 
int countLumi_
 
DQMStoredbe_
 
bool debug_
 
int endLumiOfBSFit_
 
BeamSpotMapBx fbspotMap
 
int firstlumi_
 
int fitNLumi_
 
edm::TimeValue_t ftimestamp
 
std::map< TString, MonitorElement * > hs
 
std::map< TString, MonitorElement * > hst
 
int lastlumi_
 
std::string monitorName_
 
int nextlumi_
 
edm::ParameterSet parameters_
 
bool processed_
 
std::time_t refBStime [2]
 
std::time_t refTime
 
int resetFitNLumi_
 
bool resetHistos_
 
std::time_t startTime
 
BeamFittertheBeamFitter
 
std::time_t tmpTime
 
std::map< std::string, std::string > varMap
 
std::map< std::string, std::string > varMap1
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 

Detailed Description

Definition at line 25 of file BeamMonitorBx.h.

Member Typedef Documentation

◆ BeamSpotMapBx

Definition at line 34 of file BeamMonitorBx.h.

◆ BxNum

typedef int BeamMonitorBx::BxNum

Definition at line 33 of file BeamMonitorBx.h.

◆ DQMStore

Definition at line 28 of file BeamMonitorBx.h.

◆ MonitorElement

Definition at line 27 of file BeamMonitorBx.h.

Constructor & Destructor Documentation

◆ BeamMonitorBx()

BeamMonitorBx::BeamMonitorBx ( const edm::ParameterSet ps)

Definition at line 54 of file BeamMonitorBx.cc.

References AlcaBeamMonitor_cfi::BeamFitter, beginLumiOfBSFit_, bsSrc_, edm::EDConsumerBase::consumesCollector(), countGoodFit_, dbe_, endLumiOfBSFit_, firstlumi_, fitNLumi_, edm::ParameterSet::getUntrackedParameter(), lastlumi_, monitorName_, nextlumi_, Utilities::operator, parameters_, processed_, refBStime, resetFitNLumi_, BeamFitter::resetLSRange(), BeamFitter::resetPVFitter(), BeamFitter::resetRefTime(), BeamFitter::resetTrkVector(), and theBeamFitter.

54  : countBx_(0), countEvt_(0), countLumi_(0), resetHistos_(false) {
55  parameters_ = ps;
56  monitorName_ = parameters_.getUntrackedParameter<string>("monitorName", "YourSubsystemName");
58  fitNLumi_ = parameters_.getUntrackedParameter<int>("fitEveryNLumi", -1);
59  resetFitNLumi_ = parameters_.getUntrackedParameter<int>("resetEveryNLumi", -1);
60 
62 
63  if (!monitorName_.empty())
64  monitorName_ = monitorName_ + "/";
65 
71 
72  if (fitNLumi_ <= 0)
73  fitNLumi_ = 1;
75  refBStime[0] = refBStime[1] = 0;
76  lastlumi_ = 0;
77  nextlumi_ = 0;
78  firstlumi_ = 0;
79  processed_ = false;
80  countGoodFit_ = 0;
81 }
edm::ParameterSet parameters_
Definition: BeamMonitorBx.h:61
void resetTrkVector()
Definition: BeamFitter.h:58
T getUntrackedParameter(std::string const &, T const &) const
unsigned int countBx_
Definition: BeamMonitorBx.h:72
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::string monitorName_
Definition: BeamMonitorBx.h:62
void resetLSRange()
Definition: BeamFitter.h:60
BeamFitter * theBeamFitter
Definition: BeamMonitorBx.h:70
std::time_t refBStime[2]
Definition: BeamMonitorBx.h:81
edm::InputTag bsSrc_
Definition: BeamMonitorBx.h:63
void resetPVFitter()
Definition: BeamFitter.h:72
DQMStore * dbe_
Definition: BeamMonitorBx.h:69
void resetRefTime()
Definition: BeamFitter.h:61

◆ ~BeamMonitorBx()

BeamMonitorBx::~BeamMonitorBx ( )
override

Definition at line 83 of file BeamMonitorBx.cc.

References theBeamFitter.

83 { delete theBeamFitter; }
BeamFitter * theBeamFitter
Definition: BeamMonitorBx.h:70

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 158 of file BeamMonitorBx.cc.

References countEvt_, iEvent, nextlumi_, processed_, BeamFitter::readEvent(), and theBeamFitter.

158  {
159  bool readEvent_ = true;
160  const int nthlumi = iEvent.luminosityBlock();
161  if (nthlumi < nextlumi_) {
162  readEvent_ = false;
163  edm::LogWarning("BX|BeamMonitorBx") << "Spilt event from previous lumi section!" << endl;
164  }
165  if (nthlumi > nextlumi_) {
166  readEvent_ = false;
167  edm::LogWarning("BX|BeamMonitorBx") << "Spilt event from next lumi section!!!" << endl;
168  }
169 
170  if (readEvent_) {
171  countEvt_++;
173  processed_ = true;
174  }
175 }
void readEvent(const edm::Event &iEvent)
Definition: BeamFitter.cc:261
int iEvent
Definition: GenABIO.cc:224
BeamFitter * theBeamFitter
Definition: BeamMonitorBx.h:70
Log< level::Warning, false > LogWarning

◆ beginJob()

void BeamMonitorBx::beginJob ( void  )
overrideprotectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 86 of file BeamMonitorBx.cc.

References BookTables(), dbe_, monitorName_, dqm::implementation::DQMStore::setCurrentFolder(), varMap, and varMap1.

86  {
87  varMap["x0_bx"] = "X_{0}";
88  varMap["y0_bx"] = "Y_{0}";
89  varMap["z0_bx"] = "Z_{0}";
90  varMap["sigmaX_bx"] = "#sigma_{X}";
91  varMap["sigmaY_bx"] = "#sigma_{Y}";
92  varMap["sigmaZ_bx"] = "#sigma_{Z}";
93 
94  varMap1["x"] = "X_{0} [cm]";
95  varMap1["y"] = "Y_{0} [cm]";
96  varMap1["z"] = "Z_{0} [cm]";
97  varMap1["sigmaX"] = "#sigma_{X} [cm]";
98  varMap1["sigmaY"] = "#sigma_{Y} [cm]";
99  varMap1["sigmaZ"] = "#sigma_{Z} [cm]";
100 
101  // create and cd into new folder
102  dbe_->setCurrentFolder(monitorName_ + "FitBx");
103  // Results of good fit:
104  BookTables(1, varMap, "");
105  //if (resetFitNLumi_ > 0) BookTables(1,varMap,"all");
106 
107  // create and cd into new folders
108  for (std::map<std::string, std::string>::const_iterator varName = varMap1.begin(); varName != varMap1.end();
109  ++varName) {
110  string subDir_ = "FitBx";
111  subDir_ += "/";
112  subDir_ += "All_";
113  subDir_ += varName->first;
114  dbe_->setCurrentFolder(monitorName_ + subDir_);
115  }
116  dbe_->setCurrentFolder(monitorName_ + "FitBx/All_nPVs");
117 }
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:646
std::string monitorName_
Definition: BeamMonitorBx.h:62
void BookTables(int, std::map< std::string, std::string > &, std::string)
DQMStore * dbe_
Definition: BeamMonitorBx.h:69
std::map< std::string, std::string > varMap
Definition: BeamMonitorBx.h:87
std::map< std::string, std::string > varMap1
Definition: BeamMonitorBx.h:88

◆ beginLuminosityBlock()

void BeamMonitorBx::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
overrideprotectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 127 of file BeamMonitorBx.cc.

References beginLumiOfBSFit_, edm::LuminosityBlockBase::beginTime(), countLumi_, FitAndFill(), lastlumi_, edm::LuminosityBlockBase::luminosityBlock(), nextlumi_, processed_, refBStime, and edm::Timestamp::value().

127  {
128  int nthlumi = lumiSeg.luminosityBlock();
129  const edm::TimeValue_t fbegintimestamp = lumiSeg.beginTime().value();
130  const std::time_t ftmptime = fbegintimestamp >> 32;
131 
132  if (countLumi_ == 0) {
133  beginLumiOfBSFit_ = nthlumi;
134  refBStime[0] = ftmptime;
135  }
136  if (beginLumiOfBSFit_ == 0)
138 
139  if (nthlumi < nextlumi_)
140  return;
141 
142  if (nthlumi > nextlumi_) {
143  if (countLumi_ != 0 && processed_) {
144  FitAndFill(lumiSeg, lastlumi_, nextlumi_, nthlumi);
145  }
146  nextlumi_ = nthlumi;
147  edm::LogInfo("LS|BX|BeamMonitorBx") << "Next Lumi to Fit: " << nextlumi_ << endl;
148  if (refBStime[0] == 0)
149  refBStime[0] = ftmptime;
150  }
151  countLumi_++;
152  if (processed_)
153  processed_ = false;
154  edm::LogInfo("LS|BX|BeamMonitorBx") << "Begin of Lumi: " << nthlumi << endl;
155 }
void FitAndFill(const edm::LuminosityBlock &lumiSeg, int &, int &, int &)
unsigned long long TimeValue_t
Definition: Timestamp.h:28
std::time_t refBStime[2]
Definition: BeamMonitorBx.h:81
Log< level::Info, false > LogInfo
TimeValue_t value() const
Definition: Timestamp.h:45
Timestamp const & beginTime() const
LuminosityBlockNumber_t luminosityBlock() const

◆ beginRun()

void BeamMonitorBx::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 120 of file BeamMonitorBx.cc.

References ftimestamp, alignCSCRings::r, refTime, startTime, and tmpTime.

120  {
121  ftimestamp = r.beginTime().value();
122  tmpTime = ftimestamp >> 32;
124 }
std::time_t startTime
Definition: BeamMonitorBx.h:99
edm::TimeValue_t ftimestamp
std::time_t tmpTime
Definition: BeamMonitorBx.h:97
std::time_t refTime
Definition: BeamMonitorBx.h:98

◆ BookTables()

void BeamMonitorBx::BookTables ( int  ,
std::map< std::string, std::string > &  ,
std::string   
)
private

Definition at line 190 of file BeamMonitorBx.cc.

References dqm::implementation::IBooker::book2D(), dqm::implementation::DQMStore::cd(), dbe_, hs, mps_fire::i, and monitorName_.

Referenced by beginJob(), and FitAndFill().

190  {
191  // to rebin histograms when number of bx increases
192  dbe_->cd(monitorName_ + "FitBx");
193 
194  for (std::map<std::string, std::string>::const_iterator varName = vMap.begin(); varName != vMap.end(); ++varName) {
195  string tmpName = varName->first;
196  if (!suffix_.empty()) {
197  tmpName += "_";
198  tmpName += suffix_;
199  }
200 
201  hs[tmpName] = dbe_->book2D(tmpName, varName->second, 3, 0, 3, nBx, 0, nBx);
202  hs[tmpName]->setBinLabel(1, "bx", 1);
203  hs[tmpName]->setBinLabel(2, varName->second, 1);
204  hs[tmpName]->setBinLabel(3, "#Delta " + varName->second, 1);
205  for (int i = 0; i < nBx; i++) {
206  hs[tmpName]->setBinLabel(i + 1, " ", 2);
207  }
208  hs[tmpName]->getTH1()->SetOption("text");
209  hs[tmpName]->Reset();
210  }
211 }
std::map< TString, MonitorElement * > hs
Definition: BeamMonitorBx.h:90
std::string monitorName_
Definition: BeamMonitorBx.h:62
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
DQMStore * dbe_
Definition: BeamMonitorBx.h:69

◆ BookTrendHistos()

void BeamMonitorBx::BookTrendHistos ( bool  ,
int  ,
std::map< std::string, std::string > &  ,
std::string  ,
const TString &  ,
const TString &   
)
private

Definition at line 214 of file BeamMonitorBx.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::DQMStore::cd(), Calorimetry_cff::da, dbe_, debug_, formatFitTime(), dqm::implementation::IGetter::get(), B2GTnPMonitor_cfi::histTitle, hst, mps_fire::i, monitorName_, AlcaSiPixelAliHarvester0T_cff::options, contentValuesCheck::ss, startTime, compareTotals::xtitle, and compareTotals::ytitle.

Referenced by FitAndFill().

215  {
216  int nType_ = 2;
217  if (plotPV)
218  nType_ = 4;
219  std::ostringstream ss;
220  std::ostringstream ss1;
221  ss << setfill('0') << setw(5) << nBx;
222  ss1 << nBx;
223 
224  for (int i = 0; i < nType_; i++) {
225  for (std::map<std::string, std::string>::const_iterator varName = vMap.begin(); varName != vMap.end(); ++varName) {
226  string tmpDir_ = subDir_ + "/All_" + varName->first;
227  dbe_->cd(monitorName_ + tmpDir_);
228  TString histTitle(varName->first);
229  TString tmpName;
230  if (prefix_ != "")
231  tmpName = prefix_ + "_" + varName->first;
232  if (suffix_ != "")
233  tmpName = tmpName + "_" + suffix_;
234  tmpName = tmpName + "_" + ss.str();
235 
236  TString histName(tmpName);
237  string ytitle(varName->second);
238  string xtitle("");
239  string options("E1");
240  bool createHisto = true;
241  switch (i) {
242  case 1: // BS vs time
243  histName.Insert(histName.Index("_bx_", 4), "_time");
244  xtitle = "Time [UTC] [Bx# " + ss1.str() + "]";
245  if (ytitle.find("sigma") == string::npos)
246  histTitle += " coordinate of beam spot vs time (Fit)";
247  else
248  histTitle = histTitle.Insert(5, " ") + " of beam spot vs time (Fit)";
249  break;
250  case 2: // PV +/- sigmaPV vs lumi
251  if (ytitle.find("sigma") == string::npos) {
252  histName.Insert(0, "PV");
253  histName.Insert(histName.Index("_bx_", 4), "_lumi");
254  histTitle.Insert(0, "Avg. ");
255  histTitle += " position of primary vtx vs lumi";
256  xtitle = "Lumisection [Bx# " + ss1.str() + "]";
257  ytitle.insert(0, "PV");
258  ytitle += " #pm #sigma_{PV";
259  ytitle += varName->first;
260  ytitle += "} (cm)";
261  } else
262  createHisto = false;
263  break;
264  case 3: // PV +/- sigmaPV vs time
265  if (ytitle.find("sigma") == string::npos) {
266  histName.Insert(0, "PV");
267  histName.Insert(histName.Index("_bx_", 4), "_time");
268  histTitle.Insert(0, "Avg. ");
269  histTitle += " position of primary vtx vs time";
270  xtitle = "Time [UTC] [Bx# " + ss1.str() + "]";
271  ytitle.insert(0, "PV");
272  ytitle += " #pm #sigma_{PV";
273  ytitle += varName->first;
274  ytitle += "} (cm)";
275  } else
276  createHisto = false;
277  break;
278  default: // BS vs lumi
279  histName.Insert(histName.Index("_bx_", 4), "_lumi");
280  xtitle = "Lumisection [Bx# " + ss1.str() + "]";
281  if (ytitle.find("sigma") == string::npos)
282  histTitle += " coordinate of beam spot vs lumi (Fit)";
283  else
284  histTitle = histTitle.Insert(5, " ") + " of beam spot vs lumi (Fit)";
285  break;
286  }
287  // check if already exist
288  if (dbe_->get(monitorName_ + tmpDir_ + "/" + string(histName.Data())))
289  continue;
290 
291  if (createHisto) {
292  edm::LogInfo("BX|BeamMonitorBx") << "histName = " << histName << "; histTitle = " << histTitle << std::endl;
293  hst[histName] = dbe_->book1D(histName, histTitle, 40, 0.5, 40.5);
294  hst[histName]->getTH1()->SetCanExtend(TH1::kAllAxes);
295  hst[histName]->setAxisTitle(xtitle, 1);
296  hst[histName]->setAxisTitle(ytitle, 2);
297  hst[histName]->getTH1()->SetOption("E1");
298  if (histName.Contains("time")) {
299  hst[histName]->getTH1()->SetBins(3600, 0.5, 3600 + 0.5);
300  hst[histName]->setAxisTimeDisplay(1);
301  hst[histName]->setAxisTimeFormat("%H:%M:%S", 1);
302 
303  char eventTime[64];
304  formatFitTime(eventTime, startTime);
305  TDatime da(eventTime);
306  if (debug_) {
307  edm::LogInfo("BX|BeamMonitorBx") << "TimeOffset = ";
308  da.Print();
309  }
310  hst[histName]->getTH1()->GetXaxis()->SetTimeOffset(da.Convert(kTRUE));
311  }
312  }
313  } //End of variable loop
314  } // End of type loop (lumi, time)
315 
316  // num of PVs(#Bx) per LS
317  dbe_->cd(monitorName_ + subDir_ + "/All_nPVs");
318  TString histName = "Trending_nPVs_lumi_bx_" + ss.str();
319  string xtitle = "Lumisection [Bx# " + ss1.str() + "]";
320 
321  hst[histName] = dbe_->book1D(histName, "Number of Good Reconstructed Vertices", 40, 0.5, 40.5);
322  hst[histName]->setAxisTitle(xtitle, 1);
323  hst[histName]->getTH1()->SetCanExtend(TH1::kAllAxes);
324  hst[histName]->getTH1()->SetOption("E1");
325 }
std::time_t startTime
Definition: BeamMonitorBx.h:99
std::string monitorName_
Definition: BeamMonitorBx.h:62
Log< level::Info, false > LogInfo
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:680
DQMStore * dbe_
Definition: BeamMonitorBx.h:69
std::map< TString, MonitorElement * > hst
Definition: BeamMonitorBx.h:91
void formatFitTime(char *, const std::time_t &)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

◆ endLuminosityBlock()

void BeamMonitorBx::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
overrideprotectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 178 of file BeamMonitorBx.cc.

References edm::LuminosityBlockBase::endTime(), edm::LuminosityBlockBase::id(), edm::LuminosityBlockID::luminosityBlock(), nextlumi_, refBStime, tmpTime, and edm::Timestamp::value().

178  {
179  int nthlumi = lumiSeg.id().luminosityBlock();
180  edm::LogInfo("LS|BX|BeamMonitorBx") << "Lumi of the last event before endLuminosityBlock: " << nthlumi << endl;
181 
182  if (nthlumi < nextlumi_)
183  return;
184  const edm::TimeValue_t fendtimestamp = lumiSeg.endTime().value();
185  const std::time_t fendtime = fendtimestamp >> 32;
186  tmpTime = refBStime[1] = fendtime;
187 }
LuminosityBlockNumber_t luminosityBlock() const
unsigned long long TimeValue_t
Definition: Timestamp.h:28
std::time_t refBStime[2]
Definition: BeamMonitorBx.h:81
Log< level::Info, false > LogInfo
std::time_t tmpTime
Definition: BeamMonitorBx.h:97
LuminosityBlockID id() const
TimeValue_t value() const
Definition: Timestamp.h:45
Timestamp const & endTime() const

◆ endRun()

void BeamMonitorBx::endRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 566 of file BeamMonitorBx.cc.

566 {}

◆ FillTables()

void BeamMonitorBx::FillTables ( int  ,
int  ,
std::map< std::string, std::string > &  ,
reco::BeamSpot ,
std::string   
)
private

Definition at line 450 of file BeamMonitorBx.cc.

References reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthXError(), reco::BeamSpot::BeamWidthY(), reco::BeamSpot::BeamWidthYError(), hs, reco::BeamSpot::sigmaZ(), reco::BeamSpot::sigmaZ0Error(), reco::BeamSpot::x0(), reco::BeamSpot::x0Error(), reco::BeamSpot::y0(), reco::BeamSpot::y0Error(), reco::BeamSpot::z0(), and reco::BeamSpot::z0Error().

Referenced by FitAndFill().

450  {
451  map<string, pair<double, double> > val_;
452  val_["x0_bx"] = pair<double, double>(bs_.x0(), bs_.x0Error());
453  val_["y0_bx"] = pair<double, double>(bs_.y0(), bs_.y0Error());
454  val_["z0_bx"] = pair<double, double>(bs_.z0(), bs_.z0Error());
455  val_["sigmaX_bx"] = pair<double, double>(bs_.BeamWidthX(), bs_.BeamWidthXError());
456  val_["sigmaY_bx"] = pair<double, double>(bs_.BeamWidthY(), bs_.BeamWidthYError());
457  val_["sigmaZ_bx"] = pair<double, double>(bs_.sigmaZ(), bs_.sigmaZ0Error());
458 
459  for (std::map<std::string, std::string>::const_iterator varName = vMap.begin(); varName != vMap.end(); ++varName) {
460  TString tmpName = varName->first;
461  if (!suffix_.empty())
462  tmpName += TString("_" + suffix_);
463  hs[tmpName]->setBinContent(1, nthbin_, nthbx);
464  hs[tmpName]->setBinContent(2, nthbin_, val_[varName->first].first);
465  hs[tmpName]->setBinContent(3, nthbin_, val_[varName->first].second);
466  }
467 }
std::map< TString, MonitorElement * > hs
Definition: BeamMonitorBx.h:90

◆ FillTrendHistos()

void BeamMonitorBx::FillTrendHistos ( int  ,
int  ,
std::map< std::string, std::string > &  ,
reco::BeamSpot ,
const TString &   
)
private

Definition at line 470 of file BeamMonitorBx.cc.

References reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthXError(), reco::BeamSpot::BeamWidthY(), reco::BeamSpot::BeamWidthYError(), endLumiOfBSFit_, hst, heavyIonCSV_trainingSettings::idx, reco::BeamSpot::sigmaZ(), reco::BeamSpot::sigmaZ0Error(), contentValuesCheck::ss, startTime, tmpTime, reco::BeamSpot::x0(), reco::BeamSpot::x0Error(), reco::BeamSpot::y0(), reco::BeamSpot::y0Error(), reco::BeamSpot::z0(), and reco::BeamSpot::z0Error().

Referenced by FitAndFill().

471  {
472  map<TString, pair<double, double> > val_;
473  val_[TString(prefix_ + "_x")] = pair<double, double>(bs_.x0(), bs_.x0Error());
474  val_[TString(prefix_ + "_y")] = pair<double, double>(bs_.y0(), bs_.y0Error());
475  val_[TString(prefix_ + "_z")] = pair<double, double>(bs_.z0(), bs_.z0Error());
476  val_[TString(prefix_ + "_sigmaX")] = pair<double, double>(bs_.BeamWidthX(), bs_.BeamWidthXError());
477  val_[TString(prefix_ + "_sigmaY")] = pair<double, double>(bs_.BeamWidthY(), bs_.BeamWidthYError());
478  val_[TString(prefix_ + "_sigmaZ")] = pair<double, double>(bs_.sigmaZ(), bs_.sigmaZ0Error());
479 
480  std::ostringstream ss;
481  ss << setfill('0') << setw(5) << nthBx;
482  int ntbin_ = tmpTime - startTime;
483  for (map<TString, MonitorElement*>::iterator itHst = hst.begin(); itHst != hst.end(); ++itHst) {
484  if (!(itHst->first.Contains(ss.str())))
485  continue;
486  if (itHst->first.Contains("nPVs"))
487  continue;
488  edm::LogInfo("BX|BeamMonitorBx") << "Filling histogram: " << itHst->first << endl;
489  if (itHst->first.Contains("time")) {
490  int idx = itHst->first.Index("_time", 5);
491  itHst->second->setBinContent(ntbin_, val_[itHst->first(0, idx)].first);
492  itHst->second->setBinError(ntbin_, val_[itHst->first(0, idx)].second);
493  }
494  if (itHst->first.Contains("lumi")) {
495  int idx = itHst->first.Index("_lumi", 5);
496  itHst->second->setBinContent(endLumiOfBSFit_, val_[itHst->first(0, idx)].first);
497  itHst->second->setBinError(endLumiOfBSFit_, val_[itHst->first(0, idx)].second);
498  }
499  }
500  TString histName = "Trending_nPVs_lumi_bx_" + ss.str();
501  if (hst[histName])
502  hst[histName]->setBinContent(endLumiOfBSFit_, nPVs_);
503 }
std::time_t startTime
Definition: BeamMonitorBx.h:99
Log< level::Info, false > LogInfo
std::time_t tmpTime
Definition: BeamMonitorBx.h:97
std::map< TString, MonitorElement * > hst
Definition: BeamMonitorBx.h:91

◆ FitAndFill()

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

Definition at line 328 of file BeamMonitorBx.cc.

References beginLumiOfBSFit_, BookTables(), BookTrendHistos(), cms::cuda::bs, simKBmtfDigis_cfi::bx, countBx_, countGoodFit_, endLumiOfBSFit_, fbspotMap, FillTables(), FillTrendHistos(), firstlumi_, fitNLumi_, BeamFitter::getBeamSpotMap(), BeamFitter::getFitLSRange(), BeamFitter::getNPVsperBX(), hs, BeamSpotPI::nPVs, refBStime, refTime, BeamFitter::resetCutFlow(), resetFitNLumi_, resetHistos_, BeamFitter::resetLSRange(), BeamFitter::resetPVFitter(), BeamFitter::resetRefTime(), BeamFitter::resetTrkVector(), BeamFitter::runPVandTrkFitter(), theBeamFitter, tmpTime, varMap, varMap1, and weight().

Referenced by beginLuminosityBlock().

328  {
329  if (nthlumi <= nextlumi)
330  return;
331 
332  int currentlumi = nextlumi;
333  edm::LogInfo("LS|BX|BeamMonitorBx") << "Lumi of the current fit: " << currentlumi << endl;
334  lastlumi = currentlumi;
335  endLumiOfBSFit_ = currentlumi;
336 
337  edm::LogInfo("BX|BeamMonitorBx") << "Time lapsed = " << tmpTime - refTime << std::endl;
338 
339  if (resetHistos_) {
340  edm::LogInfo("BX|BeamMonitorBx") << "Resetting Histograms" << endl;
342  resetHistos_ = false;
343  }
344 
345  if (fitNLumi_ > 0)
346  if (currentlumi % fitNLumi_ != 0)
347  return;
348 
349  std::pair<int, int> fitLS = theBeamFitter->getFitLSRange();
350  edm::LogInfo("LS|BX|BeamMonitorBx") << " [Fitter] Do BeamSpot Fit for LS = " << fitLS.first << " to " << fitLS.second
351  << endl;
352  edm::LogInfo("LS|BX|BeamMonitorBx") << " [BX] Do BeamSpot Fit for LS = " << beginLumiOfBSFit_ << " to "
353  << endLumiOfBSFit_ << endl;
354 
355  edm::LogInfo("BX|BeamMonitorBx") << " [BxDebugTime] refBStime[0] = " << refBStime[0]
356  << "; address = " << &refBStime[0] << std::endl;
357  edm::LogInfo("BX|BeamMonitorBx") << " [BxDebugTime] refBStime[1] = " << refBStime[1]
358  << "; address = " << &refBStime[1] << std::endl;
359 
361  countGoodFit_++;
362  edm::LogInfo("BX|BeamMonitorBx") << "Number of good fit = " << countGoodFit_ << endl;
364  std::map<int, int> npvsmap = theBeamFitter->getNPVsperBX();
365  edm::LogInfo("BX|BeamMonitorBx") << "Number of bx = " << bsmap.size() << endl;
366  if (bsmap.empty())
367  return;
368  if (countBx_ < bsmap.size()) {
369  countBx_ = bsmap.size();
370  BookTables(countBx_, varMap, "");
371  BookTables(countBx_, varMap, "all");
372  for (BeamSpotMapBx::const_iterator abspot = bsmap.begin(); abspot != bsmap.end(); ++abspot) {
373  int bx = abspot->first;
374  BookTrendHistos(false, bx, varMap1, "FitBx", "Trending", "bx");
375  }
376  }
377 
378  std::pair<int, int> LSRange = theBeamFitter->getFitLSRange();
379  char tmpTitle[50];
380  sprintf(tmpTitle, "%s %i %s %i %s", " [cm] (LS: ", LSRange.first, " to ", LSRange.second, ")");
381  for (std::map<std::string, std::string>::const_iterator varName = varMap.begin(); varName != varMap.end();
382  ++varName) {
383  hs[varName->first]->setTitle(varName->second + " " + tmpTitle);
384  hs[varName->first]->Reset();
385  }
386 
387  if (countGoodFit_ == 1)
388  firstlumi_ = LSRange.first;
389 
390  if (resetFitNLumi_ > 0) {
391  char tmpTitle1[60];
392  if (countGoodFit_ > 1)
393  snprintf(tmpTitle1,
394  sizeof(tmpTitle1),
395  "%s %i %s %i %s",
396  " [cm] (LS: ",
397  firstlumi_,
398  " to ",
399  LSRange.second,
400  ") [weighted average]");
401  else
402  snprintf(tmpTitle1, sizeof(tmpTitle1), "%s", "Need at least two fits to calculate weighted average");
403  for (std::map<std::string, std::string>::const_iterator varName = varMap.begin(); varName != varMap.end();
404  ++varName) {
405  TString tmpName = varName->first + "_all";
406  hs[tmpName]->setTitle(varName->second + " " + tmpTitle1);
407  hs[tmpName]->Reset();
408  }
409  }
410 
411  int nthBin = countBx_;
412  for (BeamSpotMapBx::const_iterator abspot = bsmap.begin(); abspot != bsmap.end(); ++abspot, nthBin--) {
413  reco::BeamSpot bs = abspot->second;
414  int bx = abspot->first;
415  int nPVs = npvsmap.find(bx)->second;
416  edm::LogInfo("BeamMonitorBx") << "Number of PVs of bx#[" << bx << "] = " << nPVs << endl;
417  // Tables
418  FillTables(bx, nthBin, varMap, bs, "");
419  // Histograms
420  FillTrendHistos(bx, nPVs, varMap1, bs, "Trending");
421  }
422  // Calculate weighted beam spots
423  weight(fbspotMap, bsmap);
424  // Fill the results
425  nthBin = countBx_;
426  if (resetFitNLumi_ > 0 && countGoodFit_ > 1) {
427  for (BeamSpotMapBx::const_iterator abspot = fbspotMap.begin(); abspot != fbspotMap.end(); ++abspot, nthBin--) {
428  reco::BeamSpot bs = abspot->second;
429  int bx = abspot->first;
430  FillTables(bx, nthBin, varMap, bs, "all");
431  }
432  }
433  }
434  // else
435  // edm::LogInfo("BeamMonitorBx") << "Bad Fit!!!" << endl;
436 
437  if (resetFitNLumi_ > 0 && currentlumi % resetFitNLumi_ == 0) {
438  edm::LogInfo("LS|BX|BeamMonitorBx") << "Reset track collection for beam fit!!!" << endl;
439  resetHistos_ = true;
444  beginLumiOfBSFit_ = 0;
445  refBStime[0] = 0;
446  }
447 }
void FillTrendHistos(int, int, std::map< std::string, std::string > &, reco::BeamSpot &, const TString &)
const std::map< int, int > & getNPVsperBX()
Definition: BeamFitter.h:123
void FillTables(int, int, std::map< std::string, std::string > &, reco::BeamSpot &, std::string)
bool runPVandTrkFitter()
Definition: BeamFitter.cc:449
std::map< BxNum, reco::BeamSpot > BeamSpotMapBx
Definition: BeamMonitorBx.h:34
void resetTrkVector()
Definition: BeamFitter.h:58
std::map< TString, MonitorElement * > hs
Definition: BeamMonitorBx.h:90
BeamSpotMapBx fbspotMap
Definition: BeamMonitorBx.h:86
std::map< int, reco::BeamSpot > getBeamSpotMap()
Definition: BeamFitter.h:94
unsigned int countBx_
Definition: BeamMonitorBx.h:72
void resetLSRange()
Definition: BeamFitter.h:60
BeamFitter * theBeamFitter
Definition: BeamMonitorBx.h:70
std::time_t refBStime[2]
Definition: BeamMonitorBx.h:81
Log< level::Info, false > LogInfo
std::time_t tmpTime
Definition: BeamMonitorBx.h:97
void weight(BeamSpotMapBx &, const BeamSpotMapBx &)
std::time_t refTime
Definition: BeamMonitorBx.h:98
void BookTables(int, std::map< std::string, std::string > &, std::string)
void resetPVFitter()
Definition: BeamFitter.h:72
void resetCutFlow()
Definition: BeamFitter.h:104
std::pair< int, int > getFitLSRange()
Definition: BeamFitter.h:114
std::map< std::string, std::string > varMap
Definition: BeamMonitorBx.h:87
void BookTrendHistos(bool, int, std::map< std::string, std::string > &, std::string, const TString &, const TString &)
std::map< std::string, std::string > varMap1
Definition: BeamMonitorBx.h:88
void resetRefTime()
Definition: BeamFitter.h:61

◆ formatFitTime()

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

Definition at line 28 of file BeamMonitorBx.cc.

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

Referenced by BookTrendHistos().

28  {
29 #define CET (+1)
30 #define CEST (+2)
31 
32  tm* ptm;
33  ptm = gmtime(&t);
34  sprintf(ts,
35  "%4d-%02d-%02d %02d:%02d:%02d",
36  ptm->tm_year,
37  ptm->tm_mon + 1,
38  ptm->tm_mday,
39  (ptm->tm_hour + CEST) % 24,
40  ptm->tm_min,
41  ptm->tm_sec);
42 
43 #ifdef STRIP_TRAILING_BLANKS_IN_TIMEZONE
44  unsigned int b = strlen(ts);
45  while (ts[--b] == ' ') {
46  ts[b] = 0;
47  }
48 #endif
49 }
#define CEST
double b
Definition: hdecay.h:118

◆ weight() [1/2]

void BeamMonitorBx::weight ( BeamSpotMapBx weightedMap_,
const BeamSpotMapBx newMap_ 
)
private

Definition at line 506 of file BeamMonitorBx.cc.

References reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthXError(), reco::BeamSpot::BeamWidthY(), reco::BeamSpot::BeamWidthYError(), reco::BeamSpot::dxdz(), reco::BeamSpot::dxdzError(), reco::BeamSpot::dydz(), reco::BeamSpot::dydzError(), relativeConstraints::error, mps_fire::i, reco::BeamSpot::setBeamWidthY(), reco::BeamSpot::sigmaZ(), reco::BeamSpot::sigmaZ0Error(), reco::BeamSpot::Tracker, reco::BeamSpot::Unknown, reco::BeamSpot::x0(), reco::BeamSpot::x0Error(), reco::BeamSpot::y0(), reco::BeamSpot::y0Error(), reco::BeamSpot::z0(), and reco::BeamSpot::z0Error().

Referenced by FitAndFill().

506  {
507  for (BeamSpotMapBx::const_iterator it = newMap_.begin(); it != newMap_.end(); ++it) {
508  if (weightedMap_.find(it->first) == weightedMap_.end() || (it->second.type() != 2)) {
509  weightedMap_[it->first] = it->second;
510  continue;
511  }
512 
513  BeamSpot obs = weightedMap_[it->first];
514  double val_[8] = {
515  obs.x0(), obs.y0(), obs.z0(), obs.sigmaZ(), obs.dxdz(), obs.dydz(), obs.BeamWidthX(), obs.BeamWidthY()};
516  double valErr_[8] = {obs.x0Error(),
517  obs.y0Error(),
518  obs.z0Error(),
519  obs.sigmaZ0Error(),
520  obs.dxdzError(),
521  obs.dydzError(),
522  obs.BeamWidthXError(),
523  obs.BeamWidthYError()};
524 
526  weight(val_[0], valErr_[0], it->second.x0(), it->second.x0Error());
527  weight(val_[1], valErr_[1], it->second.y0(), it->second.y0Error());
528  weight(val_[2], valErr_[2], it->second.z0(), it->second.z0Error());
529  weight(val_[3], valErr_[3], it->second.sigmaZ(), it->second.sigmaZ0Error());
530  weight(val_[4], valErr_[4], it->second.dxdz(), it->second.dxdzError());
531  weight(val_[5], valErr_[5], it->second.dydz(), it->second.dydzError());
532  weight(val_[6], valErr_[6], it->second.BeamWidthX(), it->second.BeamWidthXError());
533  weight(val_[7], valErr_[7], it->second.BeamWidthY(), it->second.BeamWidthYError());
534  if (it->second.type() == reco::BeamSpot::Tracker) {
536  }
537 
538  reco::BeamSpot::Point bsPosition(val_[0], val_[1], val_[2]);
540  for (int i = 0; i < 7; ++i) {
541  error(i, i) = valErr_[i] * valErr_[i];
542  }
543  reco::BeamSpot weightedBeamSpot(bsPosition, val_[3], val_[4], val_[5], val_[6], error, type);
544  weightedBeamSpot.setBeamWidthY(val_[7]);
545  LogInfo("BX|BeamMonitorBx") << weightedBeamSpot << endl;
546  weightedMap_.erase(it->first);
547  weightedMap_[it->first] = weightedBeamSpot;
548  }
549 }
math::Error< dimension >::type CovarianceMatrix
Definition: BeamSpot.h:29
double BeamWidthX() const
beam width X
Definition: BeamSpot.h:82
BeamType
beam spot flags
Definition: BeamSpot.h:24
double BeamWidthYError() const
error on beam width Y, assume error in X = Y
Definition: BeamSpot.h:101
double x0Error() const
error on x
Definition: BeamSpot.h:86
math::XYZPoint Point
point in the space
Definition: BeamSpot.h:27
double dydz() const
dydz slope
Definition: BeamSpot.h:80
double z0Error() const
error on z
Definition: BeamSpot.h:90
double sigmaZ0Error() const
error on sigma z
Definition: BeamSpot.h:92
double x0() const
x coordinate
Definition: BeamSpot.h:61
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:84
double y0() const
y coordinate
Definition: BeamSpot.h:63
double BeamWidthXError() const
error on beam width X, assume error in X = Y
Definition: BeamSpot.h:99
Log< level::Info, false > LogInfo
void weight(BeamSpotMapBx &, const BeamSpotMapBx &)
double sigmaZ() const
sigma z
Definition: BeamSpot.h:76
double dxdz() const
dxdz slope
Definition: BeamSpot.h:78
double z0() const
z coordinate
Definition: BeamSpot.h:65
double dydzError() const
error on dydz
Definition: BeamSpot.h:96
double dxdzError() const
error on dxdz
Definition: BeamSpot.h:94
double y0Error() const
error on y
Definition: BeamSpot.h:88

◆ weight() [2/2]

void BeamMonitorBx::weight ( double &  mean,
double &  meanError,
const double &  val,
const double &  valError 
)
private

Definition at line 552 of file BeamMonitorBx.cc.

References MillePedeFileConverter_cfg::e, SiStripPI::mean, mathSSE::sqrt(), and heppy_batch::val.

552  {
553  double tmpError = 0;
554  if (meanError < 1e-8) {
555  tmpError = 1 / (valError * valError);
556  mean = val * tmpError;
557  } else {
558  tmpError = 1 / (meanError * meanError) + 1 / (valError * valError);
559  mean = mean / (meanError * meanError) + val / (valError * valError);
560  }
561  mean = mean / tmpError;
562  meanError = std::sqrt(1 / tmpError);
563 }
T sqrt(T t)
Definition: SSEVec.h:19

Member Data Documentation

◆ beginLumiOfBSFit_

int BeamMonitorBx::beginLumiOfBSFit_
private

Definition at line 75 of file BeamMonitorBx.h.

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

◆ bsSrc_

edm::InputTag BeamMonitorBx::bsSrc_
private

Definition at line 63 of file BeamMonitorBx.h.

Referenced by BeamMonitorBx().

◆ countBx_

unsigned int BeamMonitorBx::countBx_
private

Definition at line 72 of file BeamMonitorBx.h.

Referenced by FitAndFill().

◆ countEvt_

int BeamMonitorBx::countEvt_
private

Definition at line 73 of file BeamMonitorBx.h.

Referenced by analyze().

◆ countGoodFit_

int BeamMonitorBx::countGoodFit_
private

Definition at line 80 of file BeamMonitorBx.h.

Referenced by BeamMonitorBx(), and FitAndFill().

◆ countLumi_

int BeamMonitorBx::countLumi_
private

Definition at line 74 of file BeamMonitorBx.h.

Referenced by beginLuminosityBlock().

◆ dbe_

DQMStore* BeamMonitorBx::dbe_
private

Definition at line 69 of file BeamMonitorBx.h.

Referenced by BeamMonitorBx(), beginJob(), BookTables(), and BookTrendHistos().

◆ debug_

bool BeamMonitorBx::debug_
private

Definition at line 67 of file BeamMonitorBx.h.

Referenced by BookTrendHistos().

◆ endLumiOfBSFit_

int BeamMonitorBx::endLumiOfBSFit_
private

Definition at line 76 of file BeamMonitorBx.h.

Referenced by BeamMonitorBx(), FillTrendHistos(), and FitAndFill().

◆ fbspotMap

BeamSpotMapBx BeamMonitorBx::fbspotMap
private

Definition at line 86 of file BeamMonitorBx.h.

Referenced by FitAndFill().

◆ firstlumi_

int BeamMonitorBx::firstlumi_
private

Definition at line 79 of file BeamMonitorBx.h.

Referenced by BeamMonitorBx(), and FitAndFill().

◆ fitNLumi_

int BeamMonitorBx::fitNLumi_
private

Definition at line 65 of file BeamMonitorBx.h.

Referenced by BeamMonitorBx(), and FitAndFill().

◆ ftimestamp

edm::TimeValue_t BeamMonitorBx::ftimestamp
private

Definition at line 100 of file BeamMonitorBx.h.

Referenced by beginRun().

◆ hs

std::map<TString, MonitorElement*> BeamMonitorBx::hs
private

Definition at line 90 of file BeamMonitorBx.h.

Referenced by BookTables(), FillTables(), and FitAndFill().

◆ hst

std::map<TString, MonitorElement*> BeamMonitorBx::hst
private

Definition at line 91 of file BeamMonitorBx.h.

Referenced by BookTrendHistos(), and FillTrendHistos().

◆ lastlumi_

int BeamMonitorBx::lastlumi_
private

Definition at line 77 of file BeamMonitorBx.h.

Referenced by BeamMonitorBx(), and beginLuminosityBlock().

◆ monitorName_

std::string BeamMonitorBx::monitorName_
private

Definition at line 62 of file BeamMonitorBx.h.

Referenced by BeamMonitorBx(), beginJob(), BookTables(), and BookTrendHistos().

◆ nextlumi_

int BeamMonitorBx::nextlumi_
private

Definition at line 78 of file BeamMonitorBx.h.

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

◆ parameters_

edm::ParameterSet BeamMonitorBx::parameters_
private

◆ processed_

bool BeamMonitorBx::processed_
private

Definition at line 84 of file BeamMonitorBx.h.

Referenced by analyze(), BeamMonitorBx(), and beginLuminosityBlock().

◆ refBStime

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

◆ refTime

std::time_t BeamMonitorBx::refTime
private

Definition at line 98 of file BeamMonitorBx.h.

Referenced by beginRun(), and FitAndFill().

◆ resetFitNLumi_

int BeamMonitorBx::resetFitNLumi_
private

Definition at line 66 of file BeamMonitorBx.h.

Referenced by BeamMonitorBx(), and FitAndFill().

◆ resetHistos_

bool BeamMonitorBx::resetHistos_
private

Definition at line 83 of file BeamMonitorBx.h.

Referenced by FitAndFill().

◆ startTime

std::time_t BeamMonitorBx::startTime
private

Definition at line 99 of file BeamMonitorBx.h.

Referenced by beginRun(), BookTrendHistos(), and FillTrendHistos().

◆ theBeamFitter

BeamFitter* BeamMonitorBx::theBeamFitter
private

Definition at line 70 of file BeamMonitorBx.h.

Referenced by analyze(), BeamMonitorBx(), FitAndFill(), and ~BeamMonitorBx().

◆ tmpTime

std::time_t BeamMonitorBx::tmpTime
private

Definition at line 97 of file BeamMonitorBx.h.

Referenced by beginRun(), endLuminosityBlock(), FillTrendHistos(), and FitAndFill().

◆ varMap

std::map<std::string, std::string> BeamMonitorBx::varMap
private

Definition at line 87 of file BeamMonitorBx.h.

Referenced by beginJob(), and FitAndFill().

◆ varMap1

std::map<std::string, std::string> BeamMonitorBx::varMap1
private

Definition at line 88 of file BeamMonitorBx.h.

Referenced by beginJob(), and FitAndFill().