1 |
lethuill |
1.1 |
#ifndef MCAssociator_h
|
2 |
|
|
#define MCAssociator_h
|
3 |
|
|
|
4 |
|
|
#include <memory>
|
5 |
|
|
#include <string>
|
6 |
|
|
#include <iostream>
|
7 |
|
|
#include <map>
|
8 |
|
|
|
9 |
lethuill |
1.2 |
#include "FWCore/Framework/interface/Event.h"
|
10 |
|
|
#include "FWCore/ParameterSet/interface/ParameterSet.h"
|
11 |
|
|
#include "DataFormats/Common/interface/Handle.h"
|
12 |
|
|
#include "DataFormats/HepMCCandidate/interface/GenParticle.h"
|
13 |
|
|
#include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h"
|
14 |
|
|
|
15 |
lethuill |
1.1 |
#include "../interface/TRootParticle.h"
|
16 |
|
|
#include "../interface/TRootMCParticle.h"
|
17 |
lethuill |
1.3 |
#include "../interface/TRootJet.h"
|
18 |
lethuill |
1.1 |
|
19 |
|
|
#include "TClonesArray.h"
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
class MCAssociator{
|
23 |
|
|
|
24 |
|
|
public:
|
25 |
lethuill |
1.2 |
MCAssociator();
|
26 |
|
|
MCAssociator(const edm::ParameterSet& producersNames, int verbosity);
|
27 |
lethuill |
1.1 |
~MCAssociator() {};
|
28 |
|
|
void setVerbosity(int verbosity) {verbosity_ = verbosity; };
|
29 |
lethuill |
1.2 |
void init(const edm::Event& iEvent, TClonesArray* mcParticles);
|
30 |
lethuill |
1.3 |
void matchGenParticlesTo(TClonesArray* recoParticles);
|
31 |
lethuill |
1.1 |
void printParticleAssociation(TClonesArray* recoParticles);
|
32 |
lethuill |
1.3 |
void processGenJets(TClonesArray* genJets, TClonesArray* recoJets);
|
33 |
|
|
void printJetAssociation(TClonesArray* recoJets);
|
34 |
lethuill |
1.1 |
|
35 |
|
|
private:
|
36 |
|
|
int verbosity_;
|
37 |
lethuill |
1.2 |
int nMC_;
|
38 |
lethuill |
1.1 |
TClonesArray* mcParticles_;
|
39 |
lethuill |
1.2 |
edm::Handle <reco::GenParticleCollection> genParticles_;
|
40 |
|
|
std::map<int,int> mcParticlesMap_; // map between index in genParticle collection and index in mcParticles TClonesArray
|
41 |
|
|
edm::InputTag genParticlesProducer_;
|
42 |
lethuill |
1.1 |
|
43 |
|
|
};
|
44 |
|
|
|
45 |
|
|
#endif
|