]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
moving calculation of sigmas to decoder class, bugfix for sigmaY2 which was wrong...
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 4 Sep 2011 22:42:23 +0000 (22:42 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 4 Sep 2011 22:42:23 +0000 (22:42 +0000)
HLT/TPCLib/AliHLTTPCHWCFData.h
HLT/TPCLib/AliHLTTPCHWCFSpacePointContainer.cxx
HLT/TPCLib/AliHLTTPCHWClusterTransformComponent.cxx

index 3f1c56b5944c291a2aaabd398ea8e4303752b606..8b10d4ce48799f8e8820a1cb22327b917befdad1 100644 (file)
@@ -124,8 +124,8 @@ class AliHLTTPCHWCFData : public AliHLTLogging {
     Int_t    GetPadRow()  const;
     Float_t  GetPad()     const {return fPad+0.5;}
     Float_t  GetTime()    const {return fTime;}
-    Float_t  GetSigmaY2() const {return fSigmaY2;}
-    Float_t  GetSigmaZ2() const {return fSigmaZ2;}
+    Float_t  GetSigmaY2() const {return (fSigmaY2>0.?(fSigmaY2 - fPad*fPad):0.);}
+    Float_t  GetSigmaZ2() const {return (fSigmaZ2>0.?(fSigmaZ2 - fTime*fTime):0.);}
     Int_t    GetCharge()  const;
     Int_t    GetQMax()    const {return -1;}
   };
@@ -141,8 +141,8 @@ class AliHLTTPCHWCFData : public AliHLTLogging {
     Int_t    GetPadRow()  const;
     Float_t  GetPad()     const {return fPad+0.5;}
     Float_t  GetTime()    const {return fTime;}
-    Float_t  GetSigmaY2() const {return fSigmaY2;}
-    Float_t  GetSigmaZ2() const {return fSigmaZ2;}
+    Float_t  GetSigmaY2() const {return (fSigmaY2>0.?(fSigmaY2 - fPad*fPad):0.);}
+    Float_t  GetSigmaZ2() const {return (fSigmaZ2>0.?(fSigmaZ2 - fTime*fTime):0.);}
     Int_t    GetCharge()  const;
     Int_t    GetQMax()    const;
   };
index 9da0a7c878ec5d682a1385e3fd3b98c210e041e5..c5acd216a608d723eab0940f36ff40917f16b5e2 100644 (file)
@@ -636,16 +636,10 @@ int AliHLTTPCHWCFSpacePointContainer::WriteUnsorted(AliHLTUInt8_t* outputPtr,
            break;
          }
 
-         // FIXME: the HW ClusterFinder returns only the sum
-         // sum(q_i*pad_i*pad_i)/sum(q_i)
-         // where the mean needs to be subtracted, not yet in the decoder
-         // but should be implemented there
          float pad =cl->second.Decoder()->GetPad(index);
          float time =cl->second.Decoder()->GetTime(index);
          float sigmaY2=cl->second.Decoder()->GetSigmaY2(index);
          float sigmaZ2=cl->second.Decoder()->GetSigmaZ2(index);
-         sigmaY2-=pad*pad;
-         sigmaZ2-=time*time;
 
          if (!pDeflater) {
            AliHLTTPCRawCluster& c=blockout->fClusters[blockout->fCount];
@@ -793,16 +787,10 @@ int AliHLTTPCHWCFSpacePointContainer::WriteSorted(AliHLTUInt8_t* outputPtr,
        break;
       }
 
-      // FIXME: the HW ClusterFinder returns only the sum
-      // sum(q_i*pad_i*pad_i)/sum(q_i)
-      // where the mean needs to be subtracted, not yet in the decoder
-      // but should be implemented there
       float pad =input.GetPad();
       float time =input.GetTime();
       float sigmaY2=input.GetSigmaY2();
       float sigmaZ2=input.GetSigmaZ2();
-      sigmaY2-=pad*pad;
-      sigmaZ2-=time*time;
 
       if (!pDeflater) {
        AliHLTTPCRawCluster& c=blockout->fClusters[blockout->fCount];
index d5d12715320440e32737f1df925bd0b0bab9184d..87f0eab385a279d3cee63b6b8d7a9ba4daa76392 100644 (file)
@@ -263,9 +263,7 @@ int AliHLTTPCHWClusterTransformComponent::DoEvent(const AliHLTComponentEventData
         float time=cl.GetTime();
         float sigmaY2=cl.GetSigmaY2();
         float sigmaZ2=cl.GetSigmaZ2();
-        sigmaY2-=pad*pad;
         sigmaY2*=padpitch*padpitch;
-        sigmaZ2-=time*time;
         sigmaZ2*=zwidth*zwidth;
         c.SetPadRow(padrow);
         c.SetCharge(charge);
@@ -347,8 +345,6 @@ int AliHLTTPCHWClusterTransformComponent::DoEvent(const AliHLTComponentEventData
           float time =cl.GetTime();
           float sigmaP2=cl.GetSigmaY2();
           float sigmaT2=cl.GetSigmaZ2();
-          sigmaP2-=pad*pad;
-          sigmaT2-=time*time;
           c.SetPadRow(padrow);
           c.SetCharge(charge);
           c.SetPad(pad);