EvtGen 2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Loading...
Searching...
No Matches
EvtTauolaEngine.cpp
Go to the documentation of this file.
1
2/***********************************************************************
3* Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4* *
5* This file is part of EvtGen. *
6* *
7* EvtGen is free software: you can redistribute it and/or modify *
8* it under the terms of the GNU General Public License as published by *
9* the Free Software Foundation, either version 3 of the License, or *
10* (at your option) any later version. *
11* *
12* EvtGen is distributed in the hope that it will be useful, *
13* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15* GNU General Public License for more details. *
16* *
17* You should have received a copy of the GNU General Public License *
18* along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19***********************************************************************/
20
21#ifdef EVTGEN_TAUOLA
22
24
26#include "EvtGenBase/EvtPDL.hh"
31
32#include "Tauola/Log.h"
33#include "Tauola/Tauola.h"
34
35#include <array>
36#include <cmath>
37#include <iostream>
38#include <limits>
39#include <memory>
40#include <sstream>
41#include <string>
42
43using std::endl;
44
45// Mutex Tauola as it is not thread safe.
51
52EvtTauolaEngine::EvtTauolaEngine( bool useEvtGenRandom, bool seedTauolaFortran ) :
53 m_useEvtGenRandom{ useEvtGenRandom }, m_seedTauolaFortran{ seedTauolaFortran }
54{
55}
56
58{
59 const std::lock_guard<std::mutex> lock( m_tauola_mutex );
60
61 // Set up all possible tau decay modes.
62 // This should be done just before the first doDecay() call,
63 // since we want to make sure that any decay.dec files are processed
64 // first to get lists of particle modes and their alias definitions
65 // (for creating EvtParticles with the right history information).
66
67 if ( m_initialised ) {
68 return;
69 }
70
71 EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "Setting up TAUOLA." << endl;
72
73 // These three lines are not really necessary since they are the default.
74 // But they are here so that we know what the initial conditions are.
75
76 // tau PDG code
77 Tauolapp::Tauola::setDecayingParticle( m_tauPDG );
78 // all modes allowed
79 Tauolapp::Tauola::setSameParticleDecayMode( Tauolapp::Tauola::All );
80 // all modes allowed
81 Tauolapp::Tauola::setOppositeParticleDecayMode( Tauolapp::Tauola::All );
82
83 // Limit the number of warnings printed out.
84 // Can't choose zero here, unfortunately.
85 Tauolapp::Log::SetWarningLimit( 1 );
86
87 // Initial the Tauola external generator
88 if ( m_useEvtGenRandom ) {
89 EvtGenReport( EVTGEN_INFO, "EvtGen" )
90 << "Using EvtGen random number engine also for Tauola++" << endl;
91
92 Tauolapp::Tauola::setRandomGenerator( EvtRandom::Flat );
93 }
94
95 // Use the BaBar-tuned chiral current calculations by default. Can be changed using the
96 // TauolaCurrentOption keyword in decay files
97 Tauolapp::Tauola::setNewCurrents( 1 );
98
99 Tauolapp::Tauola::initialize();
100
101 // Set-up possible decay modes _after_ we have read the (user) decay file
102 this->setUpPossibleTauModes();
103 this->setOtherParameters();
104
105 m_initialised = true;
106}
107
109{
110 // Get the decay table list defined by the decay.dec files.
111 // Only look for the first tau particle decay mode definitions with the Tauola name,
112 // since that generator only allows the same BFs for both tau+ and tau- decays.
113 // We can not choose a specific tau decay event-by-event, since this is
114 // only possible before we call Tauola::initialize().
115 // Otherwise, we could have selected a random mode ourselves for tau- and tau+
116 // separately (via selecting a random number and comparing it to be less than
117 // the cumulative BF) for each event.
118
119 const int nPDL = EvtPDL::entries();
120
121 bool gotAnyTauolaModes( false );
122
123 for ( int iPDL = 0; iPDL < nPDL; iPDL++ ) {
124 const EvtId particleId = EvtPDL::getEntry( iPDL );
125 const int PDGId = EvtPDL::getStdHep( particleId );
126
127 if ( abs( PDGId ) == m_tauPDG && gotAnyTauolaModes == false ) {
128 const int aliasInt = particleId.getAlias();
129
130 // Get the list of decay modes for this tau particle (alias)
131 const int nModes = EvtDecayTable::getInstance().getNModes( aliasInt );
132
133 // Vector to store tau mode branching fractions.
134 // The size of this vector equals the total number of possible
135 // Tauola decay modes. Initialise all BFs to zero.
136 std::vector<double> tauolaModeBFs;
137 tauolaModeBFs.assign( m_nTauolaModes, 0.0 );
138
139 double totalTauModeBF( 0.0 );
140
141 int nNonTauolaModes( 0 );
142
143 // Loop through each decay mode
144 for ( int iMode = 0; iMode < nModes; iMode++ ) {
145 EvtDecayBase* decayModel =
146 EvtDecayTable::getInstance().findDecayModel( aliasInt, iMode );
147 if ( decayModel ) {
148 // Check that the decay model name matches TAUOLA
149 std::string modelName = decayModel->getName();
150 if ( modelName == "TAUOLA" ) {
151 gotAnyTauolaModes = true;
152
153 // Extract the decay mode integer type and branching fraction
154 double BF = decayModel->getBranchingFraction();
155 int modeArrayInt = this->getModeInt( decayModel ) - 1;
156
157 if ( modeArrayInt >= 0 && modeArrayInt < m_nTauolaModes ) {
158 tauolaModeBFs[modeArrayInt] = BF;
159 totalTauModeBF += BF;
160 }
161
162 } else {
163 nNonTauolaModes++;
164 }
165 } // Decay mode exists
166 } // Loop over decay models
167
168 if ( gotAnyTauolaModes == true && nNonTauolaModes > 0 ) {
169 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
170 << "Please remove all non-TAUOLA decay modes for particle "
171 << EvtPDL::name( particleId ) << endl;
172 ::abort();
173 }
174
175 // Normalise all (non-zero) tau mode BFs to sum up to 1.0, and
176 // let Tauola know about these normalised branching fractions
177 if ( totalTauModeBF > 0.0 ) {
178 EvtGenReport( EVTGEN_INFO, "EvtGen" )
179 << "Setting TAUOLA BF modes using the definitions for the particle "
180 << EvtPDL::name( particleId ) << endl;
181
182 for ( int iTauMode = 0; iTauMode < m_nTauolaModes; iTauMode++ ) {
183 tauolaModeBFs[iTauMode] /= totalTauModeBF;
184 double modeBF = tauolaModeBFs[iTauMode];
185 EvtGenReport( EVTGEN_INFO, "EvtGen" )
186 << "Setting TAUOLA BF for mode " << iTauMode + 1
187 << " = " << modeBF << endl;
188 Tauolapp::Tauola::setTauBr( iTauMode + 1, modeBF );
189 }
190
191 EvtGenReport( EVTGEN_INFO, "EvtGen" )
192 << "Any other TAUOLA BF modes for other tau particle decay mode definitions will be ignored!"
193 << endl;
194 }
195 } // Got tau particle and have yet to get a TAUOLA mode
196 } // Loop through PDL entries
197}
198
200{
201 int modeInt( 0 );
202
203 if ( decayModel ) {
204 int nVars = decayModel->getNArg();
205
206 if ( nVars > 0 ) {
207 modeInt = static_cast<int>( decayModel->getArg( 0 ) );
208 }
209 }
210
211 return modeInt;
212}
213
215{
216 // Set other Tauola parameters using the "Defined" keyword in the decay file. If any of
217 // these are not found in the decay file, then default values are assumed/kept
218
219 // 1) TauolaNeutralProp: Specify the neutral propagator type used for spin matrix calculations
220 // "Z" (default), "Gamma", "Higgs" (H0), "PseudoHiggs" (A0), "MixedHiggs" (A0/H0)
221 int iErr( 0 );
222 std::string neutPropName = EvtSymTable::get( "TauolaNeutralProp", iErr );
223 if ( neutPropName == "Z0" || neutPropName == "Z" ) {
224 m_neutPropType = Tauolapp::TauolaParticle::Z0;
225 } else if ( neutPropName == "Gamma" ) {
226 m_neutPropType = Tauolapp::TauolaParticle::GAMMA;
227 } else if ( neutPropName == "Higgs" ) {
228 m_neutPropType = Tauolapp::TauolaParticle::HIGGS;
229 } else if ( neutPropName == "PseudoHiggs" ) {
230 m_neutPropType = Tauolapp::TauolaParticle::HIGGS_A;
231 } else if ( neutPropName == "MixedHiggs" ) {
232 m_neutPropType = Tauolapp::Tauola::getHiggsScalarPseudoscalarPDG();
233 }
234
235 if ( m_neutPropType != 0 ) {
236 EvtGenReport( EVTGEN_INFO, "EvtGen" )
237 << "TAUOLA neutral spin propagator PDG id set to " << m_neutPropType
238 << endl;
239 }
240
241 // 2) TauolaChargedProp: Specify the charged propagator type used for spin matrix calculations
242 // "W" (default), "Higgs" (H+/H-)
243 std::string chargedPropName = EvtSymTable::get( "TauolaChargedProp", iErr );
244 if ( chargedPropName == "W" ) {
245 m_negPropType = Tauolapp::TauolaParticle::W_MINUS;
246 m_posPropType = Tauolapp::TauolaParticle::W_PLUS;
247 } else if ( chargedPropName == "Higgs" ) {
248 m_negPropType = Tauolapp::TauolaParticle::HIGGS_MINUS;
249 m_posPropType = Tauolapp::TauolaParticle::HIGGS_PLUS;
250 }
251
252 if ( m_negPropType != 0 ) {
253 EvtGenReport( EVTGEN_INFO, "EvtGen" )
254 << "TAUOLA negative charge spin propagator PDG id set to "
255 << m_negPropType << endl;
256 }
257
258 if ( m_posPropType != 0 ) {
259 EvtGenReport( EVTGEN_INFO, "EvtGen" )
260 << "TAUOLA positive charge spin propagator PDG id set to "
261 << m_posPropType << endl;
262 }
263
264 // 3) TauolaHiggsMixingAngle: Specify the mixing angle between the neutral scalar & pseudoscalar Higgs
265 // A0/H0; the default mixing angle is pi/4 radians
266 std::string mixString = EvtSymTable::get( "TauolaHiggsMixingAngle", iErr );
267 // If the definition name is not found, get() just returns the first argument string
268 if ( mixString != "TauolaHiggsMixingAngle" ) {
269 double mixAngle = std::atof( mixString.c_str() );
270 EvtGenReport( EVTGEN_INFO, "EvtGen" )
271 << "TAUOLA Higgs mixing angle set to " << mixAngle << " radians"
272 << endl;
273 Tauolapp::Tauola::setHiggsScalarPseudoscalarMixingAngle( mixAngle );
274 }
275
276 // 4) TauolaBRi, where i = 1,2,3,4: Redefine sub-channel branching fractions using the setTaukle
277 // function, after initialized() has been called. Default values = 0.5, 0.5, 0.5 and 0.6667
278 std::array<double, 4> BRVect{ 0.5, 0.5, 0.5, 0.6667 };
279 for ( int j = 0; j < 4; j++ ) {
280 std::ostringstream o;
281 o << j + 1;
282 std::string BRName = "TauolaBR" + o.str();
283 std::string stringBR = EvtSymTable::get( BRName, iErr );
284
285 // If the definition name is not found, get() just returns the first argument string
286 if ( stringBR != BRName ) {
287 BRVect[j] = std::atof( stringBR.c_str() );
288 }
289 }
290
291 EvtGenReport( EVTGEN_INFO, "EvtGen" )
292 << "TAUOLA::setTaukle values are " << BRVect[0] << ", " << BRVect[1]
293 << ", " << BRVect[2] << ", " << BRVect[3] << endl;
294
295 Tauolapp::Tauola::setTaukle( BRVect[0], BRVect[1], BRVect[2], BRVect[3] );
296
297 // 5) Specify the hadronic current option, e.g. orig CLEO = 0, BaBar-tuned = 1 (default), ...
298 // No check is made by EvtGen on valid integer options - its just passed to Tauola
299 std::string currentOption = EvtSymTable::get( "TauolaCurrentOption", iErr );
300 // If the definition name is not found, get() just returns the first argument string
301 if ( currentOption != "TauolaCurrentOption" ) {
302 int currentOpt = std::atoi( currentOption.c_str() );
303 EvtGenReport( EVTGEN_INFO, "EvtGen" )
304 << "TAUOLA current option = " << currentOpt << endl;
305
306 Tauolapp::Tauola::setNewCurrents( currentOpt );
307 }
308}
309
311{
312 if ( !m_initialised ) {
313 this->initialise();
314 }
315
316 if ( !tauParticle ) {
317 return false;
318 }
319
320 // Check that we have a tau particle.
321 EvtId partId = tauParticle->getId();
322 if ( abs( EvtPDL::getStdHep( partId ) ) != m_tauPDG ) {
323 return false;
324 }
325
326 int nTauDaug = tauParticle->getNDaug();
327
328 // If the number of tau daughters is not zero, then we have already decayed
329 // it using Tauola/another decay algorithm.
330 if ( nTauDaug > 0 ) {
331 return true;
332 }
333
334 this->decayTauEvent( tauParticle );
335
336 return true;
337}
338
340{
341 // Either we have a tau particle within a decay chain, or a single particle.
342 // Create a dummy HepMC event & vertex for the parent particle, containing the tau as
343 // one of the outgoing particles. If we have a decay chain, the parent will be the
344 // incoming particle, while the daughters, including the tau, are outgoing particles.
345 // For the single particle case, the incoming particle is null, while the single tau
346 // is the only outgoing particle.
347 // We can then pass this event to Tauola which should then decay the tau particle.
348 // We also consider all other tau particles from the parent decay in the logic below.
349
350 // Create the dummy event.
351 auto theEvent = std::make_unique<GenEvent>( Units::GEV, Units::MM );
352
353 // Create the decay "vertex".
354 GenVertexPtr theVertex = newGenVertexPtr();
355 theEvent->add_vertex( theVertex );
356
357 // Get the parent of this tau particle
358 EvtParticle* theParent = tauParticle->getParent();
359 GenParticlePtr hepMCParent( nullptr );
360
361 // Assign the parent particle as the incoming particle to the vertex.
362 if ( theParent ) {
363 hepMCParent = this->createGenParticle( theParent );
364 theVertex->add_particle_in( hepMCParent );
365 } else {
366 // The tau particle has no parent. Set "itself" as the incoming particle for the first vertex.
367 // This is needed, otherwise Tauola warns of momentum non-conservation for this (1st) vertex.
368 GenParticlePtr tauGenInit = this->createGenParticle( tauParticle );
369 theVertex->add_particle_in( tauGenInit );
370 }
371
372 // Find all daughter particles and assign them as outgoing particles to the vertex.
373 // This will include the tau particle we are currently processing.
374 // If the parent decay has more than one tau particle, we need to include them as well.
375 // This is important since Tauola needs the correct physics correlations: we do not
376 // want Tauola to decay each particle separately if they are from tau pair combinations.
377 // Tauola will process the event, and we will create EvtParticles from all tau decay
378 // products, i.e. the tau particle we currently have and any other tau particles.
379 // EvtGen will try to decay the other tau particle(s) by calling EvtTauola and therefore
380 // this function. However, we check to see if the tau candidate has any daughters already.
381 // If it does, then we have already set the tau decay products from Tauola.
382
383 // Map to store (HepMC,EvtParticle) pairs for each tau candidate from the parent
384 // decay. This is needed to find out what EvtParticle corresponds to a given tau HepMC
385 // candidate: we do not want to recreate existing EvtParticle pointers.
386 std::map<GenParticlePtr, EvtParticle*> tauMap;
387
388 // Keep track of the original EvtId of the parent particle, since we may need to set
389 // the equivalent HepMCParticle has a gauge boson to let Tauola calculate spin effects
390 EvtId origParentId( -1, -1 );
391
392 if ( theParent ) {
393 // Original parent id
394 origParentId = EvtPDL::getId( theParent->getName() );
395
396 // Find all tau particles in the decay tree and store them in the map.
397 // Keep track of how many tau daughters this parent particle has
398 int nTaus( 0 );
399 int nDaug( theParent->getNDaug() );
400 int iDaug( 0 );
401
402 for ( iDaug = 0; iDaug < nDaug; iDaug++ ) {
403 EvtParticle* theDaughter = theParent->getDaug( iDaug );
404
405 if ( theDaughter ) {
406 GenParticlePtr hepMCDaughter = this->createGenParticle(
407 theDaughter );
408 theVertex->add_particle_out( hepMCDaughter );
409
410 EvtId theId = theDaughter->getId();
411 int PDGInt = EvtPDL::getStdHep( theId );
412
413 if ( abs( PDGInt ) == m_tauPDG ) {
414 // Delete any siblings for the tau particle
415 if ( theDaughter->getNDaug() > 0 ) {
416 theDaughter->deleteDaughters( false );
417 }
418 tauMap[hepMCDaughter] = theDaughter;
419 nTaus++;
420 } else {
421 // Treat all other particles as "stable"
422 hepMCDaughter->set_status( Tauolapp::TauolaParticle::STABLE );
423 }
424
425 } // theDaughter != 0
426 } // Loop over daughters
427
428 // For the parent particle, artifically set the PDG to a boson with the same 4-momentum
429 // so that spin correlations are calculated inside Tauola.
430 // This leaves the original parent m_EvtParticle_ unchanged
431 if ( nTaus > 0 && hepMCParent ) {
432 int parCharge = EvtPDL::chg3( origParentId ) /
433 3; // (3*particle charge)/3 = particle charge
434 if ( parCharge == 0 && m_neutPropType != 0 ) {
435 hepMCParent->set_pdg_id( m_neutPropType );
436 } else if ( parCharge == -1 && m_negPropType != 0 ) {
437 hepMCParent->set_pdg_id( m_negPropType );
438 } else if ( parCharge == 1 && m_posPropType != 0 ) {
439 hepMCParent->set_pdg_id( m_posPropType );
440 }
441 }
442
443 } else {
444 // We only have the one tau particle. Store only this in the map.
445 GenParticlePtr singleTau = this->createGenParticle( tauParticle );
446 theVertex->add_particle_out( singleTau );
447 tauMap[singleTau] = tauParticle;
448 }
449
450 {
451 const std::lock_guard<std::mutex> lock( m_tauola_mutex );
452
454 static thread_local auto lastSeed{
455 std::numeric_limits<unsigned long int>::max() };
456 if ( lastSeed != EvtRandom::lastSeed() ) {
457 lastSeed = EvtRandom::lastSeed();
458 Tauolapp::Tauola::setSeed( lastSeed, 0, 0 );
459 }
460 }
461
462 // Now pass the event to Tauola for processing
463 // Create a Tauola event object
464#ifdef EVTGEN_HEPMC3
465 Tauolapp::TauolaHepMC3Event tauolaEvent( theEvent.get() );
466#else
467 Tauolapp::TauolaHepMCEvent tauolaEvent( theEvent.get() );
468#endif
469
470 // Run the Tauola algorithm
471 tauolaEvent.decayTaus();
472 }
473
474 // Loop over all tau particles in the HepMC event and create their EvtParticle daughters.
475 // Store all final "stable" descendent particles as the tau daughters, i.e.
476 // let Tauola decay any resonances such as a_1 or rho.
477 // If there is more than one tau particle in the event, then also create the
478 // corresponding EvtParticles for their daughters as well. They will not be
479 // re-decayed since we check at the start of this function if the tau particle has
480 // any daughters before running Tauola decayTaus().
481
482#ifdef EVTGEN_HEPMC3
483 for ( auto aParticle : theEvent->particles() ) {
484#else
485 HepMC::GenEvent::particle_iterator eventIter;
486 for ( eventIter = theEvent->particles_begin();
487 eventIter != theEvent->particles_end(); ++eventIter ) {
488 // Check to see if we have a tau particle
489 HepMC::GenParticle* aParticle = ( *eventIter );
490#endif
491
492 if ( aParticle && abs( aParticle->pdg_id() ) == m_tauPDG ) {
493 // Find out what EvtParticle corresponds to the HepMC particle.
494 // We need this to create and attach EvtParticle daughters.
495 EvtParticle* tauEvtParticle = tauMap[aParticle];
496
497 if ( tauEvtParticle ) {
498 // Get the tau 4-momentum in the lab (first mother) frame. We need to boost
499 // all the tau daughters to this frame, such that daug.getP4() is in the tau restframe.
500 EvtVector4R tauP4CM = tauEvtParticle->getP4Lab();
501 tauP4CM.set( tauP4CM.get( 0 ), -tauP4CM.get( 1 ),
502 -tauP4CM.get( 2 ), -tauP4CM.get( 3 ) );
503
504 // Get the decay vertex for the tau particle
505 GenVertexPtr endVertex = aParticle->end_vertex();
506
507 std::vector<EvtId> daugIdVect;
508 std::vector<EvtVector4R> daugP4Vect;
509
510 // Loop through all descendants
511#ifdef EVTGEN_HEPMC3
512 for ( auto tauDaug :
513 HepMC3::Relatives::DESCENDANTS( endVertex ) ) {
514#else
515 HepMC::GenVertex::particle_iterator tauIter;
516 // Loop through all descendants
517 for ( tauIter = endVertex->particles_begin( HepMC::descendants );
518 tauIter != endVertex->particles_end( HepMC::descendants );
519 ++tauIter ) {
520 HepMC::GenParticle* tauDaug = ( *tauIter );
521#endif
522 // Check to see if this descendant has its own decay vertex, e.g. rho resonance.
523 // If so, skip this daughter and continue looping through the descendant list
524 // until we reach the final "stable" products (e.g. pi pi from rho -> pi pi).
525 GenVertexPtr daugDecayVtx = tauDaug->end_vertex();
526 if ( daugDecayVtx ) {
527 continue;
528 }
529
530 // Store the particle id and 4-momentum
531 int tauDaugPDG = tauDaug->pdg_id();
532 EvtId daugId = EvtPDL::evtIdFromStdHep( tauDaugPDG );
533 daugIdVect.push_back( daugId );
534
535 FourVector tauDaugP4 = tauDaug->momentum();
536 double tauDaug_px = tauDaugP4.px();
537 double tauDaug_py = tauDaugP4.py();
538 double tauDaug_pz = tauDaugP4.pz();
539 double tauDaug_E = tauDaugP4.e();
540
541 EvtVector4R daugP4( tauDaug_E, tauDaug_px, tauDaug_py,
542 tauDaug_pz );
543 daugP4Vect.push_back( daugP4 );
544
545 } // Loop over HepMC tau daughters
546
547 // Create the tau EvtParticle daughters and assign their ids and 4-mtm
548 int nDaug = daugIdVect.size();
549
550 tauEvtParticle->makeDaughters( nDaug, daugIdVect );
551
552 int iDaug( 0 );
553 for ( iDaug = 0; iDaug < nDaug; iDaug++ ) {
554 EvtParticle* theDaugPart = tauEvtParticle->getDaug( iDaug );
555
556 if ( theDaugPart ) {
557 EvtId theDaugId = daugIdVect[iDaug];
558 EvtVector4R theDaugP4 = daugP4Vect[iDaug];
559 theDaugP4.applyBoostTo(
560 tauP4CM ); // Boost the 4-mtm to the tau rest frame
561 theDaugPart->init( theDaugId, theDaugP4 );
562 }
563
564 } // Loop over tau daughters
565 }
566
567 } // We have a tau HepMC particle in the event
568 }
569
570 theEvent->clear();
571}
572
574{
575 // Method to create an HepMC::GenParticle version of the given EvtParticle.
576 if ( theParticle == nullptr ) {
577 return nullptr;
578 }
579
580 // Get the 4-momentum (E, px, py, pz) for the EvtParticle
581 EvtVector4R p4 = theParticle->getP4Lab();
582
583 // Convert this to the HepMC 4-momentum
584 double E = p4.get( 0 );
585 double px = p4.get( 1 );
586 double py = p4.get( 2 );
587 double pz = p4.get( 3 );
588
589 FourVector hepMC_p4( px, py, pz, E );
590
591 int PDGInt = EvtPDL::getStdHep( theParticle->getId() );
592
593 // Set the status flag for the particle.
594 int status = Tauolapp::TauolaParticle::HISTORY;
595
596 GenParticlePtr genParticle = newGenParticlePtr( hepMC_p4, PDGInt, status );
597
598 return genParticle;
599}
600
601#endif
double abs(const EvtComplex &c)
HepMC3::GenVertexPtr GenVertexPtr
GenVertexPtr newGenVertexPtr(const FourVector &pos=FourVector::ZERO_VECTOR())
GenParticlePtr newGenParticlePtr(const FourVector &mom=FourVector::ZERO_VECTOR(), int pid=0, int status=0)
HepMC3::GenParticlePtr GenParticlePtr
HepMC3::FourVector FourVector
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition EvtReport.cpp:32
@ EVTGEN_INFO
Definition EvtReport.hh:52
@ EVTGEN_ERROR
Definition EvtReport.hh:49
int getNArg() const
double getArg(unsigned int j)
virtual std::string getName() const =0
double getBranchingFraction() const
static EvtDecayTable & getInstance()
EvtDecayBase * findDecayModel(int aliasInt, int modeInt)
int getNModes(int aliasInt) const
Definition EvtId.hh:27
int getAlias() const
Definition EvtId.hh:43
static int getStdHep(EvtId id)
Definition EvtPDL.cpp:356
static int chg3(EvtId i)
Definition EvtPDL.cpp:366
static EvtId getEntry(int i)
Definition EvtPDL.cpp:386
static EvtId evtIdFromStdHep(int stdhep)
Definition EvtPDL.cpp:241
static std::string name(EvtId i)
Definition EvtPDL.cpp:376
static size_t entries()
Definition EvtPDL.cpp:381
static EvtId getId(const std::string &name)
Definition EvtPDL.cpp:283
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtId getId() const
std::string getName() const
EvtParticle * getDaug(const int i)
void deleteDaughters(bool keepChannel=false)
size_t getNDaug() const
EvtVector4R getP4Lab() const
EvtParticle * getParent() const
void makeDaughters(size_t ndaug, const EvtId *id)
static unsigned long int lastSeed()
Definition EvtRandom.cpp:65
static double Flat()
Definition EvtRandom.cpp:95
static std::string get(const std::string &name, int &ierr)
static int m_posPropType
void initialise() override
static std::mutex m_tauola_mutex
static int m_negPropType
static bool m_initialised
int getModeInt(EvtDecayBase *decayModel) const
EvtTauolaEngine(bool useEvtGenRandom=true, bool seedTauolaFortran=true)
static int m_neutPropType
void decayTauEvent(EvtParticle *tauParticle)
bool doDecay(EvtParticle *theMother) override
GenParticlePtr createGenParticle(const EvtParticle *theParticle) const
static constexpr int m_tauPDG
static constexpr int m_nTauolaModes
double get(int i) const
void set(int i, double d)
void applyBoostTo(const EvtVector4R &p4, bool inverse=false)