PandaRoot
PndEmcMakePreclusters.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 PNDEMCMAKEPRECLUSTERS_H
20 #define PNDEMCMAKEPRECLUSTERS_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 PndEmcPrecluster;
34 class PndEmcGeoPar;
35 class PndEmcRecoPar;
36 class BinaryFunctor;
37 
38 
39 class PndEmcMakePreclusters : public FairTask
40 {
41 public:
42 
43  // Constructors
44 
45  PndEmcMakePreclusters(Int_t verbose=0, Bool_t storeclusters=kTRUE);
46 
47  // Destructor
48 
49  virtual ~PndEmcMakePreclusters( );
50 
52  virtual InitStatus Init();
53 
55  virtual void Exec(Option_t* opt);
56 
57  virtual void FinishTask();
58 
59  void SetStorageOfData(Bool_t val);
60 
62  void StoreClusterBaseDigis(Bool_t val = kTRUE) { fStoreClusterBase = kTRUE; }
63 
65  void SetTimebunchCutTime(Double_t time) { fTimebunchCutTime = time; }
66  void SetClusterActiveTime(Double_t dt) { fClusterActiveTime = dt; }
67 
68  void SetPositionMethod(Int_t method) { fPosMethod = method; }
69  void SetDigiPositionType(Int_t type=-1) { fDigiPosType = type; } // select whether to use mapped or real digi position
70 
71  void SetAutoDetermineTimecuts(Bool_t autodet) {fAutoDetermine = autodet;}
72 
73 protected:
74  virtual void FinishPreclusters();
75  void FinishPrecluster(PndEmcPrecluster* tmpcluster);
76 
77 private:
79  TClonesArray* fDigiArray;
80 
82  TClonesArray* fPreclusterArray;
83 
84  PndEmcGeoPar* fGeoPar;
85  PndEmcRecoPar* fRecoPar;
87  Double_t fDigiEnergyTresholdBarrel;
88  Double_t fDigiEnergyTresholdFWD;
89  Double_t fDigiEnergyTresholdBWD;
90  Double_t fDigiEnergyTresholdShashlyk;
91 
92  Double_t fTimebunchCutTime;
93  Double_t fClusterActiveTime;
94  BinaryFunctor* fDigiFunctor;
95 
96  std::vector<Double_t> fClusterPosParam;
97 
98  Int_t fPosMethod;
99  Int_t fDigiPosType;
100  Int_t evtCounter;
101  Int_t digiCounter;
102  Int_t nTotDigisPassed;
103  Int_t fNrOfDigis;
104  Int_t fNrOfEvents;
105  Int_t nPrecProg;
106  Double_t DCtotRtime;
107  Double_t DCtotCtime;
108 
109  TH1I* hNdigis;
110 // TH1D* hRadDiff;
111 // TH1D* hPosDiff;
112 
113  Bool_t fStoreClusters;
114  Bool_t fStoreClusterBase; //restore digis in case of a timebased run
115  Bool_t fAutoDetermine;
116 
118  virtual void SetParContainers();
119 
120  TStopwatch fTimer;
121 
122  ClassDef(PndEmcMakePreclusters, 1)
123 };
124 #endif // PNDEMCMAKEPRECLUSTERS_HH
virtual void Exec(Option_t *opt)
void FinishPrecluster(PndEmcPrecluster *tmpcluster)
void SetClusterActiveTime(Double_t dt)
void SetStorageOfData(Bool_t val)
Method to specify whether clusters are stored or not.
virtual ~PndEmcMakePreclusters()
PndEmcMakePreclusters(Int_t verbose=0, Bool_t storeclusters=kTRUE)
virtual InitStatus Init()
void SetPositionMethod(Int_t method)
void StoreClusterBaseDigis(Bool_t val=kTRUE)
Restoring digis makes only sense if reconstruction is done timebased.
void SetDigiPositionType(Int_t type=-1)
void SetAutoDetermineTimecuts(Bool_t autodet)
represents an emc precluster, formed in the (virtual) data concentrators
void SetTimebunchCutTime(Double_t time)
Override EmcRecoPar cluster active time parameter ..to be set in ns!!!
virtual void FinishTask()
Parameter set for Emc Reco.
Definition: PndEmcRecoPar.h:25
virtual void FinishPreclusters()