PandaRoot
PndEmcMakeCluster.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 // Software developed for the PANDA Detector at GSI.
17 // Author List:
18 // Jan Zhong
19 // Marcel Tiemens
20 // Áron Kripkó
21 //---------------------------------------------------------------------
22 //#pragma once
23 #ifndef PNDEMCMAKECLUSTER_H
24 #define PNDEMCMAKECLUSTER_H
25 
26 #include <PndPersistencyTask.h>
27 #include <vector>
28 
29 #include "FairTSBufferFunctional.h"
30 #include "TStopwatch.h"
31 #include "TCanvas.h"
32 #include "TH1.h"
33 
34 class TClonesArray;
35 class TObjectArray;
36 class PndEmcDigi;
37 class PndEmcCluster;
38 class PndEmcGeoPar;
39 class PndEmcDigiPar;
40 class PndEmcRecoPar;
41 class BinaryFunctor;
42 
52  public:
53  // Constructors
54  PndEmcMakeCluster(Int_t verbose = 0, Bool_t storeclusters = kTRUE);
55  // Destructor
56  virtual ~PndEmcMakeCluster();
57 
58  virtual InitStatus Init();
59  virtual void Exec(Option_t *opt);
60 
62  virtual void ExecuteTasks(Option_t *option)
63  {
64  PndPersistencyTask::ExecuteTasks(option);
66  }
67 
68  void SetStorageOfData(Bool_t val);
69 
75  void StoreClusterBaseDigis(Bool_t val = kTRUE) { fStoreClusterBase = val; }
76 
77  void SetClusterActiveTime(Double_t time) { fClusterActiveTime = time; }
78 
80  void SetClusterMinimumEnergy(Double_t minE) { fClusterEnergyCut = minE; }
81  void EnableRemovalOfLowEnergyClusters(Bool_t enable) { fRemoveLowEclus = enable; }
82  void EnableBetterNeutralReconstruction(Bool_t enable) { fMerge = enable; }
83 
84  protected:
86  virtual void SetParContainers();
87  virtual void FinishClusters();
88  virtual void RemoveLowEnergyClusters();
89 
90  private:
91  void FinishCluster(PndEmcCluster *tmpcluster);
92 
93  void cleansortmclist(std::vector<Int_t> &newlist, TClonesArray *mcTrackArray);
94  // don't allow copying (-Weffc++)
95 
97  TClonesArray *fDigiArray;
98 
100  TClonesArray *fHitArray;
101  TClonesArray *fMCTrackArray;
102 
104  TClonesArray *fClusterArray;
105 
106  PndEmcGeoPar *fGeoPar;
107  PndEmcDigiPar *fDigiPar;
108  PndEmcRecoPar *fRecoPar;
111  Int_t fVerbose;
112 
113  Double_t fDigiEnergyTresholdBarrel;
114  Double_t fDigiEnergyTresholdFWD;
115  Double_t fDigiEnergyTresholdBWD;
116  Double_t fDigiEnergyTresholdShashlyk;
117  Double_t fClusterEnergyCut;
119  Double_t fMaxECut;
120 
121  Double_t fTimebunchCutTime; // Defines how long clusters are kept open in timebased reconstruction
122  Double_t fClusterActiveTime;
123  BinaryFunctor *fDigiFunctor;
124 
125  Int_t fNrOfEvents;
126  Int_t fNrOfDigis;
127  Int_t nOnlProg;
128  Int_t digiCounter;
129  Int_t evtCounter;
130 
131  std::vector<Double_t> fClusterPosParam;
132 
133  Bool_t fStoreClusters;
134  Bool_t fStoreClusterBase; // re-store digis in case of a timebased run
135  Bool_t fMerge;
136  Bool_t fRemoveLowEclus;
137 
138  TH1I *hClusMultiplicity;
139  TH1I *hEventsPerCluster;
140  TH1D *hTimeDifference;
141 
142  TStopwatch fTimer;
143 
144  ClassDef(PndEmcMakeCluster, 3)
145 };
146 #endif // PNDEMCMAKECLUSTER_HH
void SetStorageOfData(Bool_t val)
Method to specify whether clusters are stored or not.
void EnableRemovalOfLowEnergyClusters(Bool_t enable)
PndEmcMakeCluster(Int_t verbose=0, Bool_t storeclusters=kTRUE)
virtual void ExecuteTasks(Option_t *option)
Finish clusters after subtasks have been executed.
virtual void FinishClusters()
virtual ~PndEmcMakeCluster()
virtual void Exec(Option_t *opt)
void StoreClusterBaseDigis(Bool_t val=kTRUE)
Method to specify whether underlying digis are stored or not.
parameter set of Emc digitisation
Definition: PndEmcDigiPar.h:24
virtual void RemoveLowEnergyClusters()
Task to cluster PndEmcDigis.
void SetClusterActiveTime(Double_t time)
Override EmcRecoPar cluster active time parameter ..to be set in ns!!!
void EnableBetterNeutralReconstruction(Bool_t enable)
Parameter set for Emc Reco.
Definition: PndEmcRecoPar.h:25
void SetClusterMinimumEnergy(Double_t minE)
Set minimum cluster energy.
virtual void SetParContainers()
virtual InitStatus Init()