Fork me on GitHub

source: svn/trunk/interface/HepMCConverter.h@ 380

Last change on this file since 380 was 380, checked in by Xavier Rouby, 15 years ago

new PDG table

File size: 3.5 KB
Line 
1#ifndef _HEPMCCONVERTER_H_
2#define _HEPMCCONVERTER_H_
3
4/***********************************************************************
5** **
6** /----------------------------------------------\ **
7** | Delphes, a framework for the fast simulation | **
8** | of a generic collider experiment | **
9** \----------------------------------------------/ **
10** **
11** **
12** This package uses: **
13** ------------------ **
14** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] **
15** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] **
16** FROG: [hep-ex/0901.2718v1] **
17** **
18** ------------------------------------------------------------------ **
19** **
20** Main authors: **
21** ------------- **
22** **
23** Severine Ovyn Xavier Rouby **
24** severine.ovyn@uclouvain.be xavier.rouby@cern **
25** **
26** Center for Particle Physics and Phenomenology (CP3) **
27** Universite catholique de Louvain (UCL) **
28** Louvain-la-Neuve, Belgium **
29** **
30** Copyright (C) 2008-2009, **
31** All rights reserved. **
32** **
33***********************************************************************/
34
35
36#include <string>
37#include "DataConverter.h"
38
39#include "GenParticle.h"
40#include "GenVertex.h"
41#include "GenEvent.h"
42#include "IO_Ascii.h"
43
44using namespace std;
45
46class HepMCConverter : public DataConverter {
47 public:
48 HepMCConverter(const string& inputFileList, const string& outputFileName, const PdgTable& pdg, const int& Nevents=-1);
49 virtual ~HepMCConverter();
50
51 // const iterator for incoming particles
52 typedef std::vector<HepMC::GenParticle*>::const_iterator particles_in_const_iterator;
53
54
55
56 private:
57 void AnalyseEvent(ExRootTreeBranch *branch,HepMC::GenEvent& evt,const Long64_t eventNumber);
58 void AnalyseParticles(ExRootTreeBranch *branch, const HepMC::GenEvent& evt);
59 void getStatsFromTuple(int &mo1, int &mo2, int &da1, int &da2, int &status, int &pid, int j) const;
60 void ReadStats();
61
62 int mo1, mo2, da1, da2, status, pid;
63 HepMC::GenEvent *evt;
64
65 int rdstate() const;
66 //maps to convert HepMC::GenParticle to particles # and vice versa
67 // -> needed for HepEvt like output
68 std::vector<HepMC::GenParticle*> index_to_particle;
69 std::map<HepMC::GenParticle*,int> particle_to_index;
70 // find index to HepMC::GenParticle* p in map m
71 int find_in_map(const std::map<HepMC::GenParticle*,int>& m,HepMC::GenParticle *p) const;
72
73};
74
75#endif
Note: See TracBrowser for help on using the repository browser.