|
[Rivet-svn] r3309 - trunk/src/Analysesblackhole at projects.hepforge.org blackhole at projects.hepforge.orgTue Aug 23 10:26:37 BST 2011
Author: hoeth Date: Tue Aug 23 10:26:36 2011 New Revision: 3309 Log: merge r3308 from branches/2011-07-aida2yoda Modified: trunk/src/Analyses/ALICE_2011_S8945144.cc Modified: trunk/src/Analyses/ALICE_2011_S8945144.cc ============================================================================== --- trunk/src/Analyses/ALICE_2011_S8945144.cc Tue Aug 23 10:25:50 2011 (r3308) +++ trunk/src/Analyses/ALICE_2011_S8945144.cc Tue Aug 23 10:26:36 2011 (r3309) @@ -32,38 +32,31 @@ const ChargedFinalState& cfs = applyProjection<ChargedFinalState>(event, "CFS"); foreach (const Particle& p, cfs.particles()) { if(fabs(p.momentum().rapidity())<0.5) { - if(p.pdgId() == 211) { - _histPtPions->fill(p.momentum().pT()/GeV, weight); - _histAveragePt->fill(p.mass()/GeV,p.momentum().pT()/GeV,weight); - continue; - } - - if(p.pdgId() == -211) { - _histPtAntiPions->fill(p.momentum().pT()/GeV, weight); - _histAveragePt->fill(p.mass()/GeV,p.momentum().pT()/GeV,weight); - continue; - } - - if(p.pdgId() == 2212) { - _histPtProtons->fill(p.momentum().pT()/GeV, weight); - _histAveragePt->fill(p.mass()/GeV,p.momentum().pT()/GeV,weight); - continue; - } - if(p.pdgId() == -2212) { - _histPtAntiProtons->fill(p.momentum().pT()/GeV, weight); - _histAveragePt->fill(p.mass()/GeV,p.momentum().pT()/GeV,weight); - continue; - } - - if(p.pdgId() == 321) { - _histPtKaons->fill(p.momentum().pT()/GeV, weight); - _histAveragePt->fill(p.mass()/GeV,p.momentum().pT()/GeV,weight); - continue; - } - if(p.pdgId() == -321) { - _histPtAntiKaons->fill(p.momentum().pT()/GeV, weight); - _histAveragePt->fill(p.mass()/GeV,p.momentum().pT()/GeV,weight); - continue; + switch (p.pdgId()) { + case 211: + _histPtPions->fill(p.momentum().pT()/GeV, weight); + _histAveragePt->fill(p.mass()/GeV, p.momentum().pT()/GeV, weight); + break; + case -211: + _histPtAntiPions->fill(p.momentum().pT()/GeV, weight); + _histAveragePt->fill(p.mass()/GeV, p.momentum().pT()/GeV, weight); + break; + case 2212: + _histPtProtons->fill(p.momentum().pT()/GeV, weight); + _histAveragePt->fill(p.mass()/GeV, p.momentum().pT()/GeV, weight); + break; + case -2212: + _histPtAntiProtons->fill(p.momentum().pT()/GeV, weight); + _histAveragePt->fill(p.mass()/GeV, p.momentum().pT()/GeV, weight); + break; + case 321: + _histPtKaons->fill(p.momentum().pT()/GeV, weight); + _histAveragePt->fill(p.mass()/GeV, p.momentum().pT()/GeV, weight); + break; + case -321: + _histPtAntiKaons->fill(p.momentum().pT()/GeV, weight); + _histAveragePt->fill(p.mass()/GeV, p.momentum().pT()/GeV, weight); + break; } } }
More information about the Rivet-svn mailing list |