CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
BPHDecayToFlyingCascadeBuilder< ProdType, FlyingType > Class Template Reference

#include <BPHDecayToFlyingCascadeBuilder.h>

Inheritance diagram for BPHDecayToFlyingCascadeBuilder< ProdType, FlyingType >:
BPHDecayToFlyingCascadeBuilderBase BPHDecayGenericBuilder< ProdType > BPHDecaySpecificBuilderBase BPHDecayGenericBuilderBase BPHDecayGenericBuilderBase BPHDecayToResFlyingBuilder< ProdType, ResType, FlyingType >

Public Types

typedef FlyingType::const_pointer flying_ptr
 
- Public Types inherited from BPHDecayGenericBuilder< ProdType >
typedef ProdType::const_pointer prod_ptr
 

Public Member Functions

 BPHDecayToFlyingCascadeBuilder (const BPHEventSetupWrapper &es, const std::string &flyName, double flyMass, double flyMSigma, const std::vector< flying_ptr > &flyCollection)
 
 BPHDecayToFlyingCascadeBuilder (const BPHDecayToFlyingCascadeBuilder &x)=delete
 
BPHDecayToFlyingCascadeBuilderoperator= (const BPHDecayToFlyingCascadeBuilder &x)=delete
 
 ~BPHDecayToFlyingCascadeBuilder () override=default
 
- Public Member Functions inherited from BPHDecayToFlyingCascadeBuilderBase
 BPHDecayToFlyingCascadeBuilderBase (const BPHEventSetupWrapper &es, const std::string &flyName, double flyMass, double flyMSigma)
 
 BPHDecayToFlyingCascadeBuilderBase (const BPHDecayToFlyingCascadeBuilderBase &x)=delete
 
const std::map< const BPHRecoCandidate *, const BPHRecoCandidate * > & daughMap () const
 get original daughters map More...
 
double getFlyingMassMax () const
 
double getFlyingMassMin () const
 get current cuts More...
 
double getKinFitProbMin () const
 
BPHDecayToFlyingCascadeBuilderBaseoperator= (const BPHDecayToFlyingCascadeBuilderBase &x)=delete
 
void setFlyingMassMax (double m)
 
void setFlyingMassMin (double m)
 set cuts More...
 
void setFlyingMassRange (double mMin, double mMax)
 
void setKinFitProbMin (double p)
 
 ~BPHDecayToFlyingCascadeBuilderBase () override
 
- Public Member Functions inherited from BPHDecaySpecificBuilderBase
virtual ~BPHDecaySpecificBuilderBase ()=default
 
- 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< ProdType >
 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
 

Protected Member Functions

void addFlyCollection (BPHRecoBuilder &brb) override
 
 BPHDecayToFlyingCascadeBuilder (const std::vector< flying_ptr > &flyCollection)
 
void fitAndFilter (std::vector< prod_ptr > &prodList)
 fit and select candidates More...
 
- Protected Member Functions inherited from BPHDecayToFlyingCascadeBuilderBase
 BPHDecayToFlyingCascadeBuilderBase (const std::string &flyName, double flyMass, double flyMSigma)
 
 BPHDecayToFlyingCascadeBuilderBase ()
 
- Protected Member Functions inherited from BPHDecaySpecificBuilderBase
virtual void fill (BPHRecoBuilder &brb, void *parameters)=0
 
virtual void setup (void *parameters)=0
 
- Protected Member Functions inherited from BPHDecayGenericBuilderBase
virtual void fillRecList ()=0
 
- Protected Member Functions inherited from BPHDecayGenericBuilder< ProdType >
 BPHDecayGenericBuilder ()
 

Protected Attributes

const std::vector< flying_ptr > * fCollection
 
- Protected Attributes inherited from BPHDecayToFlyingCascadeBuilderBase
std::map< const BPHRecoCandidate *, const BPHRecoCandidate * > dMap
 
BPHMassFitSelectflySel
 
double fMass
 
double fMSigma
 
std::string fName
 
BPHKinFitChi2SelectkfChi2Sel
 
- Protected Attributes inherited from BPHDecayGenericBuilderBase
BPHChi2Selectchi2Sel
 
const BPHEventSetupWrapperevSetup
 
BPHMassSelectmassSel
 
BPHMassFitSelectmFitSel
 
double minPDiff
 
bool outdated
 
- Protected Attributes inherited from BPHDecayGenericBuilder< ProdType >
std::vector< prod_ptrrecList
 

Private Attributes

std::vector< flying_ptrfCollectSel
 

Detailed Description

template<class ProdType, class FlyingType>
class BPHDecayToFlyingCascadeBuilder< ProdType, FlyingType >

Description: Class to build a particle having a flying particle in the final state, for generic particle types

Author
Paolo Ronchese INFN Padova

Definition at line 41 of file BPHDecayToFlyingCascadeBuilder.h.

Member Typedef Documentation

◆ flying_ptr

template<class ProdType, class FlyingType>
typedef FlyingType::const_pointer BPHDecayToFlyingCascadeBuilder< ProdType, FlyingType >::flying_ptr

Definition at line 45 of file BPHDecayToFlyingCascadeBuilder.h.

Constructor & Destructor Documentation

◆ BPHDecayToFlyingCascadeBuilder() [1/3]

template<class ProdType, class FlyingType>
BPHDecayToFlyingCascadeBuilder< ProdType, FlyingType >::BPHDecayToFlyingCascadeBuilder ( const BPHEventSetupWrapper es,
const std::string &  flyName,
double  flyMass,
double  flyMSigma,
const std::vector< flying_ptr > &  flyCollection 
)
inline

Constructor

Definition at line 49 of file BPHDecayToFlyingCascadeBuilder.h.

54  : BPHDecayGenericBuilderBase(es, nullptr),
55  BPHDecayToFlyingCascadeBuilderBase(flyName, flyMass, flyMSigma),
56  fCollection(&flyCollection) {}
const std::vector< flying_ptr > * fCollection

◆ BPHDecayToFlyingCascadeBuilder() [2/3]

template<class ProdType, class FlyingType>
BPHDecayToFlyingCascadeBuilder< ProdType, FlyingType >::BPHDecayToFlyingCascadeBuilder ( const BPHDecayToFlyingCascadeBuilder< ProdType, FlyingType > &  x)
delete

◆ ~BPHDecayToFlyingCascadeBuilder()

template<class ProdType, class FlyingType>
BPHDecayToFlyingCascadeBuilder< ProdType, FlyingType >::~BPHDecayToFlyingCascadeBuilder ( )
overridedefault

Destructor

◆ BPHDecayToFlyingCascadeBuilder() [3/3]

template<class ProdType, class FlyingType>
BPHDecayToFlyingCascadeBuilder< ProdType, FlyingType >::BPHDecayToFlyingCascadeBuilder ( const std::vector< flying_ptr > &  flyCollection)
inlineprotected

Definition at line 67 of file BPHDecayToFlyingCascadeBuilder.h.

67 : fCollection(&flyCollection) {}
const std::vector< flying_ptr > * fCollection

Member Function Documentation

◆ addFlyCollection()

template<class ProdType, class FlyingType>
void BPHDecayToFlyingCascadeBuilder< ProdType, FlyingType >::addFlyCollection ( BPHRecoBuilder brb)
inlineoverrideprotectedvirtual

Implements BPHDecayToFlyingCascadeBuilderBase.

Definition at line 71 of file BPHDecayToFlyingCascadeBuilder.h.

71  {
72  const std::vector<flying_ptr>& fc = *this->fCollection;
73  if (flySel->getMassMax() > 0.0) {
74  fCollectSel.clear();
75  fCollectSel.reserve(fc.size());
76  for (const flying_ptr& f : fc) {
77  if (flySel->accept(*f))
78  fCollectSel.push_back(f);
79  }
80  brb.add(fName, fCollectSel);
81  } else
82  brb.add(fName, *this->fCollection);
83  }
double f[11][100]
double getMassMax() const
Definition: BPHMassCuts.h:59
void add(const std::string &name, const BPHGenericCollection *collection, double mass=-1.0, double msig=-1.0)
const std::vector< flying_ptr > * fCollection
bool accept(const BPHKinematicFit &cand) const override
select particle

◆ fitAndFilter()

template<class ProdType, class FlyingType>
void BPHDecayToFlyingCascadeBuilder< ProdType, FlyingType >::fitAndFilter ( std::vector< prod_ptr > &  prodList)
inlineprotected

fit and select candidates

Definition at line 86 of file BPHDecayToFlyingCascadeBuilder.h.

Referenced by BPHDecayToResFlyingBuilder< BPHRecoCandidate, BPHPlusMinusCandidate, BPHPlusMinusCandidate >::fillRecList().

86  {
87  std::vector<prod_ptr> tempList;
88  int iRec;
89  int nRec = prodList.size();
90  tempList.reserve(nRec);
91  for (iRec = 0; iRec < nRec; ++iRec) {
92  prod_ptr& ctmp = prodList[iRec];
93  ProdType* cptr = ctmp->clone();
94  prod_ptr cand(cptr);
95  // fit for flying reconstruction
96  // indipendent from other particles
97  cptr->setIndependentFit(fName, true, fMass, fMSigma);
98  cptr->resetKinematicFit();
99  if ((mFitSel->getMassMax() >= 0) && (!mFitSel->accept(*cptr)))
100  continue;
101  const RefCountedKinematicVertex tdv = cptr->topDecayVertex();
102  if ((kfChi2Sel->getProbMin() >= 0) && !kfChi2Sel->accept(*cptr))
103  continue;
104  const std::vector<std::string>& cList = ctmp->compNames();
105  int iComp;
106  int nComp = cList.size();
107  for (iComp = 0; iComp < nComp; ++iComp) {
108  const std::string& cName = cList[iComp];
109  dMap[cand->getComp(cName).get()] = ctmp->getComp(cName).get();
110  }
111  tempList.push_back(cand);
112  }
113  prodList = tempList;
114  }
ProdType::const_pointer prod_ptr
std::map< const BPHRecoCandidate *, const BPHRecoCandidate * > dMap
bool accept(const BPHKinematicFit &cand) const override
select vertex
double getProbMin() const
get current prob min
double getMassMax() const
Definition: BPHMassCuts.h:59
bool accept(const BPHKinematicFit &cand) const override
select particle

◆ operator=()

template<class ProdType, class FlyingType>
BPHDecayToFlyingCascadeBuilder& BPHDecayToFlyingCascadeBuilder< ProdType, FlyingType >::operator= ( const BPHDecayToFlyingCascadeBuilder< ProdType, FlyingType > &  x)
delete

Member Data Documentation

◆ fCollection

template<class ProdType, class FlyingType>
const std::vector<flying_ptr>* BPHDecayToFlyingCascadeBuilder< ProdType, FlyingType >::fCollection
protected

◆ fCollectSel

template<class ProdType, class FlyingType>
std::vector<flying_ptr> BPHDecayToFlyingCascadeBuilder< ProdType, FlyingType >::fCollectSel
private