|
ATLAS Offline Software
|
#include <ALFA_PileUpTool.h>
Definition at line 32 of file ALFA_PileUpTool.h.
◆ ALFA_PileUpTool()
ALFA_PileUpTool::ALFA_PileUpTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Definition at line 50 of file ALFA_PileUpTool.cxx.
71 declareProperty(
"SimHitCollection",
m_SimHitCollectionName,
"Name of the input ALFA Sim Hit Collection of simulated hits");
72 declareProperty(
"SimODHitCollection",
m_SimODHitCollectionName,
"Name of the input ALFA Sim OD Hit Collection of simulated hits");
74 declareProperty(
"ALFA_DigitCollection",
m_key_DigitCollection,
"Name of the Collection to hold the output from the ALFA main detector digitization");
75 declareProperty(
"ALFA_ODDigitCollection",
m_key_ODDigitCollection,
"Name of the Collection to hold the output from the ALFA OD digitization");
85 declareProperty(
"mean",
m_mean);
◆ ALFA_MD_info() [1/2]
Definition at line 400 of file ALFA_PileUpTool.cxx.
405 for (
int l = 0;
l < 8;
l++ )
407 for (
int i = 0;
i < 20;
i++ )
409 for (
int j = 0; j < 64; j++ )
422 int fiber, plate,
sign, station;
427 for (;
it != itend; ++
it) {
429 station =
it->GetStationNumber();
430 plate =
it->GetPlateNumber();
431 fiber =
it->GetFiberNumber();
432 sign =
it->GetSignFiber();
434 ATH_MSG_DEBUG (
"station=" << station <<
", plate= "<< plate <<
", fiber=" << fiber <<
", sign=" <<
sign <<
", dep energy=" <<
it->GetEnergyDeposit());
436 m_E_fib[station-1][2*(plate-1)+(1-
sign)/2][fiber-1] +=
it->GetEnergyDeposit();
◆ ALFA_MD_info() [2/2]
Definition at line 356 of file ALFA_PileUpTool.cxx.
361 for (
int l = 0;
l < 8;
l++ )
363 for (
int i = 0;
i < 20;
i++ )
365 for (
int j = 0; j < 64; j++ )
377 int fiber, plate,
sign, station;
384 station = (*it)->GetStationNumber();
385 plate = (*it)->GetPlateNumber();
386 fiber = (*it)->GetFiberNumber();
387 sign = (*it)->GetSignFiber();
389 ATH_MSG_DEBUG (
"station=" << station <<
", plate= "<< plate <<
", fiber=" << fiber <<
", sign=" <<
sign <<
", dep energy=" << ((*it)->GetEnergyDeposit()));
391 m_E_fib[station-1][2*(plate-1)+(1-
sign)/2][fiber-1] += ((*it)->GetEnergyDeposit());
◆ ALFA_OD_info() [1/2]
Definition at line 491 of file ALFA_PileUpTool.cxx.
496 for (
int l = 0;
l < 8;
l++ ){
497 for (
int i = 0;
i < 2;
i++ ){
498 for (
int j = 0; j < 3; j++ ){
499 for (
int k = 0;
k < 30;
k++ ){
510 int fiber, plate,
sign,
side, station;
516 for (;
it != itend; ++
it) {
519 station =
it->GetStationNumber();
521 plate =
it->GetPlateNumber();
522 fiber =
it->GetFiberNumber();
523 sign =
it->GetSignFiber();
526 ATH_MSG_DEBUG (
"station=" << station <<
", side=" <<
side <<
", plate= "<< plate <<
", fiber=" << fiber <<
", sign=" <<
sign <<
", dep energy=" <<
it->GetEnergyDeposit());
529 else m_E_ODfib[station-1][
side-1][plate-1][fiber] +=
it->GetEnergyDeposit();
◆ ALFA_OD_info() [2/2]
Definition at line 445 of file ALFA_PileUpTool.cxx.
450 for (
int l = 0;
l < 8;
l++ ){
451 for (
int i = 0;
i < 2;
i++ ){
452 for (
int j = 0; j < 3; j++ ){
453 for (
int k = 0;
k < 30;
k++ ){
464 int fiber, plate,
sign,
side, station;
472 station = (*it)->GetStationNumber();
473 side = (*it)->GetODSide();
474 plate = (*it)->GetPlateNumber();
475 fiber = (*it)->GetFiberNumber();
476 sign = (*it)->GetSignFiber();
479 ATH_MSG_DEBUG (
"station=" << station <<
", side=" <<
side <<
", plate= "<< plate <<
", fiber=" << fiber <<
", sign=" <<
sign <<
", dep energy=" << ((*it)->GetEnergyDeposit()));
481 if (
sign==0)
m_E_ODfib[station-1][
side-1][plate-1][fiber+15] += ((*it)->GetEnergyDeposit());
482 else m_E_ODfib[station-1][
side-1][plate-1][fiber] += ((*it)->GetEnergyDeposit());
◆ fill_MD_DigitCollection()
StatusCode ALFA_PileUpTool::fill_MD_DigitCollection |
( |
CLHEP::HepRandomEngine * |
rndEngine | ) |
|
|
private |
Definition at line 537 of file ALFA_PileUpTool.cxx.
539 ATH_MSG_DEBUG(
" ALFA_PileUpTool::fill_MD_DigitCollection()");
544 double amplitude = 0.;
548 for (
int l = 0;
l < 8;
l++ )
550 for (
int i = 0;
i < 20;
i++ )
552 for (
int j = 0; j < 64; j++ )
565 amplitude = CLHEP::RandGaussZiggurat::shoot(rndEngine, N_photo, sqrt(
pow(
m_sigma0,2)+N_photo*
pow(
m_sigma1,2)));
573 ATH_MSG_DEBUG(
" ALFA_Digitization::fillDigitCollection, amplitude " << amplitude);
574 ATH_MSG_DEBUG(
" station = " <<
l <<
", plate= " <<
i <<
", fiber=" << j );
585 for (
int l = 0;
l < 8;
l++ )
587 for (
int i = 0;
i < 20;
i++ )
589 for (
int j = 0; j < 64; j++ )
593 for (
int f = j+1;
f < 64;
f++)
595 rand_fib = CLHEP::RandFlat::shoot(rndEngine,0.,1.);
606 for (
int f = j-1;
f > -1;
f--)
608 rand_fib = CLHEP::RandFlat::shoot(rndEngine,0.,1.);
622 return StatusCode::SUCCESS;
◆ fill_OD_DigitCollection()
StatusCode ALFA_PileUpTool::fill_OD_DigitCollection |
( |
CLHEP::HepRandomEngine * |
rndEngine | ) |
|
|
private |
Definition at line 629 of file ALFA_PileUpTool.cxx.
635 double amplitude = 0.;
637 for (
int l = 0;
l < 8;
l++ )
639 for (
int i = 0;
i < 2;
i++ )
641 for (
int j = 0; j < 3; j++ )
643 for (
int k = 0;
k < 30;
k++)
660 ATH_MSG_DEBUG(
" ALFA_Digitization::fill_OD_DigitCollection, amplitude " << amplitude);
661 ATH_MSG_DEBUG(
" station = " <<
l <<
", side = " <<
i <<
", plate = " << j <<
", fiber = " <<
k);
672 return StatusCode::SUCCESS;
◆ filterPassed()
virtual bool PileUpToolBase::filterPassed |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ finalize()
StatusCode ALFA_PileUpTool::finalize |
( |
| ) |
|
|
finaloverridevirtual |
◆ initialize()
StatusCode ALFA_PileUpTool::initialize |
( |
| ) |
|
|
finaloverridevirtual |
◆ mergeEvent()
StatusCode ALFA_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 299 of file ALFA_PileUpTool.cxx.
307 CLHEP::HepRandomEngine* rngEngine = rngWrapper->
getEngine(ctx);
309 if (
sc.isFailure()) {
311 return StatusCode::SUCCESS;
318 if (
sc.isFailure()) {
320 return StatusCode::SUCCESS;
323 return StatusCode::SUCCESS;
◆ prepareEvent()
StatusCode ALFA_PileUpTool::prepareEvent |
( |
const EventContext & |
ctx, |
|
|
const unsigned int |
nInputEvents |
|
) |
| |
|
finaloverridevirtual |
code taken from ZDC; author (highly) probably John Chapman called before the subevts loop.
Not (necessarily) able to access SubEvents
Definition at line 223 of file ALFA_PileUpTool.cxx.
225 ATH_MSG_DEBUG (
"ALFA_PileUpTool::prepareEvent() called for " << nInputEvents <<
" input events" );
229 if (
sc.isFailure()) {
ATH_MSG_FATAL (
" ALFA_PileUpTool::prepareEvent(): Could not record the empty digit container in StoreGate " );
return sc; }
230 else {
ATH_MSG_DEBUG (
" ALFA_PileUpTool::prepareEvent(): Digit container is recorded in StoreGate " ); }
234 if (
sc.isFailure()) {
ATH_MSG_FATAL (
" ALFA_PileUpTool::prepareEvent(): Could not record the empty digit OD container in StoreGate " );
return sc; }
235 else {
ATH_MSG_DEBUG (
" ALFA_PileUpTool::prepareEvent(): Digit OD container is recorded in StoreGate " ); }
240 return StatusCode::SUCCESS;
◆ processAllSubEvents() [1/2]
StatusCode ALFA_PileUpTool::processAllSubEvents |
( |
const EventContext & |
ctx | ) |
|
|
finaloverridevirtual |
Reimplemented from PileUpToolBase.
Definition at line 117 of file ALFA_PileUpTool.cxx.
124 TimedALFAHitCollList tHitCollList;
125 TimedALFAODHitCollList tODHitCollList;
130 ATH_MSG_FATAL (
"Could not fill TimedALFAHitCollList" );
return StatusCode::FAILURE;
139 ATH_MSG_FATAL (
"Could not fill TimedALFAODHitCollList" );
return StatusCode::FAILURE;
141 else {
ATH_MSG_DEBUG (
"Retrieved TimedALFAODHitCollList" ); }
151 while (iHitColl != eHitColl) {
155 tALFAhit.
insert(iHitColl->first, tmpColl);
157 ATH_MSG_DEBUG (
" ALFA_HitCollection found with " << tmpColl->size() <<
" hits " << iHitColl->first );
167 while (iODHitColl != eODHitColl) {
171 tALFAODhit.
insert(iODHitColl->first, tmpColl);
173 ATH_MSG_DEBUG (
" ALFA_ODHitCollection found with " << tmpColl->size() <<
" hits " << iODHitColl->first );
182 ATH_MSG_FATAL (
" ALFA_PileUpTool::processAllSubEvents(): Could not record the empty ALFA digit container in StoreGate " );
return StatusCode::FAILURE;
184 else {
ATH_MSG_DEBUG (
" ALFA_PileUpTool::processAllSubEvents(): ALFA Digit container is recorded in StoreGate " ); }
189 ATH_MSG_FATAL (
" ALFA_PileUpTool::processAllSubEvents(): Could not record the empty ALFA OD digit container in StoreGate " );
return StatusCode::FAILURE;
191 else {
ATH_MSG_DEBUG (
" ALFA_PileUpTool::processAllSubEvents(): ALFA OD Digit container is recorded in StoreGate " ); }
201 CLHEP::HepRandomEngine* rngEngine = rngWrapper->
getEngine(ctx);
203 if (
sc.isFailure()) {
205 return StatusCode::SUCCESS;
212 if (
sc.isFailure()) {
214 return StatusCode::SUCCESS;
217 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 244 of file ALFA_PileUpTool.cxx.
247 ATH_MSG_DEBUG (
"ALFA_PileUpTool::processBunchXing() " << bunchXing );
249 for (; iEvt!=eSubEvents; ++iEvt) {
253 <<
" bunch crossing : " << bunchXing
254 <<
" time offset : " << iEvt->time()
255 <<
" event number : " << iEvt->ptr()->eventNumber()
256 <<
" run number : " << iEvt->ptr()->runNumber()
264 ATH_MSG_ERROR (
"SubEvent ALFA_HitCollection not found in StoreGate " << seStore.name() );
266 return StatusCode::FAILURE;
269 ATH_MSG_DEBUG (
"SubEvent, ALFA_HitCollection found with " << tmpHitColl->
size() <<
" hits");
280 ATH_MSG_ERROR (
"SubEvent ALFA_ODHitCollection not found in StoreGate " << seStore.name() );
282 return StatusCode::FAILURE;
285 ATH_MSG_DEBUG (
"ALFA_ODHitCollection found with " << tmpODHitColl->
size() <<
" hits" );
293 return StatusCode::SUCCESS;
◆ recordCollection()
◆ recordODCollection()
◆ resetFilter()
virtual void PileUpToolBase::resetFilter |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ toProcess()
virtual bool PileUpToolBase::toProcess |
( |
int |
bunchXing | ) |
const |
|
inlineoverridevirtualinherited |
◆ XTalk()
StatusCode ALFA_PileUpTool::XTalk |
( |
| ) |
|
|
private |
Definition at line 677 of file ALFA_PileUpTool.cxx.
678 std::ifstream fXTalk;
679 std::stringstream
ss;
681 for (
unsigned int j=0; j<8; j++){
685 fname =
"Xtalk_station";
697 throw std::runtime_error(
"FATAL: mapping MD maroc-mapmt not found in Datapath.");
708 if (fXTalk.is_open())
710 for (
unsigned int i=0;
i<127;
i++)
722 return StatusCode::FAILURE;
725 return StatusCode::SUCCESS;
◆ m_AmplitudeCut
double ALFA_PileUpTool::m_AmplitudeCut {} |
|
private |
◆ m_cross_talk
double ALFA_PileUpTool::m_cross_talk[8][127] {} |
|
private |
◆ m_digitCollection
◆ m_E_fib
double ALFA_PileUpTool::m_E_fib[8][20][64] {} |
|
private |
◆ m_E_ODfib
double ALFA_PileUpTool::m_E_ODfib[8][2][3][30] {} |
|
private |
◆ m_fibres
int ALFA_PileUpTool::m_fibres[8][20][64] {} |
|
private |
◆ 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_key_DigitCollection
std::string ALFA_PileUpTool::m_key_DigitCollection |
|
private |
◆ m_key_ODDigitCollection
std::string ALFA_PileUpTool::m_key_ODDigitCollection |
|
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_mean
double ALFA_PileUpTool::m_mean {} |
|
private |
◆ m_meanE_dep
double ALFA_PileUpTool::m_meanE_dep {} |
|
private |
◆ m_meanN_photo
double ALFA_PileUpTool::m_meanN_photo {} |
|
private |
◆ m_mergedALFA_HitList
◆ m_mergedALFA_ODHitList
◆ m_mergeSvc
◆ m_ODdigitCollection
◆ m_randomStreamName
Gaudi::Property<std::string> ALFA_PileUpTool::m_randomStreamName {this, "RandomStreamName", "ALFARndEng", ""} |
|
private |
◆ m_randomSvc
◆ m_sigma0
double ALFA_PileUpTool::m_sigma0 {} |
|
private |
◆ m_sigma1
double ALFA_PileUpTool::m_sigma1 {} |
|
private |
◆ m_SimHitCollectionName
std::string ALFA_PileUpTool::m_SimHitCollectionName |
|
private |
◆ m_SimODHitCollectionName
std::string ALFA_PileUpTool::m_SimODHitCollectionName |
|
private |
◆ m_stdDev
double ALFA_PileUpTool::m_stdDev {} |
|
private |
◆ 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
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
AtlasHitsVector< ALFA_Hit > ALFA_HitCollection
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
AtlasHitsVector< ALFA_Hit >::const_iterator ALFA_HitConstIter
#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.
AtlasHitsVector< ALFA_ODHit > ALFA_ODHitCollection
A wrapper class for event-slot-local random engines.
AtlasHitsVector< ALFA_ODHit >::const_iterator ALFA_ODHitConstIter
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.
#define ATH_MSG_WARNING(x)
const_iterator end() const
TimedVector::const_iterator const_iterator
constexpr int pow(int base, int exp) noexcept
void push_back(const T &t)