PandaRoot
PndSdsStripClusterTask.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 // ----- PndSdsStripClusterTask header file -----
15 // -------------------------------------------------------------------------
16 
17 #ifndef PNDSDSSTRIPCLUSTERTASK_H
18 #define PNDSDSSTRIPCLUSTERTASK_H
19 
20 #include "PndSdsTask.h"
21 #include "PndSdsStripDigiPar.h"
22 #include "PndSdsHit.h"
23 #include "PndSdsMCPoint.h"
24 // #include "PndSdsCluster.h"
25 //#include "PndSdsRecoCharge.h"
26 #include "FairGeoVector.h"
27 #include "FairGeoTransform.h"
28 #include "TVector3.h"
29 #include "TRandom.h"
30 #include "TGeoMatrix.h"
31 #include "TGeoBBox.h"
32 #include "TH2F.h"
33 #include "PndSdsStripHitProducer.h"
34 #include "PndSdsStripClusterer.h"
35 #include "PndDetectorList.h"
36 #include "PndSdsChargeConversion.h"
37 
38 #include "FairTSBufferFunctional.h"
39 
40 #include <string>
41 #include <vector>
42 
43 class TClonesArray;
45 
47  public:
51  PndSdsStripClusterTask(const char *name);
59  fGeoH(other.fGeoH), fCurrentClusterfinder(other.fCurrentClusterfinder), fClusterFinderList(other.fClusterFinderList), fFunctor(other.fFunctor), eta_rect(other.eta_rect),
60  eta_trap(other.eta_trap), etahistofile(other.etahistofile){};
62  virtual ~PndSdsStripClusterTask();
64  {
65  fPath = other.fPath;
66  fDigiArray = other.fDigiArray;
68  fHitArray = other.fHitArray;
70  fClusterType = other.fClusterType;
71  fFEcolumns = other.fFEcolumns;
72  fFErows = other.fFErows;
73  fChargeCut = other.fChargeCut;
74  fRadChannel = other.fRadChannel;
75  fRadTime = other.fRadTime;
77  fEventHeader = other.fEventHeader;
87  fChargeAlgos = other.fChargeAlgos;
89  fDigiPar = other.fDigiPar;
90  fGeoH = other.fGeoH;
93  fFunctor = other.fFunctor;
94  eta_rect = other.eta_rect;
95  eta_trap = other.eta_trap;
96  etahistofile = other.etahistofile;
97  return *this;
98  };
99 
101  virtual void SetParContainers();
102  virtual InitStatus Init();
103  virtual InitStatus ReInit();
104 
105  virtual void InitMQ(TList *tempList);
106  virtual void GetParList(TList *){}; // tempList //[R.K.03/2017] unused variable(s)
107  virtual void ExecMQ(TList *inputList, TList *outputList);
108  virtual void SetParContainersMQ(TList *){}; // tempList //[R.K.03/2017] unused variable(s)
109 
110  virtual void SetInBranchId()
111  {
112  FairRootManager *ioman = FairRootManager::Instance();
113  fInBranchId = ioman->GetBranchId(fInBranchName);
114  std::cout << "InBranchId: " << fInBranchId << " for Branch: " << fInBranchName.Data() << std::endl;
115  fClusterType = ioman->GetBranchId(fClustBranchName);
116  std::cout << "fClusterType: " << fClusterType << " for Branch: " << fClustBranchName.Data() << std::endl;
117  }
118 
120  virtual void Exec(Option_t *opt);
122  virtual void Finish();
123 
124  protected:
125  TString fPath;
126 
127  virtual void SetCalculators();
128  TVector2 CalcLineCross(TVector2 point1, TVector2 dir1, TVector2 point2, TVector2 dir2) const;
130  Bool_t SelectSensorParams(Int_t sensorID);
131  void CalcMeanCharge(PndSdsClusterStrip *onecluster, Double_t &meanstrip, Double_t &meanerr, Double_t &charge, Double_t &timestamp, Double_t &timestampError);
132  Bool_t Backmap(TVector2 meantopPoint, Double_t toperr, TVector2 meanbotPoint, Double_t boterr, TVector3 &hitpos, TMatrixD &hitCov, Int_t &sensorID);
133  TClonesArray *fDigiArray; // Input array of PndSdsDigis
134  TClonesArray *fClusterArray; // Output array of PndSdsClusters
135  TClonesArray *fHitArray; // Output array of PndSdsHits
136 
139 
140  void Register();
141  void Reset();
142  void ProduceHits();
143  void ResetClusterFinders();
144  void FillClusterFinders();
145  void ClearCalculators();
146 
147  Int_t fFEcolumns;
148  Int_t fFErows;
149  Double_t fChargeCut;
150  Int_t fRadChannel;
151  Int_t fRadTime;
153  FairEventHeader *fEventHeader;
154 
161  std::map<const char *, PndSdsCalcStrip *> fStripCalcTop;
162  std::map<const char *, PndSdsCalcStrip *> fStripCalcBot;
163  std::map<const char *, PndSdsChargeConversion *> fChargeConverter;
164 
170 
173  std::map<const char *, PndSdsStripClusterer *> fClusterFinderList;
174 
175  BinaryFunctor *fFunctor;
176 
178 
179  private:
180  TH2F *eta_rect;
181  TH2F *eta_trap;
182  TFile *etahistofile;
183 };
184 
185 #endif /* SDSCLUSTERTASK_H */
PndSdsChargeWeightingAlgorithms * fChargeAlgos
std::map< const char *, PndSdsChargeConversion * > fChargeConverter
Int_t fInBranchId
Definition: PndSdsTask.h:50
Bool_t SelectSensorParams(Int_t sensorID)
PndSdsCalcStrip * fCurrentStripCalcTop
Bool_t Backmap(TVector2 meantopPoint, Double_t toperr, TVector2 meanbotPoint, Double_t boterr, TVector3 &hitpos, TMatrixD &hitCov, Int_t &sensorID)
Class for calculating strip indices from wafer hits.
std::map< const char *, PndSdsCalcStrip * > fStripCalcBot
virtual void SetParContainers()
virtual void Exec(Option_t *opt)
PndSdsStripDigiPar * fDigiPar
std::map< const char *, PndSdsCalcStrip * > fStripCalcTop
Calculator objects.
Class to access the naming information of the MVD.
std::map< const char *, PndSdsStripClusterer * > fClusterFinderList
virtual void GetParList(TList *)
TString fInBranchName
Definition: PndSdsTask.h:46
Digitization Parameter Class for MVD-Strip part.
virtual void SetParContainersMQ(TList *)
PndSensorNamePar * fSensorNamePar
void SetCurrentCalculators(PndSdsStripDigiPar *digipar)
virtual void InitMQ(TList *tempList)
PndSdsStripDigiPar * fCurrentDigiPar
virtual void SetCalculators()
TVector2 CalcLineCross(TVector2 point1, TVector2 dir1, TVector2 point2, TVector2 dir2) const
ClassDef(PndSdsStripClusterTask, 2)
virtual void ExecMQ(TList *inputList, TList *outputList)
virtual ~PndSdsStripClusterTask()
PndSdsStripClusterTask & operator=(PndSdsStripClusterTask &other)
TList * fDigiParameterList
Digitization Parameters.
PndSdsCalcStrip * fCurrentStripCalcBot
virtual InitStatus Init()
virtual InitStatus ReInit()
PndSdsChargeConversion * fCurrentChargeConverter
void CalcMeanCharge(PndSdsClusterStrip *onecluster, Double_t &meanstrip, Double_t &meanerr, Double_t &charge, Double_t &timestamp, Double_t &timestampError)
PndSdsStripClusterer * fCurrentClusterfinder
Geometry name handling.
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:64
virtual void Finish()
Unique match between SensorID and path in TGeoManager.
PndSdsStripClusterTask(PndSdsStripClusterTask &other)