CMS 3D CMS Logo

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

#include <BPHMassFitSelect.h>

Inheritance diagram for BPHMassFitSelect:
BPHFitSelect BPHMassCuts

Public Member Functions

bool accept (const BPHKinematicFit &cand) const override
 select particle More...
 
 BPHMassFitSelect (const BPHMassFitSelect &x)=delete
 
 BPHMassFitSelect (const std::string &name, double mass, double minMass, double maxMass)
 
 BPHMassFitSelect (const std::string &name, double mass, double sigma, double minMass, double maxMass)
 
 BPHMassFitSelect (const std::string &name, KinematicConstraint *c, double minMass, double maxMass)
 
 BPHMassFitSelect (const std::string &name, MultiTrackKinematicConstraint *c, double minMass, double maxMass)
 
 BPHMassFitSelect (double minMass, double maxMass)
 
const std::string & getConstrainedName () const
 get fit constraint More...
 
KinematicConstraintgetKC () const
 
double getMass () const
 
MultiTrackKinematicConstraintgetMultiTrackKC () const
 
double getSigma () const
 
BPHMassFitSelectoperator= (const BPHMassFitSelect &x)=delete
 
void setFitConstraint ()
 set fit constraint More...
 
void setFitConstraint (const std::string &name, double mass)
 
void setFitConstraint (const std::string &name, double mass, double sigma)
 
void setFitConstraint (const std::string &name, KinematicConstraint *c)
 
void setFitConstraint (const std::string &name, MultiTrackKinematicConstraint *c)
 
 ~BPHMassFitSelect () override
 
- Public Member Functions inherited from BPHFitSelect
 BPHFitSelect ()
 
 BPHFitSelect (const BPHFitSelect &x)=delete
 
BPHFitSelectoperator= (const BPHFitSelect &x)=delete
 
virtual ~BPHFitSelect ()
 
- Public Member Functions inherited from BPHMassCuts
 BPHMassCuts (const BPHMassCuts &x)=delete
 
 BPHMassCuts (double minMass, double maxMass)
 
double getMassMax () const
 
double getMassMin () const
 get current mass cuts More...
 
BPHMassCutsoperator= (const BPHMassCuts &x)=delete
 
void setMassMax (double m)
 
void setMassMin (double m)
 set mass cuts More...
 
virtual ~BPHMassCuts ()
 

Private Types

enum  fit_type {
  none, mcss, mcst, kf,
  mtkf
}
 

Private Attributes

double cMass
 
std::string cName
 
double cSigma
 
KinematicConstraintkc
 
MultiTrackKinematicConstraintmtkc
 
fit_type type
 

Additional Inherited Members

- Public Types inherited from BPHFitSelect
using AcceptArg = BPHKinematicFit
 
- Protected Attributes inherited from BPHMassCuts
double mMax
 
double mMin
 

Detailed Description

Description: Class for candidate selection by invariant mass (at kinematic fit level)

Author
Paolo Ronchese INFN Padova

Definition at line 34 of file BPHMassFitSelect.h.

Member Enumeration Documentation

◆ fit_type

Enumerator
none 
mcss 
mcst 
kf 
mtkf 

Definition at line 143 of file BPHMassFitSelect.h.

143 { none, mcss, mcst, kf, mtkf };

Constructor & Destructor Documentation

◆ BPHMassFitSelect() [1/6]

BPHMassFitSelect::BPHMassFitSelect ( double  minMass,
double  maxMass 
)
inline

Constructor

Definition at line 38 of file BPHMassFitSelect.h.

References setFitConstraint().

◆ BPHMassFitSelect() [2/6]

BPHMassFitSelect::BPHMassFitSelect ( const std::string &  name,
double  mass,
double  sigma,
double  minMass,
double  maxMass 
)
inline

Definition at line 40 of file BPHMassFitSelect.h.

42  setFitConstraint(name, mass, sigma);
43  }

References EgHLTOffHistBins_cfi::mass, Skims_PA_cff::name, and setFitConstraint().

◆ BPHMassFitSelect() [3/6]

BPHMassFitSelect::BPHMassFitSelect ( const std::string &  name,
double  mass,
double  minMass,
double  maxMass 
)
inline

◆ BPHMassFitSelect() [4/6]

BPHMassFitSelect::BPHMassFitSelect ( const std::string &  name,
KinematicConstraint c,
double  minMass,
double  maxMass 
)
inline

Definition at line 50 of file BPHMassFitSelect.h.

53  }

References c, Skims_PA_cff::name, and setFitConstraint().

◆ BPHMassFitSelect() [5/6]

BPHMassFitSelect::BPHMassFitSelect ( const std::string &  name,
MultiTrackKinematicConstraint c,
double  minMass,
double  maxMass 
)
inline

Definition at line 55 of file BPHMassFitSelect.h.

58  }

References c, Skims_PA_cff::name, and setFitConstraint().

◆ BPHMassFitSelect() [6/6]

BPHMassFitSelect::BPHMassFitSelect ( const BPHMassFitSelect x)
delete

◆ ~BPHMassFitSelect()

BPHMassFitSelect::~BPHMassFitSelect ( )
inlineoverride

Destructor

Definition at line 66 of file BPHMassFitSelect.h.

66 {}

Member Function Documentation

◆ accept()

bool BPHMassFitSelect::accept ( const BPHKinematicFit cand) const
inlineoverridevirtual

select particle

Operations

Implements BPHFitSelect.

Definition at line 71 of file BPHMassFitSelect.h.

71  {
72  switch (type) {
73  default:
74  case none:
75  break;
76  case mcss:
77  cand.kinematicTree(cName, cMass, cSigma);
78  break;
79  case mcst:
80  cand.kinematicTree(cName, cMass);
81  break;
82  case kf:
83  cand.kinematicTree(cName, kc);
84  break;
85  case mtkf:
86  cand.kinematicTree(cName, mtkc);
87  break;
88  }
89  double mass = cand.p4().mass();
90  return ((mass >= mMin) && (mass <= mMax));
91  }

Referenced by BPHX3872ToJPsiPiPiBuilder::build(), BPHDecayToResFlyingBuilder::build(), and esMonitoring.FDJsonServer::handle_accept().

◆ getConstrainedName()

const std::string& BPHMassFitSelect::getConstrainedName ( ) const
inline

get fit constraint

Definition at line 136 of file BPHMassFitSelect.h.

136 { return cName; }

References cName.

◆ getKC()

KinematicConstraint* BPHMassFitSelect::getKC ( ) const
inline

Definition at line 139 of file BPHMassFitSelect.h.

139 { return kc; }

References kc.

◆ getMass()

double BPHMassFitSelect::getMass ( ) const
inline

Definition at line 137 of file BPHMassFitSelect.h.

137 { return cMass; }

References cMass.

◆ getMultiTrackKC()

MultiTrackKinematicConstraint* BPHMassFitSelect::getMultiTrackKC ( ) const
inline

Definition at line 140 of file BPHMassFitSelect.h.

140 { return mtkc; }

References mtkc.

◆ getSigma()

double BPHMassFitSelect::getSigma ( ) const
inline

Definition at line 138 of file BPHMassFitSelect.h.

138 { return cSigma; }

References cSigma.

◆ operator=()

BPHMassFitSelect& BPHMassFitSelect::operator= ( const BPHMassFitSelect x)
delete

◆ setFitConstraint() [1/5]

void BPHMassFitSelect::setFitConstraint ( )
inline

set fit constraint

Definition at line 94 of file BPHMassFitSelect.h.

94  {
95  type = none;
96  cName = "";
97  cMass = -1.0;
98  cSigma = -1.0;
99  kc = nullptr;
100  mtkc = nullptr;
101  }

References cMass, cName, cSigma, kc, mtkc, and none.

Referenced by BPHMassFitSelect().

◆ setFitConstraint() [2/5]

void BPHMassFitSelect::setFitConstraint ( const std::string &  name,
double  mass 
)
inline

Definition at line 102 of file BPHMassFitSelect.h.

102  {
103  type = mcst;
104  cName = name;
105  cMass = mass;
106  cSigma = -1.0;
107  kc = nullptr;
108  mtkc = nullptr;
109  }

References cMass, cName, cSigma, kc, EgHLTOffHistBins_cfi::mass, mcst, mtkc, and Skims_PA_cff::name.

◆ setFitConstraint() [3/5]

void BPHMassFitSelect::setFitConstraint ( const std::string &  name,
double  mass,
double  sigma 
)
inline

Definition at line 110 of file BPHMassFitSelect.h.

110  {
111  type = mcss;
112  cName = name;
113  cMass = mass;
114  cSigma = sigma;
115  kc = nullptr;
116  mtkc = nullptr;
117  }

References cMass, cName, cSigma, kc, EgHLTOffHistBins_cfi::mass, mcss, mtkc, and Skims_PA_cff::name.

◆ setFitConstraint() [4/5]

void BPHMassFitSelect::setFitConstraint ( const std::string &  name,
KinematicConstraint c 
)
inline

Definition at line 118 of file BPHMassFitSelect.h.

118  {
119  type = kf;
120  cName = name;
121  cMass = -1.0;
122  cSigma = -1.0;
123  kc = c;
124  mtkc = nullptr;
125  }

References c, cMass, cName, cSigma, kc, kf, mtkc, and Skims_PA_cff::name.

◆ setFitConstraint() [5/5]

void BPHMassFitSelect::setFitConstraint ( const std::string &  name,
MultiTrackKinematicConstraint c 
)
inline

Definition at line 126 of file BPHMassFitSelect.h.

126  {
127  type = mtkf;
128  cName = name;
129  cMass = -1.0;
130  cSigma = -1.0;
131  kc = nullptr;
132  mtkc = c;
133  }

References c, cMass, cName, cSigma, kc, mtkc, mtkf, and Skims_PA_cff::name.

Member Data Documentation

◆ cMass

double BPHMassFitSelect::cMass
private

Definition at line 147 of file BPHMassFitSelect.h.

Referenced by getMass(), and setFitConstraint().

◆ cName

std::string BPHMassFitSelect::cName
private

Definition at line 146 of file BPHMassFitSelect.h.

Referenced by getConstrainedName(), and setFitConstraint().

◆ cSigma

double BPHMassFitSelect::cSigma
private

Definition at line 148 of file BPHMassFitSelect.h.

Referenced by getSigma(), and setFitConstraint().

◆ kc

KinematicConstraint* BPHMassFitSelect::kc
private

Definition at line 149 of file BPHMassFitSelect.h.

Referenced by getKC(), and setFitConstraint().

◆ mtkc

MultiTrackKinematicConstraint* BPHMassFitSelect::mtkc
private

Definition at line 150 of file BPHMassFitSelect.h.

Referenced by getMultiTrackKC(), and setFitConstraint().

◆ type

fit_type BPHMassFitSelect::type
private
BPHMassFitSelect::mcst
Definition: BPHMassFitSelect.h:143
BPHMassCuts::mMax
double mMax
Definition: BPHMassCuts.h:63
BPHMassFitSelect::cMass
double cMass
Definition: BPHMassFitSelect.h:147
BPHMassFitSelect::mtkc
MultiTrackKinematicConstraint * mtkc
Definition: BPHMassFitSelect.h:150
BPHMassFitSelect::mcss
Definition: BPHMassFitSelect.h:143
BPHMassFitSelect::kf
Definition: BPHMassFitSelect.h:143
BPHMassFitSelect::none
Definition: BPHMassFitSelect.h:143
BPHMassFitSelect::mtkf
Definition: BPHMassFitSelect.h:143
B2GTnPMonitor_cfi.maxMass
maxMass
Definition: B2GTnPMonitor_cfi.py:55
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
cand
Definition: decayParser.h:32
BPHMassFitSelect::cName
std::string cName
Definition: BPHMassFitSelect.h:146
BPHMassCuts::BPHMassCuts
BPHMassCuts(double minMass, double maxMass)
Definition: BPHMassCuts.h:35
BPHMassCuts::mMin
double mMin
Definition: BPHMassCuts.h:62
BPHMassFitSelect::kc
KinematicConstraint * kc
Definition: BPHMassFitSelect.h:149
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
B2GTnPMonitor_cfi.minMass
minMass
Definition: B2GTnPMonitor_cfi.py:54
BPHMassFitSelect::setFitConstraint
void setFitConstraint()
set fit constraint
Definition: BPHMassFitSelect.h:94
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
BPHMassFitSelect::cSigma
double cSigma
Definition: BPHMassFitSelect.h:148