12 #include "Math/VectorUtil.h"
29 virtual void endJob()
override ;
44 muonSrcToken_(consumes<edm::
View<pat::
Muon> >(iConfig.getUntrackedParameter<edm::InputTag>(
"muonSrc")))
62 for(
unsigned int i = 0 ;
i <
muon->genParticleRefs().size() ; ++
i ){
64 switch(
muon->genParticle(
i)->status() ){
66 histContainer_[
"DR_status1Match"]->Fill( ROOT::Math::VectorUtil::DeltaR(
muon->p4() ,
muon->genParticle(
i)->p4() ) );
69 histContainer_[
"DR_status3Match"]->Fill( ROOT::Math::VectorUtil::DeltaR(
muon->p4() ,
muon->genParticle(
i)->p4() ) );
72 histContainer_[
"DR_defaultMatch"]->Fill( ROOT::Math::VectorUtil::DeltaR(
muon->p4() ,
muon->genParticle(
i)->p4() ) );
87 histContainer_[
"DR_defaultMatch" ]=fs->
make<TH1F>(
"DR_defaultMatch",
"DR_defaultMatch", 100, 0., 0.02);
88 histContainer_[
"DR_status1Match" ]=fs->
make<TH1F>(
"DR_status1Match",
"DR_status1Match", 100, 0., 0.02);
89 histContainer_[
"DR_status3Match" ]=fs->
make<TH1F>(
"DR_status3Match",
"DR_status3Match", 100, 0., 0.02);
std::map< std::string, TH1F * > histContainer_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
PatMCMatching(const edm::ParameterSet &)
default constructor
T * make(const Args &...args) const
make new ROOT object
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
virtual void endJob() override
virtual void beginJob() override
~PatMCMatching()
default destructor
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
edm::EDGetTokenT< edm::View< pat::Muon > > muonSrcToken_