]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONClusterFinderPeakCOG.cxx
- update track cuts
[u/mrichter/AliRoot.git] / MUON / AliMUONClusterFinderPeakCOG.cxx
index c6b80f25fb8b33f5e85808bfa8b2a9597963424c..83cbe8fc6146dadb550436a097c197351c574544 100644 (file)
@@ -45,6 +45,8 @@
 //#include <TCanvas.h>
 #include <TMath.h>
 
+using std::endl;
+using std::cout;
 /// \cond CLASSIMP
 ClassImp(AliMUONClusterFinderPeakCOG)
 /// \endcond
@@ -98,8 +100,9 @@ AliMUONClusterFinderPeakCOG::~AliMUONClusterFinderPeakCOG()
 
 //_____________________________________________________________________________
 Bool_t 
-AliMUONClusterFinderPeakCOG::Prepare(Int_t detElemId, TClonesArray* pads[2],
-                                    const AliMpArea& area, const AliMpVSegmentation* seg[2])
+AliMUONClusterFinderPeakCOG::Prepare(Int_t detElemId, TObjArray* pads[2],
+                                     const AliMpArea& area, 
+                                     const AliMpVSegmentation* seg[2])
 {
   /// Prepare for clustering
 //  AliCodeTimerAuto("",0)
@@ -254,7 +257,7 @@ AliMUONClusterFinderPeakCOG::CheckPrecluster(const AliMUONCluster& origCluster)
 
   // Disregard small clusters (leftovers from splitting or noise)
   if ((origCluster.Multiplicity()==1 || origCluster.Multiplicity()==2) &&
-      origCluster.Charge(0)+origCluster.Charge(1) < 10) 
+      origCluster.Charge(0)+origCluster.Charge(1) < 1.525) // JC: adc -> fc
   { 
     return 0x0;
   }
@@ -324,7 +327,7 @@ AliMUONClusterFinderPeakCOG::CheckPreclusterTwoCathodes(AliMUONCluster* cluster)
         = fkSegmentation[cath1]->PadByPosition(pad->Position().X(),pad->Position().Y(),kFALSE);
       if (!mpPad.IsValid()) continue;
       //if (nFlags == 1 && pad->Charge() < fgkZeroSuppression * 3) continue;
-      if (nFlags == 1 && pad->Charge() < 20) continue;
+      if (nFlags == 1 && pad->Charge() < 3.05) continue; // JC: adc -> fc
       AliDebug(2,Form("Releasing the following pad : de,cath,ix,iy %d,%d,%d,%d charge %e",
                       fDetElemId,pad->Cathode(),pad->Ix(),pad->Iy(),pad->Charge()));
       toBeRemoved.AddLast(pad);
@@ -530,7 +533,7 @@ void AliMUONClusterFinderPeakCOG::BuildPixArrayOneCathode(AliMUONCluster& cluste
 //  AliDebug(2,Form("cluster.Multiplicity=%d",cluster.Multiplicity()));
 
   TVector2 dim = cluster.MinPadDimensions (-1, kFALSE);
-  Double_t width[2] = {dim.X(), dim.Y()}, xy0[2];
+  Double_t width[2] = {dim.X(), dim.Y()}, xy0[2] = { 0.0, 0.0 };
   Int_t found[2] = {0}, mult = cluster.Multiplicity();
 
   for ( Int_t i = 0; i < mult; ++i) {
@@ -598,12 +601,12 @@ void AliMUONClusterFinderPeakCOG::BuildPixArrayOneCathode(AliMUONCluster& cluste
   for (Int_t i = 1; i <= nbins[0]; ++i) {
     Double_t x = xaxis->GetBinCenter(i);
     for (Int_t j = 1; j <= nbins[1]; ++j) {
-      if (hist2->GetCellContent(i,j) < 0.1) continue;
+      if (hist2->GetCellContent(i,j) < 0.01525) continue; // JC: adc -> fc
       if (cath0 != cath1) {
        // Two-sided cluster
        Double_t cont = hist2->GetCellContent(i,j);
        if (cont < 999.) continue;
-       if (cont-Int_t(cont/1000.)*1000. < 0.5) continue;
+       if (cont-Int_t(cont/1000.)*1000. < 0.07625) continue; // JC: adc -> fc
       }
       //if (hist2->GetCellContent(i,j) < 1.1 && cluster.Multiplicity(0) && 
       //  cluster.Multiplicity(1)) continue;
@@ -649,9 +652,9 @@ void AliMUONClusterFinderPeakCOG::PadOverHist(Int_t idir, Int_t ix0, Int_t iy0,
     else {
       // Fill histogram
       Double_t cont = pad->Charge();
-      if (hist2->GetCellContent(ix0, ixy) > 0.1) 
+      if (hist2->GetCellContent(ix0, ixy) > 0.01525) // JC: adc -> fc
        cont = TMath::Min (hist1->GetCellContent(ix0, ixy), cont) 
-            + TMath::Min (TMath::Max(hist1->GetCellContent(ix0, ixy),cont)*0.1, 10.);
+            + TMath::Min (TMath::Max(hist1->GetCellContent(ix0, ixy),cont)*0.1, 1.525); // JC: adc -> fc
       hist1->SetCellContent(ix0, ixy, cont);
       hist2->SetCellContent(ix0, ixy, hist2->GetCellContent(ix0, ixy)+amask);
     }
@@ -666,9 +669,9 @@ void AliMUONClusterFinderPeakCOG::PadOverHist(Int_t idir, Int_t ix0, Int_t iy0,
     else {
       // Fill histogram
       Double_t cont = pad->Charge();
-      if (hist2->GetCellContent(ix0, ixy) > 0.1) 
+      if (hist2->GetCellContent(ix0, ixy) > 0.01525) // JC: adc -> fc
        cont = TMath::Min (hist1->GetCellContent(ix0, ixy), cont)
-            + TMath::Min (TMath::Max(hist1->GetCellContent(ix0, ixy),cont)*0.1,10.);
+            + TMath::Min (TMath::Max(hist1->GetCellContent(ix0, ixy),cont)*0.1,1.525);  // JC: adc -> fc
       hist1->SetCellContent(ix0, ixy, cont);
       hist2->SetCellContent(ix0, ixy, hist2->GetCellContent(ix0, ixy)+amask);
     }
@@ -692,6 +695,9 @@ Int_t AliMUONClusterFinderPeakCOG::FindLocalMaxima(TObjArray *pixArray, Int_t *l
   Double_t xylim[4] = {999, 999, 999, 999};
 
   Int_t nPix = pixArray->GetEntriesFast();
+  
+  if ( nPix <= 0 ) return 0;
+  
   AliMUONPad *pixPtr = 0;
   for (Int_t ipix = 0; ipix < nPix; ++ipix) {
     pixPtr = (AliMUONPad*) pixArray->UncheckedAt(ipix);
@@ -717,7 +723,7 @@ Int_t AliMUONClusterFinderPeakCOG::FindLocalMaxima(TObjArray *pixArray, Int_t *l
   for (Int_t i = 1; i <= ny; ++i) {
     indx = (i-1) * nx;
     for (Int_t j = 1; j <= nx; ++j) {
-      if (fHistAnode->GetCellContent(j,i) < 0.5) continue;
+      if (fHistAnode->GetCellContent(j,i) < 0.07625) continue; // JC: adc -> fc
       //if (isLocalMax[indx+j-1] < 0) continue;
       if (isLocalMax[indx+j-1] != 0) continue;
       FlagLocalMax(fHistAnode, i, j, isLocalMax);
@@ -893,7 +899,7 @@ void AliMUONClusterFinderPeakCOG::FindCluster(AliMUONCluster& cluster,
   }
 
   //qAver = TMath::Sqrt(qAver);
-  if ( qAver >= 14 )
+  if ( qAver >= 2.135 ) // JC: adc -> fc
   {
     
     AliMUONCluster* cluster1 = new AliMUONCluster(cluster);