CbmRoot
Loading...
Searching...
No Matches
CbmMuchSignal.h
Go to the documentation of this file.
1/* Copyright (C) 2017-2018 Variable Energy Cyclotron Centre, Kolkata
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Vikas Singhal [committer] */
4
20#ifndef CBMMUCHSIGNAL_H
21#define CBMMUCHSIGNAL_H 1
22#define SLOWSHAPERPEAK 75
23
24#include "CbmMatch.h"
25
26#include "TArrayD.h"
27#include "TArrayI.h"
28#include "TObject.h"
29
30
31class TClonesArray;
32
33//static const Int_t gkResponseBin = 1;
34static const Int_t fDeadTime = 400; // Deadtime
35
36class CbmMuchSignal : public TObject {
37public:
39 CbmMuchSignal() : TObject(), fAddress(0), fTimeStart(0), fTimeStop(0), fCharge(0), fPileUpCount(0), fMatch(nullptr) {}
40 //CbmMuchSignal(): TObject(), fAddress(0), fTimeStart(0), fTimeStop(0), fCharge(0), fPileUpTime(0), fModifiedCharge(0), fPileUpCount(0),fMatch(nullptr) {}
41 //WithSignalShape CbmMuchSignal(): TObject(), fAddress(0), fTimeStart(0), fTimeStop(0), fSignalShape(0), fMatch(nullptr) {}
42
50 CbmMuchSignal(UInt_t address, Long64_t starttime = 0)
51 : TObject()
52 , fAddress(address)
53 , fTimeStart(starttime)
55 , fCharge(0)
56 , fPileUpCount(0)
57 , fMatch(new CbmMatch())
58 {
59 }
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
80 {
81 if (fMatch) delete fMatch;
82 }
83
84
85 // Added below functions as CbmMuchSignal will be buffered in the CbmMuchReadoutBuffer.
86 // 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
87 Long_t GetTimeStart() const { return fTimeStart; }
88
89 // 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.
90 Long64_t GetTimeStop() const { return fTimeStop; }
91 //ULong64_t GetPileUpTime() const {return fPileUpTime; }
92 UInt_t GetCharge() const { return fCharge; }
93 //UInt_t GetModifiedCharge() const {return fModifiedCharge; }
94 UInt_t GetPileUpCount() const { return fPileUpCount; }
95 //TArrayD GetSignalShape() const {return fSignalShape; }
96 CbmMatch* GetMatch() const { return fMatch; }
97 Int_t GetAddress() const { return fAddress; }
98
99 //Setters
100 void SetTimeStart(Long_t starttime) { fTimeStart = starttime; }
101 void SetTimeStop(Long_t stoptime) { fTimeStop = stoptime; }
102 // void SetSignalShape(TArrayD signalshape) {fSignalShape = signalshape; }
103
104 //void SetPileUpTime(Double_t pileuptime) {fPileUpTime = pileuptime; }
105 void SetCharge(UInt_t charge) { fCharge = charge; }
106 //void SetModifiedCharge(UInt_t modifiedcharge) {fModifiedCharge = modifiedcharge; }
107 void SetMatch(CbmMatch* match) { fMatch = match; }
108
109 //void MakeSignalShape(UInt_t,TArrayD);
110 //MergeSignal Function which will implement Signal PileUp
112 void AddNoise(UInt_t);
113
114 //Int_t GetMaxCharge();
115 Int_t GetCharge() { return fCharge; } //Will return respective ADC value
116 Long64_t GetTimeStamp() { return fTimeStart; }
117
118private:
119 UInt_t fAddress; //Unique detector address
120 Long64_t fTimeStart; // Absolute start Time[ns]
121 Long64_t fTimeStop; //Absolut Time till then this digi is active
122 //ULong64_t fPileUpTime; //TimewhenPileuphappened
123 UInt_t fCharge; //Charge which will stored in the Digi
124 //UInt_t fModifiedCharge;//If PileUp then modify Charge
125 UInt_t fPileUpCount = 0; //Count for PileUp cases
126 // TArrayD fSignalShape; // Array of time bins
127 //Making Actual Electronics Signal Shape
129
131};
132#endif
static const Int_t fDeadTime
Data class for an analog signal in the MUCH Simple data class used in the digitisation process of the...
CbmMatch * fMatch
ClassDef(CbmMuchSignal, 2)
void AddNoise(UInt_t)
CbmMuchSignal(CbmMuchSignal *signal)=delete
UInt_t GetCharge() const
void SetTimeStop(Long_t stoptime)
void MergeSignal(CbmMuchSignal *)
Long64_t GetTimeStamp()
CbmMatch * GetMatch() const
Int_t GetAddress() const
CbmMuchSignal(UInt_t address, Long64_t starttime=0)
void SetCharge(UInt_t charge)
Long64_t GetTimeStop() const
Long64_t fTimeStart
void SetMatch(CbmMatch *match)
UInt_t GetPileUpCount() const
Long64_t fTimeStop
void SetTimeStart(Long_t starttime)
Long_t GetTimeStart() const
CbmMuchSignal & operator=(const CbmMuchSignal &)=delete
virtual ~CbmMuchSignal()