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.

References name_.

3 { name_ = ""; }
std::string name_
Definition: MuMatchWindow.h:38

◆ MuMatchWindow() [2/2]

MuMatchWindow::MuMatchWindow ( std::string  name)

Definition at line 5 of file MuMatchWindow.cc.

References Skims_PA_cff::name, and SetName().

5 { SetName(name); }
void SetName(std::string name)
Definition: MuMatchWindow.h:22

◆ ~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.

References fCent_, and DiDispStaMuonMonitor_cfi::pt.

34 { return fCent_->Eval(pt); }
std::shared_ptr< TF1 > fCent_
Definition: MuMatchWindow.h:40

◆ bound_high()

const double MuMatchWindow::bound_high ( double  pt)
inline

Definition at line 35 of file MuMatchWindow.h.

References fHigh_, and DiDispStaMuonMonitor_cfi::pt.

35 { return fHigh_->Eval(pt); }
std::shared_ptr< TF1 > fHigh_
Definition: MuMatchWindow.h:41

◆ bound_low()

const double MuMatchWindow::bound_low ( double  pt)
inline

Definition at line 33 of file MuMatchWindow.h.

References fLow_, and DiDispStaMuonMonitor_cfi::pt.

33 { return fLow_->Eval(pt); }
std::shared_ptr< TF1 > fLow_
Definition: MuMatchWindow.h:39

◆ SetCentral() [1/2]

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

Definition at line 14 of file MuMatchWindow.cc.

References f, and pfMETCorrectionType0_cfi::formula.

14  {
15  TF1 f("tmp", formula.c_str(), 0, 1000);
16  SetCentral(&f);
17 }
double f[11][100]
void SetCentral(std::string formula)

◆ SetCentral() [2/2]

void MuMatchWindow::SetCentral ( TF1 *  formula)

Definition at line 30 of file MuMatchWindow.cc.

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

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 }
std::shared_ptr< TF1 > fCent_
Definition: MuMatchWindow.h:40
std::string name_
Definition: MuMatchWindow.h:38

◆ SetLower() [1/2]

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

Definition at line 9 of file MuMatchWindow.cc.

References f, and pfMETCorrectionType0_cfi::formula.

9  {
10  TF1 f("tmp", formula.c_str(), 0, 1000);
11  SetLower(&f);
12 }
void SetLower(std::string formula)
Definition: MuMatchWindow.cc:9
double f[11][100]

◆ SetLower() [2/2]

void MuMatchWindow::SetLower ( TF1 *  formula)

Definition at line 24 of file MuMatchWindow.cc.

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

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 }
std::shared_ptr< TF1 > fLow_
Definition: MuMatchWindow.h:39
std::string name_
Definition: MuMatchWindow.h:38

◆ SetName()

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

Definition at line 22 of file MuMatchWindow.h.

References Skims_PA_cff::name, and name_.

Referenced by MuMatchWindow().

22 { name_ = name; }
std::string name_
Definition: MuMatchWindow.h:38

◆ SetUpper() [1/2]

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

Definition at line 19 of file MuMatchWindow.cc.

References f, and pfMETCorrectionType0_cfi::formula.

19  {
20  TF1 f("tmp", formula.c_str(), 0, 1000);
21  SetUpper(&f);
22 }
void SetUpper(std::string formula)
double f[11][100]

◆ SetUpper() [2/2]

void MuMatchWindow::SetUpper ( TF1 *  formula)

Definition at line 36 of file MuMatchWindow.cc.

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

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 }
std::shared_ptr< TF1 > fHigh_
Definition: MuMatchWindow.h:41
std::string name_
Definition: MuMatchWindow.h:38

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().