Skip to content

Commit

Permalink
Update KCaloJet
Browse files Browse the repository at this point in the history
nConst is now nConstituents.
Use floats as the reco data format also uses floats.
  • Loading branch information
JoramBerger committed Nov 30, 2014
1 parent 395bd6a commit 93d17b3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
13 changes: 9 additions & 4 deletions DataFormats/interface/KJetMET.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@

struct KCaloJet : public KLV
{
double area;
double fHPD, fRBX;
double fEM, fHO;
int nConst, n90Hits;
float area; //< jet area

float fEM; //< energy fraction in the ECAL
float fHO; //< energy fraction in HO
float fHPD; //< energy fraction from dominant hybrid photo diode
float fRBX; //< energy fraction from dominant readout box

short nConstituents; //< number of constituents (calo towers)
short n90Hits; //< number of hits 90% of the jet energy
};
typedef std::vector<KCaloJet> KCaloJets;

Expand Down
2 changes: 1 addition & 1 deletion DataFormats/test/KDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ std::ostream &operator<<(std::ostream &os, const KElectron &e)
std::ostream &operator<<(std::ostream &os, const KCaloJet &jet)
{
os << static_cast<const KLV>(jet) << std::endl;
os << "\t#Const=" << jet.nConst << " n90Hits=" << jet.n90Hits << std::endl;
os << "\tnConstituents=" << jet.nConstituents << " n90Hits=" << jet.n90Hits << std::endl;
os << "\tfHPD=" << jet.fHPD << " fRBX=" << jet.fRBX << std::endl;
return os << "\tfEM=" << jet.fEM << " fHO=" << jet.fHO << " area=" << jet.area;
}
Expand Down
5 changes: 1 addition & 4 deletions Producers/interface/KCaloJetProducer.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class KCaloJetProducer : public KBaseMultiLVProducer<reco::CaloJetCollection, KC
copyP4(in, out.p4);
out.area = in.jetArea();
out.fEM = in.emEnergyFraction();
out.nConst = in.getJetConstituents().size();
out.nConstituents = in.getJetConstituents().size();

// Jet ID variables
out.n90Hits = -2;
Expand All @@ -48,11 +48,8 @@ class KCaloJetProducer : public KBaseMultiLVProducer<reco::CaloJetCollection, KC
edm::RefToBase<reco::Jet> jetRef(edm::Ref<reco::CaloJetCollection>(handle, this->nCursor));
const reco::JetID &jetID = (*hJetID)[jetRef];
out.n90Hits = (int)(jetID.n90Hits);
// energy fraction from dominant hybrid photo diode
out.fHPD = jetID.fHPD;
// energy fraction from dominant readout box
out.fRBX = jetID.fRBX;
// energy fraction in HO
out.fHO = jetID.fHO;
}
}
Expand Down

0 comments on commit 93d17b3

Please sign in to comment.