Fork me on GitHub

source: git/classes/DelphesSTDHEPReader.h@ 6301e02

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 6301e02 was 7c0fcd5, checked in by Pavel Demin <demin@…>, 10 years ago

delete duplicate license file and prepend GPLv3 header to all source code files

  • Property mode set to 100644
File size: 2.5 KB
Line 
1/*
2 * Delphes: a framework for fast simulation of a generic collider experiment
3 * Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium
4 *
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.
9 *
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.
14 *
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
19#ifndef DelphesSTDHEPReader_h
20#define DelphesSTDHEPReader_h
21
22/** \class DelphesSTDHEPReader
23 *
24 * Reads STDHEP file
25 *
26 *
27 * $Date$
28 * $Revision$
29 *
30 *
31 * \author P. Demin - UCL, Louvain-la-Neuve
32 *
33 */
34
35#include <stdio.h>
36#include <rpc/types.h>
37#include <rpc/xdr.h>
38
39class TObjArray;
40class TStopwatch;
41class TDatabasePDG;
42class ExRootTreeBranch;
43class DelphesFactory;
44
45class DelphesSTDHEPReader
46{
47public:
48 enum STDHEPBlock
49 {
50 GENERIC = 0,
51 FILEHEADER = 1,
52 EVENTTABLE = 2,
53 EVENTHEADER = 4,
54 MCFIO_STDHEP = 101,
55 MCFIO_STDHEPBEG = 106,
56 MCFIO_STDHEPEND = 107,
57 MCFIO_STDHEP4 = 201
58 };
59
60 DelphesSTDHEPReader();
61 ~DelphesSTDHEPReader();
62
63 void SetInputFile(FILE *inputFile);
64
65 void Clear();
66 bool EventReady();
67
68 bool ReadBlock(DelphesFactory *factory,
69 TObjArray *allParticleOutputArray,
70 TObjArray *stableParticleOutputArray,
71 TObjArray *partonOutputArray);
72
73 void AnalyzeEvent(ExRootTreeBranch *branch, long long eventNumber,
74 TStopwatch *readStopWatch, TStopwatch *procStopWatch);
75
76private:
77
78 void AnalyzeParticles(DelphesFactory *factory,
79 TObjArray *allParticleOutputArray,
80 TObjArray *stableParticleOutputArray,
81 TObjArray *partonOutputArray);
82
83 void SkipBytes(u_int size);
84 void SkipArray(u_int elsize);
85
86 void ReadFileHeader();
87 void ReadEventTable();
88 void ReadEventHeader();
89 void ReadSTDCM1();
90 void ReadSTDHEP();
91 void ReadSTDHEP4();
92
93 FILE *fInputFile;
94
95 XDR *fInputXDR;
96
97 char *fBuffer;
98
99 TDatabasePDG *fPDG;
100
101 u_int fEntries;
102 int fBlockType, fEventNumber, fEventSize;
103 double fWeight, fAlphaQCD, fAlphaQED;
104
105 u_int fScaleSize;
106 double fScale[10];
107};
108
109#endif // DelphesSTDHEPReader_h
110
111
Note: See TracBrowser for help on using the repository browser.