File indexing completed on 2024-04-06 12:15:37
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecayToResTrkTrkSameMassBuilderBase.h"
0012
0013
0014
0015
0016 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecayGenericBuilderBase.h"
0017 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecayToChargedXXbarBuilder.h"
0018 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHParticleNeutralVeto.h"
0019 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoBuilder.h"
0020 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHPlusMinusCandidate.h"
0021 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoCandidate.h"
0022
0023
0024
0025
0026 using namespace std;
0027
0028
0029
0030
0031
0032
0033
0034
0035 BPHDecayToResTrkTrkSameMassBuilderBase::BPHDecayToResTrkTrkSameMassBuilderBase(
0036 const BPHEventSetupWrapper& es,
0037 const string& resName,
0038 double resMass,
0039 double resWidth,
0040 const string& posName,
0041 const std::string& negName,
0042 double trkMass,
0043 double trkSigma,
0044 const BPHRecoBuilder::BPHGenericCollection* posCollection,
0045 const BPHRecoBuilder::BPHGenericCollection* negCollection)
0046 : BPHDecayGenericBuilderBase(es, nullptr),
0047 BPHDecayConstrainedBuilderBase(resName, resMass, resWidth),
0048 pName(posName),
0049 nName(negName),
0050 tMass(trkMass),
0051 tSigma(trkSigma),
0052 pCollection(posCollection),
0053 nCollection(negCollection),
0054 ptMin(0.0),
0055 etaMax(100.0) {}
0056
0057 BPHDecayToResTrkTrkSameMassBuilderBase::BPHDecayToResTrkTrkSameMassBuilderBase(
0058 const string& posName,
0059 const std::string& negName,
0060 double trkMass,
0061 double trkSigma,
0062 const BPHRecoBuilder::BPHGenericCollection* posCollection,
0063 const BPHRecoBuilder::BPHGenericCollection* negCollection)
0064 : pName(posName),
0065 nName(negName),
0066 tMass(trkMass),
0067 tSigma(trkSigma),
0068 pCollection(posCollection),
0069 nCollection(negCollection),
0070 ptMin(0.0),
0071 etaMax(100.0) {}
0072
0073
0074
0075
0076 void BPHDecayToResTrkTrkSameMassBuilderBase::fillTrkTrkList() {
0077 double mTotMax = massSel->getMassMax();
0078
0079 BPHDecayToChargedXXbarBuilder ttBuilder(*evSetup, pName, nName, tMass, tSigma, pCollection, nCollection);
0080 ttBuilder.setPtMin(ptMin);
0081 ttBuilder.setEtaMax(etaMax);
0082 ttBuilder.setDzMax(1.0);
0083 ttBuilder.setMassMin(0.0);
0084 if (mTotMax >= 0.0)
0085 ttBuilder.setMassMax(mTotMax - (0.8 * rMass));
0086 else
0087 ttBuilder.setMassMax(-1.0);
0088 ttBuilder.setMinPDiff(minPDiff);
0089
0090 ttPairs = ttBuilder.build();
0091
0092 return;
0093 }
0094
0095
0096 void BPHDecayToResTrkTrkSameMassBuilderBase::setTrkPtMin(double pt) {
0097 outdated = true;
0098 ptMin = pt;
0099 return;
0100 }
0101
0102 void BPHDecayToResTrkTrkSameMassBuilderBase::setTrkEtaMax(double eta) {
0103 outdated = true;
0104 etaMax = eta;
0105 return;
0106 }