X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONClusterFinderSimpleFit.cxx;h=314f27d37a8e07d43bd53cc84083e2c0d60181ec;hb=db7e03ac475daa4756830da34113592b1a084491;hp=52ee92ddb6ddf2e9d13decbf9dca02b41ba527ae;hpb=78649106ec7f71baeb897efa54274a4011675b87;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONClusterFinderSimpleFit.cxx b/MUON/AliMUONClusterFinderSimpleFit.cxx index 52ee92ddb6d..314f27d37a8 100644 --- a/MUON/AliMUONClusterFinderSimpleFit.cxx +++ b/MUON/AliMUONClusterFinderSimpleFit.cxx @@ -19,20 +19,21 @@ #include "AliLog.h" #include "AliMpDEManager.h" -#include "AliMpStationType.h" #include "AliMUONCluster.h" #include "AliMUONConstants.h" -#include "AliMUONDigit.h" +#include "AliMUONVDigit.h" #include "AliMUONMathieson.h" #include "AliMUONPad.h" -#include "AliMUONClusterFinderCOG.h" #include "AliMpArea.h" #include "TClonesArray.h" #include "TObjArray.h" #include "TVector2.h" #include "TVirtualFitter.h" #include "TF1.h" +#include "AliMUONVDigitStore.h" +#include +//----------------------------------------------------------------------------- /// \class AliMUONClusterFinderSimpleFit /// /// Basic cluster finder @@ -44,6 +45,7 @@ /// FIXME: this one is still at the developping stage... /// /// \author Laurent Aphecetche +//----------------------------------------------------------------------------- /// \cond CLASSIMP ClassImp(AliMUONClusterFinderSimpleFit) @@ -89,9 +91,9 @@ namespace } //_____________________________________________________________________________ -AliMUONClusterFinderSimpleFit::AliMUONClusterFinderSimpleFit() +AliMUONClusterFinderSimpleFit::AliMUONClusterFinderSimpleFit(AliMUONVClusterFinder* clusterFinder) : AliMUONVClusterFinder(), -fClusterFinder(0x0), +fClusterFinder(clusterFinder), fMathieson(0x0) { /// ctor @@ -107,39 +109,22 @@ AliMUONClusterFinderSimpleFit::~AliMUONClusterFinderSimpleFit() //_____________________________________________________________________________ Bool_t -AliMUONClusterFinderSimpleFit::Prepare(const AliMpVSegmentation* segmentations[2], - TClonesArray* digits[2]) +AliMUONClusterFinderSimpleFit::Prepare(Int_t detElemId, + TClonesArray* pads[2], + const AliMpArea& area) { /// Prepare for clustering // FIXME: should we get the Mathieson from elsewhere ? // Find out the DetElemId - Int_t detElemId(-1); - - for ( Int_t i = 0; i < 2; ++i ) - { - AliMUONDigit* d = static_cast(digits[i]->First()); - if (d) - { - detElemId = d->DetElemId(); - break; - } - } - - if ( detElemId < 0 ) - { - AliWarning("Could not find DE. Probably no digits at all ?"); - return kFALSE; - } - - AliMp::StationType stationType = AliMpDEManager::GetStationType(detElemId); + AliMq::Station12Type stationType = AliMpDEManager::GetStation12Type(detElemId); 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(); @@ -153,9 +138,7 @@ AliMUONClusterFinderSimpleFit::Prepare(const AliMpVSegmentation* segmentations[2 fMathieson->SetSqrtKx3AndDeriveKx2Kx4(kx3); fMathieson->SetSqrtKy3AndDeriveKy2Ky4(ky3); - delete fClusterFinder; - fClusterFinder = new AliMUONClusterFinderCOG; - return fClusterFinder->Prepare(segmentations,digits); + return fClusterFinder->Prepare(detElemId,pads,area); } //_____________________________________________________________________________