[1052] | 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>
|
---|
[1105] | 18 | #include <vector>
|
---|
[1052] | 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 |
|
---|
[1105] | 63 | int fEventNumber, fMPI, fProcessID, fSignalCode, fVertexCounter, fBeamCode[2];
|
---|
[1052] | 64 | double fScale, fAlphaQCD, fAlphaQED;
|
---|
| 65 |
|
---|
[1105] | 66 | int fStateSize;
|
---|
| 67 | std::vector< int > fState;
|
---|
| 68 |
|
---|
| 69 | int fWeightSize;
|
---|
| 70 | std::vector< double > fWeight;
|
---|
| 71 |
|
---|
[1052] | 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 |
|
---|