PandaRoot
PndEmcMakeClusterOnline.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 //#pragma once
18 #ifndef PNDEMCMAKECLUSTERONLINE_H
19 #define PNDEMCMAKECLUSTERONLINE_H
20 
21 #include <PndPersistencyTask.h>
22 #include <vector>
23 
24 #include "FairTSBufferFunctional.h"
25 #include "TStopwatch.h"
26 #include "TCanvas.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 
46 {
47 public:
48 
49  // Constructors
50 
51  PndEmcMakeClusterOnline(Int_t verbose=0, Bool_t storeclusters=kTRUE);
52 
53  // Destructor
54 
55  virtual ~PndEmcMakeClusterOnline( );
56 
58  virtual InitStatus Init();
59 
61  virtual void Exec(Option_t* opt);
62 
64  virtual void FinishTask();
65 
66  void SetStorageOfData(Bool_t val);
67 
69  void StoreClusterBaseDigis(Bool_t val = kTRUE) { fStoreClusterBase = val; }
70 
72  void SetTimebunchCutTime(Double_t time) { fTimebunchCutTime = time; }
74  void SetClusterActiveTime(Double_t dt) { fClusterActiveTime = dt; }
75 
77  void SetClusterMinimumEnergy(Double_t minE) { fClusterEnergyCut = minE; }
78  void EnableRemovalOfLowEnergyClusters(Bool_t enable) {fRemoveLowEclus = enable;}
80  void SetAutoDetermineTimecuts(Bool_t autodet) {fAutoDetermine = autodet;}
81 
82 protected:
83  virtual void FinishClusters();
84  void FinishCluster(PndEmcCluster* tmpcluster);
85  virtual void RemoveLowEnergyClusters();
86 
87 private:
89  TClonesArray* fDigiArray;
90 
92  TClonesArray* fClusterArray;
93 
94  PndEmcGeoPar* fGeoPar;
95  PndEmcRecoPar* fRecoPar;
97  Double_t fDigiEnergyTresholdBarrel;
98  Double_t fDigiEnergyTresholdFWD;
99  Double_t fDigiEnergyTresholdBWD;
100  Double_t fDigiEnergyTresholdShashlyk;
101  Double_t fClusterEnergyCut;
103  Double_t fTimebunchCutTime; // Defines how long clusters are kept open in timebased reconstruction
104  Double_t fClusterActiveTime;
105  BinaryFunctor* fDigiFunctor;
106 
107  Int_t fNrOfEvents;
108  Int_t fNrOfDigis;
109  Int_t nOnlProg;
110  Int_t digiCounter;
111  Int_t evtCounter;
112  Double_t OtotRtime;
113  Double_t OtotCtime;
114 
115  std::vector<Double_t> fClusterPosParam;
116 
117  Bool_t fStoreClusters;
118  Bool_t fStoreClusterBase; //re-store digis in case of a timebased run
119  Bool_t fRemoveLowEclus;
120  Bool_t fAutoDetermine;
121 
122  TH1I* hClusMultiplicity;
123  TH1I* hEventsPerCluster;
124  TH1D* hTimeDifference;
125 
127  virtual void SetParContainers();
128 
129  TStopwatch fTimer;
130 
131  ClassDef(PndEmcMakeClusterOnline, 1)
132 };
133 #endif // PNDEMCMAKECLUSTERONLINE_HH
void SetAutoDetermineTimecuts(Bool_t autodet)
void SetTimebunchCutTime(Double_t time)
Override EmcRecoPar time gap parameter ..to be set in ns!!!
virtual void FinishTask()
void FinishCluster(PndEmcCluster *tmpcluster)
Task to create clusters from digis.
virtual void Exec(Option_t *opt)
virtual ~PndEmcMakeClusterOnline()
void SetClusterMinimumEnergy(Double_t minE)
Set minimum cluster energy.
virtual InitStatus Init()
virtual void RemoveLowEnergyClusters()
void SetClusterActiveTime(Double_t dt)
Set time threshold for separating digis within a timebunch in ns.
void SetStorageOfData(Bool_t val)
Method to specify whether clusters are stored or not.
virtual void FinishClusters()
Parameter set for Emc Reco.
Definition: PndEmcRecoPar.h:25
void StoreClusterBaseDigis(Bool_t val=kTRUE)
Restoring digis makes only sense if reconstruction is done timebased.
PndEmcMakeClusterOnline(Int_t verbose=0, Bool_t storeclusters=kTRUE)
void EnableRemovalOfLowEnergyClusters(Bool_t enable)