CbmRoot
CbmMuchSignal.h
Go to the documentation of this file.
1 
16 #ifndef CBMMUCHSIGNAL_H
17 #define CBMMUCHSIGNAL_H 1
18 #define SLOWSHAPERPEAK 75
19 
20 #include "CbmMatch.h"
21 #include "TArrayD.h"
22 #include "TArrayI.h"
23 #include "TObject.h"
24 
25 
26 class TClonesArray;
27 
28 //static const Int_t gkResponseBin = 1;
29 static const Int_t fDeadTime = 400; // Deadtime
30 
31 class CbmMuchSignal : public TObject {
32 public:
35  : TObject()
36  , fAddress(0)
37  , fTimeStart(0)
38  , fTimeStop(0)
39  , fCharge(0)
40  , fPileUpCount(0)
41  , fMatch(nullptr) {}
42  //CbmMuchSignal(): TObject(), fAddress(0), fTimeStart(0), fTimeStop(0), fCharge(0), fPileUpTime(0), fModifiedCharge(0), fPileUpCount(0),fMatch(nullptr) {}
43  //WithSignalShape CbmMuchSignal(): TObject(), fAddress(0), fTimeStart(0), fTimeStop(0), fSignalShape(0), fMatch(nullptr) {}
44 
52  CbmMuchSignal(UInt_t address, Long64_t starttime = 0)
53  : TObject()
54  , fAddress(address)
55  , fTimeStart(starttime)
57  , fCharge(0)
58  , fPileUpCount(0)
59  , fMatch(new CbmMatch()) {}
60  /* CbmMuchSignal(UInt_t address, ULong64_t starttime=0)
61  : TObject(), fAddress(address), fTimeStart(starttime), fTimeStop(fTimeStart + fDeadTime), fCharge(0), fPileUpTime(0), fModifiedCharge(0), fPileUpCount(0), fMatch(new CbmMatch())
62  {
63  }
64 
65  CbmMuchSignal(UInt_t address, ULong64_t starttime=0)
66  // : TObject(), fAddress(address), fTimeStart(starttime), fTimeStop(fTimeStart + fDeadTime), fSignalShape(0), fMatch(new CbmMatch())
67 
68  {
69 // fMatch = new CbmMatch();
70 // fTimeStop = fTimeStart + fDeadTime;
71  }
72  */
73 
74  CbmMuchSignal(CbmMuchSignal* signal) = delete;
77 
79  virtual ~CbmMuchSignal() {
80  if (fMatch) delete fMatch;
81  }
82 
83 
84  // Added below functions as CbmMuchSignal will be buffered in the CbmMuchReadoutBuffer.
85  // Absolute start time for the CbmMuchSignal. If earlier MCPoint hits the same pad which was hit by later MCPoint and it is within deadtime then earlier MCPoint Time should be start time of this Signal
86  Long_t GetTimeStart() const { return fTimeStart; }
87 
88  // Absolute stop time for this CbmMuchSignal. If later MCPoint hits on the same pad and it is within deadtime then later MCPoint Time + deadtime should be stop time of this Signal. It shows tha for how much time this pad is active.
89  Long64_t GetTimeStop() const { return fTimeStop; }
90  //ULong64_t GetPileUpTime() const {return fPileUpTime; }
91  UInt_t GetCharge() const { return fCharge; }
92  //UInt_t GetModifiedCharge() const {return fModifiedCharge; }
93  UInt_t GetPileUpCount() const { return fPileUpCount; }
94  //TArrayD GetSignalShape() const {return fSignalShape; }
95  CbmMatch* GetMatch() const { return fMatch; }
96  Int_t GetAddress() const { return fAddress; }
97 
98  //Setters
99  void SetTimeStart(Long_t starttime) { fTimeStart = starttime; }
100  void SetTimeStop(Long_t stoptime) { fTimeStop = stoptime; }
101  // void SetSignalShape(TArrayD signalshape) {fSignalShape = signalshape; }
102 
103  //void SetPileUpTime(Double_t pileuptime) {fPileUpTime = pileuptime; }
104  void SetCharge(UInt_t charge) { fCharge = charge; }
105  //void SetModifiedCharge(UInt_t modifiedcharge) {fModifiedCharge = modifiedcharge; }
106  void SetMatch(CbmMatch* match) { fMatch = match; }
107 
108  //void MakeSignalShape(UInt_t,TArrayD);
109  //MergeSignal Function which will implement Signal PileUp
110  void MergeSignal(CbmMuchSignal*);
111  void AddNoise(UInt_t);
112 
113  //Int_t GetMaxCharge();
114  Int_t GetCharge() { return fCharge; } //Will return respective ADC value
115  Long64_t GetTimeStamp() { return fTimeStart; }
116 
117 private:
118  UInt_t fAddress; //Unique detector address
119  Long64_t fTimeStart; // Absolute start Time[ns]
120  Long64_t fTimeStop; //Absolut Time till then this digi is active
121  //ULong64_t fPileUpTime; //TimewhenPileuphappened
122  UInt_t fCharge; //Charge which will stored in the Digi
123  //UInt_t fModifiedCharge;//If PileUp then modify Charge
124  UInt_t fPileUpCount = 0; //Count for PileUp cases
125  // TArrayD fSignalShape; // Array of time bins
126  //Making Actual Electronics Signal Shape
128 
130 };
131 #endif
CbmMatch
Definition: CbmMatch.h:22
CbmMuchSignal::GetTimeStamp
Long64_t GetTimeStamp()
Definition: CbmMuchSignal.h:115
CbmMuchSignal::GetCharge
Int_t GetCharge()
Definition: CbmMuchSignal.h:114
CbmMuchSignal::fTimeStop
Long64_t fTimeStop
Definition: CbmMuchSignal.h:120
CbmMuchSignal::MergeSignal
void MergeSignal(CbmMuchSignal *)
Definition: CbmMuchSignal.cxx:89
fDeadTime
static const Int_t fDeadTime
Definition: CbmMuchSignal.h:29
CbmMuchSignal::SetTimeStart
void SetTimeStart(Long_t starttime)
Definition: CbmMuchSignal.h:99
CbmMuchSignal::GetAddress
Int_t GetAddress() const
Definition: CbmMuchSignal.h:96
CbmMatch.h
CbmMuchSignal::GetCharge
UInt_t GetCharge() const
Definition: CbmMuchSignal.h:91
CbmMuchSignal::GetMatch
CbmMatch * GetMatch() const
Definition: CbmMuchSignal.h:95
CbmMuchSignal::CbmMuchSignal
CbmMuchSignal(CbmMuchSignal *signal)=delete
CbmMuchSignal::GetPileUpCount
UInt_t GetPileUpCount() const
Definition: CbmMuchSignal.h:93
CbmMuchSignal::operator=
CbmMuchSignal & operator=(const CbmMuchSignal &)=delete
CbmMuchSignal::fTimeStart
Long64_t fTimeStart
Definition: CbmMuchSignal.h:119
CbmMuchSignal
Data class for an analog signal in the MUCH Simple data class used in the digitisation process of the...
Definition: CbmMuchSignal.h:31
CbmMuchSignal::CbmMuchSignal
CbmMuchSignal()
Definition: CbmMuchSignal.h:34
CbmMuchSignal::fCharge
UInt_t fCharge
Definition: CbmMuchSignal.h:122
CbmMuchSignal::SetCharge
void SetCharge(UInt_t charge)
Definition: CbmMuchSignal.h:104
CbmMuchSignal::GetTimeStart
Long_t GetTimeStart() const
Definition: CbmMuchSignal.h:86
CbmMuchSignal::CbmMuchSignal
CbmMuchSignal(UInt_t address, Long64_t starttime=0)
Definition: CbmMuchSignal.h:52
CbmMuchSignal::fPileUpCount
UInt_t fPileUpCount
Definition: CbmMuchSignal.h:124
CbmMuchSignal::fMatch
CbmMatch * fMatch
Definition: CbmMuchSignal.h:127
CbmMuchSignal::fAddress
UInt_t fAddress
Definition: CbmMuchSignal.h:118
CbmMuchSignal::GetTimeStop
Long64_t GetTimeStop() const
Definition: CbmMuchSignal.h:89
CbmMuchSignal::SetTimeStop
void SetTimeStop(Long_t stoptime)
Definition: CbmMuchSignal.h:100
CbmMuchSignal::SetMatch
void SetMatch(CbmMatch *match)
Definition: CbmMuchSignal.h:106
CbmMuchSignal::ClassDef
ClassDef(CbmMuchSignal, 2)
CbmMuchSignal::~CbmMuchSignal
virtual ~CbmMuchSignal()
Definition: CbmMuchSignal.h:79
CbmMuchSignal::AddNoise
void AddNoise(UInt_t)
Definition: CbmMuchSignal.cxx:131