7 |
|
#include <iostream> |
8 |
|
|
9 |
|
// user include files |
10 |
– |
#include "FWCore/Framework/interface/Frameworkfwd.h" |
11 |
– |
#include "FWCore/Framework/interface/EDAnalyzer.h" |
10 |
|
#include "FWCore/Framework/interface/Event.h" |
13 |
– |
//#include "FWCore/Framework/interface/Handle.h" |
14 |
– |
#include "FWCore/Framework/interface/MakerMacros.h" |
11 |
|
#include "FWCore/ParameterSet/interface/ParameterSet.h" |
12 |
|
#include "FWCore/Framework/interface/ESHandle.h" |
13 |
|
|
14 |
+ |
#include "DataFormats/JetReco/interface/GenJet.h" |
15 |
+ |
#include "DataFormats/METReco/interface/GenMET.h" |
16 |
|
#include "DataFormats/HepMCCandidate/interface/GenParticle.h" |
17 |
|
#include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h" |
18 |
|
|
19 |
+ |
#include "SimDataFormats/HepMCProduct/interface/HepMCProduct.h" |
20 |
+ |
|
21 |
|
#include "SimDataFormats/Track/interface/SimTrack.h" |
22 |
|
#include "SimDataFormats/Track/interface/SimTrackContainer.h" |
23 |
|
#include "SimDataFormats/Vertex/interface/SimVertex.h" |
27 |
|
#include "RecoEgamma/EgammaMCTools/interface/ElectronMCTruth.h" |
28 |
|
//#include "DataFormats/EgammaCandidates/interface/ConvertedPhoton.h" |
29 |
|
|
30 |
< |
#include "UserCode/Morgan/interface/ParticleTreeDrawer.h" |
31 |
< |
#include "UserCode/Morgan/interface/TRootEvent.h" |
32 |
< |
#include "UserCode/Morgan/interface/TRootSignalEvent.h" |
33 |
< |
#include "UserCode/Morgan/interface/TRootParticle.h" |
34 |
< |
#include "UserCode/Morgan/interface/TRootMCPhoton.h" |
30 |
> |
#include "../interface/ParticleTreeDrawer.h" |
31 |
> |
#include "../interface/TRootEvent.h" |
32 |
> |
#include "../interface/TRootSignalEvent.h" |
33 |
> |
#include "../interface/TRootTopTop.h" |
34 |
> |
#include "../interface/TRootParticle.h" |
35 |
> |
#include "../interface/TRootMCParticle.h" |
36 |
> |
#include "../interface/TRootMCPhoton.h" |
37 |
> |
#include "../interface/TRootJet.h" |
38 |
|
|
39 |
|
#include "TClonesArray.h" |
40 |
|
|
41 |
|
|
42 |
+ |
class MCAnalyzer |
43 |
+ |
{ |
44 |
+ |
|
45 |
+ |
public: |
46 |
+ |
MCAnalyzer(const edm::ParameterSet& config, const edm::ParameterSet& producersNames); |
47 |
+ |
~MCAnalyzer(); |
48 |
+ |
void setVerbosity(int verbosity) {verbosity_ = verbosity; }; |
49 |
+ |
void drawMCTree(const edm::Event& iEvent, const edm::EventSetup& iSetup, const edm::ParameterSet& config, const edm::ParameterSet& producersNames); |
50 |
+ |
bool pdfInfo(const edm::Event& iEvent, TRootEvent* rootEvent); |
51 |
+ |
bool processMCParticle(const edm::Event& iEvent, TClonesArray* rootMCParticles); |
52 |
+ |
bool processGenJets(const edm::Event& iEvent, TClonesArray* rootGenJets); |
53 |
+ |
bool processGenMETs(const edm::Event& iEvent, TClonesArray* rootGenMETs); |
54 |
+ |
bool processConvertedPhoton(const edm::Event& iEvent, TClonesArray* rootMCPhotons); |
55 |
+ |
bool processMuMuGammaEvent(const edm::Event& iEvent, TRootSignalEvent* rootSignalEvent); |
56 |
+ |
bool processTopTopEvent(const edm::Event& iEvent, TClonesArray* rootMCTopTop); |
57 |
+ |
|
58 |
+ |
private: |
59 |
+ |
|
60 |
+ |
int verbosity_; |
61 |
+ |
|
62 |
+ |
bool doPhotonMC_; |
63 |
+ |
double photonMC_etaMax_; |
64 |
+ |
double photonMC_ptMin_; |
65 |
+ |
bool doElectronMC_; |
66 |
+ |
double electronMC_etaMax_; |
67 |
+ |
double electronMC_ptMin_; |
68 |
+ |
bool doMuonMC_; |
69 |
+ |
double muonMC_etaMax_; |
70 |
+ |
double muonMC_ptMin_; |
71 |
+ |
bool doJetMC_; |
72 |
+ |
double jetMC_etaMax_; |
73 |
+ |
double jetMC_ptMin_; |
74 |
+ |
bool doMETMC_; |
75 |
+ |
bool doUnstablePartsMC_; |
76 |
+ |
|
77 |
+ |
std::string signalGenerator_; |
78 |
+ |
edm::InputTag genParticlesProducer_; |
79 |
+ |
edm::InputTag genJetsProducer_; |
80 |
+ |
edm::InputTag genMETsProducer_; |
81 |
+ |
|
82 |
+ |
bool allowMissingCollection_; |
83 |
|
|
40 |
– |
class MCAnalyzer{ |
41 |
– |
|
42 |
– |
public: |
43 |
– |
MCAnalyzer(); |
44 |
– |
MCAnalyzer(edm::ParameterSet * aConfig); |
45 |
– |
~MCAnalyzer(); |
46 |
– |
void SetVerbosity(int idebug) {verbosity = idebug; }; |
47 |
– |
void Process(const edm::Event& iEvent, const edm::EventSetup & iSetup, TRootEvent* rootEvent, TRootSignalEvent* rootSignalEvent, TClonesArray* rootMCParticles, TClonesArray* rootMCPhotons); |
48 |
– |
|
49 |
– |
private: |
50 |
– |
edm::ParameterSet * myConfig; |
51 |
– |
int verbosity; |
52 |
– |
|
53 |
– |
bool drawMCTree; |
54 |
– |
bool mcTreePrintP4; |
55 |
– |
bool mcTreePrintPtEtaPhi; |
56 |
– |
bool mcTreePrintVertex; |
57 |
– |
bool mcTreePrintStatus; |
58 |
– |
|
59 |
– |
bool doSignalMC; |
60 |
– |
std::string signalGenerator; |
61 |
– |
|
62 |
– |
bool doPhotonMC; |
63 |
– |
double photonMC_etaMax; |
64 |
– |
double photonMC_ptMin; |
65 |
– |
bool doElectronMC; |
66 |
– |
double electronMC_etaMax; |
67 |
– |
double electronMC_ptMin; |
68 |
– |
bool doMuonMC; |
69 |
– |
double muonMC_etaMax; |
70 |
– |
double muonMC_ptMin; |
71 |
– |
bool doJetMC; |
72 |
– |
double jetMC_etaMax; |
73 |
– |
double jetMC_ptMin; |
74 |
– |
bool doPhotonConversionMC; |
75 |
– |
|
84 |
|
}; |
85 |
|
|
86 |
|
#endif |