Fork me on GitHub

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

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

read momentum and position units from HepMC file

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision Date
File size: 1.8 KB
RevLine 
[1052]1#ifndef DelphesHepMCReader_h
2#define DelphesHepMCReader_h
3
4/** \class DelphesHepMCReader
5 *
6 * Reads HepMC file
7 *
8 *
9 * $Date: 2013-05-07 13:27:32 +0000 (Tue, 07 May 2013) $
10 * $Revision: 1108 $
11 *
12 *
13 * \author P. Demin - UCL, Louvain-la-Neuve
14 *
15 */
16
17#include <map>
[1105]18#include <vector>
[1052]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
[1105]63 int fEventNumber, fMPI, fProcessID, fSignalCode, fVertexCounter, fBeamCode[2];
[1052]64 double fScale, fAlphaQCD, fAlphaQED;
65
[1108]66 double fMomentumCoefficient, fPositionCoefficient;
67
[1105]68 int fStateSize;
69 std::vector< int > fState;
70
71 int fWeightSize;
72 std::vector< double > fWeight;
73
[1052]74 int fID1, fID2;
75 double fX1, fX2, fScalePDF, fPDF1, fPDF2;
76
77 int fOutVertexCode, fVertexID, fInCounter, fOutCounter;
78 double fX, fY, fZ, fT;
79
80 int fParticleCode, fPID, fStatus, fInVertexCode;
81 double fPx, fPy, fPz, fE, fMass, fTheta, fPhi;
82
83 int fParticleCounter;
84
85 std::map< int, std::pair < int, int > > fMotherMap;
86 std::map< int, std::pair < int, int > > fDaughterMap;
87};
88
89#endif // DelphesHepMCReader_h
90
91
Note: See TracBrowser for help on using the repository browser.