HLT TRD bugfix: correct calculation of the total charge of the cluster (Theo)
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 3 Sep 2010 21:15:07 +0000 (21:15 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 3 Sep 2010 21:15:07 +0000 (21:15 +0000)
HLT/TRD/AliHLTTRDCluster.cxx

index 8d06955..79e58e1 100644 (file)
@@ -51,7 +51,7 @@ AliHLTTRDCluster::AliHLTTRDCluster(const AliTRDcluster* const inCluster):
 
   fSignals = inCluster->fSignals[2];
   fSignals|= inCluster->fSignals[3]<<10;
-  fSignals|= inCluster->fSignals[4]<<20;
+  fSignals|= inCluster->fSignals[4]<<21;
 
   fBits = UInt_t(inCluster->TestBits(-1)) >> 14; 
 }
@@ -67,10 +67,10 @@ void AliHLTTRDCluster::ExportTRDCluster(AliTRDcluster* const outCluster) const
   outCluster->fPadTime=fPadTime;
   
   outCluster->fSignals[2] = 0x3ff & fSignals;
-  outCluster->fSignals[3] = 0x3ff & fSignals>>10;
-  outCluster->fSignals[4] = 0x3ff & fSignals>>20;
+  outCluster->fSignals[3] = 0x7ff & fSignals>>10;
+  outCluster->fSignals[4] = 0x3ff & fSignals>>21;
 
-  for(int i=0; i<3; i++){
+  for(int i=2; i<5; i++){
     outCluster->fQ+=outCluster->fSignals[i];
   }