CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
BPHDecayToV0SameMassBuilder.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 #include <cmath>
25 using namespace std;
26 
27 //-------------------
28 // Initializations --
29 //-------------------
30 
31 //----------------
32 // Constructors --
33 //----------------
35  const std::string& d1Name,
36  const std::string& d2Name,
37  double dMass,
38  double dSigma,
39  const BPHRecoBuilder::BPHGenericCollection* d1Collection,
40  const BPHRecoBuilder::BPHGenericCollection* d2Collection)
41  : BPHDecayToV0Builder(es, d1Name, d2Name, d1Collection, d2Collection), pMass(dMass), pSigma(dSigma) {}
42 
44  const std::string& d1Name,
45  const std::string& d2Name,
46  double dMass,
47  double dSigma,
48  const std::vector<reco::VertexCompositeCandidate>* v0Collection,
49  const std::string& searchList)
50  : BPHDecayToV0Builder(es, d1Name, d2Name, v0Collection, searchList), pMass(dMass), pSigma(dSigma) {}
51 
53  const edm::EventSetup& es,
54  const std::string& d1Name,
55  const std::string& d2Name,
56  double dMass,
57  double dSigma,
58  const std::vector<reco::VertexCompositePtrCandidate>* vpCollection,
59  const std::string& searchList)
60  : BPHDecayToV0Builder(es, d1Name, d2Name, vpCollection, searchList), pMass(dMass), pSigma(dSigma) {}
61 
62 //--------------
63 // Destructor --
64 //--------------
66 
67 //--------------
68 // Operations --
69 //--------------
72 
73  b.setPtMin(ptMin);
74  b.setEtaMax(etaMax);
77 
78  cList = b.build();
79 
80  return;
81 }
82 
84  const reco::Candidate* c2,
85  const void* v0,
86  v0Type type) {
88  if (c1->charge() > 0) {
89  cand->add(p1Name, c1, pMass, pSigma);
90  cand->add(p2Name, c2, pMass, pSigma);
91  } else {
92  cand->add(p1Name, c2, pMass, pSigma);
93  cand->add(p2Name, c1, pMass, pSigma);
94  }
95  return cand;
96 }
void buildFromBPHGenericCollection() override
build candidates and link to V0
const BPHRecoBuilder::BPHGenericCollection * p2Collection
void setMassRange(double mMin, double mMax)
std::vector< BPHPlusMinusConstCandPtr > build()
build Phi candidates
BPHGenericPtr< BPHPlusMinusCandidate >::type BPHPlusMinusCandidatePtr
BPHPlusMinusCandidatePtr buildCandidate(const reco::Candidate *c1, const reco::Candidate *c2, const void *v0, v0Type type) override
virtual int charge() const =0
electric charge
double getMassMin() const
get current cuts
const BPHRecoBuilder::BPHGenericCollection * p1Collection
std::vector< BPHPlusMinusConstCandPtr > cList
double b
Definition: hdecay.h:118
BPHDecayToV0SameMassBuilder(const edm::EventSetup &es, const std::string &d1Name, const std::string &d2Name, double dMass, double dSigma, const BPHRecoBuilder::BPHGenericCollection *d1Collection, const BPHRecoBuilder::BPHGenericCollection *d2Collection)
static type create(Args &&...args)
Definition: BPHGenericPtr.h:10
const edm::EventSetup * evSetup