]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONPreClusterFinder.h
In AliMUONSDigitizerV2:
[u/mrichter/AliRoot.git] / MUON / AliMUONPreClusterFinder.h
1 #ifndef ALIMUONPRECLUSTERFINDER_H
2 #define ALIMUONPRECLUSTERFINDER_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice                               */
6
7 // $Id$
8
9 /// \ingroup rec
10 /// \class AliMUONPreClusterFinder
11 /// \brief A basic pre-cluster finder
12 /// 
13 // Author Laurent Aphecetche, Subatech
14
15 #ifndef AliMUONVCLUSTERFINDER_H
16 #  include "AliMUONVClusterFinder.h"
17 #endif
18 #ifndef ALI_MP_AREA_H
19 #  include "AliMpArea.h"
20 #endif
21 #ifndef ROOT_TClonesArray
22 #  include <TClonesArray.h>
23 #endif
24
25 class TStopwatch;
26 class AliMUONPad;
27
28 class AliMUONPreClusterFinder : public AliMUONVClusterFinder
29 {
30 public:
31   AliMUONPreClusterFinder();
32   virtual ~AliMUONPreClusterFinder();
33   
34   using AliMUONVClusterFinder::Prepare;
35
36   virtual Bool_t Prepare(Int_t detElemId,
37                          TClonesArray* pads[2],
38                          const AliMpArea& area);
39   
40   virtual AliMUONCluster* NextCluster();
41
42   virtual Bool_t UsePad(const AliMUONPad& pad);
43   
44 private:
45   /// Not implemented
46   AliMUONPreClusterFinder(const AliMUONPreClusterFinder& rhs);
47   /// Not implemented
48   AliMUONPreClusterFinder& operator=(const AliMUONPreClusterFinder& rhs);
49
50   void AddPad(AliMUONCluster& cluster, AliMUONPad* pad);
51   
52   AliMUONPad* GetNextPad(Int_t cathode) const;
53
54   /// Whether we should stop working...
55   virtual Bool_t ShouldAbort() const { return fShouldAbort; }
56   
57   AliMUONCluster* NewCluster();
58   void RemoveCluster(AliMUONCluster* cluster);
59   
60 private:
61   TClonesArray fClusters; //!< the clusters we've found (owner)
62   TClonesArray** fPads; //!< the pads corresponding to the digits (not owner)
63   Int_t fDetElemId; //!< which DE we're considering
64   AliMpArea fArea; //!< area into which to consider pads to *start* a cluster
65   Bool_t fShouldAbort; //!< to indicate clustering should stop right now
66   
67   ClassDef(AliMUONPreClusterFinder,4) // A basic pre-cluster finder
68 };
69
70 #endif