CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
gen::ExternalDecayDriver Class Reference

#include <ExternalDecayDriver.h>

Public Member Functions

HepMC::GenEvent * decay (HepMC::GenEvent *)
 
 ExternalDecayDriver (const edm::ParameterSet &)
 
void init (const edm::EventSetup &)
 
const std::vector< int > & operatesOnParticles ()
 
void setRandomEngine (CLHEP::HepRandomEngine *)
 
std::vector< std::string > const & sharedResources () const
 
const std::vector< std::string > & specialSettings ()
 
void statistics () const
 
 ~ExternalDecayDriver ()
 

Private Attributes

std::vector< std::string > exSharedResources
 
EvtGenInterfacefEvtGenInterface
 
bool fIsInitialized
 
std::vector< int > fPDGs
 
PhotosInterfacefPhotosInterface
 
std::vector< std::string > fSpecialSettings
 
TauolaInterfacefTauolaInterface
 

Detailed Description

Definition at line 25 of file ExternalDecayDriver.h.

Constructor & Destructor Documentation

ExternalDecayDriver::ExternalDecayDriver ( const edm::ParameterSet pset)

Definition at line 19 of file ExternalDecayDriver.cc.

References gen::PhotosInterface::avoidTauLeptonicDecays(), gen::PhotosInterface::configureOnlyFor(), exSharedResources, fEvtGenInterface, fPhotosInterface, fTauolaInterface, gen::TauolaInterface::getInstance(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), edm::SharedResourceNames::kEvtGen, edm::SharedResourceNames::kPhotos, edm::SharedResourceNames::kPythia6, edm::SharedResourceNames::kTauola, gen::TauolaInterface::setPSet(), and AlCaHLTBitMon_QueryRunRegistry::string.

20  : fIsInitialized(false),
24 {
25 
26  std::vector<std::string> extGenNames =
27  pset.getParameter< std::vector<std::string> >("parameterSets");
28 
29  for (unsigned int ip=0; ip<extGenNames.size(); ++ip )
30  {
31  std::string curSet = extGenNames[ip];
32  if ( curSet == "EvtGen" )
33  {
37  }
38  else if ( curSet == "Tauola" )
39  {
40  // this is for old tauola27 (+pretauola)
41  //
42  // --> fTauolaInterface = new gen::TauolaInterface(pset.getUntrackedParameter< ParameterSet >(curSet));
43  //
44  // for tauola++, here it should be something like:
45  //
52  }
53  else if ( curSet == "Photos" )
54  {
57  }
58  }
59 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
PhotosInterface * fPhotosInterface
void setPSet(const edm::ParameterSet &)
TauolaInterface * fTauolaInterface
static const std::string kTauola
static const std::string kPhotos
static const std::string kPythia6
static const std::string kEvtGen
std::vector< std::string > exSharedResources
EvtGenInterface * fEvtGenInterface
static TauolaInterface * getInstance()
ExternalDecayDriver::~ExternalDecayDriver ( )

Definition at line 61 of file ExternalDecayDriver.cc.

References fEvtGenInterface, fPhotosInterface, and fTauolaInterface.

62 {
63  if ( fEvtGenInterface ) delete fEvtGenInterface;
64  if ( fTauolaInterface ) delete fTauolaInterface;
65  if ( fPhotosInterface ) delete fPhotosInterface;
66 }
PhotosInterface * fPhotosInterface
TauolaInterface * fTauolaInterface
EvtGenInterface * fEvtGenInterface

Member Function Documentation

HepMC::GenEvent * ExternalDecayDriver::decay ( HepMC::GenEvent *  evt)

Definition at line 68 of file ExternalDecayDriver.cc.

References gen::PhotosInterface::apply(), gen::EvtGenInterface::decay(), gen::TauolaInterface::decay(), fEvtGenInterface, fIsInitialized, fPhotosInterface, and fTauolaInterface.

69 {
70 
71  if ( !fIsInitialized ) return evt;
72 
73  if ( fEvtGenInterface )
74  {
75  evt = fEvtGenInterface->decay( evt );
76  if ( !evt ) return 0;
77  }
78 
79  if ( fTauolaInterface )
80  {
81  evt = fTauolaInterface->decay( evt );
82  if ( !evt ) return 0;
83  }
84 
85  if ( fPhotosInterface )
86  {
87  evt = fPhotosInterface->apply( evt );
88  if ( !evt ) return 0;
89  }
90 
91  return evt;
92 }
PhotosInterface * fPhotosInterface
HepMC::GenEvent * decay(HepMC::GenEvent *)
HepMC::GenEvent * decay(HepMC::GenEvent *)
TauolaInterface * fTauolaInterface
EvtGenInterface * fEvtGenInterface
HepMC::GenEvent * apply(HepMC::GenEvent *)
void ExternalDecayDriver::init ( const edm::EventSetup es)

Definition at line 94 of file ExternalDecayDriver.cc.

References fEvtGenInterface, fIsInitialized, fPDGs, fPhotosInterface, fSpecialSettings, fTauolaInterface, i, gen::PhotosInterface::init(), gen::EvtGenInterface::init(), gen::TauolaInterface::init(), gen::EvtGenInterface::operatesOnParticles(), gen::TauolaInterface::operatesOnParticles(), and gen::PhotosInterface::specialSettings().

95 {
96 
97  if ( fIsInitialized ) return;
98 
99  if ( fTauolaInterface )
100  {
101  fTauolaInterface->init( es );
102  for ( std::vector<int>::const_iterator i=fTauolaInterface->operatesOnParticles().begin();
103  i!=fTauolaInterface->operatesOnParticles().end(); i++ )
104  fPDGs.push_back( *i );
105  }
106 
107  if ( fEvtGenInterface )
108  {
110  for ( std::vector<int>::const_iterator i=fEvtGenInterface->operatesOnParticles().begin();
111  i!=fEvtGenInterface->operatesOnParticles().end(); i++ )
112  fPDGs.push_back( *i );
113  }
114 
115 
116  if ( fPhotosInterface )
117  {
119 // for tauola++
120  if ( fPhotosInterface )
121  {
122  for ( unsigned int iss=0; iss<fPhotosInterface->specialSettings().size(); iss++ )
123  {
125  }
126  }
127  }
128 
129 // this is specific to old tauola27 only, because it calls up photos automatically
130 //
131 //
132 // if ( fTauolaInterface )
133 // {
134 // // override !
135 // fSpecialSettings.clear();
136 // fSpecialSettings.push_back( "QED-brem-off:15" );
137 // }
138 
139  fIsInitialized = true;
140 
141  return;
142 }
int i
Definition: DBlmapReader.cc:9
PhotosInterface * fPhotosInterface
const std::vector< int > & operatesOnParticles()
TauolaInterface * fTauolaInterface
const std::vector< std::string > & specialSettings()
EvtGenInterface * fEvtGenInterface
std::vector< std::string > fSpecialSettings
const std::vector< int > & operatesOnParticles()
void init(const edm::EventSetup &)
const std::vector<int>& gen::ExternalDecayDriver::operatesOnParticles ( )
inline

Definition at line 35 of file ExternalDecayDriver.h.

References fPDGs.

35 { return fPDGs; }
void ExternalDecayDriver::setRandomEngine ( CLHEP::HepRandomEngine *  v)

Definition at line 151 of file ExternalDecayDriver.cc.

References decayRandomEngine, fEvtGenInterface, fTauolaInterface, gen::EvtGenInterface::setRandomEngine(), gen::TauolaInterface::setRandomEngine(), and gen::v.

152 {
154  if ( fTauolaInterface ) {
156  }
157  if ( fEvtGenInterface ) {
159  }
160 }
TauolaInterface * fTauolaInterface
double v[5][pyjets_maxn]
void setRandomEngine(CLHEP::HepRandomEngine *v)
EvtGenInterface * fEvtGenInterface
CLHEP::HepRandomEngine * decayRandomEngine
void setRandomEngine(CLHEP::HepRandomEngine *v)
std::vector<std::string> const& gen::ExternalDecayDriver::sharedResources ( ) const
inline

Definition at line 43 of file ExternalDecayDriver.h.

References exSharedResources.

43 { return exSharedResources; }
std::vector< std::string > exSharedResources
const std::vector<std::string>& gen::ExternalDecayDriver::specialSettings ( )
inline

Definition at line 36 of file ExternalDecayDriver.h.

References fSpecialSettings.

36 { return fSpecialSettings; }
std::vector< std::string > fSpecialSettings
void ExternalDecayDriver::statistics ( ) const

Definition at line 144 of file ExternalDecayDriver.cc.

References fTauolaInterface, and gen::TauolaInterface::statistics().

145 {
147  // similar for EvtGen and/or Photos, if needs be
148  return;
149 }
TauolaInterface * fTauolaInterface

Member Data Documentation

std::vector<std::string> gen::ExternalDecayDriver::exSharedResources
private

Definition at line 54 of file ExternalDecayDriver.h.

Referenced by ExternalDecayDriver(), and sharedResources().

EvtGenInterface* gen::ExternalDecayDriver::fEvtGenInterface
private
bool gen::ExternalDecayDriver::fIsInitialized
private

Definition at line 47 of file ExternalDecayDriver.h.

Referenced by decay(), and init().

std::vector<int> gen::ExternalDecayDriver::fPDGs
private

Definition at line 51 of file ExternalDecayDriver.h.

Referenced by init(), and operatesOnParticles().

PhotosInterface* gen::ExternalDecayDriver::fPhotosInterface
private

Definition at line 50 of file ExternalDecayDriver.h.

Referenced by decay(), ExternalDecayDriver(), init(), and ~ExternalDecayDriver().

std::vector<std::string> gen::ExternalDecayDriver::fSpecialSettings
private

Definition at line 52 of file ExternalDecayDriver.h.

Referenced by init(), and specialSettings().

TauolaInterface* gen::ExternalDecayDriver::fTauolaInterface
private