PandaRoot
PndSdsHybridHitProducer.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 
18 #ifndef PNDSDSHYBRIDHITPRODUCER_H
19 #define PNDSDSHYBRIDHITPRODUCER_H
20 
21 #include "PndSdsTask.h"
22 #include "PndSdsPixelDigiPar.h"
23 #include "PndSdsMCPoint.h"
24 #include "PndSdsPixel.h"
25 #include "PndSdsDigiPixel.h"
26 #include "FairGeoVector.h"
27 #include "FairGeoTransform.h"
28 #include "FairMCEventHeader.h"
29 #include "TVector3.h"
30 #include "TRandom.h"
31 #include "TGeoMatrix.h"
32 #include "TGeoBBox.h"
33 #include "PndGeoHandling.h"
34 #include "PndSdsChargeConversion.h"
35 #include "PndSdsTotDigiPar.h"
36 #include "PndSdsFE.h"
37 
39 
40 #include <string>
41 #include <vector>
42 
43 class TClonesArray;
44 
46  public:
49 
53  flx(other.flx), fly(other.fly), fthreshold(other.fthreshold), fnoise(other.fnoise), fqsigma(other.fqsigma), fcols(other.fcols), frows(other.frows),
55  fPixelList(other.fPixelList)
56  {
57  }
59  PndSdsHybridHitProducer(const char *name);
60 
61  PndSdsHybridHitProducer(Double_t lx, Double_t ly, Double_t threshold, Double_t noise);
62 
64  virtual ~PndSdsHybridHitProducer();
65 
67  virtual void SetParContainers();
68  virtual InitStatus Init();
69  virtual InitStatus ReInit();
70 
72  virtual void Exec(Option_t *opt);
73 
74  virtual void FinishEvent();
75  virtual void FinishTask();
76 
77  void RunTimeBased() { fTimeOrderedDigi = kTRUE; }
78 
80  {
81  if (this != &other) // protect against invalid self-assignment
82  {
84  fPointArray = other.fPointArray;
85  fPixelArray = other.fPixelArray;
87  fDigiPar = other.fDigiPar;
88  fTotDigiPar = other.fTotDigiPar;
91  fDataBuffer = other.fDataBuffer;
92  flx = other.flx;
93  fly = other.fly;
94  fthreshold = other.fthreshold;
95  fnoise = other.fnoise;
96  fqsigma = other.fqsigma;
97  fcols = other.fcols;
98  frows = other.frows;
99  fPixelHits = other.fPixelHits;
100  fGeoH = other.fGeoH;
101  fEventNr = other.fEventNr;
104  fPixelList = other.fPixelList;
105  }
106  return *this;
107  };
108 
109  protected:
110  Bool_t fPersistance; // switch to turn on/off storing the arrays to a file
111  Bool_t fDigiPixelMCInfo; // switch to turn on/off storing additional MC Info of Digis
112 
114  TClonesArray *fPointArray;
115 
117  TClonesArray *fPixelArray;
118 
120  TClonesArray *fPixelMCArray;
121 
125  FairMCEventHeader *fMCEventHeader;
126 
128  // fDetectorType fMCPointType;
129 
130  void Register();
131  void Reset();
132  void ProduceHits();
133 
134  TGeoHMatrix GetTransformation(Int_t sensorID);
135  void GetLocalHitPoints(PndSdsMCPoint *myPoint, FairGeoVector &myHitIn, FairGeoVector &myHitOut);
136  // PndSdsHit CalcGlobalPoint(std::vector<PndSdsPixel> pixels);
137  TVector3 GetSensorDimensions(Int_t sensorID);
138 
139  void AddHit(PndSdsPixel &hit, int mcIndex);
140  void AddHits(std::vector<PndSdsPixel> *hitList, int mcIndex);
141 
142  // PndSdsFE* fFEModel;
143 
144  Double_t flx; // pixel width in x;
145  Double_t fly; // pixel width in y;
146  Double_t fthreshold; // pixel threshold in electrons
147  Double_t fnoise; // pixel noise in electrons
148  Double_t fqsigma; // gaussian charge cloud spread
149  Int_t fcols; // pixel columns in one FE
150  Int_t frows; // pixel rows in one FE
151  Int_t fPixelHits;
152  // FairMCEventHeader* fMcEventHeader;
154  Int_t fEventNr;
157 
158  std::vector<PndSdsPixel> fPixelList;
159 
161 };
162 
163 #endif
FairMCEventHeader * fMCEventHeader
virtual void FinishTask()
PndSdsChargeConversion * fChargeConverter
virtual void SetParContainers()
Charge Digitization Parameter Class for SDS.
Bool_t fTimeOrderedDigi
set to kTRUE to use the time ordering of the output data.
virtual ~PndSdsHybridHitProducer()
virtual void FinishEvent()
PndSdsHybridHitProducer & operator=(PndSdsHybridHitProducer &other)
TVector3 GetSensorDimensions(Int_t sensorID)
Class to access the naming information of the MVD.
PndSdsHybridHitProducer(PndSdsHybridHitProducer &other)
void AddHits(std::vector< PndSdsPixel > *hitList, int mcIndex)
virtual InitStatus Init()
void GetLocalHitPoints(PndSdsMCPoint *myPoint, FairGeoVector &myHitIn, FairGeoVector &myHitOut)
std::vector< PndSdsPixel > fPixelList
virtual void Exec(Option_t *opt)
void AddHit(PndSdsPixel &hit, int mcIndex)
PndSdsDigiPixelWriteoutBuffer * fDataBuffer
virtual InitStatus ReInit()
ClassDef(PndSdsHybridHitProducer, 8)
TGeoHMatrix GetTransformation(Int_t sensorID)
Digitization Parameter Class for SDS-Pixel part.