Skip to content

Commit

Permalink
Merge pull request #7208 from eduardburelo/evtgen-interface-update
Browse files Browse the repository at this point in the history
Correcting typos and adding new features
  • Loading branch information
cmsbuild committed Jan 16, 2015
2 parents bae448e + ffde0ae commit 0487b4b
Show file tree
Hide file tree
Showing 13 changed files with 1,544 additions and 6 deletions.
14 changes: 14 additions & 0 deletions GeneratorInterface/EvtGenInterface/data/LambdaB_pmunu_LCSR.dec
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# This is the decay file for the decay LambdaB -> P+ K-
#
Alias MyLambda_b0 Lambda_b0
Alias Myanti-Lambda_b0 anti-Lambda_b0
ChargeConj Myanti-Lambda_b0 MyLambda_b0
#
Decay MyLambda_b0
#1.000 p+ mu- anti-nu_mu PHOTOS Lb2plnuLCSR 1 1 1 1;
1.000 p+ mu- anti-nu_mu Lb2plnuLCSR 1 1 1 1;
Enddecay
CDecay Myanti-Lambda_b0
#
End
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace gen {
std::vector<int> polarize_ids;
std::vector<double> polarize_pol;
std::map<int, float> polarizations;

int BmixingOption = 1;
edm::ParameterSet* fPSet;

static CLHEP::HepRandomEngine* fRandomEngine;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//--------------------------------------------------------------------------
//
// Environment:
// This software is part of the EvtGen package developed jointly
// for the BaBar and CLEO collaborations. If you use all or part
// of it, please give an appropriate acknowledgement.
//
// Copyright Information:
// Copyright (C) 1998 Caltech, UCSB
//
// Module: EvtGen/EvtLb2plnuLCSR.hh
//
// Description:Implementation of the Lb2plnuLCSR model
// Class to handle semileptonic Lb -> p l nu decays using the using form factor predictions from Light Cone Sum Rules.
//
//
// Modification history:
//
// William Sutcliffe July 27, 2013 Module created
//
//------------------------------------------------------------------------

#ifndef EVTLB2PMUNULCSR_HH
#define EVTLB2PMUNULCSR_HH

#include "EvtGenBase/EvtDecayAmp.hh"
#include "EvtGenBase/EvtSemiLeptonicFF.hh"
#include "GeneratorInterface/EvtGenInterface/interface/EvtGenUserModels/EvtSLBaryonAmp.hh"

class EvtParticle;

class EvtLb2plnuLCSR:public EvtDecayAmp {

public:

EvtLb2plnuLCSR();
virtual ~EvtLb2plnuLCSR();

std::string getName();
EvtDecayBase* clone();

void decay(EvtParticle *p);
void initProbMax();
void init();

private:
EvtSemiLeptonicFF *ffmodel;
EvtSLBaryonAmp *calcamp;
};

#endif

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//--------------------------------------------------------------------------
//
// Environment:
// This software is part of the EvtGen package developed jointly
// for the BaBar and CLEO collaborations. If you use all or part
// of it, please give an appropriate acknowledgement.
//
// Copyright Information:
// Copyright (C) 1998 Caltech, UCSB
//
// Module: EvtGen/EvtLb2plnuLCSRFF.hh
//
// Description: Module for computation of Lb->p form factors via LCSR
//
// Modification history:
//
// William Sutcliffe July 27, 2013 Module created
//
//------------------------------------------------------------------------

#ifndef EVTLB2PMUNULCSRFF_HH
#define EVTLB2PMUNULCSRFF_HH

#include "EvtGenBase/EvtSemiLeptonicFF.hh"

class EvtId;

class EvtLb2plnuLCSRFF : public EvtSemiLeptonicFF {

public:

void getscalarff(EvtId parent, EvtId daught,
double t, double mass, double *fpf,
double *f0f );
void getvectorff(EvtId parent, EvtId daught,
double t, double mass, double *a1f,
double *a2f, double *vf, double *a0f );
void gettensorff(EvtId parent, EvtId daught,
double t, double mass, double *hf,
double *kf, double *bpf, double *bmf );

void getbaryonff(EvtId, EvtId, double, double, double*,
double*, double*, double*);

void getdiracff( EvtId parent, EvtId daught,
double q2, double mass,
double *f1, double *f2, double *f3,
double *g1, double *g2, double *g3 );

void getraritaff( EvtId parent, EvtId daught,
double q2, double mass,
double *f1, double *f2, double *f3, double *f4,
double *g1, double *g2, double *g3, double *g4 );
};

#endif


Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#ifndef gen_EvtModelUserReg_h
#define gen_EvtModelUserReg_h

#include <memory>
#include "EvtGenModels/EvtModelReg.hh"
/**
* Provides a list of user defined decay models to EvtGen.
*/
//typedef std::list<EvtDecayBase*> EvtModelList;

class EvtModelUserReg
{
public:
std::list<EvtDecayBase*> getUserModels();
};

#endif /*EvtModelUserReg*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
//--------------------------------------------------------------------------
//
// Environment:
// This software is part of the EvtGen package developed jointly
// for the BaBar and CLEO collaborations. If you use all or part
// of it, please give an appropriate acknowledgement.
//
// Copyright Information: See EvtGen/COPYRIGHT
// Copyright (C) 1998 Caltech, UCSB
//
// Module: EvtGen/EvtSLBaryonAmp.hh
//
// Description:
//
// Modification history:
//
// Lange Oct 20, 2004 Created
//
//------------------------------------------------------------------------

#ifndef EVTSLBARYONAMP_HH
#define EVTSLBARYONAMP_HH

#include "EvtGenBase/EvtSemiLeptonicAmp.hh"

class EvtParticle;
class EvtAmp;
class EvtSemiLeptonicFF;

class EvtVector4C;
class EvtVector4R;
class EvtDiracSpinor;
class EvtRaritaSchwinger;

class EvtSLBaryonAmp:public EvtSemiLeptonicAmp {

public:

virtual ~EvtSLBaryonAmp();

//Daughters are initialized and have been added to the parent.
//No need to carry around the daughters seperately!
void CalcAmp( EvtParticle *parent,EvtAmp& amp,
EvtSemiLeptonicFF *FormFactors );

void CalcAmp( EvtParticle *parent, EvtAmp& amp,
EvtSemiLeptonicFF *FormFactors,
EvtComplex r00, EvtComplex r01,
EvtComplex r10, EvtComplex r11 );

double CalcMaxProb( EvtId parent, EvtId meson, EvtId lepton,
EvtId nudaug, EvtSemiLeptonicFF *FormFactors,
EvtComplex r00, EvtComplex r01,
EvtComplex r10, EvtComplex r11);


private:

EvtVector4C EvtBaryonVACurrent( const EvtDiracSpinor& Bf,
const EvtDiracSpinor& Bi,
EvtVector4R parent,
EvtVector4R daught,
const double *ff, int pflag);

EvtVector4C EvtBaryonVARaritaCurrent( const EvtRaritaSchwinger& Bf_vect,
const EvtDiracSpinor& Bi,
EvtVector4R parent,
EvtVector4R daught,
const double *ff, int pflag);

};

#endif


4 changes: 2 additions & 2 deletions GeneratorInterface/EvtGenInterface/plugins/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
<flags EDM_PLUGIN="1"/>
</library>

<library file="EvtGen/*.cc,myEvtRandomEngine.cc" name="EvtGenInterface">

<library file="EvtGenUserModels/*.cpp,EvtGen/*.cc,myEvtRandomEngine.cc" name="EvtGenInterface">
<use name="FWCore/Framework"/>
<use name="FWCore/MessageLogger"/>
<use name="FWCore/ParameterSet"/>
Expand All @@ -40,4 +41,3 @@
<use name="FWCore/PluginManager"/>
<flags EDM_PLUGIN="1"/>
</library>

Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
// The modifications for EvtGen 1.3.0 are implemented by Ian M. Nugent
// I would like to thank the EvtGen developers, in particular John Black, and Mikhail Kirsanov for their assistance.
//
// January 2015: Setting of coherent or incoherent B mixing included by Eduard Burelo
// January 2015: Adding new feature to allow users to provide new evtgen models


#include "GeneratorInterface/EvtGenInterface/interface/EvtGenUserModels/EvtModelUserReg.h"
#include "GeneratorInterface/EvtGenInterface/interface/EvtGenInterface.h"

#include "GeneratorInterface/EvtGenInterface/interface/EvtGenFactory.h"
Expand Down Expand Up @@ -313,14 +315,35 @@ void EvtGenInterface::init(){
if(name.Contains("PYTHIA") && usePythia) myExtraModels.push_back(*it);
if(name.Contains("TAUOLA") && useTauola) myExtraModels.push_back(*it);
}

//Set up user evtgen models

EvtModelUserReg userList;
std::list<EvtDecayBase*> userModels = userList.getUserModels(); // get interface to user models
for(unsigned int i=0; i<userModels.size();i++){
std::list<EvtDecayBase*>::iterator it = userModels.begin();
std::advance(it,i);
TString name=(*it)->getName();
std::cout<<" Adding user model: "<<name<<std::endl;
myExtraModels.push_back(*it);
}



// Set up the incoherent (1) or coherent (0) B mixing option
BmixingOption = fPSet->getUntrackedParameter<int>("B_Mixing",1);
if(BmixingOption!=0 && BmixingOption!=1){
throw cms::Exception("Configuration") << "EvtGenProducer requires B_Mixing to be 0 (coherent) or 1 (incoherent) \n"
"Please fix this in your configuration.";
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////
// Create the EvtGen generator object, passing the external generators
m_EvtGen = new EvtGen(decay_table.fullPath().c_str(),pdt.fullPath().c_str(),the_engine,radCorrEngine,&myExtraModels);
m_EvtGen = new EvtGen(decay_table.fullPath().c_str(),pdt.fullPath().c_str(),the_engine,radCorrEngine,&myExtraModels,BmixingOption);

// Add additional user information
if (fPSet->exists("user_decay_file")){
std::vector<std::string> user_decays = fPSet->getParameter<std::vector<std::string> >("user_decay_files");
std::vector<std::string> user_decays = fPSet->getParameter<std::vector<std::string> >("user_decay_file");
for(unsigned int i=0;i<user_decays.size();i++){
edm::FileInPath user_decay(user_decays.at(i));
m_EvtGen->readUDecay(user_decay.fullPath().c_str());
Expand Down

0 comments on commit 0487b4b

Please sign in to comment.