Fork me on GitHub

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

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

new header in all files

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