]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSClusterFinderV2SDD.cxx
Merge branch 'master' into TPCdev
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinderV2SDD.cxx
index 543a33d7df929a6e78aa14f6b99f0c1888533eb7..21a4880d2bb1b81d75b87936897875314369534f 100644 (file)
@@ -112,8 +112,8 @@ void AliITSClusterFinderV2SDD::FindClustersSDD(TClonesArray *digits) {
      d=(AliITSdigitSDD*)digits->UncheckedAt(i);
      Int_t ian=d->GetCoord1();
      Int_t itb=d->GetCoord2();
-     Int_t iSide=0;
-     if (ian >= fNAnodes) iSide=1;    
+     //Int_t iSide=0;
+     //if (ian >= fNAnodes) iSide=1;    
      Float_t gain=cal->GetChannelGain(ian)/fDetTypeRec->GetAverageGainSDD();
      Float_t charge=d->GetSignal(); // returns expanded signal 
                                     // (10 bit, low threshold already added)
@@ -250,6 +250,9 @@ FindClustersSDD(AliBin* bins[2], TBits* anodeFired[2],
                }
              }
            }
+         } 
+         else { // raw data
+           if (fRawID2ClusID) milab[0] = fNClusters+1; // RS: store clID+1 as a reference to the cluster
          }
          
 
@@ -291,12 +294,12 @@ FindClustersSDD(AliBin* bins[2], TBits* anodeFired[2],
          y=trk[1];
          z=trk[2]; 
          
+         q+=(driftTime*rsdd->GetADCvsDriftTime(fModule)); // correction for zero supp.
          q/=rsdd->GetADCtokeV(fModule);
-         q+=(driftTime*rsdd->GetChargevsTime()); // correction for zero supp.
          if(cal-> IsAMAt20MHz()) q*=2.; // account for 1/2 sampling freq.
          if(q<repa->GetMinClusterChargeSDD()) continue; // remove noise clusters
          
-         Float_t hit[5] = {y, z, 0.0030*0.0030, 0.0020*0.0020, q};
+         Float_t hit[6] = {y, z, 0.0030*0.0030, 0.0020*0.0020, q, 0.};
          Int_t  info[3] = {clSizTb, clSizAnode, fNlayer[fModule]};
          if (digits) CheckLabels2(milab);
          milab[3]=fNdet[fModule];
@@ -309,6 +312,7 @@ FindClustersSDD(AliBin* bins[2], TBits* anodeFired[2],
          else {
            fDetTypeRec->AddRecPoint(cc);
          }
+         fNClusters++; // RS
          ncl++;
        }
       }
@@ -322,7 +326,7 @@ void AliITSClusterFinderV2SDD::RawdataToClusters(AliRawReader* rawReader){
     //------------------------------------------------------------
   // This function creates ITS clusters from raw data
   //------------------------------------------------------------
-
+  fNClusters = 0; //RS
   AliITSRawStream* inputSDD=AliITSRawStreamSDD::CreateRawStreamSDD(rawReader);
   AliDebug(1,Form("%s is used",inputSDD->ClassName()));
 
@@ -367,6 +371,9 @@ void AliITSClusterFinderV2SDD::FindClustersSDD(AliITSRawStream* input)
   for(Int_t iMod=0; iMod<kModulesPerDDL; iMod++) vectModId[iMod]=-1;
 
   // read raw data input stream
+  int countRW = 0; //RS
+  if (fRawID2ClusID) fRawID2ClusID->Reset(); //RS if array was provided, we shall store the rawID -> ClusterID
+  //
   while (input->Next()) {
     Int_t iModule = input->GetModuleID();
     if(iModule<0){
@@ -438,6 +445,7 @@ void AliITSClusterFinderV2SDD::FindClustersSDD(AliITSRawStream* input)
            fDDLBins[iHybrid][index].SetQ(q);
            fDDLBins[iHybrid][index].SetMask(1);
            fDDLBins[iHybrid][index].SetIndex(index);
+           fDDLBins[iHybrid][index].SetRawID(countRW); //RS register raw id
            ddlAnodeFired[iHybrid]->SetBitNumber(iz);
          }else{
            AliWarning(Form("Invalid SDD cell: Anode=%d   TimeBin=%d",iz,itb));   
@@ -445,6 +453,7 @@ void AliITSClusterFinderV2SDD::FindClustersSDD(AliITSRawStream* input)
        }
       }
     }
+    countRW++; //RS
   }
   for(Int_t iHyb=0;iHyb<kHybridsPerDDL;iHyb++){ 
    delete ddlAnodeFired[iHyb];
@@ -453,7 +462,7 @@ void AliITSClusterFinderV2SDD::FindClustersSDD(AliITSRawStream* input)
 }
 
 //______________________________________________________________________
-Bool_t AliITSClusterFinderV2SDD::NoiseSuppress(Int_t k, Int_t sid, AliBin* bins, AliITSCalibrationSDD* cal) const {
+Bool_t AliITSClusterFinderV2SDD::NoiseSuppress(Int_t k, Int_t sid, AliBin* bins, const AliITSCalibrationSDD* cal) const {
   // applies zero suppression using the measured noise of each anode
   // threshold values from ALICE-INT-1999-28 V10
   // returns kTRUE if the digit should eb noise suppressed, kFALSE if it should be kept