FairRoot/PandaRoot
PndSdsStripClusterTask.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndSdsStripClusterTask header file -----
3 // -------------------------------------------------------------------------
4 
5 
6 
7 #ifndef PNDSDSSTRIPCLUSTERTASK_H
8 #define PNDSDSSTRIPCLUSTERTASK_H
9 
10 #include "PndSdsTask.h"
11 #include "PndSdsStripDigiPar.h"
12 #include "PndSdsHit.h"
13 #include "PndSdsMCPoint.h"
14 // #include "PndSdsCluster.h"
15 //#include "PndSdsRecoCharge.h"
16 #include "FairGeoVector.h"
17 #include "FairGeoTransform.h"
18 #include "TVector3.h"
19 #include "TRandom.h"
20 #include "TGeoMatrix.h"
21 #include "TGeoBBox.h"
22 #include "TH2F.h"
23 #include "PndSdsStripHitProducer.h"
24 #include "PndSdsStripClusterer.h"
25 #include "PndDetectorList.h"
26 #include "PndSdsChargeConversion.h"
27 
28 
29 #include "FairTSBufferFunctional.h"
30 
31 #include <string>
32 #include <vector>
33 
34 class TClonesArray;
36 
38  {
39  public:
40 
44  PndSdsStripClusterTask(const char* name);
46  PndSdsTask(),
47  fPath(other.fPath),
48  fDigiArray(other.fDigiArray),
50  fHitArray(other.fHitArray),
53  fFEcolumns(other.fFEcolumns),
54  fFErows(other.fFErows),
55  fChargeCut(other.fChargeCut),
56  fRadChannel(other.fRadChannel),
57  fRadTime(other.fRadTime),
71  fDigiPar(other.fDigiPar),
72  fGeoH(other.fGeoH),
75  fFunctor(other.fFunctor),
76  eta_rect(other.eta_rect),
77  eta_trap(other.eta_trap),
79  {};
81  virtual ~PndSdsStripClusterTask();
83  {
84  fPath=other.fPath;
85  fDigiArray=other.fDigiArray;
87  fHitArray=other.fHitArray;
90  fFEcolumns=other.fFEcolumns;
91  fFErows=other.fFErows;
92  fChargeCut=other.fChargeCut;
94  fRadTime=other.fRadTime;
108  fDigiPar=other.fDigiPar;
109  fGeoH=other.fGeoH;
112  fFunctor=other.fFunctor;
113  eta_rect=other.eta_rect;
114  eta_trap=other.eta_trap;
116  return *this;
117  };
118 
120  virtual void SetParContainers();
121  virtual InitStatus Init();
122  virtual InitStatus ReInit();
123 
124  virtual void InitMQ(TList* tempList);
125  virtual void GetParList(TList* ){};// tempList //[R.K.03/2017] unused variable(s)
126  virtual void ExecMQ(TList* inputList,TList* outputList);
127  virtual void SetParContainersMQ(TList* ){}; //tempList //[R.K.03/2017] unused variable(s)
128 
129  virtual void SetInBranchId(){
130  FairRootManager *ioman = FairRootManager::Instance();
131  fInBranchId = ioman->GetBranchId(fInBranchName);
132  std::cout << "InBranchId: " << fInBranchId << " for Branch: " << fInBranchName.Data() << std::endl;
133  fClusterType = ioman->GetBranchId(fClustBranchName);
134  std::cout << "fClusterType: " << fClusterType << " for Branch: " << fClustBranchName.Data() << std::endl;
135 
136  }
137 
139  virtual void Exec(Option_t* opt);
141  virtual void Finish();
142 
143  protected:
144 
146 
147  virtual void SetCalculators();
148  TVector2 CalcLineCross(TVector2 point1, TVector2 dir1, TVector2 point2, TVector2 dir2) const;
150  Bool_t SelectSensorParams(Int_t sensorID);
151  void CalcMeanCharge(PndSdsClusterStrip* onecluster, Double_t &meanstrip, Double_t &meanerr, Double_t &charge, Double_t &timestamp, Double_t &timestampError);
152  Bool_t Backmap( TVector2 meantopPoint, Double_t toperr , TVector2 meanbotPoint, Double_t boterr,
153  TVector3 &hitpos, TMatrixD &hitCov, Int_t &sensorID);
154  TClonesArray* fDigiArray; // Input array of PndSdsDigis
155  TClonesArray* fClusterArray; // Output array of PndSdsClusters
156  TClonesArray* fHitArray; // Output array of PndSdsHits
157 
160 
161  void Register();
162  void Reset();
163  void ProduceHits();
164  void ResetClusterFinders();
165  void FillClusterFinders();
166  void ClearCalculators();
167 
168  Int_t fFEcolumns;
169  Int_t fFErows;
171  Int_t fRadChannel;
172  Int_t fRadTime;
174  FairEventHeader* fEventHeader;
175 
182  std::map<const char*,PndSdsCalcStrip*> fStripCalcTop;
183  std::map<const char*,PndSdsCalcStrip*> fStripCalcBot;
184  std::map<const char*,PndSdsChargeConversion*> fChargeConverter;
185 
191 
192 
195  std::map<const char*,PndSdsStripClusterer*> fClusterFinderList;
196 
197  BinaryFunctor* fFunctor;
198 
200 
201  private:
202 
203  TH2F* eta_rect;
204  TH2F* eta_trap;
205  TFile* etahistofile;
206 
207  };
208 
209 #endif /* SDSCLUSTERTASK_H */
210 
PndSdsChargeWeightingAlgorithms * fChargeAlgos
Int_t fInBranchId
Definition: PndSdsTask.h:43
Bool_t SelectSensorParams(Int_t sensorID)
PndSdsCalcStrip * fCurrentStripCalcTop
virtual void InitMQ(TList *tempList)
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.
PndSdsStripDigiPar * fDigiPar
std::map< const char *, PndSdsStripClusterer * > fClusterFinderList
std::map< const char *, PndSdsCalcStrip * > fStripCalcBot
Class to access the naming information of the MVD.
Double_t
virtual void GetParList(TList *)
TString fInBranchName
Definition: PndSdsTask.h:39
virtual void ExecMQ(TList *inputList, TList *outputList)
Digitization Parameter Class for MVD-Strip part.
virtual void SetParContainersMQ(TList *)
Double_t meanerr[nsteps]
Definition: dedx_bands.C:65
TString name
std::map< const char *, PndSdsCalcStrip * > fStripCalcTop
Calculator objects.
PndSensorNamePar * fSensorNamePar
void SetCurrentCalculators(PndSdsStripDigiPar *digipar)
PndSdsStripDigiPar * fCurrentDigiPar
std::map< const char *, PndSdsChargeConversion * > fChargeConverter
ClassDef(PndSdsStripClusterTask, 2)
PndSdsStripClusterTask & operator=(PndSdsStripClusterTask &other)
TList * fDigiParameterList
Digitization Parameters.
PndSdsCalcStrip * fCurrentStripCalcBot
PndSdsChargeConversion * fCurrentChargeConverter
void CalcMeanCharge(PndSdsClusterStrip *onecluster, Double_t &meanstrip, Double_t &meanerr, Double_t &charge, Double_t &timestamp, Double_t &timestampError)
virtual void Exec(Option_t *opt)
PndSdsStripClusterer * fCurrentClusterfinder
Geometry name handling.
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52
Unique match between SensorID and path in TGeoManager.
PndSdsStripClusterTask(PndSdsStripClusterTask &other)
TVector2 CalcLineCross(TVector2 point1, TVector2 dir1, TVector2 point2, TVector2 dir2) const