PandaRoot
PndEmcMergePreclusters.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 // File and Version Information:
15 // $Id: $
16 //
17 //---------------------------------------------------------------------
18 //#pragma once
19 #ifndef PNDEMCMERGEPRECLUSTERS_H
20 #define PNDEMCMERGEPRECLUSTERS_H
21 
22 #include "FairTask.h"
23 #include <vector>
24 
25 #include "FairTSBufferFunctional.h"
26 #include "TStopwatch.h"
27 #include "TH1.h"
28 
29 class TClonesArray;
30 class TObjectArray;
31 class PndEmcDigi;
32 class PndEmcCluster;
33 class PndEmcGeoPar;
34 class PndEmcRecoPar;
35 class BinaryFunctor;
36 
37 
38 class PndEmcMergePreclusters : public FairTask
39 {
40 public:
41 
42  // Constructors
43 
44  PndEmcMergePreclusters(Int_t verbose=0, Bool_t storeclusters=kTRUE);
45 
46  // Destructor
47 
48  virtual ~PndEmcMergePreclusters( );
49 
51  virtual InitStatus Init();
52 
54  virtual void Exec(Option_t* opt);
55 
56  virtual void FinishTask();
57 
58  void SetStorageOfData(Bool_t val);
59 
61  void StoreClusterBaseDigis(Bool_t val = kTRUE) { fStoreClusterBase = kTRUE; }
62 
64  void SetTimebunchCutTime(Double_t time) { fTimebunchCutTime = time; fAutoTime=kFALSE; }
65  void SetPreclusterTimeThreshold(Double_t dt) { fClusterActiveTime = dt; }
66  void SetAutoDetermineTimecuts(Bool_t autotime) {fAutoTime=!autotime; }
67 
69  void SetClusterMinimumEnergy(Double_t minE) { fClusterEnergyCut = minE; }
70  void EnableRemovalOfLowEnergyClusters(Bool_t enable) {fRemoveLowEclus = enable;}
72  void SetPositionMethod(Int_t method) { fPosMethod = method; }
79  void SetNeighbourMethod(Int_t nbmethod) { fNbMethod = nbmethod; }
86 protected:
87  virtual void FinishClusters();
88  void FinishCluster(PndEmcCluster* tmpcluster);
89  virtual void RemoveLowEnergyClusters();
90 
91 private:
93  TClonesArray* fDigiArray;
94  TClonesArray* fPreclusterArray;
95 
97  TClonesArray* fClusterArray;
98 
99  PndEmcGeoPar* fGeoPar;
100  PndEmcRecoPar* fRecoPar;
102  Double_t fClusterEnergyCut;
103 
104  Double_t fTimebunchCutTime;
105  Double_t fClusterActiveTime;
106  BinaryFunctor* fClusterFunctor;
107 
108  std::vector<Double_t> fClusterPosParam;
109 
110  Int_t fPosMethod;
111  Int_t fNbMethod;
112  Int_t evtCounter;
113  Int_t precCounter;
114  Int_t fNrOfPres;
115  Int_t nMrgProg;
116  Int_t nTotClusters;
117  Int_t fRemovedClusters;
118  Int_t nTotDigis;
119  Int_t wrongConnection;
120  Double_t CNtotRtime;
121  Double_t CNtotCtime;
122 
123  TH1D* hDx;
124  TH1D* hDy;
125  TH1D* hDz;
126  TH1D* hTimeDifference;
127 
128  Bool_t fStoreClusters;
129  Bool_t fStoreClusterBase; //restore digis in case of a timebased run
130  Bool_t fRemoveLowEclus;
131  Bool_t fAutoTime; // toggle manual overwriting of timebunch cut time
132 
134  virtual void SetParContainers();
135 
136  TStopwatch fTimer;
137 
138  ClassDef(PndEmcMergePreclusters, 2)
139 };
140 #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:25