-
Notifications
You must be signed in to change notification settings - Fork 0
/
HepMC2Reader.hh
57 lines (39 loc) · 1.21 KB
/
HepMC2Reader.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef HEPMC2READER_HH
#define HEPMC2READER_HH
#include "NtupleReader.hh"
#include "TLorentzVector.h"
#include <vector>
#include <string>
#include <map>
#include <iostream>
#include "HepMC/GenEvent.h"
#include "HepMC/GenParticle.h"
#include "HepMC/IO_GenEvent.h"
class HepMC2Reader : public NtupleReader {
public:
HepMC2Reader( const std::string& filename );
virtual ~HepMC2Reader();
virtual Int_t GetNumberEntries() { return 0; }
virtual bool GetEvent( Int_t ievent=0 );
virtual bool GetNextEvent( Int_t maxevt=0 );
virtual const std::vector<TLorentzVector> GetLorentzVectors( const std::string & opt );
virtual const std::map<std::string,bool> getSelections( const std::string & ) {
return std::map<std::string,bool>();
}
virtual bool MCNonRad();
virtual bool isMC() { return true; }
virtual void printParticlesVertices();
private:
void findISRphotons();
void getHadron();
void getParton();
void getIsr();
std::ifstream input;
Int_t nevent;
HepMC::GenEvent event;
std::vector<const HepMC::GenParticle*> ISRphotons;
std::vector<TLorentzVector> vtlv;
std::map<std::string,std::vector<TLorentzVector>> vtlvCache;
std::map<std::string,Bool_t> cacheIsValid;
};
#endif