Fork me on GitHub

Changeset 61 in svn for trunk/src


Ignore:
Timestamp:
Nov 27, 2008, 8:55:10 PM (16 years ago)
Author:
severine ovyn
Message:

remove bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SmearUtil.cc

    r55 r61  
    444444  // the 'muon' variable will be changed by the function
    445445  float pt = muon.Pt(); // before smearing
    446   float ptS = gRandom->Gaus(pt, MU_SmearPt*pt ); // after smearing // \sigma/E = C + N/E + S/\sqrt{E}
    447  
    448   muon.SetPtEtaPhiE(ptS, muon.Eta(), muon.Phi(), ptS*cosh(muon.Eta()));
     446  float ptS=pt;
     447
     448  if(fabs(muon.Eta()) < MAX_MU )
     449   {
     450     ptS = gRandom->Gaus(pt, MU_SmearPt*pt ); // after smearing // \sigma/E = C + N/E + S/\sqrt{E}
     451   }
     452     muon.SetPtEtaPhiE(ptS, muon.Eta(), muon.Phi(), ptS*cosh(muon.Eta()));
    449453 
    450454  if(muon.E() < 0)muon.SetPxPyPzE(0,0,0,0); // no negative values after smearing !
     
    619623    charge = 0;
    620624  else charge = (sign(pid));
    621 cout<<"charge "<<charge<<endl;
    622625  return charge;
    623626           
Note: See TracChangeset for help on using the changeset viewer.