Changed reweighting method to try 1e6 times before assigning maximum energy loss.
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 1 Apr 2004 08:24:14 +0000 (08:24 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 1 Apr 2004 08:24:14 +0000 (08:24 +0000)
FASTSIM/AliQuenchingWeights.cxx
FASTSIM/AliQuenchingWeights.h

index 05c006e..d7a81e8 100644 (file)
@@ -867,9 +867,9 @@ Double_t AliQuenchingWeights::GetELossRandom(Int_t ipart, Double_t length, Doubl
     Int_t ws=0;
     while(ret>e){
       ret=fHistos[ipart-1][l-1]->GetRandom(); 
-      if(++ws==1e5){
-       Warning("GetELossRandomK",
-                "Aborted reweighting; maximum loss assigned after 1e5 trials.");
+      if(++ws==1e6){
+       Warning("GetELossRandom",
+                "Aborted reweighting; maximum loss assigned after 1e6 trials.");
        return e;
       }
     }
@@ -952,9 +952,9 @@ Double_t AliQuenchingWeights::GetELossRandomK(Int_t ipart, Double_t I0, Double_t
     Int_t ws=0;
     while(ret>e){
       ret=fHisto->GetRandom(); 
-      if(++ws==1e5){
+      if(++ws==1e6){
        Warning("GetELossRandomK",
-                "Aborted reweighting; maximum loss assigned after 1e5 trials.");
+                "Aborted reweighting; maximum loss assigned after 1e6 trials.");
        return e;
       }
     }
index 33de502..16f14f9 100644 (file)
@@ -88,7 +88,10 @@ class AliQuenchingWeights : public TObject {
     {return CalcQk(fK,I0,I1);} 
 
   Double_t CalcQk(Double_t k, Double_t I0, Double_t I1) const
-      {return I0*I0/2/I1/fgkConvFmToInvGeV/fgkConvFmToInvGeV*k;}
+    {return I0*I0/2/I1/fgkConvFmToInvGeV/fgkConvFmToInvGeV*k;}
+
+  Double_t CalcLk(Double_t i0, Double_t i1) const
+    {return 2.*i1/i0;}
 
   Int_t CalcLengthMax(Double_t q) const
     {Double_t l3max=fgkRMax/.5/q/fgkConvFmToInvGeV/fgkConvFmToInvGeV;