PandaRoot
PndSdsStripClusterer.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // -------------------------------------------------------------------------
14 // ----- PndSdsStripClusterer header file -----
15 // ----- Converted 27.11.2007 from R.Jaekel by R.Kliemt -----
16 // -------------------------------------------------------------------------
17 
25 #ifndef PNDSDSSTRIPCLUSTERBUILDER_H
26 #define PNDSDSSTRIPCLUSTERBUILDER_H
27 
28 #include <vector>
29 #include <map>
30 #include <string>
31 
32 #include "PndSdsDigiStrip.h"
33 #include "PndSdsClusterStrip.h"
34 // #include "PndSdsStripCluster.h"
35 
36 typedef std::map<Int_t, Int_t> Indexpair;
37 typedef std::map<Int_t, Indexpair> Indextriple;
38 typedef std::map<SensorSide, Indextriple> SidedTriple;
39 typedef std::map<Int_t, SidedTriple> Fullmap;
40 
42  public:
43  PndSdsStripClusterer(Int_t DigiType);
44  virtual ~PndSdsStripClusterer();
45 
46  void Reinit();
47 
48  void AddDigi(Int_t sensorID, SensorSide side, Int_t timestamp, Int_t strip, Int_t iDigi);
49  void ClearDigis() { fSortedDigis.clear(); }
50  virtual std::vector<PndSdsClusterStrip *> SearchClusters() = 0;
51 
52  std::vector<PndSdsClusterStrip *> GetClusters() const { return fClusters; }
56  std::vector<Int_t> GetTopClusterIDs() const { return fTopclusters; }
57  std::vector<Int_t> GetBotClusterIDs() const { return fBotclusters; }
58  std::vector<Int_t> GetLeftDigiIDs() const { return fLeftDigis; }
59 
60  void SetDigiType(Int_t digiType) { fDigiType = digiType; }
61 
62  protected:
63  void AddCluster(const std::vector<Int_t> &onecluster, SensorSide side);
65  std::vector<Int_t> fTopclusters; // contains index to fClusterArray
66  std::vector<Int_t> fBotclusters; // contains index to fClusterArray
67  std::vector<Int_t> fLeftDigis; // contains index to the not assigned digis
68  std::vector<PndSdsClusterStrip *> fClusters;
69 
70  Int_t fDigiType;
71 
73 };
74 
75 #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:33
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()