CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions
BPHDecayToResTrkTrkSameMassBuilder< ProdType, ResType > Class Template Reference

#include <BPHDecayToResTrkTrkSameMassBuilder.h>

Inheritance diagram for BPHDecayToResTrkTrkSameMassBuilder< ProdType, ResType >:
BPHDecayToResTrkTrkSameMassBuilderBase BPHDecayConstrainedBuilder< ProdType, ResType > BPHDecayConstrainedBuilderBase BPHDecayConstrainedBuilderBase BPHDecayGenericBuilder< ProdType > BPHDecayGenericBuilderBase BPHDecayGenericBuilderBase BPHDecayGenericBuilderBase

Public Member Functions

 BPHDecayToResTrkTrkSameMassBuilder (const BPHEventSetupWrapper &es, const std::string &resName, double resMass, double resWidth, const std::vector< res_ptr > &resCollection, const std::string &posName, const std::string &negName, double trkMass, double trkSigma, const BPHRecoBuilder::BPHGenericCollection *posCollection, const BPHRecoBuilder::BPHGenericCollection *negCollection)
 
 BPHDecayToResTrkTrkSameMassBuilder (const BPHDecayToResTrkTrkSameMassBuilder &x)=delete
 
BPHDecayToResTrkTrkSameMassBuilderoperator= (const BPHDecayToResTrkTrkSameMassBuilder &x)=delete
 
 ~BPHDecayToResTrkTrkSameMassBuilder () override=default
 
- Public Member Functions inherited from BPHDecayToResTrkTrkSameMassBuilderBase
 BPHDecayToResTrkTrkSameMassBuilderBase (const BPHEventSetupWrapper &es, const std::string &resName, double resMass, double resWidth, const std::string &posName, const std::string &negName, double trkMass, double trkSigma, const BPHRecoBuilder::BPHGenericCollection *posCollection, const BPHRecoBuilder::BPHGenericCollection *negCollection)
 
 BPHDecayToResTrkTrkSameMassBuilderBase (const BPHDecayToResTrkTrkSameMassBuilderBase &x)=delete
 
double getTrkEtaMax () const
 
double getTrkPtMin () const
 get current cuts More...
 
BPHDecayToResTrkTrkSameMassBuilderBaseoperator= (const BPHDecayToResTrkTrkSameMassBuilderBase &x)=delete
 
void setTrkEtaMax (double eta)
 
void setTrkPtMin (double pt)
 set cuts More...
 
 ~BPHDecayToResTrkTrkSameMassBuilderBase () override=default
 
- Public Member Functions inherited from BPHDecayConstrainedBuilderBase
 BPHDecayConstrainedBuilderBase (const BPHEventSetupWrapper &es, const std::string &resName, double resMass, double resWidth)
 
 BPHDecayConstrainedBuilderBase (const BPHDecayConstrainedBuilderBase &x)=delete
 
bool getConstr () const
 
BPHMassFitSelectgetMassFitSelect () const
 
double getResMassMax () const
 
double getResMassMin () const
 get current cuts More...
 
BPHDecayConstrainedBuilderBaseoperator= (const BPHDecayConstrainedBuilderBase &x)=delete
 
void setConstr (bool flag)
 
void setMassFitSelect (BPHMassFitSelect *mfs)
 
void setResMassMax (double m)
 
void setResMassMin (double m)
 set cuts More...
 
void setResMassRange (double mMin, double mMax)
 
 ~BPHDecayConstrainedBuilderBase () 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 BPHDecayConstrainedBuilder< ProdType, ResType >
 BPHDecayConstrainedBuilder (const BPHEventSetupWrapper &es, const std::string &resName, double resMass, double resWidth, const std::vector< res_ptr > &resCollection)
 
 BPHDecayConstrainedBuilder (const BPHDecayConstrainedBuilder &x)=delete
 
BPHDecayConstrainedBuilderoperator= (const BPHDecayConstrainedBuilder &x)=delete
 
 ~BPHDecayConstrainedBuilder () override=default
 
- 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

 BPHDecayToResTrkTrkSameMassBuilder (const std::vector< res_ptr > &resCollection, const std::string &posName, const std::string &negName, double trkMass, double trkSigma, const BPHRecoBuilder::BPHGenericCollection *posCollection, const BPHRecoBuilder::BPHGenericCollection *negCollection)
 
void fillRecList () override
 
- Protected Member Functions inherited from BPHDecayToResTrkTrkSameMassBuilderBase
 BPHDecayToResTrkTrkSameMassBuilderBase (const std::string &posName, const std::string &negName, double trkMass, double trkSigma, const BPHRecoBuilder::BPHGenericCollection *posCollection, const BPHRecoBuilder::BPHGenericCollection *negCollection)
 
void fillTrkTrkList ()
 
- Protected Member Functions inherited from BPHDecayConstrainedBuilderBase
 BPHDecayConstrainedBuilderBase (const std::string &resName, double resMass, double resWidth, bool createFitSelObject=true)
 
 BPHDecayConstrainedBuilderBase ()
 
virtual BPHMassFitSelectmassFitSelector (double mMin, double mMax)
 
- Protected Member Functions inherited from BPHDecayConstrainedBuilder< ProdType, ResType >
void addResCollection (BPHRecoBuilder &brb) override
 
 BPHDecayConstrainedBuilder (const std::vector< res_ptr > &resCollection)
 
- Protected Member Functions inherited from BPHDecayGenericBuilder< ProdType >
 BPHDecayGenericBuilder ()
 

Additional Inherited Members

- Public Types inherited from BPHDecayConstrainedBuilder< ProdType, ResType >
typedef ResType::const_pointer res_ptr
 
- Public Types inherited from BPHDecayGenericBuilder< ProdType >
typedef ProdType::const_pointer prod_ptr
 
- Protected Attributes inherited from BPHDecayToResTrkTrkSameMassBuilderBase
double etaMax
 
const BPHRecoBuilder::BPHGenericCollectionnCollection
 
std::string nName
 
const BPHRecoBuilder::BPHGenericCollectionpCollection
 
std::string pName
 
double ptMin
 
double tMass
 
double tSigma
 
std::vector< BPHPlusMinusConstCandPtrttPairs
 
- Protected Attributes inherited from BPHDecayConstrainedBuilderBase
bool massConstr
 
bool mfSelForce
 
BPHMassSelectresoSel
 
double rMass
 
std::string rName
 
double rWidth
 
- Protected Attributes inherited from BPHDecayGenericBuilderBase
BPHChi2Selectchi2Sel
 
const BPHEventSetupWrapperevSetup
 
BPHMassSelectmassSel
 
BPHMassFitSelectmFitSel
 
double minPDiff
 
bool outdated
 
- Protected Attributes inherited from BPHDecayConstrainedBuilder< ProdType, ResType >
const std::vector< res_ptr > * rCollection
 
- Protected Attributes inherited from BPHDecayGenericBuilder< ProdType >
std::vector< prod_ptrrecList
 

Detailed Description

template<class ProdType, class ResType>
class BPHDecayToResTrkTrkSameMassBuilder< ProdType, ResType >

Description: Class to build a particle decaying to a resonance, decaying itself to an opposite charged particles pair, and two additional opposite charged particles pair

Author
Paolo Ronchese INFN Padova

Definition at line 46 of file BPHDecayToResTrkTrkSameMassBuilder.h.

Constructor & Destructor Documentation

◆ BPHDecayToResTrkTrkSameMassBuilder() [1/3]

template<class ProdType, class ResType>
BPHDecayToResTrkTrkSameMassBuilder< ProdType, ResType >::BPHDecayToResTrkTrkSameMassBuilder ( const BPHEventSetupWrapper es,
const std::string &  resName,
double  resMass,
double  resWidth,
const std::vector< res_ptr > &  resCollection,
const std::string &  posName,
const std::string &  negName,
double  trkMass,
double  trkSigma,
const BPHRecoBuilder::BPHGenericCollection posCollection,
const BPHRecoBuilder::BPHGenericCollection negCollection 
)
inline

Constructor

Definition at line 54 of file BPHDecayToResTrkTrkSameMassBuilder.h.

65  : BPHDecayGenericBuilderBase(es, nullptr),
66  BPHDecayConstrainedBuilderBase(resName, resMass, resWidth),
67  BPHDecayToResTrkTrkSameMassBuilderBase(posName, negName, trkMass, trkSigma, posCollection, negCollection),
BPHDecayToResTrkTrkSameMassBuilderBase(const BPHEventSetupWrapper &es, const std::string &resName, double resMass, double resWidth, const std::string &posName, const std::string &negName, double trkMass, double trkSigma, const BPHRecoBuilder::BPHGenericCollection *posCollection, const BPHRecoBuilder::BPHGenericCollection *negCollection)

◆ BPHDecayToResTrkTrkSameMassBuilder() [2/3]

template<class ProdType, class ResType>
BPHDecayToResTrkTrkSameMassBuilder< ProdType, ResType >::BPHDecayToResTrkTrkSameMassBuilder ( const BPHDecayToResTrkTrkSameMassBuilder< ProdType, ResType > &  x)
delete

◆ ~BPHDecayToResTrkTrkSameMassBuilder()

template<class ProdType, class ResType>
BPHDecayToResTrkTrkSameMassBuilder< ProdType, ResType >::~BPHDecayToResTrkTrkSameMassBuilder ( )
overridedefault

Destructor

◆ BPHDecayToResTrkTrkSameMassBuilder() [3/3]

template<class ProdType, class ResType>
BPHDecayToResTrkTrkSameMassBuilder< ProdType, ResType >::BPHDecayToResTrkTrkSameMassBuilder ( const std::vector< res_ptr > &  resCollection,
const std::string &  posName,
const std::string &  negName,
double  trkMass,
double  trkSigma,
const BPHRecoBuilder::BPHGenericCollection posCollection,
const BPHRecoBuilder::BPHGenericCollection negCollection 
)
inlineprotected

Definition at line 79 of file BPHDecayToResTrkTrkSameMassBuilder.h.

86  : BPHDecayToResTrkTrkSameMassBuilderBase(posName, negName, trkMass, trkSigma, posCollection, negCollection),
BPHDecayToResTrkTrkSameMassBuilderBase(const BPHEventSetupWrapper &es, const std::string &resName, double resMass, double resWidth, const std::string &posName, const std::string &negName, double trkMass, double trkSigma, const BPHRecoBuilder::BPHGenericCollection *posCollection, const BPHRecoBuilder::BPHGenericCollection *negCollection)

Member Function Documentation

◆ fillRecList()

template<class ProdType, class ResType>
void BPHDecayToResTrkTrkSameMassBuilder< ProdType, ResType >::fillRecList ( )
inlineoverrideprotectedvirtual

Implements BPHDecayGenericBuilderBase.

Definition at line 89 of file BPHDecayToResTrkTrkSameMassBuilder.h.

89  {
90  std::vector<res_ptr> resList;
91  int nRes = this->rCollection->size();
92  int iRes;
93  resList.reserve(nRes);
94  for (iRes = 0; iRes < nRes; ++iRes) {
95  const res_ptr& rCand = this->rCollection->at(iRes);
96  if (this->resoSel->accept(*rCand))
97  resList.push_back(rCand);
98  }
99  if (resList.empty())
100  return;
101  nRes = resList.size();
102 
103  fillTrkTrkList();
104  if (ttPairs.empty())
105  return;
106 
107  int nPair = ttPairs.size();
108  int iPair;
109  for (iPair = 0; iPair < nPair; ++iPair) {
110  const BPHPlusMinusConstCandPtr tt = ttPairs[iPair];
111  for (iRes = 0; iRes < nRes; ++iRes) {
112  ProdType* cand = new ProdType(evSetup);
113  prod_ptr cPtr(cand);
114  cand->add(rName, resList[iRes]);
115  cand->add(pName, tt->originalReco(tt->getDaug(pName)), tMass, tSigma);
116  cand->add(nName, tt->originalReco(tt->getDaug(nName)), tMass, tSigma);
117  if (!massSel->accept(*cand))
118  continue;
119  if ((chi2Sel != nullptr) && !chi2Sel->accept(*cand))
120  continue;
121  if (!mFitSel->accept(*cand))
122  continue;
123  this->recList.push_back(cPtr);
124  }
125  }
126  ttPairs.clear();
127 
128  return;
129  }
ProdType::const_pointer prod_ptr
bool accept(const BPHDecayVertex &cand) const override
select vertex
Definition: BPHChi2Select.h:48
bool accept(const BPHDecayMomentum &cand) const override
select particle
Definition: BPHMassSelect.h:48
const BPHEventSetupWrapper * evSetup
BPHGenericPtr< const BPHPlusMinusCandidate >::type BPHPlusMinusConstCandPtr
const std::vector< res_ptr > * rCollection
std::vector< prod_ptr > recList
bool accept(const BPHKinematicFit &cand) const override
select particle

◆ operator=()

template<class ProdType, class ResType>
BPHDecayToResTrkTrkSameMassBuilder& BPHDecayToResTrkTrkSameMassBuilder< ProdType, ResType >::operator= ( const BPHDecayToResTrkTrkSameMassBuilder< ProdType, ResType > &  x)
delete