コード例 #1
0
float MelaReweighterWW::weightStoSBI(){    
  
  //setupDaughters(isVBF, id_l1, id_l2, id_n1, id_n2, l1, l2, n1, n2, associated, idsAssociated);

  float meS;
  _mela->setProcess(TVar::HSMHiggs, TVar::MCFM, _isVBF ? TVar::JJVBF_S : TVar::ZZGG);
  // Added here -- U. Sarica
  _mela->setMelaHiggsMassWidth(_mpole, _width, 0);
  _mela->setMelaHiggsMassWidth(125., 4.07e-3, 1);
  //
  if (!_isVBF)
    _mela->computeP(meS, false);
  else
    _mela->computeProdDecP(meS, false);
  float meSBI;
  _mela->setProcess(TVar::bkgWW_SMHiggs, TVar::MCFM, _isVBF ? TVar::JJEW : TVar::ZZGG);
  // Added here -- U. Sarica
  _mela->setMelaHiggsMassWidth(_mpole, _width, 0);
  _mela->setMelaHiggsMassWidth(125., 4.07e-3, 1);
  //
  if (!_isVBF)
    _mela->computeP(meSBI, false);
  else
    _mela->computeProdDecP(meSBI, false);
  
  _mela->resetInputEvent();  
  return meSBI/meS;
}
コード例 #2
0
void MelaReweighterWW::setupDaughters(bool isVBF, const int& id_l1,  const int& id_l2, const int& id_n1, const int& id_n2,
                    const TLorentzVector& l1, const TLorentzVector& l2, const TLorentzVector& n1, const TLorentzVector& n2,
                    const std::vector<TLorentzVector>& associated, const std::vector<int>& idsAssociated,
                    const std::vector<TLorentzVector>& mothers, const std::vector<int>& idsMothers){
 
  _isVBF=isVBF;
  _daughters->clear();
  _daughters->push_back(SimpleParticle_t(id_l1, l1));
  _daughters->push_back(SimpleParticle_t(id_l2, l2));
  _daughters->push_back(SimpleParticle_t(id_n1, n1));
  _daughters->push_back(SimpleParticle_t(id_n2, n2));
  _associated->clear();
  for (unsigned int i = 0; i < associated.size(); ++i){
    _associated->push_back(SimpleParticle_t(idsAssociated[i], associated[i]));
  }
  _mothers->clear();
  bool hasOneGluon = false;
  for (unsigned int i = 0; i < mothers.size(); ++i){
    _mothers->push_back(SimpleParticle_t(idsMothers[i], mothers[i]));
    if (idsMothers[i] == 22)
      hasOneGluon = true;
  }

  if (_candModified != 0){
    delete _candModified;
    _candModified = 0;
  }

  _mela->resetInputEvent();
  //check charge        
  double chargeIn = 0;
  for (unsigned int i = 0; i < _mothers->size(); ++i){
    MELAParticle p(_mothers->at(i).first, _mothers->at(i).second);
    chargeIn+=p.charge();
  }
  double chargeOut = 0;
  for (unsigned int i = 0; i < _associated->size(); ++i){
    MELAParticle p(_associated->at(i).first, _associated->at(i).second);
    chargeOut+=p.charge();
  }
  bool toRecast=true;
  if (chargeIn != chargeOut){
    toRecast =  false;
    //just kill the unwanted particle
    for (unsigned int i = 0; i < _associated->size(); ++i){
      int id=_associated->at(i).first;
      bool antiParticleInInitialState=false;
      for (unsigned int j = 0; j < _mothers->size(); ++j){
        if (id==-_mothers->at(j).first){
          //cout << "Skipping " << id << endl;
          antiParticleInInitialState=true;
        }  
      }    
      if (antiParticleInInitialState)
        _associated->erase(_associated->begin()+i);
    }    
  }  

  _mela->setInputEvent(_daughters, _associated, _mothers, true); 
  if (isVBF){
    bool recasted = recast();
    if (!recasted) {
      //just remove the gluon
      for (unsigned int i = 0; i < _associated->size(); ++i){
        int id=_associated->at(i).first;
        if (id == 21)
          _associated->erase(_associated->begin()+i);
      }
      _mela->setInputEvent(_daughters, _associated, _mothers, true);  
    }
  }

}