1 | #ifndef DelphesHepMCReader_h
|
---|
2 | #define DelphesHepMCReader_h
|
---|
3 |
|
---|
4 | /** \class DelphesHepMCReader
|
---|
5 | *
|
---|
6 | * Reads HepMC file
|
---|
7 | *
|
---|
8 | *
|
---|
9 | * $Date$
|
---|
10 | * $Revision$
|
---|
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 |
|
---|
22 | class TObjArray;
|
---|
23 | class TStopwatch;
|
---|
24 | class TDatabasePDG;
|
---|
25 | class ExRootTreeBranch;
|
---|
26 | class DelphesFactory;
|
---|
27 |
|
---|
28 | class DelphesHepMCReader
|
---|
29 | {
|
---|
30 | public:
|
---|
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 |
|
---|
48 | private:
|
---|
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 | double fMomentumCoefficient, fPositionCoefficient;
|
---|
67 |
|
---|
68 | int fStateSize;
|
---|
69 | std::vector< int > fState;
|
---|
70 |
|
---|
71 | int fWeightSize;
|
---|
72 | std::vector< double > fWeight;
|
---|
73 |
|
---|
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 |
|
---|