-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NTuplizers] added RecoGen{Jet,MET}CollectionContainer
- Loading branch information
Showing
8 changed files
with
263 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#ifndef JMETriggerAnalysis_RecoGenJetCollectionContainer_h | ||
#define JMETriggerAnalysis_RecoGenJetCollectionContainer_h | ||
|
||
#include <JMETriggerAnalysis/NTuplizers/interface/VRecoCandidateCollectionContainer.h> | ||
#include <DataFormats/JetReco/interface/GenJet.h> | ||
|
||
class RecoGenJetCollectionContainer : public VRecoCandidateCollectionContainer<reco::GenJet> { | ||
|
||
public: | ||
explicit RecoGenJetCollectionContainer(const std::string&, const std::string&, const edm::EDGetToken&, const std::string& strCut="", const bool orderByHighestPt=false); | ||
virtual ~RecoGenJetCollectionContainer() {} | ||
|
||
void clear(); | ||
void reserve(const size_t); | ||
void emplace_back(const reco::GenJet&); | ||
|
||
std::vector<float>& vec_pt(){ return pt_; } | ||
std::vector<float>& vec_eta(){ return eta_; } | ||
std::vector<float>& vec_phi(){ return phi_; } | ||
std::vector<float>& vec_mass(){ return mass_; } | ||
|
||
protected: | ||
std::vector<float> pt_; | ||
std::vector<float> eta_; | ||
std::vector<float> phi_; | ||
std::vector<float> mass_; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#ifndef JMETriggerAnalysis_RecoGenMETCollectionContainer_h | ||
#define JMETriggerAnalysis_RecoGenMETCollectionContainer_h | ||
|
||
#include <JMETriggerAnalysis/NTuplizers/interface/VRecoCandidateCollectionContainer.h> | ||
#include <DataFormats/METReco/interface/GenMET.h> | ||
|
||
class RecoGenMETCollectionContainer : public VRecoCandidateCollectionContainer<reco::GenMET> { | ||
|
||
public: | ||
explicit RecoGenMETCollectionContainer(const std::string&, const std::string&, const edm::EDGetToken&, const std::string& strCut="", const bool orderByHighestPt=false); | ||
virtual ~RecoGenMETCollectionContainer() {} | ||
|
||
void clear(); | ||
void reserve(const size_t); | ||
void emplace_back(const reco::GenMET&); | ||
|
||
std::vector<float>& vec_pt(){ return pt_; } | ||
std::vector<float>& vec_phi(){ return phi_; } | ||
std::vector<float>& vec_sumEt(){ return sumEt_; } | ||
std::vector<float>& vec_NeutralEMEtFraction(){ return NeutralEMEtFraction_; } | ||
std::vector<float>& vec_NeutralHadEtFraction(){ return NeutralHadEtFraction_; } | ||
std::vector<float>& vec_ChargedEMEtFraction(){ return ChargedEMEtFraction_; } | ||
std::vector<float>& vec_ChargedHadEtFraction(){ return ChargedHadEtFraction_; } | ||
std::vector<float>& vec_MuonEtFraction(){ return MuonEtFraction_; } | ||
std::vector<float>& vec_InvisibleEtFraction(){ return InvisibleEtFraction_; } | ||
|
||
protected: | ||
std::vector<float> pt_; | ||
std::vector<float> phi_; | ||
std::vector<float> sumEt_; | ||
std::vector<float> NeutralEMEtFraction_; | ||
std::vector<float> NeutralHadEtFraction_; | ||
std::vector<float> ChargedEMEtFraction_; | ||
std::vector<float> ChargedHadEtFraction_; | ||
std::vector<float> MuonEtFraction_; | ||
std::vector<float> InvisibleEtFraction_; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#include <JMETriggerAnalysis/NTuplizers/interface/RecoGenJetCollectionContainer.h> | ||
|
||
RecoGenJetCollectionContainer::RecoGenJetCollectionContainer( | ||
const std::string& name, const std::string& inputTagLabel, const edm::EDGetToken& token, const std::string& strCut, const bool orderByHighestPt | ||
) : VRecoCandidateCollectionContainer(name, inputTagLabel, token, strCut, orderByHighestPt) { | ||
} | ||
|
||
void RecoGenJetCollectionContainer::clear(){ | ||
|
||
pt_.clear(); | ||
eta_.clear(); | ||
phi_.clear(); | ||
mass_.clear(); | ||
} | ||
|
||
void RecoGenJetCollectionContainer::reserve(const size_t vec_size){ | ||
|
||
pt_.reserve(vec_size); | ||
eta_.reserve(vec_size); | ||
phi_.reserve(vec_size); | ||
mass_.reserve(vec_size); | ||
} | ||
|
||
void RecoGenJetCollectionContainer::emplace_back(const reco::GenJet& obj){ | ||
|
||
pt_.emplace_back(obj.pt()); | ||
eta_.emplace_back(obj.eta()); | ||
phi_.emplace_back(obj.phi()); | ||
mass_.emplace_back(obj.mass()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#include <JMETriggerAnalysis/NTuplizers/interface/RecoGenMETCollectionContainer.h> | ||
|
||
RecoGenMETCollectionContainer::RecoGenMETCollectionContainer( | ||
const std::string& name, const std::string& inputTagLabel, const edm::EDGetToken& token, const std::string& strCut, const bool orderByHighestPt | ||
) : VRecoCandidateCollectionContainer(name, inputTagLabel, token, strCut, orderByHighestPt) { | ||
} | ||
|
||
void RecoGenMETCollectionContainer::clear(){ | ||
|
||
pt_.clear(); | ||
phi_.clear(); | ||
sumEt_.clear(); | ||
NeutralEMEtFraction_.clear(); | ||
NeutralHadEtFraction_.clear(); | ||
ChargedEMEtFraction_.clear(); | ||
ChargedHadEtFraction_.clear(); | ||
MuonEtFraction_.clear(); | ||
InvisibleEtFraction_.clear(); | ||
} | ||
|
||
void RecoGenMETCollectionContainer::reserve(const size_t vec_size){ | ||
|
||
pt_.reserve(vec_size); | ||
phi_.reserve(vec_size); | ||
sumEt_.reserve(vec_size); | ||
NeutralEMEtFraction_.reserve(vec_size); | ||
NeutralHadEtFraction_.reserve(vec_size); | ||
ChargedEMEtFraction_.reserve(vec_size); | ||
ChargedHadEtFraction_.reserve(vec_size); | ||
MuonEtFraction_.reserve(vec_size); | ||
InvisibleEtFraction_.reserve(vec_size); | ||
} | ||
|
||
void RecoGenMETCollectionContainer::emplace_back(const reco::GenMET& obj){ | ||
|
||
pt_.emplace_back(obj.pt()); | ||
phi_.emplace_back(obj.phi()); | ||
sumEt_.emplace_back(obj.sumEt()); | ||
NeutralEMEtFraction_.emplace_back(obj.NeutralEMEtFraction()); | ||
NeutralHadEtFraction_.emplace_back(obj.NeutralHadEtFraction()); | ||
ChargedEMEtFraction_.emplace_back(obj.ChargedEMEtFraction()); | ||
ChargedHadEtFraction_.emplace_back(obj.ChargedHadEtFraction()); | ||
MuonEtFraction_.emplace_back(obj.MuonEtFraction()); | ||
InvisibleEtFraction_.emplace_back(obj.InvisibleEtFraction()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ Set up CMSSW area: | |
cmsrel CMSSW_10_6_1_patch3 | ||
cd CMSSW_10_6_1_patch3/src | ||
cmsenv | ||
git cms-merge-topic cms-egamma:EgammaPostRecoTools | ||
#git cms-merge-topic cms-egamma:EgammaPostRecoTools | ||
git cms-addpkg HLTrigger/Configuration | ||
git clone https://[email protected]/missirol/JMETriggerAnalysis.git -o missirol | ||
scram b | ||
|