1 |
#ifndef HbbAnalysis_MCTreeMaker_hh
|
2 |
#define HbbAnalysis_MCTreeMaker_hh
|
3 |
|
4 |
#include <fstream>
|
5 |
#include <string>
|
6 |
#include <iostream>
|
7 |
#include <vector>
|
8 |
|
9 |
#include "Math/VectorUtil.h"
|
10 |
|
11 |
#include "FWCore/Framework/interface/EDAnalyzer.h"
|
12 |
#include "FWCore/Framework/interface/ESHandle.h"
|
13 |
#include "FWCore/Framework/interface/Event.h"
|
14 |
#include "FWCore/Framework/interface/EventSetup.h"
|
15 |
#include "FWCore/ParameterSet/interface/ParameterSet.h"
|
16 |
|
17 |
#include "DataFormats/Common/interface/Handle.h"
|
18 |
|
19 |
#include "DataFormats/JetReco/interface/GenJet.h"
|
20 |
#include "SimDataFormats/GeneratorProducts/interface/GenRunInfoProduct.h"
|
21 |
#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
|
22 |
#include "SimDataFormats/GeneratorProducts/interface/LHEEventProduct.h"
|
23 |
#include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h"
|
24 |
|
25 |
#include "UserCode/HbbAnalysis/interface/MCEvent.hh"
|
26 |
|
27 |
|
28 |
#include "DataFormats/PatCandidates/interface/Jet.h"
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
#include "TTree.h"
|
34 |
#include "boost/regex.hpp"
|
35 |
|
36 |
class MCTreeMaker : public edm::EDAnalyzer {//class
|
37 |
|
38 |
public:
|
39 |
|
40 |
MCTreeMaker(const edm::ParameterSet & pset);
|
41 |
~MCTreeMaker();
|
42 |
|
43 |
void beginJob();
|
44 |
void analyze(const edm::Event& ,
|
45 |
const edm::EventSetup&
|
46 |
);
|
47 |
void beginRun(const edm::Run& ,
|
48 |
const edm::EventSetup&
|
49 |
);
|
50 |
void endJob();
|
51 |
|
52 |
private:
|
53 |
|
54 |
void HbbParticles(const edm::Handle<reco::GenParticleCollection> & aCol,
|
55 |
std::vector<HbbAnalysis::GenParticle> & aVec, HbbAnalysis::P4Total & p4total);
|
56 |
|
57 |
void HbbGenJets(const edm::Handle<reco::GenJetCollection> & aCol,
|
58 |
std::vector<HbbAnalysis::GenJet> & aVec,
|
59 |
const bool aSaveConstituants);
|
60 |
|
61 |
|
62 |
void HbbLHEInfo(const edm::Handle<LHEEventProduct> & aLHEEvt,
|
63 |
std::vector<HbbAnalysis::GenParticle> & aVec);
|
64 |
|
65 |
void HbbJets(const edm::Handle<std::vector<pat::Jet> > & aCol,
|
66 |
const edm::Handle<reco::GenParticleCollection> & aGenParticles,
|
67 |
std::vector<HbbAnalysis::Jet> & aVec);
|
68 |
|
69 |
int debug_;
|
70 |
|
71 |
bool doGen_;
|
72 |
|
73 |
edm::InputTag genParticleSrc_;
|
74 |
edm::InputTag genJetSrc_;
|
75 |
edm::InputTag partonJetSrc_;
|
76 |
edm::InputTag pfJetSrc_;
|
77 |
std::vector<std::string> status1ToKeep_;
|
78 |
std::vector<std::string> status2ToKeep_;
|
79 |
std::vector<std::string> status3ToKeep_;
|
80 |
std::vector<boost::regex> status1ToKeepRegex_;
|
81 |
std::vector<boost::regex> status2ToKeepRegex_;
|
82 |
std::vector<boost::regex> status3ToKeepRegex_;
|
83 |
|
84 |
HbbAnalysis::MCEvent * event_;
|
85 |
|
86 |
TTree *tree_;
|
87 |
|
88 |
|
89 |
};//class
|
90 |
|
91 |
#endif //HbbAnalysis_MCTreeMaker_hh
|