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