Skip to content

Commit

Permalink
Merge pull request cms-sw#123 from kurtejung/fixHiGenEtaFilter2
Browse files Browse the repository at this point in the history
fixing HiGen eta filter
  • Loading branch information
kurtejung authored Jun 22, 2017
2 parents 3669770 + 0979968 commit a6071aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion HeavyIonsAnalysis/JetAnalysis/python/HiGenAnalyzer_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

HiGenParticleAna = cms.EDAnalyzer('HiGenAnalyzer',
doVertex = cms.untracked.bool(False),
etaMax = cms.untracked.double(2),
etaMax = cms.untracked.double(2.5),
ptMin = cms.untracked.double(5),
chargedOnly = cms.untracked.bool(False),
stableOnly = cms.untracked.bool(True),
Expand Down
2 changes: 2 additions & 0 deletions HeavyIonsAnalysis/TrackAnalysis/src/HiGenAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ HiGenAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)
nparticles++;
if ((*it)->momentum().perp()<ptMin_) continue;
// if((*it)->status() == 1){
if (fabs((*it)->momentum().eta())>etaMax_) continue;
Int_t pdg_id = (*it)->pdg_id();
Float_t eta = (*it)->momentum().eta();
Float_t phi = (*it)->momentum().phi();
Expand Down Expand Up @@ -357,6 +358,7 @@ HiGenAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)
const reco::GenParticle& p = (*parts)[i];
if (stableOnly_ && p.status()!=1) continue;
if (p.pt()<ptMin_) continue;
if (fabs(p.eta())>etaMax_) continue;
if (chargedOnly_&&p.charge()==0) continue;
hev_.pt.push_back( p.pt());
hev_.eta.push_back( p.eta());
Expand Down

0 comments on commit a6071aa

Please sign in to comment.