gdynamicDigitization
Loading...
Searching...
No Matches
gParticleCounterDigitization.cc
Go to the documentation of this file.
1
#include "
ginternalDigitization.h
"
2
3
// See header for API docs.
4
bool
GParticleCounterDigitization::defineReadoutSpecsImpl
() {
5
double
timeWindow = 10;
// electronic readout time-window of the detector
6
double
gridStartTime = 0;
// defines the window grid
7
auto
hitBitSet =
HitBitSet
(
"000000"
);
// defines what information to be stored in the hit
8
9
readoutSpecs
= std::make_shared<GReadoutSpecs>(timeWindow, gridStartTime, hitBitSet,
log
);
10
11
return
true
;
12
}
13
14
// See header for API docs.
15
std::unique_ptr<GDigitizedData>
GParticleCounterDigitization::digitizeHitImpl
(
GHit
* ghit,
size_t
hitn) {
16
// Expected to be a single-identity detector: take the first identity entry.
17
GIdentifier
identity = ghit->
getGID
().front();
18
19
auto
gdata = std::make_unique<GDigitizedData>(
gopts
, ghit);
20
21
gdata->includeVariable(identity.
getName
(), identity.
getValue
());
22
gdata->includeVariable(
"hitn"
,
static_cast<
int
>
(hitn));
23
gdata->includeVariable(
"totEdep"
, ghit->
getTotalEnergyDeposited
());
24
gdata->includeVariable(
"time"
, ghit->
getAverageTime
());
25
gdata->includeVariable(
"pid"
, ghit->
getPid
());
26
gdata->includeVariable(
"totalE"
, ghit->
getE
());
27
28
return
gdata;
29
}
GBase< GDynamicDigitization >::log
std::shared_ptr< GLogger > log
GDynamicDigitization::gopts
std::shared_ptr< GOptions > gopts
Options used by the digitization plugin instance.
Definition
gdynamicdigitization.h:461
GDynamicDigitization::readoutSpecs
std::shared_ptr< const GReadoutSpecs > readoutSpecs
Readout specs are created during initialization and treated as immutable.
Definition
gdynamicdigitization.h:403
GHit
GHit::getPid
int getPid() const
GHit::getGID
std::vector< GIdentifier > getGID() const
GHit::getTotalEnergyDeposited
double getTotalEnergyDeposited()
GHit::getAverageTime
double getAverageTime()
GHit::getE
double getE() const
GParticleCounterDigitization::digitizeHitImpl
std::unique_ptr< GDigitizedData > digitizeHitImpl(GHit *ghit, size_t hitn) override
Digitizes a hit for particle counters.
Definition
gParticleCounterDigitization.cc:15
GParticleCounterDigitization::defineReadoutSpecsImpl
bool defineReadoutSpecsImpl() override
Defines readout specifications for particle counter digitization.
Definition
gParticleCounterDigitization.cc:4
HitBitSet
std::bitset< NHITBITS > HitBitSet
ginternalDigitization.h
Internal digitization plugins shipped with the gdynamic digitization library.
GIdentifier
GIdentifier::getName
std::string getName() const
GIdentifier::getValue
int getValue() const
gParticleCounterDigitization.cc
Generated by
1.10.0