CMS 3D CMS Logo

BPHDecayToResTrkTrkSameMassBuilderBase.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 //-------------------------------
22 
23 //---------------
24 // C++ Headers --
25 //---------------
26 using namespace std;
27 
28 //-------------------
29 // Initializations --
30 //-------------------
31 
32 //----------------
33 // Constructors --
34 //----------------
36  const BPHEventSetupWrapper& es,
37  const string& resName,
38  double resMass,
39  double resWidth,
40  const string& posName,
41  const std::string& negName,
42  double trkMass,
43  double trkSigma,
44  const BPHRecoBuilder::BPHGenericCollection* posCollection,
45  const BPHRecoBuilder::BPHGenericCollection* negCollection)
46  : BPHDecayGenericBuilderBase(es, nullptr),
47  BPHDecayConstrainedBuilderBase(resName, resMass, resWidth),
48  pName(posName),
49  nName(negName),
50  tMass(trkMass),
51  tSigma(trkSigma),
52  pCollection(posCollection),
53  nCollection(negCollection),
54  ptMin(0.0),
55  etaMax(100.0) {}
56 
58  const string& posName,
59  const std::string& negName,
60  double trkMass,
61  double trkSigma,
62  const BPHRecoBuilder::BPHGenericCollection* posCollection,
63  const BPHRecoBuilder::BPHGenericCollection* negCollection)
64  : pName(posName),
65  nName(negName),
66  tMass(trkMass),
67  tSigma(trkSigma),
68  pCollection(posCollection),
69  nCollection(negCollection),
70  ptMin(0.0),
71  etaMax(100.0) {}
72 
73 //--------------
74 // Operations --
75 //--------------
77  double mTotMax = massSel->getMassMax();
78 
80  ttBuilder.setPtMin(ptMin);
81  ttBuilder.setEtaMax(etaMax);
82  ttBuilder.setDzMax(1.0);
83  ttBuilder.setMassMin(0.0);
84  if (mTotMax >= 0.0)
85  ttBuilder.setMassMax(mTotMax - (0.8 * rMass));
86  else
87  ttBuilder.setMassMax(-1.0);
88  ttBuilder.setMinPDiff(minPDiff);
89 
90  ttPairs = ttBuilder.build();
91 
92  return;
93 }
94 
97  outdated = true;
98  ptMin = pt;
99  return;
100 }
101 
103  outdated = true;
104  etaMax = eta;
105  return;
106 }
constexpr float ptMin
virtual std::vector< prod_ptr > build()
build candidates
const BPHEventSetupWrapper * evSetup
const BPHRecoBuilder::BPHGenericCollection * pCollection
const BPHRecoBuilder::BPHGenericCollection * nCollection
double getMassMax() const
Definition: BPHMassCuts.h:59
common object to interface with edm collections
void setMinPDiff(double mpd)
track min p difference
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)