PandaRoot
PndEmcMergePreclusters.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------
2 // File and Version Information:
3 // $Id: $
4 //
5 //---------------------------------------------------------------------
6 //#pragma once
7 #ifndef PNDEMCMERGEPRECLUSTERS_H
8 #define PNDEMCMERGEPRECLUSTERS_H
9 
10 #include "FairTask.h"
11 #include <vector>
12 
13 #include "FairTSBufferFunctional.h"
14 #include "TStopwatch.h"
15 #include "TH1.h"
16 
17 class TClonesArray;
18 class TObjectArray;
19 class PndEmcDigi;
20 class PndEmcCluster;
21 class PndEmcGeoPar;
22 class PndEmcRecoPar;
23 class BinaryFunctor;
24 
25 
26 class PndEmcMergePreclusters : public FairTask
27 {
28 public:
29 
30  // Constructors
31 
32  PndEmcMergePreclusters(Int_t verbose=0, Bool_t storeclusters=kTRUE);
33 
34  // Destructor
35 
36  virtual ~PndEmcMergePreclusters( );
37 
39  virtual InitStatus Init();
40 
42  virtual void Exec(Option_t* opt);
43 
44  virtual void FinishTask();
45 
46  void SetStorageOfData(Bool_t val);
47 
49  void StoreClusterBaseDigis(Bool_t val = kTRUE) { fStoreClusterBase = kTRUE; }
50 
52  void SetTimebunchCutTime(Double_t time) { fTimebunchCutTime = time; fAutoTime=kFALSE; }
53  void SetPreclusterTimeThreshold(Double_t dt) { fClusterActiveTime = dt; }
54  void SetAutoDetermineTimecuts(Bool_t autotime) {fAutoTime=!autotime; }
55 
57  void SetClusterMinimumEnergy(Double_t minE) { fClusterEnergyCut = minE; }
58  void EnableRemovalOfLowEnergyClusters(Bool_t enable) {fRemoveLowEclus = enable;}
60  void SetPositionMethod(Int_t method) { fPosMethod = method; }
67  void SetNeighbourMethod(Int_t nbmethod) { fNbMethod = nbmethod; }
74 protected:
75  virtual void FinishClusters();
76  void FinishCluster(PndEmcCluster* tmpcluster);
77  virtual void RemoveLowEnergyClusters();
78 
79 private:
81  TClonesArray* fDigiArray;
82  TClonesArray* fPreclusterArray;
83 
85  TClonesArray* fClusterArray;
86 
87  PndEmcGeoPar* fGeoPar;
88  PndEmcRecoPar* fRecoPar;
90  Double_t fClusterEnergyCut;
91 
92  Double_t fTimebunchCutTime;
93  Double_t fClusterActiveTime;
94  BinaryFunctor* fClusterFunctor;
95 
96  std::vector<Double_t> fClusterPosParam;
97 
98  Int_t fPosMethod;
99  Int_t fNbMethod;
100  Int_t evtCounter;
101  Int_t precCounter;
102  Int_t fNrOfPres;
103  Int_t nMrgProg;
104  Int_t nTotClusters;
105  Int_t fRemovedClusters;
106  Int_t nTotDigis;
107  Int_t wrongConnection;
108  Double_t CNtotRtime;
109  Double_t CNtotCtime;
110 
111  TH1D* hDx;
112  TH1D* hDy;
113  TH1D* hDz;
114  TH1D* hTimeDifference;
115 
116  Bool_t fStoreClusters;
117  Bool_t fStoreClusterBase; //restore digis in case of a timebased run
118  Bool_t fRemoveLowEclus;
119  Bool_t fAutoTime; // toggle manual overwriting of timebunch cut time
120 
122  virtual void SetParContainers();
123 
124  TStopwatch fTimer;
125 
126  ClassDef(PndEmcMergePreclusters, 2)
127 };
128 #endif // PNDEMCMERGEPRECLUSTERS_HH
void SetTimebunchCutTime(Double_t time)
Override EmcRecoPar timebunch cutting parameter - to be set in ns!
virtual void Exec(Option_t *opt)
virtual void FinishTask()
void SetPreclusterTimeThreshold(Double_t dt)
virtual void FinishClusters()
void StoreClusterBaseDigis(Bool_t val=kTRUE)
Restoring digis makes only sense if reconstruction is done timebased.
void SetStorageOfData(Bool_t val)
Method to specify whether clusters are stored or not.
virtual ~PndEmcMergePreclusters()
virtual void RemoveLowEnergyClusters()
PndEmcMergePreclusters(Int_t verbose=0, Bool_t storeclusters=kTRUE)
void FinishCluster(PndEmcCluster *tmpcluster)
void SetNeighbourMethod(Int_t nbmethod)
void SetAutoDetermineTimecuts(Bool_t autotime)
void EnableRemovalOfLowEnergyClusters(Bool_t enable)
virtual InitStatus Init()
void SetPositionMethod(Int_t method)
void SetClusterMinimumEnergy(Double_t minE)
Set minimum cluster energy.
Parameter set for Emc Reco.
Definition: PndEmcRecoPar.h:12