CMS 3D CMS Logo

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);
75  b.setMassRange(getMassMin(), getMassMax());
76  b.setProbMin(getProbMin());
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 }
BPHDecayToChargedXXbarBuilder.h
V0Monitor_cff.v0
v0
Definition: V0Monitor_cff.py:7
BPHDecayToV0Builder::p2Name
std::string p2Name
Definition: BPHDecayToV0Builder.h:92
BPHDecayGenericBuilder::getMassMax
double getMassMax() const
Definition: BPHDecayGenericBuilder.h:63
BPHDecayToV0Builder::v0Type
v0Type
Definition: BPHDecayToV0Builder.h:43
BPHPlusMinusCandidatePtr
BPHGenericPtr< BPHPlusMinusCandidate >::type BPHPlusMinusCandidatePtr
Definition: BPHPlusMinusCandidatePtr.h:7
BPHDecayToV0Builder
Definition: BPHDecayToV0Builder.h:41
BPHDecayToV0Builder::p1Name
std::string p1Name
Definition: BPHDecayToV0Builder.h:91
BPHDecayToV0SameMassBuilder::pMass
double pMass
Definition: BPHDecayToV0SameMassBuilder.h:74
BPHDecayToV0Builder::ptMin
double ptMin
Definition: BPHDecayToV0Builder.h:100
BPHDecayToV0SameMassBuilder.h
BPHDecayToV0SameMassBuilder::BPHDecayToV0SameMassBuilder
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)
Definition: BPHDecayToV0SameMassBuilder.cc:34
b
double b
Definition: hdecay.h:118
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
BPHDecayGenericBuilder::getProbMin
double getProbMin() const
Definition: BPHDecayGenericBuilder.h:64
BPHDecayGenericBuilder::evSetup
const edm::EventSetup * evSetup
Definition: BPHDecayGenericBuilder.h:73
BPHDecayToV0Builder::p1Collection
const BPHRecoBuilder::BPHGenericCollection * p1Collection
Definition: BPHDecayToV0Builder.h:94
BPHDecayToV0SameMassBuilder::buildFromBPHGenericCollection
void buildFromBPHGenericCollection() override
build candidates and link to V0
Definition: BPHDecayToV0SameMassBuilder.cc:70
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
cand
Definition: decayParser.h:32
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
newFWLiteAna.searchList
searchList
Definition: newFWLiteAna.py:119
BPHDecayToV0Builder::p2Collection
const BPHRecoBuilder::BPHGenericCollection * p2Collection
Definition: BPHDecayToV0Builder.h:95
BPHDecayToV0Builder::etaMax
double etaMax
Definition: BPHDecayToV0Builder.h:101
edm::EventSetup
Definition: EventSetup.h:58
BPHRecoBuilder.h
BPHDecayToV0SameMassBuilder::buildCandidate
BPHPlusMinusCandidatePtr buildCandidate(const reco::Candidate *c1, const reco::Candidate *c2, const void *v0, v0Type type) override
Definition: BPHDecayToV0SameMassBuilder.cc:83
reco::Candidate
Definition: Candidate.h:27
BPHRecoBuilder::BPHGenericCollection
Definition: BPHRecoBuilder.h:70
std
Definition: JetResolutionObject.h:76
BPHPlusMinusCandidate.h
BPHDecayToV0Builder::cList
std::vector< BPHPlusMinusConstCandPtr > cList
Definition: BPHDecayToV0Builder.h:89
BPHDecayToChargedXXbarBuilder
Definition: BPHDecayToChargedXXbarBuilder.h:42
BPHDecayToV0SameMassBuilder::~BPHDecayToV0SameMassBuilder
~BPHDecayToV0SameMassBuilder() override
Definition: BPHDecayToV0SameMassBuilder.cc:65
Candidate.h
BPHDecayToV0SameMassBuilder::pSigma
double pSigma
Definition: BPHDecayToV0SameMassBuilder.h:75
BPHGenericPtr::create
static type create(Args &&... args)
Definition: BPHGenericPtr.h:10
BPHDecayGenericBuilder::getMassMin
double getMassMin() const
get current cuts
Definition: BPHDecayGenericBuilder.h:62