CMS 3D CMS Logo

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

#include <BPHDecayToResTrkBuilderBase.h>

Inheritance diagram for BPHDecayToResTrkBuilderBase:
BPHDecaySpecificBuilderBase BPHDecayConstrainedBuilderBase BPHDecayGenericBuilderBase BPHDecayToResTrkBuilder< ProdType, ResType > BPHDecayToResTrkBuilder< BPHRecoCandidate, BPHPlusMinusCandidate > BPHDecayToResTrkBuilder< BPHRecoCandidate, BPHRecoCandidate > BPHBcToJPsiPiBuilder BPHBuToJPsiKBuilder BPHBuToPsi2SKBuilder

Public Member Functions

 BPHDecayToResTrkBuilderBase (const BPHEventSetupWrapper &es, const std::string &resName, double resMass, double resWidth, const std::string &trkName, double trkMass, double trkSigma, const BPHRecoBuilder::BPHGenericCollection *trkCollection)
 
 BPHDecayToResTrkBuilderBase (const BPHDecayToResTrkBuilderBase &x)=delete
 
double getTrkEtaMax () const
 
double getTrkPtMin () const
 get current cuts More...
 
BPHDecayToResTrkBuilderBaseoperator= (const BPHDecayToResTrkBuilderBase &x)=delete
 
void setTrkEtaMax (double eta)
 
void setTrkPtMin (double pt)
 set cuts More...
 
 ~BPHDecayToResTrkBuilderBase () override
 
- Public Member Functions inherited from BPHDecaySpecificBuilderBase
virtual ~BPHDecaySpecificBuilderBase ()=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 ()
 

Protected Member Functions

 BPHDecayToResTrkBuilderBase (const std::string &trkName, double trkMass, double trkSigma, const BPHRecoBuilder::BPHGenericCollection *trkCollection)
 
void fill (BPHRecoBuilder &brb, void *parameters) override
 build candidates More...
 
- Protected Member Functions inherited from BPHDecaySpecificBuilderBase
virtual void setup (void *parameters)=0
 
- Protected Member Functions inherited from BPHDecayConstrainedBuilderBase
virtual void addResCollection (BPHRecoBuilder &brb)=0
 
 BPHDecayConstrainedBuilderBase (const std::string &resName, double resMass, double resWidth, bool createFitSelObject=true)
 
 BPHDecayConstrainedBuilderBase ()
 
virtual BPHMassFitSelectmassFitSelector (double mMin, double mMax)
 
- Protected Member Functions inherited from BPHDecayGenericBuilderBase
virtual void fillRecList ()=0
 

Protected Attributes

BPHParticleEtaSelectetaSel
 
BPHParticlePtSelectptSel
 
const BPHRecoBuilder::BPHGenericCollectiontCollection
 
BPHParticleNeutralVetotknVeto
 
double tMass
 
std::string tName
 
double tSigma
 
- 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
 

Private Member Functions

void swap (std::vector< const reco::Candidate *> *&l, std::vector< const reco::Candidate *> *&r)
 

Static Private Member Functions

static void filter (const std::vector< const reco::Candidate *> *s, std::vector< const reco::Candidate *> *d, BPHRecoSelect *f)
 

Private Attributes

std::vector< const reco::Candidate * > tCollectSel1
 
std::vector< const reco::Candidate * > tCollectSel2
 

Detailed Description

Description: Base class to build a particle decaying to a particle, decaying itself in cascade, and an additional track

Author
Paolo Ronchese INFN Padova

Definition at line 41 of file BPHDecayToResTrkBuilderBase.h.

Constructor & Destructor Documentation

◆ BPHDecayToResTrkBuilderBase() [1/3]

BPHDecayToResTrkBuilderBase::BPHDecayToResTrkBuilderBase ( const BPHEventSetupWrapper es,
const std::string &  resName,
double  resMass,
double  resWidth,
const std::string &  trkName,
double  trkMass,
double  trkSigma,
const BPHRecoBuilder::BPHGenericCollection trkCollection 
)

Constructor

◆ BPHDecayToResTrkBuilderBase() [2/3]

BPHDecayToResTrkBuilderBase::BPHDecayToResTrkBuilderBase ( const BPHDecayToResTrkBuilderBase x)
delete

◆ ~BPHDecayToResTrkBuilderBase()

BPHDecayToResTrkBuilderBase::~BPHDecayToResTrkBuilderBase ( )
override

Destructor

Definition at line 67 of file BPHDecayToResTrkBuilderBase.cc.

References etaSel, ptSel, and tknVeto.

67  {
68  delete tknVeto;
69  delete ptSel;
70  delete etaSel;
71 }

◆ BPHDecayToResTrkBuilderBase() [3/3]

BPHDecayToResTrkBuilderBase::BPHDecayToResTrkBuilderBase ( const std::string &  trkName,
double  trkMass,
double  trkSigma,
const BPHRecoBuilder::BPHGenericCollection trkCollection 
)
protected

Member Function Documentation

◆ fill()

void BPHDecayToResTrkBuilderBase::fill ( BPHRecoBuilder brb,
void *  parameters 
)
overrideprotectedvirtual

build candidates

Implements BPHDecaySpecificBuilderBase.

Definition at line 91 of file BPHDecayToResTrkBuilderBase.cc.

References BPHRecoBuilder::add(), BPHDecayConstrainedBuilderBase::addResCollection(), BPHDecayGenericBuilderBase::chi2Sel, BPHRecoBuilder::createCollection(), etaSel, filter(), BPHRecoBuilder::filter(), BPHRecoBuilder::BPHGenericCollection::get(), BPHParticleEtaSelect::getEtaMax(), BPHMassCuts::getMassMax(), BPHChi2Select::getProbMin(), BPHParticlePtSelect::getPtMin(), mps_fire::i, BPHDecayGenericBuilderBase::massSel, BPHDecayGenericBuilderBase::mFitSel, BPHDecayGenericBuilderBase::minPDiff, create_idmaps::n, ptSel, BPHRecoBuilder::BPHGenericCollection::searchList(), BPHRecoBuilder::setMinPDiffererence(), BPHDecaySpecificBuilderBase::setup(), BPHRecoBuilder::BPHGenericCollection::size(), pfDeepBoostedJetPreprocessParams_cfi::sv, swap(), tCollection, tCollectSel1, tCollectSel2, tMass, tName, and tSigma.

91  {
93  addResCollection(brb);
94  int i;
95  int n = tCollection->size();
96  tCollectSel1.clear();
97  tCollectSel1.reserve(n);
98  for (i = 0; i < n; ++i) {
100  if (cand.charge() != 0)
101  tCollectSel1.push_back(&cand);
102  }
103  vector<const reco::Candidate*>* dv = &tCollectSel1;
104  vector<const reco::Candidate*>* sv = &tCollectSel2;
105  if (ptSel->getPtMin() >= 0.0) {
106  swap(sv, dv);
107  filter(sv, dv, ptSel);
108  }
109  if (etaSel->getEtaMax() >= 0.0) {
110  swap(sv, dv);
111  filter(sv, dv, etaSel);
112  }
114 
115  if (massSel->getMassMax() >= 0.0)
116  brb.filter(*massSel);
117  if (chi2Sel->getProbMin() >= 0.0)
118  brb.filter(*chi2Sel);
119  if (mFitSel->getMassMax() >= 0.0)
120  brb.filter(*mFitSel);
121 
122  setup(parameters);
123 
124  return;
125 }
double getProbMin() const
get current prob min
Definition: BPHChi2Select.h:66
virtual void addResCollection(BPHRecoBuilder &brb)=0
void setMinPDiffererence(double pMin)
double getPtMin() const
get current pt min
static BPHGenericCollection * createCollection(const edm::Handle< T > &collection, const std::string &list="cfhpmig")
const std::string & searchList() const
void filter(const std::string &name, const BPHRecoSelect &sel) const
virtual const reco::Candidate & get(int i) const =0
double getMassMax() const
Definition: BPHMassCuts.h:59
const BPHRecoBuilder::BPHGenericCollection * tCollection
static void filter(const std::vector< const reco::Candidate *> *s, std::vector< const reco::Candidate *> *d, BPHRecoSelect *f)
void add(const std::string &name, const BPHGenericCollection *collection, double mass=-1.0, double msig=-1.0)
std::vector< const reco::Candidate * > tCollectSel2
virtual void setup(void *parameters)=0
void swap(std::vector< const reco::Candidate *> *&l, std::vector< const reco::Candidate *> *&r)
std::vector< const reco::Candidate * > tCollectSel1
double getEtaMax() const
get current eta max

◆ filter()

static void BPHDecayToResTrkBuilderBase::filter ( const std::vector< const reco::Candidate *> *  s,
std::vector< const reco::Candidate *> *  d,
BPHRecoSelect f 
)
inlinestaticprivate

Definition at line 96 of file BPHDecayToResTrkBuilderBase.h.

References ztail::d, f, mps_fire::i, create_idmaps::n, and alignCSCRings::s.

Referenced by fill().

98  {
99  int i;
100  int n = s->size();
101  d->clear();
102  d->reserve(n);
103  for (i = 0; i < n; ++i) {
104  if (f->accept(*s->at(i)))
105  d->push_back(s->at(i));
106  }
107  }
double f[11][100]
d
Definition: ztail.py:151

◆ getTrkEtaMax()

double BPHDecayToResTrkBuilderBase::getTrkEtaMax ( ) const
inline

◆ getTrkPtMin()

double BPHDecayToResTrkBuilderBase::getTrkPtMin ( ) const
inline

get current cuts

Definition at line 71 of file BPHDecayToResTrkBuilderBase.h.

References BPHParticlePtSelect::getPtMin(), and ptSel.

Referenced by BPHBuToJPsiKBuilder::getKPtMin(), BPHBuToPsi2SKBuilder::getKPtMin(), and BPHBcToJPsiPiBuilder::getPiPtMin().

71 { return ptSel->getPtMin(); }
double getPtMin() const
get current pt min

◆ operator=()

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

◆ setTrkEtaMax()

void BPHDecayToResTrkBuilderBase::setTrkEtaMax ( double  eta)

◆ setTrkPtMin()

void BPHDecayToResTrkBuilderBase::setTrkPtMin ( double  pt)

◆ swap()

void BPHDecayToResTrkBuilderBase::swap ( std::vector< const reco::Candidate *> *&  l,
std::vector< const reco::Candidate *> *&  r 
)
inlineprivate

Definition at line 108 of file BPHDecayToResTrkBuilderBase.h.

References MainPageGenerator::l, alignCSCRings::r, and submitPVValidationJobs::t.

Referenced by fill().

108  {
109  std::vector<const reco::Candidate*>* t = l;
110  l = r;
111  r = t;
112  }

Member Data Documentation

◆ etaSel

BPHParticleEtaSelect* BPHDecayToResTrkBuilderBase::etaSel
protected

◆ ptSel

BPHParticlePtSelect* BPHDecayToResTrkBuilderBase::ptSel
protected

◆ tCollection

const BPHRecoBuilder::BPHGenericCollection* BPHDecayToResTrkBuilderBase::tCollection
protected

Definition at line 84 of file BPHDecayToResTrkBuilderBase.h.

Referenced by fill().

◆ tCollectSel1

std::vector<const reco::Candidate*> BPHDecayToResTrkBuilderBase::tCollectSel1
private

Definition at line 94 of file BPHDecayToResTrkBuilderBase.h.

Referenced by fill().

◆ tCollectSel2

std::vector<const reco::Candidate*> BPHDecayToResTrkBuilderBase::tCollectSel2
private

Definition at line 95 of file BPHDecayToResTrkBuilderBase.h.

Referenced by fill().

◆ tknVeto

BPHParticleNeutralVeto* BPHDecayToResTrkBuilderBase::tknVeto
protected

Definition at line 86 of file BPHDecayToResTrkBuilderBase.h.

Referenced by ~BPHDecayToResTrkBuilderBase().

◆ tMass

double BPHDecayToResTrkBuilderBase::tMass
protected

Definition at line 81 of file BPHDecayToResTrkBuilderBase.h.

Referenced by fill().

◆ tName

std::string BPHDecayToResTrkBuilderBase::tName
protected

Definition at line 80 of file BPHDecayToResTrkBuilderBase.h.

Referenced by fill().

◆ tSigma

double BPHDecayToResTrkBuilderBase::tSigma
protected

Definition at line 82 of file BPHDecayToResTrkBuilderBase.h.

Referenced by fill().