#include "AliLog.h"
#include "AliMUONCluster.h"
-#include "AliMUONDigit.h"
+#include "AliMUONVDigit.h"
#include "AliMUONPad.h"
-#include "AliMUONPreClusterFinder.h"
#include "AliMpArea.h"
-#include "TClonesArray.h"
#include "TVector2.h"
+#include "AliMUONVDigitStore.h"
+//-----------------------------------------------------------------------------
/// \class AliMUONClusterFinderCOG
///
/// A very basic (and mostly useless, probably) cluster finder.
/// 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
}
//_____________________________________________________________________________
Bool_t
-AliMUONClusterFinderCOG::Prepare(const AliMpVSegmentation* segmentations[2],
- TClonesArray* digits[2])
+AliMUONClusterFinderCOG::Prepare(Int_t detElemId,
+ TClonesArray* pads[2],
+ const AliMpArea& area)
{
/// Prepare for clustering
- // Find out the DetElemId
- Int_t detElemId(-1);
-
- for ( Int_t i = 0; i < 2; ++i )
- {
- AliMUONDigit* d = static_cast<AliMUONDigit*>(digits[i]->First());
- if (d)
- {
- detElemId = d->DetElemId();
- break;
- }
- }
-
- if ( detElemId < 0 )
- {
- AliWarning("Could not find DE. Probably no digits at all ?");
- return kFALSE;
- }
-
- delete fPreClusterFinder;
- fPreClusterFinder = new AliMUONPreClusterFinder;
- return fPreClusterFinder->Prepare(segmentations,digits);
+ return fPreClusterFinder->Prepare(detElemId,pads,area);
}
//_____________________________________________________________________________
{
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);