hepmc

Subversion Repositories:
Compare Path: Rev
With Path: Rev
/trunk/ @ 265  →  /trunk/ @ 266
/trunk/examples/list_of_examples.cc
@@ -20,5 +20,7 @@
*/
/** \example testPythiaCopies.cc
*/
/** \example VectorConversion.h
*/
 
// This file is used by Doxygen when generating the documentation.
/trunk/examples/testPythiaCopies.cc
@@ -37,7 +37,7 @@
std::ofstream out3( "testPythiaCopies2.dat" );
//
//........................................EVENT LOOP
for ( int i = 1; i <= 100; i++ ) {
for ( int i = 1; i <= 50; i++ ) {
if ( i%50==1 ) std::cout << "Processing Event Number "
<< i << std::endl;
call_pyevnt(); // generate one event with Pythia
/trunk/examples/example_BuildEventFromScratch.cc
@@ -123,7 +123,7 @@
for ( GenEvent::particle_const_iterator p = evt->particles_begin();
p != evt->particles_end(); ++p ){
if( (*p)->status() == 1 ) {
sum += SVtoLV( (*p)->momentum() );
sum += convertTo( (*p)->momentum() );
(*p)->print();
}
}
/trunk/examples/VectorConversion.h
@@ -2,17 +2,27 @@
#define VECTOR_CONVERSION_H
//////////////////////////////////////////////////////////////////////////
// garren@fnal.gov, January 2007
// Example conversion functions
// This example converts from ThreeVector and FourVector to CLHEP::HepLorentzVector
//
// This example converts from ThreeVector and FourVector to
// CLHEP::Hep3Vector and CLHEP::HepLorentzVector
// Similar (or perhaps templated) conversion methods could be added to
// any vector class.
//
//////////////////////////////////////////////////////////////////////////
 
#include "HepMC/SimpleVector.h"
#include "CLHEP/Vector/LorentzVector.h"
///
/// \namespace CLHEP
/// CLHEP Vector classes are used in one of the examples
///
 
CLHEP::HepLorentzVector SVtoLV( const HepMC::ThreeVector& v )
{ return CLHEP::HepLorentzVector( v.x(), v.y(), v.z() ); }
/// Convert from HepMC::ThreeVector to CLHEP::Hep3Vector
CLHEP::Hep3Vector convertTo( const HepMC::ThreeVector& v )
{ return CLHEP::Hep3Vector( v.x(), v.y(), v.z() ); }
 
CLHEP::HepLorentzVector SVtoLV( const HepMC::FourVector& v )
/// Convert from HepMC::FourVector to CLHEP::HepLorentzVector
CLHEP::HepLorentzVector convertTo( const HepMC::FourVector& v )
{ return CLHEP::HepLorentzVector( v.x(), v.y(), v.z(), v.t() ); }
 
#endif // VECTOR_CONVERSION_H
/trunk/examples/testHerwigCopies.cc
@@ -29,7 +29,7 @@
hwproc.PBEAM2 = 7000.; // energy of beam2
// 1610 = gg->H--> WW, 1706 = qq-->ttbar, 2510 = ttH -> ttWW
hwproc.IPROC = 1706; // qq -> ttbar production
hwproc.MAXEV = 100; // number of events
hwproc.MAXEV = 50; // number of events
// tell it what the beam particles are:
for ( unsigned int i = 0; i < 8; ++i ) {
hwbmch.PART1[i] = (i < 1) ? 'P' : ' ';