Fork me on GitHub

source: git/classes/DelphesSTDHEPReader.h@ 9a9afa8

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 9a9afa8 was cab38f6, checked in by Pavel Demin <pavel.demin@…>, 10 years ago

remove svn tags and fix formatting

  • Property mode set to 100644
File size: 2.4 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>
31#include <rpc/types.h>
32#include <rpc/xdr.h>
33
34class TObjArray;
35class TStopwatch;
36class TDatabasePDG;
37class ExRootTreeBranch;
38class DelphesFactory;
39
40class DelphesSTDHEPReader
41{
42public:
43 enum STDHEPBlock
44 {
45 GENERIC = 0,
46 FILEHEADER = 1,
47 EVENTTABLE = 2,
48 EVENTHEADER = 4,
49 MCFIO_STDHEP = 101,
50 MCFIO_STDHEPBEG = 106,
51 MCFIO_STDHEPEND = 107,
52 MCFIO_STDHEP4 = 201
53 };
54
55 DelphesSTDHEPReader();
56 ~DelphesSTDHEPReader();
57
58 void SetInputFile(FILE *inputFile);
59
60 void Clear();
61 bool EventReady();
62
63 bool ReadBlock(DelphesFactory *factory,
64 TObjArray *allParticleOutputArray,
65 TObjArray *stableParticleOutputArray,
66 TObjArray *partonOutputArray);
67
68 void AnalyzeEvent(ExRootTreeBranch *branch, long long eventNumber,
69 TStopwatch *readStopWatch, TStopwatch *procStopWatch);
70
71private:
72
73 void AnalyzeParticles(DelphesFactory *factory,
74 TObjArray *allParticleOutputArray,
75 TObjArray *stableParticleOutputArray,
76 TObjArray *partonOutputArray);
77
78 void SkipBytes(u_int size);
79 void SkipArray(u_int elsize);
80
81 void ReadFileHeader();
82 void ReadEventTable();
[f59b6d75]83 void ReadEventHeader();
[d7d2da3]84 void ReadSTDCM1();
85 void ReadSTDHEP();
86 void ReadSTDHEP4();
87
88 FILE *fInputFile;
89
90 XDR *fInputXDR;
91
92 char *fBuffer;
93
94 TDatabasePDG *fPDG;
95
96 u_int fEntries;
97 int fBlockType, fEventNumber, fEventSize;
98 double fWeight, fAlphaQCD, fAlphaQED;
99
100 u_int fScaleSize;
101 double fScale[10];
102};
103
104#endif // DelphesSTDHEPReader_h
105
106
Note: See TracBrowser for help on using the repository browser.