CMS 3D CMS Logo

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

#include <BPHDecayToV0DiffMassBuilder.h>

Inheritance diagram for BPHDecayToV0DiffMassBuilder:
BPHDecayToV0Builder BPHDecayToTkpTknSymChargeBuilder BPHDecayGenericBuilderBase BPHDecayGenericBuilder< BPHPlusMinusCandidate > BPHDecayGenericBuilderBase BPHDecayGenericBuilder< BPHPlusMinusCandidate > BPHDecayGenericBuilderBase BPHDecayGenericBuilderBase BPHLambda0ToPPiBuilder

Public Member Functions

 BPHDecayToV0DiffMassBuilder (const BPHEventSetupWrapper &es, const std::string &daug1Name, double daug1Mass, double daug1Sigma, const std::string &daug2Name, double daug2Mass, double daug2Sigma, const BPHRecoBuilder::BPHGenericCollection *posCollection, const BPHRecoBuilder::BPHGenericCollection *negCollection, double expectedMass)
 
 BPHDecayToV0DiffMassBuilder (const BPHEventSetupWrapper &es, const std::string &daug1Name, double daug1Mass, double daug1Sigma, const std::string &daug2Name, double daug2Mass, double daug2Sigma, const std::vector< reco::VertexCompositeCandidate > *v0Collection, double expectedMass, const std::string &searchList="cfp")
 
 BPHDecayToV0DiffMassBuilder (const BPHEventSetupWrapper &es, const std::string &daug1Name, double daug1Mass, double daug1Sigma, const std::string &daug2Name, double daug2Mass, double daug2Sigma, const std::vector< reco::VertexCompositePtrCandidate > *vpCollection, double expectedMass, const std::string &searchList="cfp")
 
 BPHDecayToV0DiffMassBuilder (const BPHDecayToV0DiffMassBuilder &x)=delete
 
BPHDecayToV0DiffMassBuilderoperator= (const BPHDecayToV0DiffMassBuilder &x)=delete
 
void setEtaMax (double eta)
 
void setPtMin (double pt)
 set cuts More...
 
 ~BPHDecayToV0DiffMassBuilder () override=default
 
- Public Member Functions inherited from BPHDecayToV0Builder
 BPHDecayToV0Builder (const BPHEventSetupWrapper &es, const std::string &daug1Name, const std::string &daug2Name, const BPHRecoBuilder::BPHGenericCollection *daug1Collection, const BPHRecoBuilder::BPHGenericCollection *daug2Collection)
 
 BPHDecayToV0Builder (const BPHEventSetupWrapper &es, const std::string &daug1Name, const std::string &daug2Name, const std::vector< reco::VertexCompositeCandidate > *v0Collection, const std::string &searchList="cfp")
 
 BPHDecayToV0Builder (const BPHEventSetupWrapper &es, const std::string &daug1Name, const std::string &daug2Name, const std::vector< reco::VertexCompositePtrCandidate > *vpCollection, const std::string &searchList="cfp")
 
 BPHDecayToV0Builder (const BPHDecayToV0Builder &x)=delete
 
BPHDecayToV0Builderoperator= (const BPHDecayToV0Builder &x)=delete
 
 ~BPHDecayToV0Builder () override
 
- Public Member Functions inherited from BPHDecayGenericBuilderBase
 BPHDecayGenericBuilderBase ()
 
 BPHDecayGenericBuilderBase (const BPHEventSetupWrapper &es, BPHMassFitSelect *mfs=new BPHMassFitSelect(-2.0e+06, -1.0e+06))
 
 BPHDecayGenericBuilderBase (const BPHDecayGenericBuilderBase &x)=delete
 
double getMassFitMax () const
 
double getMassFitMin () const
 
double getMassMax () const
 
double getMassMin () const
 get current cuts More...
 
double getMinPDiff ()
 
double getProbMin () const
 
BPHDecayGenericBuilderBaseoperator= (const BPHDecayGenericBuilderBase &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 ~BPHDecayGenericBuilderBase ()
 
- Public Member Functions inherited from BPHDecayGenericBuilder< BPHPlusMinusCandidate >
 BPHDecayGenericBuilder (const BPHEventSetupWrapper &es, BPHMassFitSelect *mfs)
 
 BPHDecayGenericBuilder (const BPHDecayGenericBuilder &x)=delete
 
virtual std::vector< prod_ptrbuild ()
 build candidates More...
 
BPHDecayGenericBuilderoperator= (const BPHDecayGenericBuilder &x)=delete
 
 ~BPHDecayGenericBuilder () override=default
 
- Public Member Functions inherited from BPHDecayToTkpTknSymChargeBuilder
 BPHDecayToTkpTknSymChargeBuilder (const BPHEventSetupWrapper &es, const std::string &daug1Name, double daug1Mass, double daug1Sigma, const std::string &daug2Name, double daug2Mass, double daug2Sigma, const BPHRecoBuilder::BPHGenericCollection *posCollection, const BPHRecoBuilder::BPHGenericCollection *negCollection, double expectedMass)
 
 BPHDecayToTkpTknSymChargeBuilder (const BPHDecayToTkpTknSymChargeBuilder &x)=delete
 
double getDzMax () const
 
double getTrk1EtaMax () const
 
double getTrk1PtMin () const
 get current cuts More...
 
double getTrk2EtaMax () const
 
double getTrk2PtMin () const
 
BPHDecayToTkpTknSymChargeBuilderoperator= (const BPHDecayToTkpTknSymChargeBuilder &x)=delete
 
void setDzMax (double dz)
 
void setTrk1EtaMax (double eta)
 
void setTrk1PtMin (double pt)
 set cuts More...
 
void setTrk2EtaMax (double eta)
 
void setTrk2PtMin (double pt)
 
 ~BPHDecayToTkpTknSymChargeBuilder () override=default
 

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 Member Functions inherited from BPHDecayGenericBuilder< BPHPlusMinusCandidate >
 BPHDecayGenericBuilder ()
 

Protected Attributes

double expMass
 
double p1Mass
 
double p1Sigma
 
double p2Mass
 
double p2Sigma
 
- Protected Attributes inherited from BPHDecayToV0Builder
const BPHRecoBuilder::BPHGenericCollectionp1Collection
 
std::string p1Name
 
const BPHRecoBuilder::BPHGenericCollectionp2Collection
 
std::string p2Name
 
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 BPHDecayGenericBuilderBase
BPHChi2Selectchi2Sel
 
const BPHEventSetupWrapperevSetup
 
BPHMassSelectmassSel
 
BPHMassFitSelectmFitSel
 
double minPDiff
 
bool outdated
 
- Protected Attributes inherited from BPHDecayGenericBuilder< BPHPlusMinusCandidate >
std::vector< prod_ptrrecList
 

Private Member Functions

void fillRecList () override
 build candidates More...
 

Additional Inherited Members

- Public Types inherited from BPHDecayToV0Builder
enum  v0Type { VertexCompositeCandidate, VertexCompositePtrCandidate }
 
- Public Types inherited from BPHDecayGenericBuilder< BPHPlusMinusCandidate >
typedef BPHPlusMinusCandidate ::const_pointer prod_ptr
 

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 40 of file BPHDecayToV0DiffMassBuilder.h.

Constructor & Destructor Documentation

◆ BPHDecayToV0DiffMassBuilder() [1/4]

BPHDecayToV0DiffMassBuilder::BPHDecayToV0DiffMassBuilder ( const BPHEventSetupWrapper es,
const std::string &  daug1Name,
double  daug1Mass,
double  daug1Sigma,
const std::string &  daug2Name,
double  daug2Mass,
double  daug2Sigma,
const BPHRecoBuilder::BPHGenericCollection posCollection,
const BPHRecoBuilder::BPHGenericCollection negCollection,
double  expectedMass 
)

Constructor

◆ BPHDecayToV0DiffMassBuilder() [2/4]

BPHDecayToV0DiffMassBuilder::BPHDecayToV0DiffMassBuilder ( const BPHEventSetupWrapper es,
const std::string &  daug1Name,
double  daug1Mass,
double  daug1Sigma,
const std::string &  daug2Name,
double  daug2Mass,
double  daug2Sigma,
const std::vector< reco::VertexCompositeCandidate > *  v0Collection,
double  expectedMass,
const std::string &  searchList = "cfp" 
)

◆ BPHDecayToV0DiffMassBuilder() [3/4]

BPHDecayToV0DiffMassBuilder::BPHDecayToV0DiffMassBuilder ( const BPHEventSetupWrapper es,
const std::string &  daug1Name,
double  daug1Mass,
double  daug1Sigma,
const std::string &  daug2Name,
double  daug2Mass,
double  daug2Sigma,
const std::vector< reco::VertexCompositePtrCandidate > *  vpCollection,
double  expectedMass,
const std::string &  searchList = "cfp" 
)

◆ BPHDecayToV0DiffMassBuilder() [4/4]

BPHDecayToV0DiffMassBuilder::BPHDecayToV0DiffMassBuilder ( const BPHDecayToV0DiffMassBuilder x)
delete

◆ ~BPHDecayToV0DiffMassBuilder()

BPHDecayToV0DiffMassBuilder::~BPHDecayToV0DiffMassBuilder ( )
overridedefault

Destructor

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 111 of file BPHDecayToV0DiffMassBuilder.cc.

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

114  {
117  BPHPlusMinusCandidate* cptrX = candX.get();
118  BPHPlusMinusCandidate* cptrY = candY.get();
119  cptrX->add(p1Name, c1, sList, p1Mass, p1Sigma);
120  cptrX->add(p2Name, c2, sList, p2Mass, p2Sigma);
121  cptrY->add(p1Name, c2, sList, p1Mass, p1Sigma);
122  cptrY->add(p2Name, c1, sList, p2Mass, p2Sigma);
123  double mv0 = 0.0;
124  switch (type) {
126  mv0 = static_cast<const reco::VertexCompositeCandidate*>(v0)->mass();
127  break;
129  mv0 = static_cast<const reco::VertexCompositePtrCandidate*>(v0)->mass();
130  break;
131  default:
132  mv0 = expMass;
133  break;
134  }
135  double m1 = 0.0;
136  double m2 = 0.0;
137  if (p1Mass > p2Mass) {
138  m1 = c1->mass();
139  m2 = c2->mass();
140  } else {
141  m1 = c2->mass();
142  m2 = c1->mass();
143  }
144  // check daughter masses in V0 CompositeCandidate
145  double mcut = (p1Mass + p2Mass) / 2;
146  if ((m1 > mcut) && (m2 < mcut))
147  return candX;
148  if ((m1 < mcut) && (m2 > mcut))
149  return candY;
150  // choose combination having the best invariant mass
151  return (fabs(mv0 - cptrX->mass()) < fabs(mv0 - cptrY->mass()) ? candX : candY);
152 }
virtual double mass() const =0
mass
const BPHEventSetupWrapper * evSetup
void add(const std::string &name, const reco::Candidate *daug, double mass=-1.0, double sigma=-1.0) override
BPHGenericPtr< BPHPlusMinusCandidate >::type BPHPlusMinusCandidatePtr
static type create(Args &&... args)
Definition: BPHGenericPtr.h:10
virtual ParticleMass mass() const

◆ buildFromBPHGenericCollection()

void BPHDecayToV0DiffMassBuilder::buildFromBPHGenericCollection ( )
overrideprotectedvirtual

build candidates and link to V0

Implements BPHDecayToV0Builder.

Definition at line 106 of file BPHDecayToV0DiffMassBuilder.cc.

References BPHDecayGenericBuilder< BPHPlusMinusCandidate >::build().

106  {
108  return;
109 }
virtual std::vector< prod_ptr > build()
build candidates

◆ fillRecList()

void BPHDecayToV0DiffMassBuilder::fillRecList ( )
inlineoverrideprivatevirtual

build candidates

Reimplemented from BPHDecayToTkpTknSymChargeBuilder.

Definition at line 112 of file BPHDecayToV0DiffMassBuilder.h.

References BPHDecayToV0Builder::fillRecList().

void fillRecList() override
build candidates

◆ operator=()

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

◆ setEtaMax()

void BPHDecayToV0DiffMassBuilder::setEtaMax ( double  eta)
inline

◆ setPtMin()

void BPHDecayToV0DiffMassBuilder::setPtMin ( double  pt)
inline

Member Data Documentation

◆ expMass

double BPHDecayToV0DiffMassBuilder::expMass
protected

Definition at line 101 of file BPHDecayToV0DiffMassBuilder.h.

Referenced by buildCandidate().

◆ p1Mass

double BPHDecayToV0DiffMassBuilder::p1Mass
protected

Definition at line 97 of file BPHDecayToV0DiffMassBuilder.h.

Referenced by buildCandidate().

◆ p1Sigma

double BPHDecayToV0DiffMassBuilder::p1Sigma
protected

Definition at line 99 of file BPHDecayToV0DiffMassBuilder.h.

Referenced by buildCandidate().

◆ p2Mass

double BPHDecayToV0DiffMassBuilder::p2Mass
protected

Definition at line 98 of file BPHDecayToV0DiffMassBuilder.h.

Referenced by buildCandidate().

◆ p2Sigma

double BPHDecayToV0DiffMassBuilder::p2Sigma
protected

Definition at line 100 of file BPHDecayToV0DiffMassBuilder.h.

Referenced by buildCandidate().