Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:07:32

0001 #ifndef _READ_PARTICLES_FROM_HEPMC_H_
0002 #define _READ_PARTICLES_FROM_HEPMC_H_
0003 
0004 // HepMC headers
0005 #include "HepMC/GenEvent.h"
0006 #include "HepMC/GenParticle.h"
0007 #include "HepMC/IO_GenEvent.h"
0008 
0009 #include "TauSpinner/SimpleParticle.h"
0010 #include <vector>
0011 
0012 /** Read HepMC::GenEvent.
0013 
0014   Read HepMC event from data file
0015   and return particles needed for tau spin weight calculation.
0016   
0017   This routine is prepared for use with files generated by Pythia8.
0018   Fills:
0019   
0020   'X'              - Heavy particle (W+/-, H+/-, H, Z)
0021   'tau'            - first tau
0022   
0023   'tau_daughters'  - daughters of 'tau'
0024   'tau2_daughters' - daughters of 'tau2' or empty list, if 'tau2' is nu_tau.
0025   
0026   Returns:
0027   0 - event processed correctly 
0028   1 - empty event or no decay found in the event
0029 */
0030 
0031 int readParticlesFromHepMC(const HepMC::GenEvent *event,
0032                            TauSpinner::SimpleParticle &X,
0033                            TauSpinner::SimpleParticle &tau,
0034                            TauSpinner::SimpleParticle &tau2,
0035                            std::vector<TauSpinner::SimpleParticle> &tau_daughters,
0036                            std::vector<TauSpinner::SimpleParticle> &tau2_daughters);
0037 
0038 // Get daughters of HepMC::GenParticle Recursively searches for final-state daughters of 'x'
0039 std::vector<TauSpinner::SimpleParticle> *getDaughters(HepMC::GenParticle *x);
0040 
0041 // Find last self Recursively finds the last particle with the same PDG ID on the list of its decay products
0042 HepMC::GenParticle *findLastSelf(HepMC::GenParticle *x);
0043 bool isFirst(HepMC::GenParticle *x);
0044 #endif