MINT2
Public Member Functions | Private Attributes | List of all members
MINT::IEvtGen Class Reference

#include <IEvtGen.h>

Public Member Functions

 IEvtGen (const std::string &inputFileName, const std::vector< int > &pattern, TRandom *rand, const double &unitConversion)
 
virtual ~IEvtGen ()
 
void GenerateEvent (std::vector< std::vector< double >> &daughters, double &weight_gen)
 
std::vector< double > GetDaughter (const IDalitzEvent *const event, const unsigned int &daughter_id)
 

Private Attributes

const double m_unitConversion
 
SignalGeneratorm_sg
 

Detailed Description

Definition at line 14 of file IEvtGen.h.

Constructor & Destructor Documentation

◆ IEvtGen()

IEvtGen::IEvtGen ( const std::string &  inputFileName,
const std::vector< int > &  pattern,
TRandom *  rand,
const double &  unitConversion 
)

Interface to EvtGen Requires Mint steering file as argument The pattern should be deduced in the EvtGen model The random number generator should point to the EvtGen implementation Requires unit conversion rate between Mint and EvtGen as argument Mint 4-vectors will be divided by this factor and returned to EvtGen

Definition at line 5 of file IEvtGen.cpp.

8  : m_unitConversion(unitConversion)
9 {
11 
12  DalitzEventPattern pdg(pattern);
13  if( pattern[0] < 0 )
14  pdg = pdg.makeCPConjugate();
15 
16  std::cout << "Mother Particle " << pattern[0] << std::endl
17  << " got event pattern: " << pdg << std::endl;
18 
19  m_sg = new SignalGenerator(pdg, rand);
20 }
static bool setDefaultInputFile(const std::string &fname)
SignalGenerator * m_sg
Definition: IEvtGen.h:47
const double m_unitConversion
Definition: IEvtGen.h:45

◆ ~IEvtGen()

virtual MINT::IEvtGen::~IEvtGen ( )
inlinevirtual

Definition at line 29 of file IEvtGen.h.

30  { delete m_sg; }
SignalGenerator * m_sg
Definition: IEvtGen.h:47

Member Function Documentation

◆ GenerateEvent()

void IEvtGen::GenerateEvent ( std::vector< std::vector< double >> &  daughters,
double &  weight_gen 
)

Generate single event in Mint

Definition at line 22 of file IEvtGen.cpp.

24 {
26  const IDalitzEvent* const event = newEvt.get();
27  //const IDalitzEvent* const event = m_sg->newEvent().get();
28 
29  //0th entry is the mother particle
30  for( unsigned int i=1;
31  i<static_cast<unsigned int>(event->eventPattern().numDaughters()+1);
32  ++i ){
33  const std::vector<double> daughter = GetDaughter(event, i);
34  daughters.push_back(daughter);
35  }
36 
37  weight_gen = event->getGeneratorPdfRelativeToPhaseSpace();
38 }
virtual MINT::counted_ptr< IDalitzEvent > newEvent()
SignalGenerator * m_sg
Definition: IEvtGen.h:47
std::vector< double > GetDaughter(const IDalitzEvent *const event, const unsigned int &daughter_id)
Definition: IEvtGen.cpp:40
X * get() const
Definition: counted_ptr.h:123

◆ GetDaughter()

std::vector< double > IEvtGen::GetDaughter ( const IDalitzEvent *const  event,
const unsigned int &  daughter_id 
)

Intermediary to go between Mint and EvtGen 4-vector types

Definition at line 40 of file IEvtGen.cpp.

42 {
43  std::vector<double> daughter;
44  daughter.push_back(event->p(daughter_id).T()/m_unitConversion);
45  daughter.push_back(event->p(daughter_id).X()/m_unitConversion);
46  daughter.push_back(event->p(daughter_id).Y()/m_unitConversion);
47  daughter.push_back(event->p(daughter_id).Z()/m_unitConversion);
48 
49  return daughter;
50 }
virtual const TLorentzVector & p(unsigned int i) const =0
const double m_unitConversion
Definition: IEvtGen.h:45

Member Data Documentation

◆ m_sg

SignalGenerator* MINT::IEvtGen::m_sg
private

Definition at line 47 of file IEvtGen.h.

◆ m_unitConversion

const double MINT::IEvtGen::m_unitConversion
private

Definition at line 45 of file IEvtGen.h.


The documentation for this class was generated from the following files: