FairRoot/PandaRoot
PndGemFindClustersTB.h
Go to the documentation of this file.
1 //* $Id: */
2 
3 // -------------------------------------------------------------------------
4 // ----- PndGemFindClustersTB header file -----
5 // ----- Created 15/06/2013 by R. Karabowicz -----
6 // -------------------------------------------------------------------------
7 
8 
20 #ifndef PNDGEMFINDCLUSTERSTB_H
21 #define PNDGEMFINDCLUSTERSTB_H 1
22 
23 
24 #include "FairTask.h"
25 #include "FairTSBufferFunctional.h"
26 
27 #include "TStopwatch.h"
28 
29 #include <map>
30 #include <set>
31 
32 
33 class TClonesArray;
34 class PndGemDigiPar;
35 class PndGemSensor;
36 class PndGemStation;
37 
38 struct DigiClusterTB {
39  Int_t detId;
40  std::vector<Int_t> digiNr;
41  std::vector<Int_t> chanNr;
42  std::vector<Double_t> sigADC;
43  std::vector<Double_t> sigTDC;
47  Int_t cluPMn;
48  Int_t cluPMx;
51 };
52 
53 class PndGemFindClustersTB : public FairTask
54 {
55 
56 
57  public :
58 
61 
62 
65 
66 
68  PndGemFindClustersTB(const char* name, Int_t iVerbose=0);
69 
70 
72  virtual ~PndGemFindClustersTB();
73 
74 
76  virtual void Exec(Option_t* opt);
77 
78  void SetInBranchName(TString ibn) { fInBranchName = ibn.Data(); }
79 
80  private:
81 
83  TClonesArray* fDigis;
84  TClonesArray* fClusters;
86  Int_t fTNofEvents;
87  Int_t fTNofDigis;
89 
90  BinaryFunctor* fFunctor;
91 
99 
101 
102  std::vector <DigiClusterTB> fDigiClusters;
103 
104  TStopwatch fTimer;
105 
106 
108  virtual void SetParContainers();
109 
110 
112  virtual InitStatus Init();
113 
114 
116  virtual InitStatus ReInit();
117 
118 
120  Int_t CreateClusters();
121 
123  Int_t WriteClusters();
124 
125  void AnalyzeClusters();
126 
127  void SortClusters();
128  void SortCluster(Int_t clus);
129  void PrintClusters();
130  void PrintCluster (Int_t clus);
131 
132  void CheckClusters();
133  void CheckCluster(Int_t clus);
134 
135  void JoinTwoClusters(Int_t clus1, Int_t clus2);
136 
137  void AddDigiToCluster(Int_t digiNr, Int_t clusNr);
138 
140  Bool_t CompareDigiToClusters(Int_t digiNumber);
141 
143  virtual void Finish();
144 
145 
147 
148 };
149 
150 #endif
ClassDef(PndGemFindClustersTB, 1)
std::vector< Double_t > sigTDC
virtual InitStatus Init()
Digitization Parameter Class for GEM part.
Definition: PndGemDigiPar.h:31
void JoinTwoClusters(Int_t clus1, Int_t clus2)
virtual void Exec(Option_t *opt)
void AddDigiToCluster(Int_t digiNr, Int_t clusNr)
std::vector< Int_t > digiNr
Double_t
Bool_t CompareDigiToClusters(Int_t digiNumber)
void SetInBranchName(TString ibn)
TString name
std::vector< Double_t > sigADC
std::vector< Int_t > chanNr
std::vector< DigiClusterTB > fDigiClusters
Int_t iVerbose
virtual InitStatus ReInit()