]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONClusterSplitterMLEM.cxx
Study jet p_T vs. total mult
[u/mrichter/AliRoot.git] / MUON / AliMUONClusterSplitterMLEM.cxx
index da1f0ff6bdc34f67ccf0b3c4c5ef5b5a58594d31..1de8e48a5f8ae271975f2ea68f343ef88ca1e306 100644 (file)
 #include "AliMUONCluster.h"
 #include "AliMUONPad.h"
 #include "AliMUONPad.h"
-#include "AliMpStationType.h"
 #include "AliMUONConstants.h"
 #include "AliMpDEManager.h"
 #include "AliMUONMathieson.h"
 
+#include "AliMpEncodePair.h"
+
 #include "AliLog.h"
 
 #include <TClonesArray.h>
@@ -56,7 +57,10 @@ const Double_t AliMUONClusterSplitterMLEM::fgkCouplMin = 1.e-2; // threshold on
 
 //_____________________________________________________________________________
 AliMUONClusterSplitterMLEM::AliMUONClusterSplitterMLEM(Int_t detElemId, 
-                                                       TObjArray* pixArray) 
+                                                       TObjArray* pixArray,
+                                                       Double_t lowestPixelCharge,
+                                                       Double_t lowestPadCharge,
+                                                       Double_t lowestClusterCharge) 
 : TObject(),
 fPixArray(pixArray),
 fMathieson(0x0),
@@ -64,17 +68,20 @@ fDetElemId(detElemId),
 fNpar(0),
 fQtot(0),
 fnCoupled(0),
-fDebug(0)
+fDebug(0),
+fLowestPixelCharge(lowestPixelCharge),
+fLowestPadCharge(lowestPadCharge),
+fLowestClusterCharge(lowestClusterCharge)
 {
   /// Constructor
   
-  AliMp::StationType stationType = AliMpDEManager::GetStationType(fDetElemId);
+  AliMq::Station12Type stationType = AliMpDEManager::GetStation12Type(fDetElemId);
   
   Float_t kx3 = AliMUONConstants::SqrtKx3();
   Float_t ky3 = AliMUONConstants::SqrtKy3();
   Float_t pitch = AliMUONConstants::Pitch();
   
-  if ( stationType == AliMp::kStation1 )
+  if ( stationType == AliMq::kStation1 )
   {
     kx3 = AliMUONConstants::SqrtKx3St1();
     ky3 = AliMUONConstants::SqrtKy3St1();
@@ -118,7 +125,7 @@ AliMUONClusterSplitterMLEM::AddBin(TH2 *mlem,
       cont1 = mlem->GetCellContent(j,i);
       if (mode && cont1 > cont) continue;
       used[(i-1)*nx+j-1] = kTRUE;
-      if (cont1 < 0.5) continue;
+      if (cont1 < fLowestPixelCharge) continue;
       if (pix) pix->Add(BinToPix(mlem,j,i)); 
       else {
         pixPtr = new AliMUONPad (mlem->GetXaxis()->GetBinCenter(j), 
@@ -163,7 +170,7 @@ AliMUONClusterSplitterMLEM::BinToPix(TH2 *mlem,
   // Compare pixel and bin positions
   for (Int_t i = 0; i < nPix; ++i) {
     pixPtr = (AliMUONPad*) fPixArray->UncheckedAt(i);
-    if (pixPtr->Charge() < 0.5) continue;
+    if (pixPtr->Charge() < fLowestPixelCharge) continue; 
     if (TMath::Abs(pixPtr->Coord(0)-xc)<1.e-4 && TMath::Abs(pixPtr->Coord(1)-yc)<1.e-4) 
     {
       //return (TObject*) pixPtr;
@@ -334,9 +341,9 @@ AliMUONClusterSplitterMLEM::Fit(const AliMUONCluster& cluster,
   //const Int_t kStatusToTest(1);
   const Int_t kStatusToTest(AliMUONClusterFinderMLEM::GetUseForFitFlag());
   
-  AliMpIntPair nofPads = cluster.NofPads(kStatusToTest);
-  Int_t nInX = nofPads.GetFirst();
-  Int_t nInY = nofPads.GetSecond();
+  Long_t nofPads = cluster.NofPads(kStatusToTest);
+  Int_t nInX = AliMp::PairFirst(nofPads);
+  Int_t nInY = AliMp::PairSecond(nofPads);
 
   if (fDebug) {
     Int_t npadOK = 0;
@@ -737,7 +744,7 @@ AliMUONClusterSplitterMLEM::Fit(const AliMUONCluster& cluster,
     //                                             Double_t /*sigy*/, 
     //                                             Double_t /*dist*/)
     
-    if ( coef*fQtot >= 14 )
+    if ( coef*fQtot >= fLowestClusterCharge ) 
     {
       //AZ AliMUONCluster* cluster1 = new AliMUONCluster();
       AliMUONCluster* cluster1 = new AliMUONCluster(cluster);
@@ -801,7 +808,7 @@ AliMUONClusterSplitterMLEM::Split(const AliMUONCluster& cluster,
       indx = (i-1)*nx + j - 1;
       if (used[indx]) continue;
       cont = mlem->GetCellContent(j,i);
-      if (cont < 0.5) continue;
+      if (cont < fLowestPixelCharge) continue;
       pix = new TObjArray(20);
       used[indx] = 1;
       pix->Add(BinToPix(mlem,j,i));
@@ -1292,7 +1299,7 @@ AliMUONClusterSplitterMLEM::UpdatePads(const AliMUONCluster& cluster,
     } // if (fNpar != 0)
     
     //if (pad->Charge() > 6 /*fgkZeroSuppression*/) pad->SetStatus(0); 
-    if (pad->Charge() > 6 /*fgkZeroSuppression*/) pad->SetStatus(AliMUONClusterFinderMLEM::GetZeroFlag()); 
+    if (pad->Charge() > fLowestPadCharge) pad->SetStatus(AliMUONClusterFinderMLEM::GetZeroFlag());
     // return pad for further using // FIXME: remove usage of zerosuppression here
     else pad->SetStatus(AliMUONClusterFinderMLEM::GetOverFlag()); // do not use anymore