Fork me on GitHub

source: git/classes/DelphesSTDHEPReader.h@ e57c062

ImprovedOutputFile Timing dual_readout llp
Last change on this file since e57c062 was 1716933, checked in by Pavel Demin <pavel-demin@…>, 6 years ago

add DelphesXDRReader and DelphesXDRWriter

  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[b443089]1/*
2 * Delphes: a framework for fast simulation of a generic collider experiment
3 * Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium
[1fa50c2]4 *
[b443089]5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
[1fa50c2]9 *
[b443089]10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
[1fa50c2]14 *
[b443089]15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
[d7d2da3]19#ifndef DelphesSTDHEPReader_h
20#define DelphesSTDHEPReader_h
21
22/** \class DelphesSTDHEPReader
23 *
24 * Reads STDHEP file
25 *
26 * \author P. Demin - UCL, Louvain-la-Neuve
27 *
28 */
29
30#include <stdio.h>
[1716933]31#include <stdint.h>
32
33#include "classes/DelphesXDRReader.h"
[d7d2da3]34
35class TObjArray;
36class TStopwatch;
37class TDatabasePDG;
38class ExRootTreeBranch;
39class DelphesFactory;
[1716933]40class DelphesXDRReader;
[d7d2da3]41
42class DelphesSTDHEPReader
43{
44public:
45 enum STDHEPBlock
46 {
47 GENERIC = 0,
48 FILEHEADER = 1,
49 EVENTTABLE = 2,
50 EVENTHEADER = 4,
51 MCFIO_STDHEP = 101,
52 MCFIO_STDHEPBEG = 106,
53 MCFIO_STDHEPEND = 107,
54 MCFIO_STDHEP4 = 201
55 };
56
57 DelphesSTDHEPReader();
58 ~DelphesSTDHEPReader();
59
60 void SetInputFile(FILE *inputFile);
61
62 void Clear();
63 bool EventReady();
64
65 bool ReadBlock(DelphesFactory *factory,
66 TObjArray *allParticleOutputArray,
67 TObjArray *stableParticleOutputArray,
68 TObjArray *partonOutputArray);
69
70 void AnalyzeEvent(ExRootTreeBranch *branch, long long eventNumber,
71 TStopwatch *readStopWatch, TStopwatch *procStopWatch);
72
73private:
74
75 void AnalyzeParticles(DelphesFactory *factory,
76 TObjArray *allParticleOutputArray,
77 TObjArray *stableParticleOutputArray,
78 TObjArray *partonOutputArray);
79
[1716933]80 void SkipBytes(int size);
81 void SkipArray(int elsize);
[d7d2da3]82
83 void ReadFileHeader();
84 void ReadEventTable();
[f59b6d75]85 void ReadEventHeader();
[d7d2da3]86 void ReadSTDCM1();
87 void ReadSTDHEP();
88 void ReadSTDHEP4();
89
90 FILE *fInputFile;
91
[1716933]92 DelphesXDRReader fReader[7];
[d7d2da3]93
[1716933]94 uint8_t *fBuffer;
[d7d2da3]95
96 TDatabasePDG *fPDG;
97
[1716933]98 uint32_t fEntries;
99 int32_t fBlockType, fEventNumber, fEventSize;
[d7d2da3]100 double fWeight, fAlphaQCD, fAlphaQED;
101
[1716933]102 uint32_t fScaleSize;
[d7d2da3]103 double fScale[10];
104};
105
106#endif // DelphesSTDHEPReader_h
Note: See TracBrowser for help on using the repository browser.