-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding chsMET and trackMET to miniAOD #20655
Changes from 1 commit
046cf84
ce18926
79b2107
8aaf704
123a086
07f5ac9
b226afb
159dd89
d81d212
d139b77
28f06fe
aab6709
bd91dae
7fb017a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,26 +76,6 @@ namespace pat { | |
// get the MET significance | ||
double metSignificance() const; | ||
|
||
// ----- CHS MET functions ---- | ||
// set CHS MET | ||
void setCHSMETpt(const double& chsMETpt); | ||
void setCHSMETphi(const double& chsMETphi); | ||
void setCHSMETsumEt(const double& chsMETsumEt); | ||
// get CHS MET | ||
double CHSMETpt() const; | ||
double CHSMETphi() const; | ||
double CHSMETsumEt() const; | ||
|
||
// ----- Track MET functions ---- | ||
// set Track MET | ||
void setTrkMETpt(const double& trkMETpt); | ||
void setTrkMETphi(const double& trkMETphi); | ||
void setTrkMETsumEt(const double& trkMETsumEt); | ||
// get Track MET | ||
double TrkMETpt() const; | ||
double TrkMETphi() const; | ||
double TrkMETsumEt() const; | ||
|
||
// ---- methods for uncorrected MET ---- | ||
// Methods not yet defined | ||
//float uncorrectedPt() const; | ||
|
@@ -178,12 +158,12 @@ namespace pat { | |
enum METCorrectionLevel { | ||
Raw=0, Type1=1, Type01=2, TypeXY=3, Type1XY=4, Type01XY=5, | ||
Type1Smear=6, Type01Smear=7, Type1SmearXY=8, | ||
Type01SmearXY=9, RawCalo=10, METCorrectionLevelSize=11 | ||
Type01SmearXY=9, RawCalo=10, RawChs=11, RawTrk=12, METCorrectionLevelSize=13 | ||
}; | ||
enum METCorrectionType { | ||
None=0, T1=1, T0=2, TXY=3, TXYForRaw=4, | ||
TXYForT01=5, TXYForT1Smear=6, TXYForT01Smear=7, | ||
Smear=8, Calo=9, METCorrectionTypeSize=10 | ||
Smear=8, Calo=9, Chs=10, Trk=11, METCorrectionTypeSize=12 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please indent as for the other lines |
||
}; | ||
|
||
struct Vector2 { | ||
|
@@ -271,16 +251,6 @@ namespace pat { | |
// MET significance | ||
double metSig_; | ||
|
||
// MET CHS | ||
double chsMETpt_; | ||
double chsMETphi_; | ||
double chsMETsumEt_; | ||
|
||
// MET Track | ||
double trkMETpt_; | ||
double trkMETphi_; | ||
double trkMETsumEt_; | ||
|
||
const PackedMETUncertainty findMETTotalShift(MET::METCorrectionLevel cor, MET::METUncertainty shift) const; | ||
|
||
std::map<MET::METCorrectionLevel, std::vector<MET::METCorrectionType> > corMap_; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,12 +23,6 @@ MET::MET(const reco::MET & aMET) : PATObject<reco::MET>(aMET) { | |
if (pm != nullptr) this->operator=(*pm); | ||
|
||
metSig_ =0.; | ||
chsMETpt_ =0.; | ||
chsMETphi_ =0.; | ||
chsMETsumEt_ =0.; | ||
trkMETpt_ =0.; | ||
trkMETphi_ =0.; | ||
trkMETsumEt_ =0.; | ||
initCorMap(); | ||
} | ||
|
||
|
@@ -43,12 +37,6 @@ MET::MET(const edm::RefToBase<reco::MET> & aMETRef) : PATObject<reco::MET>(aMETR | |
if (pm != nullptr) this->operator=(*pm); | ||
|
||
metSig_ =0.; | ||
chsMETpt_ =0.; | ||
chsMETphi_ =0.; | ||
chsMETsumEt_ =0.; | ||
trkMETpt_ =0.; | ||
trkMETphi_ =0.; | ||
trkMETsumEt_ =0.; | ||
initCorMap(); | ||
} | ||
|
||
|
@@ -62,12 +50,6 @@ MET::MET(const edm::Ptr<reco::MET> & aMETRef) : PATObject<reco::MET>(aMETRef) { | |
if (pm != nullptr) this->operator=(*pm); | ||
|
||
metSig_ =0.; | ||
chsMETpt_ = 0.; | ||
chsMETphi_ =0.; | ||
chsMETsumEt_ =0.; | ||
trkMETpt_ =0.; | ||
trkMETphi_ =0.; | ||
trkMETsumEt_ =0.; | ||
initCorMap(); | ||
} | ||
|
||
|
@@ -78,12 +60,6 @@ genMET_(iOther.genMET_), | |
caloMET_(iOther.caloMET_), | ||
pfMET_(iOther.pfMET_), | ||
metSig_(iOther.metSig_), | ||
chsMETpt_(iOther.chsMETpt_), | ||
chsMETphi_(iOther.chsMETphi_), | ||
chsMETsumEt_(iOther.chsMETsumEt_), | ||
trkMETpt_(iOther.trkMETpt_), | ||
trkMETphi_(iOther.trkMETphi_), | ||
trkMETsumEt_(iOther.trkMETsumEt_), | ||
uncertaintiesRaw_(iOther.uncertaintiesRaw_), //74X reading compatibility | ||
uncertaintiesType1_(iOther.uncertaintiesType1_), //74X compatibility | ||
uncertaintiesType1p2_(iOther.uncertaintiesType1p2_), //74X compatibility | ||
|
@@ -102,12 +78,6 @@ genMET_(srcMET.genMET_), | |
caloMET_(srcMET.caloMET_), | ||
pfMET_(srcMET.pfMET_), | ||
metSig_(srcMET.metSig_), | ||
chsMETpt_(srcMET.chsMETpt_), | ||
chsMETphi_(srcMET.chsMETphi_), | ||
chsMETsumEt_(srcMET.chsMETsumEt_), | ||
trkMETpt_(srcMET.trkMETpt_), | ||
trkMETphi_(srcMET.trkMETphi_), | ||
trkMETsumEt_(srcMET.trkMETsumEt_), | ||
caloPackedMet_(srcMET.caloPackedMet_) { | ||
|
||
setSignificanceMatrix(srcMET.getSignificanceMatrix()); | ||
|
@@ -131,12 +101,6 @@ MET& MET::operator=(MET const& iOther) { | |
uncertainties_ = iOther.uncertainties_; | ||
corrections_ = iOther.corrections_; | ||
metSig_ = iOther.metSig_; | ||
chsMETpt_ = iOther.chsMETpt_; | ||
chsMETphi_ = iOther.chsMETphi_; | ||
chsMETsumEt_ = iOther.chsMETsumEt_; | ||
trkMETpt_ = iOther.trkMETpt_; | ||
trkMETphi_ = iOther.trkMETphi_; | ||
trkMETsumEt_ = iOther.trkMETsumEt_; | ||
caloPackedMet_ = iOther.caloPackedMet_; | ||
|
||
return *this; | ||
|
@@ -163,61 +127,6 @@ double MET::metSignificance() const { | |
return metSig_; | ||
} | ||
|
||
//Method to set the CHS MET | ||
void MET::setCHSMETpt(const double& chsMETpt) { | ||
chsMETpt_ = chsMETpt; | ||
} | ||
|
||
double MET::CHSMETpt() const { | ||
return chsMETpt_; | ||
} | ||
|
||
//Method to set the CHS MET | ||
void MET::setCHSMETphi(const double& chsMETphi) { | ||
chsMETphi_ = chsMETphi; | ||
} | ||
|
||
double MET::CHSMETphi() const { | ||
return chsMETphi_; | ||
} | ||
|
||
//Method to set the CHS MET | ||
void MET::setCHSMETsumEt(const double& chsMETsumEt) { | ||
chsMETsumEt_ = chsMETsumEt; | ||
} | ||
|
||
double MET::CHSMETsumEt() const { | ||
return chsMETsumEt_; | ||
} | ||
|
||
//Method to set the Track MET | ||
void MET::setTrkMETpt(const double& trkMETpt) { | ||
trkMETpt_ = trkMETpt; | ||
} | ||
|
||
double MET::TrkMETpt() const { | ||
return trkMETpt_; | ||
} | ||
|
||
//Method to set the CHS MET | ||
void MET::setTrkMETphi(const double& trkMETphi) { | ||
trkMETphi_ = trkMETphi; | ||
} | ||
|
||
double MET::TrkMETphi() const { | ||
return trkMETphi_; | ||
} | ||
|
||
//Method to set the CHS MET | ||
void MET::setTrkMETsumEt(const double& trkMETsumEt) { | ||
trkMETsumEt_ = trkMETsumEt; | ||
} | ||
|
||
double MET::TrkMETsumEt() const { | ||
return trkMETsumEt_; | ||
} | ||
|
||
|
||
void | ||
MET::initCorMap() { | ||
|
||
|
@@ -274,6 +183,16 @@ MET::initCorMap() { | |
std::vector<MET::METCorrectionType> tmpRawCalo; | ||
tmpRawCalo.push_back(MET::Calo); | ||
corMap_[MET::RawCalo] = tmpRawCalo; | ||
|
||
//specific chs case | ||
std::vector<MET::METCorrectionType> tmpRawChs; | ||
tmpRawChs.push_back(MET::Chs); | ||
corMap_[MET::RawChs] = tmpRawChs; | ||
|
||
//specific chs case | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. //specific trk case |
||
std::vector<MET::METCorrectionType> tmpRawTrk; | ||
tmpRawTrk.push_back(MET::Trk); | ||
corMap_[MET::RawTrk] = tmpRawTrk; | ||
} | ||
|
||
const MET::PackedMETUncertainty | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -243,7 +243,8 @@ | |
<ioread sourceClass = "pat::Jet" version="[1-11]" targetClass="pat::Jet" source="int partonFlavour_" target="jetFlavourInfo_"> | ||
<![CDATA[jetFlavourInfo_ = reco::JetFlavourInfo(0,onfile.partonFlavour_);]]> | ||
</ioread> | ||
<class name="pat::MET" ClassVersion="17"> | ||
<class name="pat::MET" ClassVersion="18"> | ||
<version ClassVersion="18" checksum="428901429"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What are ClassVersion 16 and 17 for? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as we were changing the code, there were a couple of times we edited the pat MET class, and to get to compile we had to increment it. please let us know if need to fix it some other way There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please cancel the intermediate ones and put classversion 16 in the most recent one |
||
<version ClassVersion="17" checksum="2630287804"/> | ||
<version ClassVersion="16" checksum="4025491907"/> | ||
<version ClassVersion="15" checksum="428901429"/> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,10 +185,14 @@ def miniAOD_customizeCommon(process): | |
globalThreshold = cms.double(0.0), | ||
calculateSignificance = cms.bool(False), | ||
) | ||
|
||
task.add(process.pfMetCHS) | ||
|
||
process.patMETs.chsmetSource = cms.InputTag("pfMetCHS") | ||
addMETCollection(process, | ||
labelName = "patChsMet", | ||
metSource = "pfMetCHS" | ||
) | ||
|
||
process.patChsMet.computeMETSignificance = cms.bool(False) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hi @zdemirag - please follow a convention here. Eg CHS or Chs (seems CHS is the established one) (and similarly for TrkMet) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The differences between patXXXMet and MetXXX is the pat vs reco modules. therefore the notation is self consistent. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Its not XXXMet vs MetXXX - rather its "XXX" being consistent that I'm requesting.It looks like CHS is currently universal in CMSSW python: [dlange@lxplus098 CMSSW_9_4_0_pre2]$ cmsglimpse CHS | grep python | wc |
||
|
||
# ================== CHSMET | ||
|
||
|
@@ -208,7 +212,12 @@ def miniAOD_customizeCommon(process): | |
|
||
task.add(process.pfMetTrk) | ||
|
||
process.patMETs.trkmetSource = cms.InputTag("pfMetTrk") | ||
addMETCollection(process, | ||
labelName = "patTrkMet", | ||
metSource = "pfMetTrk" | ||
) | ||
|
||
process.patTrkMet.computeMETSignificance = cms.bool(False) | ||
|
||
# ================== TrkMET | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please indent as for the other lines