PandaRoot
PndSdsStripHitProducer.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 #ifndef PNDSDSSTRIPHITPRODUCER_H
14 #define PNDSDSSTRIPHITPRODUCER_H
15 
16 #include "PndSdsTask.h"
17 #include "PndSdsStripDigiPar.h"
18 #include "PndSdsMCPoint.h"
19 #include "PndSdsStrip.h"
20 #include "PndSdsDigiStrip.h"
21 #include "PndDetectorList.h"
22 #include "FairGeoVector.h"
23 #include "FairGeoTransform.h"
24 #include "FairMCEventHeader.h"
25 #include "TVector3.h"
26 #include "TRandom.h"
27 #include "TGeoMatrix.h"
28 #include "TGeoBBox.h"
29 
30 #include "PndGeoHandling.h"
31 #include "PndSdsCalcStrip.h"
32 #include "PndSdsChargeConversion.h"
34 
35 #include <string>
36 #include <vector>
37 #include <map>
38 
39 class TClonesArray;
40 
42 
83  public:
88 
96  PndSdsStripHitProducer(const char *name);
97 
99  virtual ~PndSdsStripHitProducer();
100 
101  virtual void SetParContainers();
103  virtual InitStatus Init();
104  virtual InitStatus ReInit();
105 
111  virtual void SetBranchNames() = 0;
112  virtual void SetMCPointType(){};
113 
115  virtual void Exec(Option_t *opt);
116  virtual void FinishEvent();
117  virtual void FinishTask();
118  void AddDigi(Int_t &iStrip, Int_t iPoint, Int_t detID, Int_t sensorID, Int_t fe, Int_t chan, Double_t charge);
119 
120  void RunTimeBased() { fTimeOrderedDigi = kTRUE; }
121 
123  {
124  if (this != &other) // protect against invalid self-assignment
125  {
126  fPointArray = other.fPointArray;
127  fStripArray = other.fStripArray;
128  fDataBuffer = other.fDataBuffer;
139  fGeoH = other.fGeoH;
142  fEventNr = other.fEventNr;
143  }
144  return *this;
145  }
146 
147  protected:
149  TClonesArray *fPointArray;
150 
152  TClonesArray *fStripArray;
153 
154  FairWriteoutBuffer *fDataBuffer;
155 
161 
163  std::map<const char *, PndSdsCalcStrip *> fStripCalcTop;
164  std::map<const char *, PndSdsCalcStrip *> fStripCalcBot;
165  std::map<const char *, PndSdsChargeConversion *> fChargeConverter;
168 
169  void Register();
170  void Reset();
171  void ProduceHits();
172  virtual void SetCalculators();
173  Bool_t SelectSensorParams(Int_t sensorID);
174 
175  Double_t DigitizeTime(Double_t time, Double_t charge);
176 
177  FairMCEventHeader *fMcEventHeader;
178 
182 
183  Int_t fEventNr;
184 
186 };
187 
188 #endif
TList * fDigiParameterList
Digitization Parameters.
std::map< const char *, PndSdsCalcStrip * > fStripCalcTop
Calculator objects.
virtual ~PndSdsStripHitProducer()
PndSdsStripHitProducer(PndSdsStripHitProducer &other)
std::map< const char *, PndSdsChargeConversion * > fChargeConverter
std::map< const char *, PndSdsCalcStrip * > fStripCalcBot
Bool_t fTimeOrderedDigi
parameter to switch to time ordered simulation
FairWriteoutBuffer * fDataBuffer
Class for calculating strip indices from wafer hits.
Int_t fEventNr
EventCounter.
Class to access the naming information of the MVD.
PndSdsStripDigiPar * fCurrentDigiPar
ClassDef(PndSdsStripHitProducer, 5)
virtual void FinishEvent()
virtual void FinishTask()
Digitization Parameter Class for MVD-Strip part.
virtual void SetCalculators()
void AddDigi(Int_t &iStrip, Int_t iPoint, Int_t detID, Int_t sensorID, Int_t fe, Int_t chan, Double_t charge)
PndSdsChargeConversion * fCurrentChargeConverter
virtual InitStatus ReInit()
TClonesArray * fStripArray
Output array of PndSdsHits.
FairMCEventHeader * fMcEventHeader
PndSdsStripHitProducer & operator=(PndSdsStripHitProducer &other)
Hit Producer Task for strip detectors.
virtual InitStatus Init()
Bool_t fOverrideParams
///< converter for detector names
Bool_t SelectSensorParams(Int_t sensorID)
PndSdsCalcStrip * fCurrentStripCalcBot
virtual void Exec(Option_t *opt)
virtual void SetBranchNames()=0
PndSdsCalcStrip * fCurrentStripCalcTop
Double_t DigitizeTime(Double_t time, Double_t charge)
virtual void SetParContainers()