]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
implementation of summed charge (Xianguo)
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 May 2012 09:59:55 +0000 (09:59 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 May 2012 09:59:55 +0000 (09:59 +0000)
TRD/AliTRDdEdxUtils.cxx

index 8586d7163c326ae595c2e34b84d5fcf6347e99ec..eaa7cb3a146a34420348593d8e3e12b8cce5ea7c 100644 (file)
@@ -1222,15 +1222,17 @@ Double_t AliTRDdEdxUtils::GetRNDClusterQ(AliTRDcluster *cl)
 
   Double_t rndqsum = 0;
   for(Int_t ii=0; ii<7; ii++){
-    const Int_t icol = pad3col+(ii-3);
+    if(cl->GetSignals()[ii] < EPSILON){//bad pad marked by electronics
+      continue;
+    }
 
-    const Double_t padgain = IsPadGainOn()? GetPadGain(det, icol, padrow) : 1;
-    if(padgain<0){//indices out of range
-      //printf("testout %d %d\n\n", pad3col, ii);
+    const Int_t icol = pad3col+(ii-3);
+    const Double_t padgain = GetPadGain(det, icol, padrow);
+    if(padgain<0){//indices out of range, pad3col near boundary case
       continue;
     }
 
-    const Double_t rndsignal = (cl->GetSignals()[ii] - baseline)/padgain;
+    const Double_t rndsignal = (cl->GetSignals()[ii] - baseline)/(IsPadGainOn()? padgain : 1);
 
     //sum it anyway even if signal below baseline, as long as the total is positive
     rndqsum += rndsignal;
@@ -1247,7 +1249,7 @@ Double_t AliTRDdEdxUtils::GetClusterQ(const Bool_t kinvq, const AliTRDseedV1 * s
   Double_t dq = 0;
   AliTRDcluster *cl = 0x0;
       
-  //GetRNDClusterQ(cl)>0 ensures that the total sum of q is above baseline*7
+  //GetRNDClusterQ(cl)>0 ensures that the total sum of q is above baseline*NsignalPhysical
   cl = seed->GetClusters(itb);                    if(cl && GetRNDClusterQ(cl)>0 ) dq+= GetRNDClusterQ(cl);//cl->GetRawQ();
   cl = seed->GetClusters(itb+AliTRDseedV1::kNtb); if(cl && GetRNDClusterQ(cl)>0 ) dq+= GetRNDClusterQ(cl);//cl->GetRawQ();