12 #include "Math/VectorUtil.h"
57 muonSrc_(iConfig.getUntrackedParameter<edm::InputTag>(
"muonSrc"))
74 if(
muon->genParticleById(0,1).isNonnull() ){
75 histContainer_[
"DR_status1Match"]->Fill( ROOT::Math::VectorUtil::DeltaR(
muon->p4() , (
muon->genParticleById(0,1) )->
p4() ) );
78 if(
muon->genParticleById(0,3).isNonnull() ){
79 histContainer_[
"DR_status3Match"]->Fill( ROOT::Math::VectorUtil::DeltaR(
muon->p4() , (
muon->genParticleById(0,3) )->
p4() ) );
82 if(
muon->genParticleById(0,-1).isNonnull() ){
83 histContainer_[
"DR_defaultMatch"]->Fill( ROOT::Math::VectorUtil::DeltaR(
muon->p4() , (
muon->genParticleById(0,-1) )->
p4() ) );
86 if(
muon->genParticleById(0,1).isNull() &&
muon->genParticleById(0,3).isNull() &&
muon->genParticleById(0,-1).isNull())
noMatch++;
87 if(
muon->genParticleById(0,1).isNull() &&
muon->genParticleById(0,3).isNull() &&
muon->genParticleById(0,-1).isNonnull())
decayInFlight++;
91 if(
muon->genParticleById(-13,0, 1).isNonnull() ){
93 std::cout<<
" DIFF CHARGE!!! charge gen: "<<
muon->genParticleById(-13,0,
true)->charge()<<
" charge reco: "<<
muon->charge()<<std::endl;
108 histContainer_[
"DR_defaultMatch" ]=fs->
make<TH1F>(
"DR_defaultMatch",
"DR_defaultMatch", 100, 0, 0.02);
109 histContainer_[
"DR_status1Match" ]=fs->
make<TH1F>(
"DR_status1Match",
"DR_status1Match", 100, 0, 0.02);
110 histContainer_[
"DR_status3Match" ]=fs->
make<TH1F>(
"DR_status3Match",
"DR_status3Match", 100, 0, 0.02);
112 histContainer_[
"DPt_defaultMatch" ]=fs->
make<TH1F>(
"DPt_defaultMatch",
"DPt_defaultMatch", 10, 0, 1.2);
113 histContainer_[
"DPt_status1Match" ]=fs->
make<TH1F>(
"DPt_status1Match",
"DPt_status1Match", 10, 0, 1.2);
114 histContainer_[
"DPt_status3Match" ]=fs->
make<TH1F>(
"DPt_status3Match",
"DPt_status3Match", 10, 0, 1.2);
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
#define DEFINE_FWK_MODULE(type)
~PatMCMatchingExtended()
default destructor
unsigned int decayInFlight
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::map< std::string, TH1F * > histContainer_
PatMCMatchingExtended(const edm::ParameterSet &)
default constructor
T * make() const
make new ROOT object
virtual void analyze(const edm::Event &, const edm::EventSetup &)