Fork me on GitHub

source: svn/trunk/classes/DelphesHepMCReader.h@ 1107

Last change on this file since 1107 was 1105, checked in by Pavel Demin, 12 years ago

add weight for HepMCEvent

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision Date
File size: 1.7 KB
Line 
1#ifndef DelphesHepMCReader_h
2#define DelphesHepMCReader_h
3
4/** \class DelphesHepMCReader
5 *
6 * Reads HepMC file
7 *
8 *
9 * $Date: 2013-05-01 17:29:33 +0000 (Wed, 01 May 2013) $
10 * $Revision: 1105 $
11 *
12 *
13 * \author P. Demin - UCL, Louvain-la-Neuve
14 *
15 */
16
17#include <map>
18#include <vector>
19
20#include <stdio.h>
21
22class TObjArray;
23class TStopwatch;
24class TDatabasePDG;
25class ExRootTreeBranch;
26class DelphesFactory;
27
28class DelphesHepMCReader
29{
30public:
31
32 DelphesHepMCReader();
33 ~DelphesHepMCReader();
34
35 void SetInputFile(FILE *inputFile);
36
37 void Clear();
38 bool EventReady();
39
40 bool ReadBlock(DelphesFactory *factory,
41 TObjArray *allParticleOutputArray,
42 TObjArray *stableParticleOutputArray,
43 TObjArray *partonOutputArray);
44
45 void AnalyzeEvent(ExRootTreeBranch *branch, long long eventNumber,
46 TStopwatch *readStopWatch, TStopwatch *procStopWatch);
47
48private:
49
50 void AnalyzeParticle(DelphesFactory *factory,
51 TObjArray *allParticleOutputArray,
52 TObjArray *stableParticleOutputArray,
53 TObjArray *partonOutputArray);
54
55 void FinalizeParticles(TObjArray *allParticleOutputArray);
56
57 FILE *fInputFile;
58
59 char *fBuffer;
60
61 TDatabasePDG *fPDG;
62
63 int fEventNumber, fMPI, fProcessID, fSignalCode, fVertexCounter, fBeamCode[2];
64 double fScale, fAlphaQCD, fAlphaQED;
65
66 int fStateSize;
67 std::vector< int > fState;
68
69 int fWeightSize;
70 std::vector< double > fWeight;
71
72 int fID1, fID2;
73 double fX1, fX2, fScalePDF, fPDF1, fPDF2;
74
75 int fOutVertexCode, fVertexID, fInCounter, fOutCounter;
76 double fX, fY, fZ, fT;
77
78 int fParticleCode, fPID, fStatus, fInVertexCode;
79 double fPx, fPy, fPz, fE, fMass, fTheta, fPhi;
80
81 int fParticleCounter;
82
83 std::map< int, std::pair < int, int > > fMotherMap;
84 std::map< int, std::pair < int, int > > fDaughterMap;
85};
86
87#endif // DelphesHepMCReader_h
88
89
Note: See TracBrowser for help on using the repository browser.