Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-07-08 01:45:58

0001 /*
0002  *  See header file for a description of this class.
0003  *
0004  *  \author Paolo Ronchese INFN Padova
0005  *
0006  */
0007 
0008 //-----------------------
0009 // This Class' Header --
0010 //-----------------------
0011 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecayToResTrkTrkSameMassBuilderBase.h"
0012 
0013 //-------------------------------
0014 // Collaborating Class Headers --
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 // C++ Headers --
0025 //---------------
0026 using namespace std;
0027 
0028 //-------------------
0029 // Initializations --
0030 //-------------------
0031 
0032 //----------------
0033 // Constructors --
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 // Operations --
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 /// set cuts
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 }