CMS 3D CMS Logo

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

#include <MuMatchWindow.h>

Public Member Functions

const double bound_cent (double pt)
 
const double bound_high (double pt)
 
const double bound_low (double pt)
 
 MuMatchWindow ()
 
 MuMatchWindow (std::string name)
 
void SetCentral (std::string formula)
 
void SetCentral (TF1 *formula)
 
void SetLower (std::string formula)
 
void SetLower (TF1 *formula)
 
void SetName (std::string name)
 
void SetUpper (std::string formula)
 
void SetUpper (TF1 *formula)
 
 ~MuMatchWindow ()
 

Private Attributes

std::shared_ptr< TF1 > fCent_
 
std::shared_ptr< TF1 > fHigh_
 
std::shared_ptr< TF1 > fLow_
 
std::string name_
 

Detailed Description

Definition at line 17 of file MuMatchWindow.h.

Constructor & Destructor Documentation

◆ MuMatchWindow() [1/2]

MuMatchWindow::MuMatchWindow ( )

Definition at line 3 of file MuMatchWindow.cc.

3 { name_ = ""; }

References name_.

◆ MuMatchWindow() [2/2]

MuMatchWindow::MuMatchWindow ( std::string  name)

Definition at line 5 of file MuMatchWindow.cc.

5 { SetName(name); }

References Skims_PA_cff::name, and SetName().

◆ ~MuMatchWindow()

MuMatchWindow::~MuMatchWindow ( )

Definition at line 7 of file MuMatchWindow.cc.

7 {}

Member Function Documentation

◆ bound_cent()

const double MuMatchWindow::bound_cent ( double  pt)
inline

Definition at line 34 of file MuMatchWindow.h.

34 { return fCent_->Eval(pt); }

References fCent_, and DiDispStaMuonMonitor_cfi::pt.

◆ bound_high()

const double MuMatchWindow::bound_high ( double  pt)
inline

Definition at line 35 of file MuMatchWindow.h.

35 { return fHigh_->Eval(pt); }

References fHigh_, and DiDispStaMuonMonitor_cfi::pt.

◆ bound_low()

const double MuMatchWindow::bound_low ( double  pt)
inline

Definition at line 33 of file MuMatchWindow.h.

33 { return fLow_->Eval(pt); }

References fLow_, and DiDispStaMuonMonitor_cfi::pt.

◆ SetCentral() [1/2]

void MuMatchWindow::SetCentral ( std::string  formula)

Definition at line 14 of file MuMatchWindow.cc.

14  {
15  TF1 f("tmp", formula.c_str(), 0, 1000);
16  SetCentral(&f);
17 }

References f, pfMETCorrectionType0_cfi::formula, and tools::TF1.

◆ SetCentral() [2/2]

void MuMatchWindow::SetCentral ( TF1 *  formula)

Definition at line 30 of file MuMatchWindow.cc.

30  {
31  if (fCent_)
32  throw std::runtime_error("Cannot initialize twice fCent_");
33  fCent_ = std::shared_ptr<TF1>((TF1*)formula->Clone((name_ + std::string("cent")).c_str()));
34 }

References fCent_, pfMETCorrectionType0_cfi::formula, name_, AlCaHLTBitMon_QueryRunRegistry::string, and tools::TF1.

◆ SetLower() [1/2]

void MuMatchWindow::SetLower ( std::string  formula)

Definition at line 9 of file MuMatchWindow.cc.

9  {
10  TF1 f("tmp", formula.c_str(), 0, 1000);
11  SetLower(&f);
12 }

References f, pfMETCorrectionType0_cfi::formula, and tools::TF1.

◆ SetLower() [2/2]

void MuMatchWindow::SetLower ( TF1 *  formula)

Definition at line 24 of file MuMatchWindow.cc.

24  {
25  if (fLow_)
26  throw std::runtime_error("Cannot initialize twice fLow_");
27  fLow_ = std::shared_ptr<TF1>((TF1*)formula->Clone((name_ + std::string("low")).c_str()));
28 }

References fLow_, pfMETCorrectionType0_cfi::formula, name_, AlCaHLTBitMon_QueryRunRegistry::string, and tools::TF1.

◆ SetName()

void MuMatchWindow::SetName ( std::string  name)
inline

Definition at line 22 of file MuMatchWindow.h.

22 { name_ = name; }

References Skims_PA_cff::name, and name_.

Referenced by MuMatchWindow().

◆ SetUpper() [1/2]

void MuMatchWindow::SetUpper ( std::string  formula)

Definition at line 19 of file MuMatchWindow.cc.

19  {
20  TF1 f("tmp", formula.c_str(), 0, 1000);
21  SetUpper(&f);
22 }

References f, pfMETCorrectionType0_cfi::formula, and tools::TF1.

◆ SetUpper() [2/2]

void MuMatchWindow::SetUpper ( TF1 *  formula)

Definition at line 36 of file MuMatchWindow.cc.

36  {
37  if (fHigh_)
38  throw std::runtime_error("Cannot initialize twice fHigh_");
39  fHigh_ = std::shared_ptr<TF1>((TF1*)formula->Clone((name_ + std::string("high")).c_str()));
40 }

References fHigh_, pfMETCorrectionType0_cfi::formula, name_, AlCaHLTBitMon_QueryRunRegistry::string, and tools::TF1.

Member Data Documentation

◆ fCent_

std::shared_ptr<TF1> MuMatchWindow::fCent_
private

Definition at line 40 of file MuMatchWindow.h.

Referenced by bound_cent(), and SetCentral().

◆ fHigh_

std::shared_ptr<TF1> MuMatchWindow::fHigh_
private

Definition at line 41 of file MuMatchWindow.h.

Referenced by bound_high(), and SetUpper().

◆ fLow_

std::shared_ptr<TF1> MuMatchWindow::fLow_
private

Definition at line 39 of file MuMatchWindow.h.

Referenced by bound_low(), and SetLower().

◆ name_

std::string MuMatchWindow::name_
private

Definition at line 38 of file MuMatchWindow.h.

Referenced by MuMatchWindow(), SetCentral(), SetLower(), SetName(), and SetUpper().

MuMatchWindow::fLow_
std::shared_ptr< TF1 > fLow_
Definition: MuMatchWindow.h:39
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
pfMETCorrectionType0_cfi.formula
formula
Definition: pfMETCorrectionType0_cfi.py:46
tools.TF1
TF1
Definition: tools.py:23
MuMatchWindow::fCent_
std::shared_ptr< TF1 > fCent_
Definition: MuMatchWindow.h:40
MuMatchWindow::SetName
void SetName(std::string name)
Definition: MuMatchWindow.h:22
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MuMatchWindow::fHigh_
std::shared_ptr< TF1 > fHigh_
Definition: MuMatchWindow.h:41
MuMatchWindow::SetLower
void SetLower(std::string formula)
Definition: MuMatchWindow.cc:9
MuMatchWindow::SetCentral
void SetCentral(std::string formula)
Definition: MuMatchWindow.cc:14
MuMatchWindow::name_
std::string name_
Definition: MuMatchWindow.h:38
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
MuMatchWindow::SetUpper
void SetUpper(std::string formula)
Definition: MuMatchWindow.cc:19