Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62337
b: refs/heads/l1tmuon-upgrade-dev
c: ef5d902
h: refs/heads/l1tmuon-upgrade-dev
i:
  62335: 267c36c
  • Loading branch information
Sebastian Mirko Naumann-Emme committed Mar 19, 2009
1 parent 1dc2ccb commit 3723933
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/l1tmuon-upgrade-dev: 4467af8311c37c4897d8dc06cddc1eba22e4c481
refs/heads/l1tmuon-upgrade-dev: ef5d9020abf3b0b17031402d4c31da1e66287218
63 changes: 45 additions & 18 deletions trunk/TopQuarkAnalysis/TopKinFitter/src/TtSemiLepKinFitter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -259,25 +259,52 @@ int TtSemiLepKinFitter::fit(const std::vector<pat::Jet>& jets, const pat::Lepton
double pt = lepton.pt ();
double eta = lepton.eta();

res::HelperMuon muonRes;
res::HelperElectron elecRes;
switch(lepParam_){
case kEMom :
m5(0,0) = pow(elecRes.a (pt, eta), 2);
m5(1,1) = pow(elecRes.b (pt, eta), 2);
m5(2,2) = pow(elecRes.c (pt, eta), 2);
break;
case kEtEtaPhi :
m5(0,0) = pow(elecRes.et (pt, eta), 2);
m5(1,1) = pow(elecRes.eta(pt, eta), 2);
m5(2,2) = pow(elecRes.phi(pt, eta), 2);
break;
case kEtThetaPhi :
m5(0,0) = pow(elecRes.et (pt, eta), 2);
m5(1,1) = pow(elecRes.theta(pt, eta), 2);
m5(2,2) = pow(elecRes.phi(pt, eta), 2);
break;
// if lepton is an electron
if( dynamic_cast<const reco::GsfElectron*>(&lepton) ) {
res::HelperElectron elecRes;
switch(lepParam_){
case kEMom :
m5(0,0) = pow(elecRes.a (pt, eta), 2);
m5(1,1) = pow(elecRes.b (pt, eta), 2);
m5(2,2) = pow(elecRes.c (pt, eta), 2);
break;
case kEtEtaPhi :
m5(0,0) = pow(elecRes.et (pt, eta), 2);
m5(1,1) = pow(elecRes.eta(pt, eta), 2);
m5(2,2) = pow(elecRes.phi(pt, eta), 2);
break;
case kEtThetaPhi :
m5(0,0) = pow(elecRes.et (pt, eta), 2);
m5(1,1) = pow(elecRes.theta(pt, eta), 2);
m5(2,2) = pow(elecRes.phi (pt, eta), 2);
break;
}
}
// if lepton is a muon
else if( dynamic_cast<const reco::Muon*>(&lepton) ) {
res::HelperMuon muonRes;
switch(lepParam_){
case kEMom :
m5(0,0) = pow(muonRes.a (pt, eta), 2);
m5(1,1) = pow(muonRes.b (pt, eta), 2);
m5(2,2) = pow(muonRes.c (pt, eta), 2);
break;
case kEtEtaPhi :
m5(0,0) = pow(muonRes.et (pt, eta), 2);
m5(1,1) = pow(muonRes.eta(pt, eta), 2);
m5(2,2) = pow(muonRes.phi(pt, eta), 2);
break;
case kEtThetaPhi :
m5(0,0) = pow(muonRes.et (pt, eta), 2);
m5(1,1) = pow(muonRes.theta(pt, eta), 2);
m5(2,2) = pow(muonRes.phi (pt, eta), 2);
break;
}
}
// if lepton is neither electron nor muon
else
throw edm::Exception(edm::errors::Configuration,
"The lepton passed to the TtSemiLepKinFitter is neither a reco::GsfElectron nor a reco::Muon" );
}
// add neutrino resolutions
{
Expand Down

0 comments on commit 3723933

Please sign in to comment.