 |
ATLAS Offline Software
|
#include <LUCID_PileUpTool.h>
Definition at line 31 of file LUCID_PileUpTool.h.
◆ LUCID_PileUpTool()
LUCID_PileUpTool::LUCID_PileUpTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Definition at line 17 of file LUCID_PileUpTool.cxx.
37 {0.000001,0.000001,0.000001,0.000001,0.000001,
38 0.000001,0.000001,0.000001,0.000001,0.000001,
39 0.000001,0.000001,0.000001,0.000001,0.000001},
43 declareProperty(
"SimHitCollection" ,
45 "Name of the input Collection of simulated hits");
46 declareProperty(
"LucidDigitsContainer",
48 "Name of the Container to hold the output from the digitization");
59 declareProperty(
"Q1bin" ,
m_Q1bin);
◆ createAndStoreDigit()
StatusCode LUCID_DigitizationToolBox::createAndStoreDigit |
( |
unsigned short |
tubeID, |
|
|
CLHEP::HepRandomEngine * |
rndEngine |
|
) |
| |
|
protectedinherited |
Definition at line 133 of file LUCID_DigitizationToolBox.cxx.
137 double npeTot = npeGas + npePmt;
144 double tdcTotSmeared = 0;
148 tdcTotSmeared = (npeTot) ? tdcTotSmeared/npeTot : tdcTotSmeared;
149 tdcTotSmeared = (tdcTotSmeared < 0) ? 0 : tdcTotSmeared;
151 m_tdc =
static_cast<unsigned int>(tdcTotSmeared);
162 return StatusCode::SUCCESS;
◆ DynodeChainSimulation()
double LUCID_DigitizationToolBox::DynodeChainSimulation |
( |
double |
npe, |
|
|
CLHEP::HepRandomEngine * |
rndEngine |
|
) |
| const |
|
protectedinherited |
◆ DynodeGainSmearing()
double LUCID_DigitizationToolBox::DynodeGainSmearing |
( |
double |
npe, |
|
|
CLHEP::HepRandomEngine * |
rndEngine |
|
) |
| |
|
staticprotectedinherited |
Definition at line 260 of file LUCID_DigitizationToolBox.cxx.
262 if (npe < 20)
return CLHEP::RandPoissonQ::shoot(rndEngine, npe);
263 else return CLHEP::RandGaussQ::shoot (rndEngine, npe, std::sqrt(npe));
◆ fillDigitContainer() [1/2]
StatusCode LUCID_DigitizationToolBox::fillDigitContainer |
( |
LUCID_SimHitCollection * |
thpclucid, |
|
|
CLHEP::HepRandomEngine * |
rndEngine |
|
) |
| |
|
inherited |
Definition at line 199 of file LUCID_DigitizationToolBox.cxx.
211 for (; hitIt != hitItE; ++hitIt) {
213 if (
m_tubeID != (*hitIt).GetTubeID())
continue;
215 if (!(*hitIt).isDetected(rndEngine))
continue;
217 if ((*hitIt).GetGenVolume() == 1)
m_npeGas++;
218 if ((*hitIt).GetGenVolume() == 2)
m_npeGas++;
219 if ((*hitIt).GetGenVolume() == 3)
m_npePmt++;
221 m_tdcTot += (*hitIt).GetPreStepTime();
227 return StatusCode::SUCCESS;
◆ fillDigitContainer() [2/2]
Definition at line 166 of file LUCID_DigitizationToolBox.cxx.
180 if (
m_tubeID != (*hitIt)->GetTubeID())
continue;
182 if (!(*hitIt)->isDetected(rndEngine))
continue;
184 if ((*hitIt)->GetGenVolume() == 1)
m_npeGas++;
185 if ((*hitIt)->GetGenVolume() == 2)
m_npeGas++;
186 if ((*hitIt)->GetGenVolume() == 3)
m_npePmt++;
188 m_tdcTot += (*hitIt)->GetPreStepTime();
194 return StatusCode::SUCCESS;
◆ filterPassed()
virtual bool PileUpToolBase::filterPassed |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ finalize()
StatusCode LUCID_PileUpTool::finalize |
( |
| ) |
|
|
finaloverridevirtual |
◆ getDebugTree()
TTree* LUCID_DigitizationToolBox::getDebugTree |
( |
| ) |
|
|
inlineprotectedinherited |
◆ initialize()
StatusCode LUCID_PileUpTool::initialize |
( |
| ) |
|
|
finaloverridevirtual |
◆ mergeEvent()
StatusCode LUCID_PileUpTool::mergeEvent |
( |
const EventContext & |
ctx | ) |
|
|
finaloverridevirtual |
return false if not interested in certain xing times (in ns) implemented by default in PileUpToolBase as FirstXing<=bunchXing<=LastXing
called at the end of the subevts loop. Not (necessarily) able to access SubEvents
Definition at line 157 of file LUCID_PileUpTool.cxx.
161 CLHEP::HepRandomEngine* rngEngine = rngWrapper->
getEngine(ctx);
163 ATH_MSG_DEBUG (
" LUCID_DigitContainer successfully registered in StoreGate " );
165 return StatusCode::SUCCESS;
◆ prepareEvent()
StatusCode LUCID_PileUpTool::prepareEvent |
( |
const EventContext & |
ctx, |
|
|
const unsigned int |
nInputEvents |
|
) |
| |
|
finaloverridevirtual |
called before the subevts loop. Not (necessarily) able to access SubEvents
Definition at line 103 of file LUCID_PileUpTool.cxx.
105 ATH_MSG_DEBUG (
"prepareEvent() called for " << nInputEvents <<
" input events" );
108 ATH_MSG_DEBUG (
" Digit container is recorded in StoreGate " );
112 return StatusCode::SUCCESS;
◆ processAllSubEvents() [1/2]
StatusCode LUCID_PileUpTool::processAllSubEvents |
( |
const EventContext & |
ctx | ) |
|
|
finaloverridevirtual |
perform the digitization - used by LUCID_DigiTop::execute
Reimplemented from PileUpToolBase.
Definition at line 169 of file LUCID_PileUpTool.cxx.
175 TimedHitCollList hitCollList;
187 while (iColl != endColl)
191 thpclucid.
insert(iColl->first, tmpColl);
193 ATH_MSG_DEBUG (
" LUCID_SimHitCollection found with " << tmpColl->size() <<
" hits " << iColl->first );
200 ATH_MSG_DEBUG (
" Digit container is recorded in StoreGate " );
204 CLHEP::HepRandomEngine* rngEngine = rngWrapper->
getEngine(ctx);
206 ATH_MSG_DEBUG (
" Digit container was filled successfully " );
208 return StatusCode::SUCCESS;
◆ processAllSubEvents() [2/2]
virtual StatusCode IPileUpTool::processAllSubEvents |
|
inherited |
dummy implementation to allow compilation while all Digitization packages are migrated to use this new interface.
◆ processBunchXing()
called for each active bunch-crossing to process current SubEvents bunchXing is in ns
Reimplemented from PileUpToolBase.
Definition at line 116 of file LUCID_PileUpTool.cxx.
120 ATH_MSG_DEBUG (
"LUCID_PileUpTool::processBunchXing() " << bunchXing );
124 for (; iEvt!=eSubEvents; ++iEvt)
128 ATH_MSG_VERBOSE (
"SubEvt EventInfo from StoreGate " << seStore.name() <<
" :"
129 <<
" bunch crossing : " << bunchXing
130 <<
" time offset : " << iEvt->time()
131 <<
" event number : " << iEvt->ptr()->eventNumber()
132 <<
" run number : " << iEvt->ptr()->runNumber()
139 ATH_MSG_ERROR (
"SubEvent BCM SiHitCollection not found in StoreGate " << seStore.name() );
141 return StatusCode::FAILURE;
144 ATH_MSG_DEBUG (
"LUCID_SimHitCollection found with " << tmpColl->
size() <<
" hits" );
153 return StatusCode::SUCCESS;
◆ recordContainers()
◆ resetFilter()
virtual void PileUpToolBase::resetFilter |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ roundoff()
unsigned int LUCID_DigitizationToolBox::roundoff |
( |
double |
x | ) |
|
|
staticprotectedinherited |
Definition at line 122 of file LUCID_DigitizationToolBox.cxx.
124 assert(
x >= INT_MIN-0.5);
125 assert(
x <= INT_MAX+0.5);
127 if (
x >= 0)
return static_cast<int>(
x+0.5);
129 return static_cast<int>(
x-0.5);
◆ setDebugTree()
StatusCode LUCID_DigitizationToolBox::setDebugTree |
( |
| ) |
|
|
inherited |
Definition at line 101 of file LUCID_DigitizationToolBox.cxx.
102 SmartIF<ITHistSvc> digitHistSvc{Gaudi::svcLocator()->service(
"THistSvc")};
103 if (!digitHistSvc) {
return StatusCode::FAILURE; }
105 m_tubeInfo =
new TTree(
"t",
"LUCID_LUMI_SUMMARY");
109 if (
sc.isFailure())
return StatusCode::FAILURE;
118 return StatusCode::SUCCESS;
◆ toProcess()
virtual bool PileUpToolBase::toProcess |
( |
int |
bunchXing | ) |
const |
|
inlineoverridevirtualinherited |
◆ m_AmpFactor
double LUCID_DigitizationToolBox::m_AmpFactor {} |
|
protectedinherited |
◆ m_ChargeToQdcFactor
double LUCID_DigitizationToolBox::m_ChargeToQdcFactor {} |
|
protectedinherited |
◆ m_dataObjectName
std::string LUCID_PileUpTool::m_dataObjectName |
|
private |
◆ m_digitContainer
◆ m_digitsContainerName
std::string LUCID_PileUpTool::m_digitsContainerName |
|
private |
◆ m_dynodeGammaFactor
double LUCID_DigitizationToolBox::m_dynodeGammaFactor {} |
|
protectedinherited |
◆ m_fillRootTree
bool LUCID_DigitizationToolBox::m_fillRootTree {} |
|
protectedinherited |
◆ m_filterPassed
bool PileUpToolBase::m_filterPassed {true} |
|
protectedinherited |
◆ m_firstXing
Gaudi::Property<int> PileUpToolBase::m_firstXing |
|
protectedinherited |
Initial value:{this, "FirstXing", -999,
"First bunch-crossing in which det is live"}
Definition at line 54 of file PileUpToolBase.h.
◆ m_gainPerDynode
double LUCID_DigitizationToolBox::m_gainPerDynode {} |
|
protectedinherited |
◆ m_gasScaling
std::vector<double> LUCID_DigitizationToolBox::m_gasScaling {} |
|
protectedinherited |
◆ m_key_digitCnt
std::string LUCID_PileUpTool::m_key_digitCnt |
|
private |
◆ m_lastXing
Gaudi::Property<int> PileUpToolBase::m_lastXing |
|
protectedinherited |
Initial value:{this, "LastXing", 999,
"Last bunch-crossing in which det is live"}
Definition at line 56 of file PileUpToolBase.h.
◆ m_mergedhitList
◆ m_mergeSvc
◆ m_NoiseCharge
int LUCID_DigitizationToolBox::m_NoiseCharge {} |
|
protectedinherited |
◆ m_npe
double LUCID_DigitizationToolBox::m_npe {} |
|
protectedinherited |
◆ m_npeGas
unsigned short LUCID_DigitizationToolBox::m_npeGas {} |
|
protectedinherited |
◆ m_npePmt
unsigned short LUCID_DigitizationToolBox::m_npePmt {} |
|
protectedinherited |
◆ m_npeThreshold
std::vector<double> LUCID_DigitizationToolBox::m_npeThreshold {} |
|
protectedinherited |
◆ m_numDyinodes
int LUCID_DigitizationToolBox::m_numDyinodes {} |
|
protectedinherited |
◆ m_numTubes
int LUCID_DigitizationToolBox::m_numTubes {} |
|
protectedinherited |
◆ m_pmtScaling
std::vector<double> LUCID_DigitizationToolBox::m_pmtScaling {} |
|
protectedinherited |
◆ m_pmtSmearing
std::vector<double> LUCID_DigitizationToolBox::m_pmtSmearing {} |
|
protectedinherited |
◆ m_Q1bin
double LUCID_DigitizationToolBox::m_Q1bin {} |
|
protectedinherited |
◆ m_qdc
unsigned short LUCID_DigitizationToolBox::m_qdc {} |
|
protectedinherited |
◆ m_qdcChannelsPerPE
double LUCID_DigitizationToolBox::m_qdcChannelsPerPE {} |
|
protectedinherited |
◆ m_qdcFedNoiseFactor
double LUCID_DigitizationToolBox::m_qdcFedNoiseFactor {} |
|
protectedinherited |
◆ m_qdcPedestal
double LUCID_DigitizationToolBox::m_qdcPedestal {} |
|
protectedinherited |
◆ m_randomStreamName
Gaudi::Property<std::string> LUCID_PileUpTool::m_randomStreamName {this, "RandomStreamName", "LUCIDRndEng", ""} |
|
private |
◆ m_randomSvc
◆ m_SimHitCollectionName
std::string LUCID_PileUpTool::m_SimHitCollectionName |
|
private |
◆ m_tdc
unsigned short LUCID_DigitizationToolBox::m_tdc {} |
|
protectedinherited |
◆ m_tdcFedNoiseFactor
double LUCID_DigitizationToolBox::m_tdcFedNoiseFactor {} |
|
protectedinherited |
◆ m_tdcPmtNoiseFactor
double LUCID_DigitizationToolBox::m_tdcPmtNoiseFactor {} |
|
protectedinherited |
◆ m_tdcTot
double LUCID_DigitizationToolBox::m_tdcTot {} |
|
protectedinherited |
◆ m_TotalPMTgain
double LUCID_DigitizationToolBox::m_TotalPMTgain {} |
|
protectedinherited |
◆ m_tubeID
unsigned short LUCID_DigitizationToolBox::m_tubeID {} |
|
protectedinherited |
◆ m_tubeInfo
TTree* LUCID_DigitizationToolBox::m_tubeInfo {} |
|
protectedinherited |
◆ m_vetoPileUpTruthLinks
Gaudi::Property<int> PileUpToolBase::m_vetoPileUpTruthLinks |
|
protectedinherited |
Initial value:{this, "VetoPileUpTruthLinks", true,
"Ignore links to suppressed pile-up truth"}
Definition at line 58 of file PileUpToolBase.h.
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
AtlasHitsVector< LUCID_SimHit > LUCID_SimHitCollection
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
#define ATH_MSG_VERBOSE(x)
const_iterator begin() const
bool nextDetectorElement(const_iterator &b, const_iterator &e)
sets an iterator range with the hits of current detector element returns a bool when done
CONT::const_iterator const_iterator
std::list< value_t > type
type of the collection of timed data object
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
The Athena Transient Store API.
void insert(const PileUpTimeEventIndex &timeEventIndex, const AtlasHitsVector< HIT > *inputCollection)
::StatusCode StatusCode
StatusCode definition for legacy code.
#define CHECK(...)
Evaluate an expression and check for errors.
A wrapper class for event-slot-local random engines.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
const_iterator end() const
TimedVector::const_iterator const_iterator
void push_back(const T &t)