PandaRoot
PndSdsStripClusterer.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndSdsStripClusterer header file -----
3 // ----- Converted 27.11.2007 from R.Jaekel by R.Kliemt -----
4 // -------------------------------------------------------------------------
5 
13 #ifndef PNDSDSSTRIPCLUSTERBUILDER_H
14 #define PNDSDSSTRIPCLUSTERBUILDER_H
15 
16 #include <vector>
17 #include <map>
18 #include <string>
19 
20 #include "PndSdsDigiStrip.h"
21 #include "PndSdsClusterStrip.h"
22 // #include "PndSdsStripCluster.h"
23 
24 typedef std::map<Int_t, Int_t> Indexpair;
25 typedef std::map<Int_t, Indexpair> Indextriple;
26 typedef std::map<SensorSide, Indextriple> SidedTriple;
27 typedef std::map<Int_t, SidedTriple> Fullmap;
28 
30  public:
31  PndSdsStripClusterer(Int_t DigiType);
32  virtual ~PndSdsStripClusterer();
33 
34  void Reinit();
35 
36  void AddDigi(Int_t sensorID, SensorSide side, Int_t timestamp, Int_t strip, Int_t iDigi);
37  void ClearDigis() { fSortedDigis.clear(); }
38  virtual std::vector<PndSdsClusterStrip *> SearchClusters() = 0;
39 
40  std::vector<PndSdsClusterStrip *> GetClusters() const { return fClusters; }
44  std::vector<Int_t> GetTopClusterIDs() const { return fTopclusters; }
45  std::vector<Int_t> GetBotClusterIDs() const { return fBotclusters; }
46  std::vector<Int_t> GetLeftDigiIDs() const { return fLeftDigis; }
47 
48  void SetDigiType(Int_t digiType) { fDigiType = digiType; }
49 
50  protected:
51  void AddCluster(const std::vector<Int_t> &onecluster, SensorSide side);
53  std::vector<Int_t> fTopclusters; // contains index to fClusterArray
54  std::vector<Int_t> fBotclusters; // contains index to fClusterArray
55  std::vector<Int_t> fLeftDigis; // contains index to the not assigned digis
56  std::vector<PndSdsClusterStrip *> fClusters;
57 
58  Int_t fDigiType;
59 
61 };
62 
63 #endif // PndSdsStripClusterer
std::map< Int_t, Indexpair > Indextriple
PndSdsStripClusterer(Int_t DigiType)
std::map< std::string, std::map< SensorSide, Indexpair > > Fullmap
std::map< Int_t, SidedTriple > Fullmap
unsigned int i
Definition: P4_F32vec4.h:21
std::vector< Int_t > GetTopClusterIDs() const
std::vector< Int_t > GetLeftDigiIDs() const
std::map< SensorSide, Indextriple > SidedTriple
std::vector< Int_t > fLeftDigis
std::vector< Int_t > fBotclusters
std::vector< PndSdsClusterStrip * > GetClusters() const
ClassDef(PndSdsStripClusterer, 3)
PndSdsClusterStrip * GetBotCluster(Int_t i)
std::vector< Int_t > GetBotClusterIDs() const
std::map< Int_t, Int_t > Indexpair
std::vector< PndSdsClusterStrip * > fClusters
void AddDigi(Int_t sensorID, SensorSide side, Int_t timestamp, Int_t strip, Int_t iDigi)
SensorSide
PndSdsClusterStrip * GetTopCluster(Int_t i)
PndSdsClusterStrip * GetCluster(Int_t i)
virtual std::vector< PndSdsClusterStrip * > SearchClusters()=0
void AddCluster(const std::vector< Int_t > &onecluster, SensorSide side)
void SetDigiType(Int_t digiType)
std::vector< Int_t > fTopclusters
virtual ~PndSdsStripClusterer()