PandaRoot
PndGemDigitize.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 //* $Id: */
14 
15 // -------------------------------------------------------------------------
16 // ----- PndGemDigitize header file -----
17 // ----- Created 12/02/2009 by R. Karabowicz -----
18 // -------------------------------------------------------------------------
19 
30 #ifndef PNDGEMDIGITIZE_H
31 #define PNDGEMDIGITIZE_H 1
32 
33 #include <PndPersistencyTask.h>
34 #include "TStopwatch.h"
35 #include "TRandom.h"
36 #include "PndGemMCPoint.h"
37 #include "PndGemSensor.h"
38 
39 #include <list>
40 #include <map>
41 
42 class TClonesArray;
43 class PndGemDigiPar;
45 
47 
48  public:
51 
53  PndGemDigitize(Int_t iVerbose);
54 
56  PndGemDigitize(const char *name, Int_t iVerbose);
57 
59  virtual ~PndGemDigitize();
60 
62  virtual void Exec(Option_t *opt);
63 
65  void SaveOutsideHits(Bool_t bt = kTRUE) { fSaveOutsideHits = bt; }
66 
67  void SetRealisticResponse(Bool_t bt = kTRUE) { fRealisticResponse = bt; }
68 
69  void RunTimeBased(Bool_t bt = kTRUE) { fTimeOrderedDigi = bt; }
70 
71  Bool_t GetTimeBased() const { return fTimeOrderedDigi; }
72 
73  void SetShowerSigma(Double_t dd) { fSSigma = dd; } // sigam for realistic response
74 
75  private:
76  PndGemDigiPar *fDigiPar;
77  TClonesArray *fPoints;
78  TClonesArray *fDigis;
79  TClonesArray *fDigiMatches;
80  Double_t fSSigma;
81  Bool_t fSaveOutsideHits;
82  TClonesArray *fHitOutsideArray;
83  Bool_t fRealisticResponse;
84  Int_t fTNofEvents;
85  Int_t fTNofPoints;
86  Int_t fTNofDigis;
87  PndGemDigiWriteoutBuffer *fDataBuffer;
88  Bool_t fTimeOrderedDigi;
89 
90  Int_t fNPoints;
91  Int_t fNFailed;
92  Int_t fNOutside;
93  Int_t fNMulti;
94  Int_t fNDigis;
95 
96  TStopwatch fTimer;
97 
100  std::map<std::pair<Int_t, Int_t>, Int_t> fChannelMap;
101 
103  virtual void SetParContainers();
104 
106  virtual InitStatus Init();
107 
109  virtual InitStatus ReInit();
110 
112  void Reset();
113 
115  virtual void Finish();
116 
118  void DigitizeEvent();
119 
121  void DigitizeRealisticEvent();
122 
124  void SimulateRectangularResponse(Int_t sensorDetId, Int_t side, Double_t channelInd, Double_t stripWidth, Double_t showerSigma, Double_t showerStrength, Int_t iPoint);
125 
127  void SimulateGaussianResponse(PndGemSensor *sensor, Int_t side, PndGemMCPoint *gemPoint, Double_t showerSigma, Double_t showerStrength, Int_t iPoint);
128 
130  void ActivateChannel(Int_t sensorDetId, Int_t sensorSide, Int_t channelNumber, Double_t signalHeight, Double_t signalTime, Int_t iPoint);
131 
133  void PrintDigis();
134 
135  ClassDef(PndGemDigitize, 1);
136 };
137 
138 #endif
Bool_t GetTimeBased() const
void SetShowerSigma(Double_t dd)
void RunTimeBased(Bool_t bt=kTRUE)
Digitization Parameter Class for GEM part.
Definition: PndGemDigiPar.h:42
virtual ~PndGemDigitize()
void SetRealisticResponse(Bool_t bt=kTRUE)
virtual void Exec(Option_t *opt)
void SaveOutsideHits(Bool_t bt=kTRUE)