Skip to content

Commit

Permalink
Update KMET
Browse files Browse the repository at this point in the history
Consistent naming inside Kappa and with CMSSW.
Do not use type6 and type7 anymore.
Use floats as the reco data format has floats.
  • Loading branch information
JoramBerger committed Nov 30, 2014
1 parent 0ba7640 commit 845b3e3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
10 changes: 5 additions & 5 deletions DataFormats/interface/KJetMET.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,19 @@ struct KJet : public KBasicJet
};
typedef std::vector<KJet> KJets;


struct KBasicMET : public KLV
{
double sumEt;

ROOT::Math::SMatrix<double, 2, 2, ROOT::Math::MatRepSym<double, 2> > significance;
};

struct KMET : public KBasicMET
{
double chargedEMEtFraction, chargedHadEtFraction;
double neutralEMEtFraction, neutralHadEtFraction;
double muonEtFraction;
double type6EtFraction, type7EtFraction;
float photonFraction, electronFraction;
float neutralHadronFraction, chargedHadronFraction;
float muonFraction;
float hfHadronFraction, hfEMFraction;
};

struct KHCALNoiseSummary
Expand Down
6 changes: 3 additions & 3 deletions DataFormats/test/KDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ std::ostream &operator<<(std::ostream &os, const KBasicMET &met)
std::ostream &operator<<(std::ostream &os, const KMET &met)
{
os << static_cast<const KBasicMET>(met) << std::endl;
os << "\tCharged (em,had): " << met.chargedEMEtFraction << ", " << met.chargedHadEtFraction << std::endl;
os << "\tNeutral (em,had): " << met.neutralEMEtFraction << ", " << met.neutralHadEtFraction << std::endl;
os << "\tMuonF=" << met.muonEtFraction << " type6F=" << met.type6EtFraction << " type7F=" << met.type7EtFraction;
os << "\tCHF=" << met.chargedHadronFraction << " NHF=" << met.neutralHadronFraction << std::endl;
os << "\teF=" << met.electronFraction << " photF=" << met.photonFraction << " muF=" << met.muonFraction << std::endl;
os << "\tHFHadF=" << met.hfHadronFraction << " HFEMF=" << met.hfEMFraction;
return os;
}

Expand Down
15 changes: 8 additions & 7 deletions Producers/interface/KMETProducer.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ class KMETProducer : public KBaseMultiProducer<edm::View<reco::PFMET>, KMET>
copyP4(in.at(0), out.p4);
out.sumEt = in.at(0).sumEt();

out.chargedEMEtFraction = in.at(0).ChargedEMEtFraction();
out.chargedHadEtFraction = in.at(0).ChargedHadEtFraction();
out.muonEtFraction = in.at(0).MuonEtFraction();
out.neutralEMEtFraction = in.at(0).NeutralEMEtFraction();
out.neutralHadEtFraction = in.at(0).NeutralHadEtFraction();
out.type6EtFraction = in.at(0).Type6EtFraction();
out.type7EtFraction = in.at(0).Type7EtFraction();
out.photonFraction = in.at(0).photonEtFraction();
out.neutralHadronFraction = in.at(0).neutralHadronEtFraction();
out.electronFraction = in.at(0).electronEtFraction();
out.chargedHadronFraction = in.at(0).chargedHadronEtFraction();
out.muonFraction = in.at(0).muonEtFraction();
out.hfHadronFraction = in.at(0).HFHadronEtFraction();
out.hfEMFraction = in.at(0).HFEMEtFraction();


TMatrixD mat = in.at(0).getSignificanceMatrix();
if (mat(0,1) != mat(1,0))
Expand Down

0 comments on commit 845b3e3

Please sign in to comment.