CMS 3D CMS Logo

BPHDecayToResTrkBuilder.cc
Go to the documentation of this file.
1 /*
2  * See header file for a description of this class.
3  *
4  * \author Paolo Ronchese INFN Padova
5  *
6  */
7 
8 //-----------------------
9 // This Class' Header --
10 //-----------------------
12 
13 //-------------------------------
14 // Collaborating Class Headers --
15 //-------------------------------
20 
21 //---------------
22 // C++ Headers --
23 //---------------
24 using namespace std;
25 
26 //-------------------
27 // Initializations --
28 //-------------------
29 
30 //----------------
31 // Constructors --
32 //----------------
34  const std::string& resName,
35  double resMass,
36  double resWidth,
37  const std::vector<BPHPlusMinusConstCandPtr>& resCollection,
38  const std::string& trkName,
39  double trkMass,
40  double trkSigma,
41  const BPHRecoBuilder::BPHGenericCollection* trkCollection)
42  : BPHDecayConstrainedBuilder(es, resName, resMass, resWidth, resCollection),
43  tName(trkName),
44  tMass(trkMass),
45  tSigma(trkSigma),
46  tCollection(trkCollection),
47  tknVeto(new BPHParticleNeutralVeto),
48  ptSel(new BPHParticlePtSelect(0.0)),
49  etaSel(new BPHParticleEtaSelect(100.0)) {}
50 
51 //--------------
52 // Destructor --
53 //--------------
55  delete tknVeto;
56  delete ptSel;
57  delete etaSel;
58 }
59 
60 //--------------
61 // Operations --
62 //--------------
63 vector<BPHRecoConstCandPtr> BPHDecayToResTrkBuilder::build() {
64  if (updated)
65  return recList;
66 
67  recList.clear();
68 
69  BPHRecoBuilder brb(*evSetup);
71  brb.add(rName, *rCollection);
73  if (resoSel->getMassMax() > 0.0)
74  brb.filter(rName, *resoSel);
75  brb.filter(tName, *tknVeto);
76  if (ptSel->getPtMin() >= 0.0)
77  brb.filter(tName, *ptSel);
78  if (etaSel->getEtaMax() >= 0.0)
79  brb.filter(tName, *etaSel);
80 
81  if (massSel->getMassMax() >= 0.0)
82  brb.filter(*massSel);
83  if (chi2Sel->getProbMin() >= 0.0)
84  brb.filter(*chi2Sel);
85  if (mFitSel->getMassMax() >= 0.0)
86  brb.filter(*mFitSel);
87 
89  updated = true;
90  return recList;
91 }
92 
95  updated = false;
96  ptSel->setPtMin(pt);
97  return;
98 }
99 
101  updated = false;
102  etaSel->setEtaMax(eta);
103  return;
104 }
BPHParticleEtaSelect::setEtaMax
void setEtaMax(double eta)
set eta max
Definition: BPHParticleEtaSelect.h:50
BPHRecoBuilder::filter
void filter(const std::string &name, const BPHRecoSelect &sel) const
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
BPHChi2Select::getProbMin
double getProbMin() const
get current prob min
Definition: BPHChi2Select.h:66
BPHDecayToResTrkBuilder::build
std::vector< BPHRecoConstCandPtr > build()
build candidates
Definition: BPHDecayToResTrkBuilder.cc:63
BPHParticlePtSelect::getPtMin
double getPtMin() const
get current pt min
Definition: BPHParticlePtSelect.h:56
simpleEdmComparison.tName
tName
Definition: simpleEdmComparison.py:125
BPHDecayToResTrkBuilder::tMass
double tMass
Definition: BPHDecayToResTrkBuilder.h:79
BPHDecayConstrainedBuilder
Definition: BPHDecayConstrainedBuilder.h:37
BPHParticleEtaSelect
Definition: BPHParticleEtaSelect.h:30
BPHDecayToResTrkBuilder::recList
std::vector< BPHRecoConstCandPtr > recList
Definition: BPHDecayToResTrkBuilder.h:88
BPHDecayGenericBuilder::massSel
BPHMassSelect * massSel
Definition: BPHDecayGenericBuilder.h:75
BPHDecayConstrainedBuilder::resoSel
BPHMassSelect * resoSel
Definition: BPHDecayConstrainedBuilder.h:75
BPHDecayConstrainedBuilder::rCollection
const std::vector< BPHPlusMinusConstCandPtr > * rCollection
Definition: BPHDecayConstrainedBuilder.h:73
pseudoTop_cfi.tMass
tMass
Definition: pseudoTop_cfi.py:13
BPHDecayGenericBuilder::updated
bool updated
Definition: BPHDecayGenericBuilder.h:80
PVValHelper::eta
Definition: PVValidationHelpers.h:70
BPHRecoBuilder
Definition: BPHRecoBuilder.h:50
BPHDecayToResTrkBuilder::tCollection
const BPHRecoBuilder::BPHGenericCollection * tCollection
Definition: BPHDecayToResTrkBuilder.h:82
BPHParticleNeutralVeto
Definition: BPHParticleNeutralVeto.h:30
BPHDecayToResTrkBuilder::setTrkPtMin
void setTrkPtMin(double pt)
set cuts
Definition: BPHDecayToResTrkBuilder.cc:94
BPHParticleNeutralVeto.h
BPHParticlePtSelect
Definition: BPHParticlePtSelect.h:30
BPHRecoBuilder::setMinPDiffererence
void setMinPDiffererence(double pMin)
Definition: BPHRecoBuilder.cc:172
BPHDecayGenericBuilder::evSetup
const edm::EventSetup * evSetup
Definition: BPHDecayGenericBuilder.h:73
BPHParticleEtaSelect::getEtaMax
double getEtaMax() const
get current eta max
Definition: BPHParticleEtaSelect.h:56
BPHDecayGenericBuilder::chi2Sel
BPHChi2Select * chi2Sel
Definition: BPHDecayGenericBuilder.h:76
BPHDecayGenericBuilder::minPDiff
double minPDiff
Definition: BPHDecayGenericBuilder.h:79
BPHDecayGenericBuilder::mFitSel
BPHMassFitSelect * mFitSel
Definition: BPHDecayGenericBuilder.h:77
BPHDecayToResTrkBuilder::~BPHDecayToResTrkBuilder
~BPHDecayToResTrkBuilder() override
Definition: BPHDecayToResTrkBuilder.cc:54
BPHDecayToResTrkBuilder.h
BPHMassCuts::getMassMax
double getMassMax() const
Definition: BPHMassCuts.h:59
BPHDecayToResTrkBuilder::tName
std::string tName
Definition: BPHDecayToResTrkBuilder.h:78
edm::EventSetup
Definition: EventSetup.h:58
BPHRecoBuilder.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
BPHRecoBuilder::BPHGenericCollection
Definition: BPHRecoBuilder.h:70
BPHParticlePtSelect::setPtMin
void setPtMin(double pt)
set pt min
Definition: BPHParticlePtSelect.h:50
BPHDecayToResTrkBuilder::BPHDecayToResTrkBuilder
BPHDecayToResTrkBuilder(const edm::EventSetup &es, const std::string &resName, double resMass, double resWidth, const std::vector< BPHPlusMinusConstCandPtr > &resCollection, const std::string &trkName, double trkMass, double trkSigma, const BPHRecoBuilder::BPHGenericCollection *trkCollection)
Definition: BPHDecayToResTrkBuilder.cc:33
std
Definition: JetResolutionObject.h:76
BPHPlusMinusCandidate.h
BPHDecayConstrainedBuilder::rName
std::string rName
Definition: BPHDecayConstrainedBuilder.h:69
BPHDecayToResTrkBuilder::etaSel
BPHParticleEtaSelect * etaSel
Definition: BPHDecayToResTrkBuilder.h:86
BPHRecoCandidate::build
static std::vector< BPHRecoConstCandPtr > build(const BPHRecoBuilder &builder, double mass=-1, double msig=-1)
Definition: BPHRecoCandidate.cc:43
BPHRecoCandidate.h
BPHRecoBuilder::add
void add(const std::string &name, const BPHGenericCollection *collection, double mass=-1.0, double msig=-1.0)
BPHDecayToResTrkBuilder::ptSel
BPHParticlePtSelect * ptSel
Definition: BPHDecayToResTrkBuilder.h:85
BPHDecayToResTrkBuilder::setTrkEtaMax
void setTrkEtaMax(double eta)
Definition: BPHDecayToResTrkBuilder.cc:100
BPHDecayToResTrkBuilder::tknVeto
BPHParticleNeutralVeto * tknVeto
Definition: BPHDecayToResTrkBuilder.h:84
BPHDecayToResTrkBuilder::tSigma
double tSigma
Definition: BPHDecayToResTrkBuilder.h:80