23 #include "TObjArray.h"
29 #include <Riostream.h>
65 for ( Int_t i = 0; i < 2; ++i )
67 fPreClusters[i] =
new TClonesArray(
"AliMUONCluster",10);
76 for ( Int_t i = 0; i < 2; ++i )
89 AliError(Form(
"Cannot add pad from DE %d to this cluster finder which is "
111 AliError(
"Handling of area not yet implemented for this class. Please check.");
118 for ( Int_t i = 0; i < 2; ++i )
125 if (
fPads[0]->GetLast() < 0 &&
fPads[1]->GetLast() < 0 )
149 cout <<
"Cath0" << endl;
150 while ( ( c = static_cast<AliMUONCluster*>(next0())) )
152 cout << c->
AsString().Data() << endl;
154 cout <<
"Cath1" << endl;
155 while ( ( c = static_cast<AliMUONCluster*>(next1())) )
157 cout << c->
AsString().Data() << endl;
169 Int_t cathode = preCluster->
Cathode();
171 AliError(Form(
"Cathod undefined: %d",cathode));
176 if ( cathode <=1 && !
fPreClusters[cathode]->Remove(preCluster) )
178 AliError(Form(
"Could not remove %s from preclusters[%d]",
179 preCluster->
AsString().Data(),cathode));
191 while ( ( testCluster = static_cast<AliMUONCluster*>(next())))
208 Int_t cathode = pad->
Cathode();
210 delete padArray.Remove(pad);
212 TIter next(&padArray);
215 while ( ( testPad = static_cast<AliMUONPad*>(next())))
241 for ( Int_t cathode = 0; cathode < 2; ++cathode )
245 TIter next(&preclusters);
248 while ( ( preCluster = static_cast<AliMUONCluster*>(next()) ) )
252 cluster->SetUniqueID(
id);
266 while (
fPads[cathode]->GetLast() > 0 )
268 TIter next(
fPads[cathode]);
271 if (!pad) AliFatal(
"");
275 cluster->SetUniqueID(
id);
285 AliWarning(
"Got an empty cluster...");
TClonesArray * fPreClusters[2]
! the preclusters per cathode (owner)
void AddPreCluster(AliMUONCluster &cluster, AliMUONCluster *preCluster)
Interface of a cluster finder.
static Bool_t AreOverlapping(const AliMUONCluster &c1, const AliMUONCluster &c2)
const AliMpVSegmentation ** fkSegmentations
! segmentations (not owner)
Int_t fDetElemId
! which DE we're considering
void MakeCathodePreClusters(Int_t cathode)
A group of adjacent pads.
TClonesArray * fClusters
! the clusters we've found (owner)
A rectangle area positioned in plane..
void AddPad(AliMUONCluster &cluster, AliMUONPad *pad)
Int_t Multiplicity() const
static Bool_t AreNeighbours(const AliMUONPad &d1, const AliMUONPad &d2)
virtual Bool_t Prepare(Int_t detElemId, TObjArray *pads[2], const AliMpArea &area, const AliMpVSegmentation *seg[2])
virtual AliMUONCluster * NextCluster()
Int_t Cathode() const
Return cathode number.
virtual ~AliMUONPreClusterFinderV3()
A basic pre-cluster finder.
AliMUONPad * AddPad(const AliMUONPad &pad)
TObjArray ** fPads
! the pads corresponding to the digits (not owner)
The abstract base class for the segmentation.
Bool_t IsValid() const
Return validity.
TIterator * fIterator
! iterator on fClusters
Int_t DetElemId() const
Return detection element id.
void SetClusterId(Int_t id)
Set cluster id this pad belongs to -1 if not attached to a cluster.
void DumpPreClusters() const
ClassImp(AliMUONPreClusterFinderV3) AliMUONPreClusterFinderV3
Combination of digit and mppad informations.
virtual Bool_t UsePad(const AliMUONPad &pad)
void AddCluster(const AliMUONCluster &cluster)