er  dev
ERNDDigitizer.h
1 /********************************************************************************
2  * Copyright (C) Joint Institute for Nuclear Research *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence version 3 (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 
9 #ifndef ERNDDigitizer_H
10 #define ERNDDigitizer_H
11 
12 #include "TClonesArray.h"
13 
14 #include "FairTask.h"
15 
16 #include "ERNDDigi.h"
17 #include "ERNDSetup.h"
18 
19 class ERNDDigitizer : public FairTask {
20 
21 public:
23  ERNDDigitizer();
24 
28  ERNDDigitizer(Int_t verbose);
29 
32 
34  virtual InitStatus Init();
35 
37  virtual void Exec(Option_t* opt);
38 
40  virtual void Finish();
41 
43  virtual void Reset();
44 
46  void SetLYError(Float_t a, Float_t b, Float_t c) {fLYErrorA = a;fLYErrorB = b;fLYErrorC = c;}
47  void SetEdepError(Float_t a, Float_t b, Float_t c) {fEdepErrorA = a;fEdepErrorB = b;fEdepErrorC = c;}
48  void SetTimeError(Float_t a) {fTimeErrorA = a;}
49 
50  void SetQuenchThreshold(Float_t th) {fQuenchThreshold = th;}
51  void SetLYThreshold(Float_t th) {fLYThreshold = th;}
52  void SetProbabilityB(Float_t b) {fProbabilityB = b;}
53  void SetProbabilityC(Float_t c) {fProbabilityC = c;}
55  Float_t ElossThreshold() const {return fQuenchThreshold;}
56  Float_t LYThreshold() const {return fLYThreshold;}
57  Float_t ProbabilityB() const {return fProbabilityB;}
58  Float_t ProbabilityC() const {return fProbabilityC;}
59 protected:
60  //Input arrays
61  TClonesArray* fNDPoints = nullptr;
62  //Output arrays
63  TClonesArray* fNDDigis = nullptr;
64 
65  static Int_t fEvent;
66  Float_t fEdepErrorA, fEdepErrorB, fEdepErrorC;
67  Float_t fLYErrorA, fLYErrorB, fLYErrorC;
68  Float_t fTimeErrorA;
69  Float_t fQuenchThreshold;
70  Float_t fLYThreshold;
71  Float_t fProbabilityB;
72  Float_t fProbabilityC;
73 
74  ERNDSetup* fSetup = nullptr;
75 protected:
76  ERNDDigi* AddDigi(Int_t stilbenNb, Float_t edep, Float_t lightYield, Float_t time, Float_t neutronProb);
77  Float_t NeutronProbability(Float_t edep, Float_t ly);
78 private:
79  virtual void SetParContainers();
80 
81  ClassDef(ERNDDigitizer,1)
82 };
83 
84 #endif
virtual void Reset()
void SetLYError(Float_t a, Float_t b, Float_t c)
Definition: ERNDDigitizer.h:46
Float_t ElossThreshold() const
Definition: ERNDDigitizer.h:55
virtual void Finish()
virtual void Exec(Option_t *opt)
virtual InitStatus Init()