CMS 3D CMS Logo

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

#include <BPHDecayToV0DiffMassBuilder.h>

Inheritance diagram for BPHDecayToV0DiffMassBuilder:
BPHDecayToV0Builder BPHDecayGenericBuilder BPHLambda0ToPPiBuilder

Public Member Functions

 BPHDecayToV0DiffMassBuilder (const BPHDecayToV0DiffMassBuilder &x)=delete
 
 BPHDecayToV0DiffMassBuilder (const edm::EventSetup &es, const std::string &d1Name, double d1Mass, double d1Sigma, const std::string &d2Name, double d2Mass, double d2Sigma, const BPHRecoBuilder::BPHGenericCollection *posCollection, const BPHRecoBuilder::BPHGenericCollection *negCollection, double expectedMass)
 
 BPHDecayToV0DiffMassBuilder (const edm::EventSetup &es, const std::string &d1Name, double d1Mass, double d1Sigma, const std::string &d2Name, double d2Mass, double d2Sigma, const std::vector< reco::VertexCompositeCandidate > *v0Collection, double expectedMass, const std::string &searchList="cfp")
 
 BPHDecayToV0DiffMassBuilder (const edm::EventSetup &es, const std::string &d1Name, double d1Mass, double d1Sigma, const std::string &d2Name, double d2Mass, double d2Sigma, const std::vector< reco::VertexCompositePtrCandidate > *vpCollection, double expectedMass, const std::string &searchList="cfp")
 
BPHDecayToV0DiffMassBuilderoperator= (const BPHDecayToV0DiffMassBuilder &x)=delete
 
 ~BPHDecayToV0DiffMassBuilder () override
 
- Public Member Functions inherited from BPHDecayToV0Builder
 BPHDecayToV0Builder (const BPHDecayToV0Builder &x)=delete
 
 BPHDecayToV0Builder (const edm::EventSetup &es, const std::string &d1Name, const std::string &d2Name, const BPHRecoBuilder::BPHGenericCollection *d1Collection, const BPHRecoBuilder::BPHGenericCollection *d2Collection)
 
 BPHDecayToV0Builder (const edm::EventSetup &es, const std::string &d1Name, const std::string &d2Name, const std::vector< reco::VertexCompositeCandidate > *v0Collection, const std::string &searchList="cfp")
 
 BPHDecayToV0Builder (const edm::EventSetup &es, const std::string &d1Name, const std::string &d2Name, const std::vector< reco::VertexCompositePtrCandidate > *vpCollection, const std::string &searchList="cfp")
 
std::vector< BPHPlusMinusConstCandPtrbuild ()
 build candidates More...
 
double getEtaMax () const
 
double getPtMin () const
 get current cuts More...
 
BPHDecayToV0Builderoperator= (const BPHDecayToV0Builder &x)=delete
 
void setEtaMax (double eta)
 
void setPtMin (double pt)
 set cuts More...
 
 ~BPHDecayToV0Builder () override
 
- Public Member Functions inherited from BPHDecayGenericBuilder
 BPHDecayGenericBuilder (const BPHDecayGenericBuilder &x)=delete
 
 BPHDecayGenericBuilder (const edm::EventSetup &es, BPHMassFitSelect *mfs=nullptr)
 
double getMassFitMax () const
 
double getMassFitMin () const
 
double getMassMax () const
 
double getMassMin () const
 get current cuts More...
 
double getMinPDiff ()
 
double getProbMin () const
 
BPHDecayGenericBuilderoperator= (const BPHDecayGenericBuilder &x)=delete
 
void setMassFitMax (double m)
 
void setMassFitMin (double m)
 
void setMassFitRange (double mMin, double mMax)
 
void setMassMax (double m)
 
void setMassMin (double m)
 set cuts More...
 
void setMassRange (double mMin, double mMax)
 
void setMinPDiff (double mpd)
 track min p difference More...
 
void setProbMin (double p)
 
virtual ~BPHDecayGenericBuilder ()
 

Protected Member Functions

BPHPlusMinusCandidatePtr buildCandidate (const reco::Candidate *c1, const reco::Candidate *c2, const void *v0, v0Type type) override
 
void buildFromBPHGenericCollection () override
 build candidates and link to V0 More...
 
- Protected Member Functions inherited from BPHDecayToV0Builder
template<class T >
void buildFromV0 (const T *v0Collection, v0Type type)
 
void v0Clear ()
 

Protected Attributes

double expMass
 
double p1Mass
 
double p1Sigma
 
double p2Mass
 
double p2Sigma
 
- Protected Attributes inherited from BPHDecayToV0Builder
std::vector< BPHPlusMinusConstCandPtrcList
 
double etaMax
 
const BPHRecoBuilder::BPHGenericCollectionp1Collection
 
std::string p1Name
 
const BPHRecoBuilder::BPHGenericCollectionp2Collection
 
std::string p2Name
 
double ptMin
 
const std::vector< reco::VertexCompositePtrCandidate > * rCollection
 
std::string sList
 
std::map< const BPHRecoCandidate *, const V0Info * > v0Map
 
const std::vector< reco::VertexCompositeCandidate > * vCollection
 
- Protected Attributes inherited from BPHDecayGenericBuilder
BPHChi2Selectchi2Sel
 
const edm::EventSetupevSetup
 
BPHMassSelectmassSel
 
BPHMassFitSelectmFitSel
 
double minPDiff
 
bool updated
 

Additional Inherited Members

- Public Types inherited from BPHDecayToV0Builder
enum  v0Type { VertexCompositeCandidate, VertexCompositePtrCandidate }
 

Detailed Description

Description: Class to build neutral particles decaying to a V0, with daughters having different mass, starting from reco::Candidates or already reconstructed V0s

Author
Paolo Ronchese INFN Padova

Definition at line 39 of file BPHDecayToV0DiffMassBuilder.h.

Constructor & Destructor Documentation

◆ BPHDecayToV0DiffMassBuilder() [1/4]

BPHDecayToV0DiffMassBuilder::BPHDecayToV0DiffMassBuilder ( const edm::EventSetup es,
const std::string &  d1Name,
double  d1Mass,
double  d1Sigma,
const std::string &  d2Name,
double  d2Mass,
double  d2Sigma,
const BPHRecoBuilder::BPHGenericCollection posCollection,
const BPHRecoBuilder::BPHGenericCollection negCollection,
double  expectedMass 
)

Constructor

Definition at line 34 of file BPHDecayToV0DiffMassBuilder.cc.

44  : BPHDecayToV0Builder(es, d1Name, d2Name, posCollection, negCollection),
45  p1Mass(d1Mass),
46  p2Mass(d2Mass),
47  p1Sigma(d1Sigma),
48  p2Sigma(d2Sigma),
49  expMass(expectedMass) {}

◆ BPHDecayToV0DiffMassBuilder() [2/4]

BPHDecayToV0DiffMassBuilder::BPHDecayToV0DiffMassBuilder ( const edm::EventSetup es,
const std::string &  d1Name,
double  d1Mass,
double  d1Sigma,
const std::string &  d2Name,
double  d2Mass,
double  d2Sigma,
const std::vector< reco::VertexCompositeCandidate > *  v0Collection,
double  expectedMass,
const std::string &  searchList = "cfp" 
)

Definition at line 51 of file BPHDecayToV0DiffMassBuilder.cc.

61  : BPHDecayToV0Builder(es, d1Name, d2Name, v0Collection, searchList),
62  p1Mass(d1Mass),
63  p2Mass(d2Mass),
64  p1Sigma(d1Sigma),
65  p2Sigma(d2Sigma),
66  expMass(expectedMass) {}

◆ BPHDecayToV0DiffMassBuilder() [3/4]

BPHDecayToV0DiffMassBuilder::BPHDecayToV0DiffMassBuilder ( const edm::EventSetup es,
const std::string &  d1Name,
double  d1Mass,
double  d1Sigma,
const std::string &  d2Name,
double  d2Mass,
double  d2Sigma,
const std::vector< reco::VertexCompositePtrCandidate > *  vpCollection,
double  expectedMass,
const std::string &  searchList = "cfp" 
)

Definition at line 68 of file BPHDecayToV0DiffMassBuilder.cc.

79  : BPHDecayToV0Builder(es, d1Name, d2Name, vpCollection, searchList),
80  p1Mass(d1Mass),
81  p2Mass(d2Mass),
82  p1Sigma(d1Sigma),
83  p2Sigma(d2Sigma),
84  expMass(expectedMass) {}

◆ BPHDecayToV0DiffMassBuilder() [4/4]

BPHDecayToV0DiffMassBuilder::BPHDecayToV0DiffMassBuilder ( const BPHDecayToV0DiffMassBuilder x)
delete

◆ ~BPHDecayToV0DiffMassBuilder()

BPHDecayToV0DiffMassBuilder::~BPHDecayToV0DiffMassBuilder ( )
override

Destructor

Definition at line 89 of file BPHDecayToV0DiffMassBuilder.cc.

89 {}

Member Function Documentation

◆ buildCandidate()

BPHPlusMinusCandidatePtr BPHDecayToV0DiffMassBuilder::buildCandidate ( const reco::Candidate c1,
const reco::Candidate c2,
const void *  v0,
v0Type  type 
)
overrideprotectedvirtual

Implements BPHDecayToV0Builder.

Definition at line 110 of file BPHDecayToV0DiffMassBuilder.cc.

113  {
116  BPHPlusMinusCandidate* cptrX = candX.get();
117  BPHPlusMinusCandidate* cptrY = candY.get();
118  cptrX->add(p1Name, c1, sList, p1Mass, p1Sigma);
119  cptrX->add(p2Name, c2, sList, p2Mass, p2Sigma);
120  cptrY->add(p1Name, c2, sList, p1Mass, p1Sigma);
121  cptrY->add(p2Name, c1, sList, p2Mass, p2Sigma);
122  double mv0 = 0.0;
123  switch (type) {
125  mv0 = static_cast<const reco::VertexCompositeCandidate*>(v0)->mass();
126  break;
128  mv0 = static_cast<const reco::VertexCompositePtrCandidate*>(v0)->mass();
129  break;
130  default:
131  mv0 = expMass;
132  break;
133  }
134  double m1 = 0.0;
135  double m2 = 0.0;
136  if (p1Mass > p2Mass) {
137  m1 = c1->mass();
138  m2 = c2->mass();
139  } else {
140  m1 = c2->mass();
141  m2 = c1->mass();
142  }
143  // check daughter masses in V0 CompositeCandidate
144  double mcut = (p1Mass + p2Mass) / 2;
145  if ((m1 > mcut) && (m2 < mcut))
146  return candX;
147  if ((m1 < mcut) && (m2 > mcut))
148  return candY;
149  // choose combination having the best invariant mass
150  return (fabs(mv0 - cptrX->mass()) < fabs(mv0 - cptrY->mass()) ? candX : candY);
151 }

References BPHPlusMinusCandidate::add(), alignmentValidation::c1, BPHGenericPtr< T >::create(), BPHDecayGenericBuilder::evSetup, expMass, reco::Candidate::mass(), BPHKinematicFit::mass(), p1Mass, BPHDecayToV0Builder::p1Name, p1Sigma, p2Mass, BPHDecayToV0Builder::p2Name, p2Sigma, BPHDecayToV0Builder::sList, V0Monitor_cff::v0, BPHDecayToV0Builder::VertexCompositeCandidate, and BPHDecayToV0Builder::VertexCompositePtrCandidate.

◆ buildFromBPHGenericCollection()

void BPHDecayToV0DiffMassBuilder::buildFromBPHGenericCollection ( )
overrideprotectedvirtual

◆ operator=()

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

Member Data Documentation

◆ expMass

double BPHDecayToV0DiffMassBuilder::expMass
protected

Definition at line 87 of file BPHDecayToV0DiffMassBuilder.h.

Referenced by buildCandidate(), and buildFromBPHGenericCollection().

◆ p1Mass

double BPHDecayToV0DiffMassBuilder::p1Mass
protected

Definition at line 83 of file BPHDecayToV0DiffMassBuilder.h.

Referenced by buildCandidate(), and buildFromBPHGenericCollection().

◆ p1Sigma

double BPHDecayToV0DiffMassBuilder::p1Sigma
protected

Definition at line 85 of file BPHDecayToV0DiffMassBuilder.h.

Referenced by buildCandidate(), and buildFromBPHGenericCollection().

◆ p2Mass

double BPHDecayToV0DiffMassBuilder::p2Mass
protected

Definition at line 84 of file BPHDecayToV0DiffMassBuilder.h.

Referenced by buildCandidate(), and buildFromBPHGenericCollection().

◆ p2Sigma

double BPHDecayToV0DiffMassBuilder::p2Sigma
protected

Definition at line 86 of file BPHDecayToV0DiffMassBuilder.h.

Referenced by buildCandidate(), and buildFromBPHGenericCollection().

BPHDecayToV0Builder::VertexCompositePtrCandidate
Definition: BPHDecayToV0Builder.h:43
V0Monitor_cff.v0
v0
Definition: V0Monitor_cff.py:7
BPHDecayToV0Builder::VertexCompositeCandidate
Definition: BPHDecayToV0Builder.h:43
BPHDecayToV0Builder::p2Name
std::string p2Name
Definition: BPHDecayToV0Builder.h:92
BPHDecayGenericBuilder::getMassMax
double getMassMax() const
Definition: BPHDecayGenericBuilder.h:63
BPHDecayToV0Builder::BPHDecayToV0Builder
BPHDecayToV0Builder(const edm::EventSetup &es, const std::string &d1Name, const std::string &d2Name, const BPHRecoBuilder::BPHGenericCollection *d1Collection, const BPHRecoBuilder::BPHGenericCollection *d2Collection)
Definition: BPHDecayToV0Builder.cc:35
reco::Candidate::mass
virtual double mass() const =0
mass
BPHPlusMinusCandidatePtr
BPHGenericPtr< BPHPlusMinusCandidate >::type BPHPlusMinusCandidatePtr
Definition: BPHPlusMinusCandidatePtr.h:7
BPHPlusMinusCandidate
Definition: BPHPlusMinusCandidate.h:32
BPHDecayToV0Builder::p1Name
std::string p1Name
Definition: BPHDecayToV0Builder.h:91
BPHDecayToV0Builder::ptMin
double ptMin
Definition: BPHDecayToV0Builder.h:100
b
double b
Definition: hdecay.h:118
BPHDecayToV0Builder::sList
std::string sList
Definition: BPHDecayToV0Builder.h:98
BPHDecayGenericBuilder::getProbMin
double getProbMin() const
Definition: BPHDecayGenericBuilder.h:64
BPHDecayToV0DiffMassBuilder::expMass
double expMass
Definition: BPHDecayToV0DiffMassBuilder.h:87
BPHDecayToV0DiffMassBuilder::p2Sigma
double p2Sigma
Definition: BPHDecayToV0DiffMassBuilder.h:86
BPHDecayGenericBuilder::evSetup
const edm::EventSetup * evSetup
Definition: BPHDecayGenericBuilder.h:73
BPHDecayToV0Builder::p1Collection
const BPHRecoBuilder::BPHGenericCollection * p1Collection
Definition: BPHDecayToV0Builder.h:94
BPHDecayToV0DiffMassBuilder::p2Mass
double p2Mass
Definition: BPHDecayToV0DiffMassBuilder.h:84
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
newFWLiteAna.searchList
searchList
Definition: newFWLiteAna.py:119
BPHDecayToV0Builder::p2Collection
const BPHRecoBuilder::BPHGenericCollection * p2Collection
Definition: BPHDecayToV0Builder.h:95
BPHDecayToV0Builder::etaMax
double etaMax
Definition: BPHDecayToV0Builder.h:101
BPHKinematicFit::mass
virtual ParticleMass mass() const
Definition: BPHKinematicFit.cc:297
type
type
Definition: HCALResponse.h:21
BPHDecayToV0DiffMassBuilder::p1Mass
double p1Mass
Definition: BPHDecayToV0DiffMassBuilder.h:83
BPHDecayToV0Builder::cList
std::vector< BPHPlusMinusConstCandPtr > cList
Definition: BPHDecayToV0Builder.h:89
BPHDecayToV0DiffMassBuilder::p1Sigma
double p1Sigma
Definition: BPHDecayToV0DiffMassBuilder.h:85
BPHPlusMinusCandidate::add
void add(const std::string &name, const reco::Candidate *daug, double mass=-1.0, double sigma=-1.0) override
BPHGenericPtr::create
static type create(Args &&... args)
Definition: BPHGenericPtr.h:10
BPHDecayToTkpTknSymChargeBuilder
Definition: BPHDecayToTkpTknSymChargeBuilder.h:43
BPHDecayGenericBuilder::getMassMin
double getMassMin() const
get current cuts
Definition: BPHDecayGenericBuilder.h:62