PandaRoot
PndSdsStripClusterTask.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndSdsStripClusterTask header file -----
3 // -------------------------------------------------------------------------
4 
5 #ifndef PNDSDSSTRIPCLUSTERTASK_H
6 #define PNDSDSSTRIPCLUSTERTASK_H
7 
8 #include "PndSdsTask.h"
9 #include "PndSdsStripDigiPar.h"
10 #include "PndSdsHit.h"
11 #include "PndSdsMCPoint.h"
12 // #include "PndSdsCluster.h"
13 //#include "PndSdsRecoCharge.h"
14 #include "FairGeoVector.h"
15 #include "FairGeoTransform.h"
16 #include "TVector3.h"
17 #include "TRandom.h"
18 #include "TGeoMatrix.h"
19 #include "TGeoBBox.h"
20 #include "TH2F.h"
21 #include "PndSdsStripHitProducer.h"
22 #include "PndSdsStripClusterer.h"
23 #include "PndDetectorList.h"
24 #include "PndSdsChargeConversion.h"
25 
26 #include "FairTSBufferFunctional.h"
27 
28 #include <string>
29 #include <vector>
30 
31 class TClonesArray;
33 
35  public:
39  PndSdsStripClusterTask(const char *name);
47  fGeoH(other.fGeoH), fCurrentClusterfinder(other.fCurrentClusterfinder), fClusterFinderList(other.fClusterFinderList), fFunctor(other.fFunctor), eta_rect(other.eta_rect),
48  eta_trap(other.eta_trap), etahistofile(other.etahistofile){};
50  virtual ~PndSdsStripClusterTask();
52  {
53  fPath = other.fPath;
54  fDigiArray = other.fDigiArray;
56  fHitArray = other.fHitArray;
58  fClusterType = other.fClusterType;
59  fFEcolumns = other.fFEcolumns;
60  fFErows = other.fFErows;
61  fChargeCut = other.fChargeCut;
62  fRadChannel = other.fRadChannel;
63  fRadTime = other.fRadTime;
65  fEventHeader = other.fEventHeader;
75  fChargeAlgos = other.fChargeAlgos;
77  fDigiPar = other.fDigiPar;
78  fGeoH = other.fGeoH;
81  fFunctor = other.fFunctor;
82  eta_rect = other.eta_rect;
83  eta_trap = other.eta_trap;
84  etahistofile = other.etahistofile;
85  return *this;
86  };
87 
89  virtual void SetParContainers();
90  virtual InitStatus Init();
91  virtual InitStatus ReInit();
92 
93  virtual void InitMQ(TList *tempList);
94  virtual void GetParList(TList *){}; // tempList //[R.K.03/2017] unused variable(s)
95  virtual void ExecMQ(TList *inputList, TList *outputList);
96  virtual void SetParContainersMQ(TList *){}; // tempList //[R.K.03/2017] unused variable(s)
97 
98  virtual void SetInBranchId()
99  {
100  FairRootManager *ioman = FairRootManager::Instance();
101  fInBranchId = ioman->GetBranchId(fInBranchName);
102  std::cout << "InBranchId: " << fInBranchId << " for Branch: " << fInBranchName.Data() << std::endl;
103  fClusterType = ioman->GetBranchId(fClustBranchName);
104  std::cout << "fClusterType: " << fClusterType << " for Branch: " << fClustBranchName.Data() << std::endl;
105  }
106 
108  virtual void Exec(Option_t *opt);
110  virtual void Finish();
111 
112  protected:
113  TString fPath;
114 
115  virtual void SetCalculators();
116  TVector2 CalcLineCross(TVector2 point1, TVector2 dir1, TVector2 point2, TVector2 dir2) const;
118  Bool_t SelectSensorParams(Int_t sensorID);
119  void CalcMeanCharge(PndSdsClusterStrip *onecluster, Double_t &meanstrip, Double_t &meanerr, Double_t &charge, Double_t &timestamp, Double_t &timestampError);
120  Bool_t Backmap(TVector2 meantopPoint, Double_t toperr, TVector2 meanbotPoint, Double_t boterr, TVector3 &hitpos, TMatrixD &hitCov, Int_t &sensorID);
121  TClonesArray *fDigiArray; // Input array of PndSdsDigis
122  TClonesArray *fClusterArray; // Output array of PndSdsClusters
123  TClonesArray *fHitArray; // Output array of PndSdsHits
124 
127 
128  void Register();
129  void Reset();
130  void ProduceHits();
131  void ResetClusterFinders();
132  void FillClusterFinders();
133  void ClearCalculators();
134 
135  Int_t fFEcolumns;
136  Int_t fFErows;
137  Double_t fChargeCut;
138  Int_t fRadChannel;
139  Int_t fRadTime;
141  FairEventHeader *fEventHeader;
142 
149  std::map<const char *, PndSdsCalcStrip *> fStripCalcTop;
150  std::map<const char *, PndSdsCalcStrip *> fStripCalcBot;
151  std::map<const char *, PndSdsChargeConversion *> fChargeConverter;
152 
158 
161  std::map<const char *, PndSdsStripClusterer *> fClusterFinderList;
162 
163  BinaryFunctor *fFunctor;
164 
166 
167  private:
168  TH2F *eta_rect;
169  TH2F *eta_trap;
170  TFile *etahistofile;
171 };
172 
173 #endif /* SDSCLUSTERTASK_H */
PndSdsChargeWeightingAlgorithms * fChargeAlgos
std::map< const char *, PndSdsChargeConversion * > fChargeConverter
Int_t fInBranchId
Definition: PndSdsTask.h:38
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:34
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:52
virtual void Finish()
Unique match between SensorID and path in TGeoManager.
PndSdsStripClusterTask(PndSdsStripClusterTask &other)