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