Fork me on GitHub

source: git/classes/DelphesSTDHEPReader.h@ 2eaa9fd

Last change on this file since 2eaa9fd 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
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
[1716933]30#include <stdint.h>
[341014c]31#include <stdio.h>
[1716933]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 void AnalyzeParticles(DelphesFactory *factory,
75 TObjArray *allParticleOutputArray,
76 TObjArray *stableParticleOutputArray,
77 TObjArray *partonOutputArray);
78
[1716933]79 void SkipBytes(int size);
80 void SkipArray(int elsize);
[d7d2da3]81
82 void ReadFileHeader();
83 void ReadEventTable();
[f59b6d75]84 void ReadEventHeader();
[d7d2da3]85 void ReadSTDCM1();
86 void ReadSTDHEP();
87 void ReadSTDHEP4();
88
89 FILE *fInputFile;
90
[1716933]91 DelphesXDRReader fReader[7];
[d7d2da3]92
[1716933]93 uint8_t *fBuffer;
[d7d2da3]94
95 TDatabasePDG *fPDG;
96
[1716933]97 uint32_t fEntries;
98 int32_t fBlockType, fEventNumber, fEventSize;
[d7d2da3]99 double fWeight, fAlphaQCD, fAlphaQED;
100
[1716933]101 uint32_t fScaleSize;
[d7d2da3]102 double fScale[10];
103};
104
105#endif // DelphesSTDHEPReader_h
Note: See TracBrowser for help on using the repository browser.