Skip to content
Snippets Groups Projects
Commit 606ef415 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'FixATLASSQ-191_master' into 'master'

Pass TimedHitCollection<TRTUncompressedHit> as an argument of TRTDigitizationTool::processStraw

Closes ATLASSQ-191

See merge request atlas/athena!30930
parents bef9693b be795018
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
......@@ -334,7 +334,8 @@ StatusCode TRTDigitizationTool::lateInitialize() {
}
//_____________________________________________________________________________
StatusCode TRTDigitizationTool::processStraws(std::set<int>& sim_hitids, std::set<Identifier>& simhitsIdentifiers,
StatusCode TRTDigitizationTool::processStraws(const TimedHitCollection<TRTUncompressedHit>& thpctrt,
std::set<int>& sim_hitids, std::set<Identifier>& simhitsIdentifiers,
CLHEP::HepRandomEngine *rndmEngine,
CLHEP::HepRandomEngine *strawRndmEngine,
CLHEP::HepRandomEngine *elecProcRndmEngine,
......@@ -364,7 +365,7 @@ StatusCode TRTDigitizationTool::processStraws(std::set<int>& sim_hitids, std::se
// loop over all straws
TimedHitCollection<TRTUncompressedHit>::const_iterator i, e;
while (m_thpctrt->nextDetectorElement(i, e)) {
while (thpctrt.nextDetectorElement(i, e)) {
int hitID((*i)->GetHitID()); // Get hitID
......@@ -547,14 +548,13 @@ StatusCode TRTDigitizationTool::processAllSubEvents() {
++iColl;
}
}
m_thpctrt = &thpctrt;
//Set of all hitid's with simhits (used for noise simulation).
std::set<int> sim_hitids;
std::set<Identifier> simhitsIdentifiers;
// Process the Hits straw by straw: get the iterator pairs for given straw
ATH_CHECK(this->processStraws(sim_hitids, simhitsIdentifiers, rndmEngine, strawRndmEngine, elecProcRndmEngine, elecNoiseRndmEngine,paiRndmEngine));
ATH_CHECK(this->processStraws(thpctrt, sim_hitids, simhitsIdentifiers, rndmEngine, strawRndmEngine, elecProcRndmEngine, elecNoiseRndmEngine,paiRndmEngine));
// no more hits
......@@ -650,7 +650,7 @@ StatusCode TRTDigitizationTool::mergeEvent() {
// Process the Hits straw by straw:
// get the iterator pairs for given straw
ATH_CHECK(this->processStraws(sim_hitids, simhitsIdentifiers, rndmEngine, strawRndmEngine, elecProcRndmEngine, elecNoiseRndmEngine,paiRndmEngine));
ATH_CHECK(this->processStraws(*m_thpctrt, sim_hitids, simhitsIdentifiers, rndmEngine, strawRndmEngine, elecProcRndmEngine, elecNoiseRndmEngine,paiRndmEngine));
delete m_thpctrt;
std::list<TRTUncompressedHitCollection*>::iterator trtHitColl(m_trtHitCollList.begin());
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TRT_DIGITIZATION_TRTDIGITIZATIONTOOL_H
......@@ -108,7 +108,7 @@ private:
StatusCode ConditionsDependingInitialization();
StatusCode lateInitialize();
StatusCode processStraws(std::set<int>& sim_hitids, std::set<Identifier>& simhitsIdentifiers,
StatusCode processStraws(const TimedHitCollection<TRTUncompressedHit>& thpctrt, std::set<int>& sim_hitids, std::set<Identifier>& simhitsIdentifiers,
CLHEP::HepRandomEngine *rndmEngine,
CLHEP::HepRandomEngine *strawRndmEngine,
CLHEP::HepRandomEngine *elecProcRndmEngine,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment