1 | #ifndef _HEPEVTCONVERTER_H_
|
---|
2 | #define _HEPEVTCONVERTER_H_
|
---|
3 |
|
---|
4 | /***********************************************************************
|
---|
5 | ** **
|
---|
6 | ** /----------------------------------------------\ **
|
---|
7 | ** | Delphes, a framework for the fast simulation | **
|
---|
8 | ** | of a generic collider experiment | **
|
---|
9 | ** \----------------------------------------------/ **
|
---|
10 | ** **
|
---|
11 | ** **
|
---|
12 | ** This package uses: **
|
---|
13 | ** ------------------ **
|
---|
14 | ** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] **
|
---|
15 | ** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] **
|
---|
16 | ** FROG: [hep-ex/0901.2718v1] **
|
---|
17 | ** **
|
---|
18 | ** ------------------------------------------------------------------ **
|
---|
19 | ** **
|
---|
20 | ** Main authors: **
|
---|
21 | ** ------------- **
|
---|
22 | ** **
|
---|
23 | ** Severine Ovyn Xavier Rouby **
|
---|
24 | ** severine.ovyn@uclouvain.be xavier.rouby@cern **
|
---|
25 | ** **
|
---|
26 | ** Center for Particle Physics and Phenomenology (CP3) **
|
---|
27 | ** Universite catholique de Louvain (UCL) **
|
---|
28 | ** Louvain-la-Neuve, Belgium **
|
---|
29 | ** **
|
---|
30 | ** Copyright (C) 2008-2009, **
|
---|
31 | ** All rights reserved. **
|
---|
32 | ** **
|
---|
33 | ***********************************************************************/
|
---|
34 |
|
---|
35 | #include <deque>
|
---|
36 |
|
---|
37 | #include "BlockClasses.h"
|
---|
38 | #include "TSimpleArray.h"
|
---|
39 | #include "DataConverter.h"
|
---|
40 | using namespace std;
|
---|
41 |
|
---|
42 | //------------------------------------------------------------------------------
|
---|
43 | //
|
---|
44 | struct HEPEvent
|
---|
45 | {
|
---|
46 | Int_t Nevhep;
|
---|
47 | Int_t Nhep;
|
---|
48 | Int_t *Idhep; //[Nhep]
|
---|
49 | Int_t *Jsmhep; //[Nhep]
|
---|
50 | Int_t *Jsdhep; //[Nhep]
|
---|
51 | Float_t *Phep; //[Nhep][5]
|
---|
52 | Float_t *Vhep; //[Nhep][4]
|
---|
53 | Int_t Irun;
|
---|
54 | Int_t Ievt;
|
---|
55 | Float_t Weight;
|
---|
56 | Float_t Xsecn;
|
---|
57 | Int_t Ifilter;
|
---|
58 | Int_t Nparam;
|
---|
59 | Float_t *Param; //[Nparam]
|
---|
60 | };
|
---|
61 | //
|
---|
62 |
|
---|
63 | //
|
---|
64 | class HEPTreeReader {
|
---|
65 |
|
---|
66 | public:
|
---|
67 |
|
---|
68 | HEPTreeReader(TTree *tree, HEPEvent *event);
|
---|
69 | ~HEPTreeReader();
|
---|
70 |
|
---|
71 | Long64_t GetEntries() const { return fChain ? static_cast<Long64_t>(fChain->GetEntries()) : 0; }
|
---|
72 | Bool_t ReadEntry(Long64_t element);
|
---|
73 |
|
---|
74 | private:
|
---|
75 |
|
---|
76 | void Notify();
|
---|
77 |
|
---|
78 | TTree *fChain; // pointer to the analyzed TTree or TChain
|
---|
79 | Int_t fCurrentTree; // current Tree number in a TChain
|
---|
80 | HEPEvent *fEvent;
|
---|
81 | deque< pair<TString, TBranch*> > fBranches;
|
---|
82 |
|
---|
83 | };
|
---|
84 |
|
---|
85 |
|
---|
86 | class HEPEVTConverter : public DataConverter {
|
---|
87 |
|
---|
88 | public:
|
---|
89 |
|
---|
90 | HEPEVTConverter(const string& inputFileList, const string& outputFileName);
|
---|
91 |
|
---|
92 | };
|
---|
93 |
|
---|
94 |
|
---|
95 | #endif
|
---|