X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONClusterFinderCOG.cxx;h=7bd0b8a56b98ba9e3c2f8d3121abe0bd15d6b2ca;hb=a0036e80febab1792c0e1afbe8512ab54b6bb89d;hp=5746859023cf288f17ac49e93472cfbaa79bed67;hpb=3887d11e8f4027e75439a92362adf9415a79eadf;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONClusterFinderCOG.cxx b/MUON/AliMUONClusterFinderCOG.cxx index 5746859023c..7bd0b8a56b9 100644 --- a/MUON/AliMUONClusterFinderCOG.cxx +++ b/MUON/AliMUONClusterFinderCOG.cxx @@ -21,11 +21,11 @@ #include "AliMUONCluster.h" #include "AliMUONVDigit.h" #include "AliMUONPad.h" -#include "AliMUONPreClusterFinder.h" #include "AliMpArea.h" #include "TVector2.h" #include "AliMUONVDigitStore.h" +//----------------------------------------------------------------------------- /// \class AliMUONClusterFinderCOG /// /// A very basic (and mostly useless, probably) cluster finder. @@ -38,15 +38,16 @@ /// direction with the better resolution. /// /// \author Laurent Aphecetche +//----------------------------------------------------------------------------- /// \cond CLASSIMP ClassImp(AliMUONClusterFinderCOG) /// \endcond //_____________________________________________________________________________ -AliMUONClusterFinderCOG::AliMUONClusterFinderCOG() +AliMUONClusterFinderCOG::AliMUONClusterFinderCOG(AliMUONVClusterFinder* clusterFinder) : AliMUONVClusterFinder(), -fPreClusterFinder(0x0) +fPreClusterFinder(clusterFinder) { /// ctor } @@ -60,33 +61,13 @@ AliMUONClusterFinderCOG::~AliMUONClusterFinderCOG() //_____________________________________________________________________________ Bool_t -AliMUONClusterFinderCOG::Prepare(const AliMpVSegmentation* segmentations[2], - const AliMUONVDigitStore& digitStore) +AliMUONClusterFinderCOG::Prepare(Int_t detElemId, + TObjArray* pads[2], + const AliMpArea& area) { /// Prepare for clustering - // Find out the DetElemId - Int_t detElemId(-1); - - TIter next(digitStore.CreateIterator()); - AliMUONVDigit* d; - - d = static_cast(next()); - - if (d) - { - detElemId = d->DetElemId(); - } - - if ( detElemId < 0 ) - { - AliWarning("Could not find DE. Probably no digits at all ?"); - return kFALSE; - } - - delete fPreClusterFinder; - fPreClusterFinder = new AliMUONPreClusterFinder; - return fPreClusterFinder->Prepare(segmentations,digitStore); + return fPreClusterFinder->Prepare(detElemId,pads,area); } //_____________________________________________________________________________ @@ -101,7 +82,7 @@ AliMUONClusterFinderCOG::NextCluster() { ComputePosition(*cluster); - if ( cluster->Charge() < 7 ) + if ( cluster->Charge() < 1.0675 ) // JC: adc -> fc { // skip that one return NextCluster(); @@ -133,7 +114,7 @@ AliMUONClusterFinderCOG::ComputePosition(AliMUONCluster& cluster) { AliMUONPad* pad = cluster.Pad(i); TVector2 padPosition = pad->Position(); - AliMpArea area(pad->Position(),pad->Dimensions()); + AliMpArea area(pad->X(), pad->Y(), pad->DX(), pad->DY()); xmin = TMath::Min(area.LeftBorder(),xmin); xmax = TMath::Max(area.RightBorder(),xmax); ymin = TMath::Min(area.DownBorder(),ymin);