Fork me on GitHub

source: git/classes/DelphesSTDHEPReader.h@ 32b2ff1

Timing
Last change on this file since 32b2ff1 was 341014c, checked in by Pavel Demin <pavel-demin@…>, 6 years ago

apply .clang-format to all .h, .cc and .cpp 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 * \author P. Demin - UCL, Louvain-la-Neuve
27 *
28 */
29
30#include <stdint.h>
31#include <stdio.h>
32
33#include "classes/DelphesXDRReader.h"
34
35class TObjArray;
36class TStopwatch;
37class TDatabasePDG;
38class ExRootTreeBranch;
39class DelphesFactory;
40class DelphesXDRReader;
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 void AnalyzeParticles(DelphesFactory *factory,
75 TObjArray *allParticleOutputArray,
76 TObjArray *stableParticleOutputArray,
77 TObjArray *partonOutputArray);
78
79 void SkipBytes(int size);
80 void SkipArray(int elsize);
81
82 void ReadFileHeader();
83 void ReadEventTable();
84 void ReadEventHeader();
85 void ReadSTDCM1();
86 void ReadSTDHEP();
87 void ReadSTDHEP4();
88
89 FILE *fInputFile;
90
91 DelphesXDRReader fReader[7];
92
93 uint8_t *fBuffer;
94
95 TDatabasePDG *fPDG;
96
97 uint32_t fEntries;
98 int32_t fBlockType, fEventNumber, fEventSize;
99 double fWeight, fAlphaQCD, fAlphaQED;
100
101 uint32_t fScaleSize;
102 double fScale[10];
103};
104
105#endif // DelphesSTDHEPReader_h
Note: See TracBrowser for help on using the repository browser.