![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <ALFA_PileUpTool.h>
Definition at line 36 of file ALFA_PileUpTool.h.
◆ ALFA_PileUpTool()
ALFA_PileUpTool::ALFA_PileUpTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ALFA_MD_info() [1/2]
Definition at line 399 of file ALFA_PileUpTool.cxx.
404 for (
int l = 0;
l < 8;
l++ )
406 for (
int i = 0;
i < 20;
i++ )
408 for (
int j = 0; j < 64; j++ )
421 int fiber, plate,
sign, station;
426 for (;
it != itend; ++
it) {
428 station =
it->GetStationNumber();
429 plate =
it->GetPlateNumber();
430 fiber =
it->GetFiberNumber();
431 sign =
it->GetSignFiber();
433 ATH_MSG_DEBUG (
"station=" << station <<
", plate= "<< plate <<
", fiber=" << fiber <<
", sign=" <<
sign <<
", dep energy=" <<
it->GetEnergyDeposit());
435 m_E_fib[station-1][2*(plate-1)+(1-
sign)/2][fiber-1] +=
it->GetEnergyDeposit();
◆ ALFA_MD_info() [2/2]
Definition at line 355 of file ALFA_PileUpTool.cxx.
360 for (
int l = 0;
l < 8;
l++ )
362 for (
int i = 0;
i < 20;
i++ )
364 for (
int j = 0; j < 64; j++ )
376 int fiber, plate,
sign, station;
383 station = (*it)->GetStationNumber();
384 plate = (*it)->GetPlateNumber();
385 fiber = (*it)->GetFiberNumber();
386 sign = (*it)->GetSignFiber();
388 ATH_MSG_DEBUG (
"station=" << station <<
", plate= "<< plate <<
", fiber=" << fiber <<
", sign=" <<
sign <<
", dep energy=" << ((*it)->GetEnergyDeposit()));
390 m_E_fib[station-1][2*(plate-1)+(1-
sign)/2][fiber-1] += ((*it)->GetEnergyDeposit());
◆ ALFA_OD_info() [1/2]
Definition at line 490 of file ALFA_PileUpTool.cxx.
495 for (
int l = 0;
l < 8;
l++ ){
496 for (
int i = 0;
i < 2;
i++ ){
497 for (
int j = 0; j < 3; j++ ){
498 for (
int k = 0;
k < 30;
k++ ){
509 int fiber, plate,
sign,
side, station;
515 for (;
it != itend; ++
it) {
518 station =
it->GetStationNumber();
520 plate =
it->GetPlateNumber();
521 fiber =
it->GetFiberNumber();
522 sign =
it->GetSignFiber();
525 ATH_MSG_DEBUG (
"station=" << station <<
", side=" <<
side <<
", plate= "<< plate <<
", fiber=" << fiber <<
", sign=" <<
sign <<
", dep energy=" <<
it->GetEnergyDeposit());
528 else m_E_ODfib[station-1][
side-1][plate-1][fiber] +=
it->GetEnergyDeposit();
◆ ALFA_OD_info() [2/2]
Definition at line 444 of file ALFA_PileUpTool.cxx.
449 for (
int l = 0;
l < 8;
l++ ){
450 for (
int i = 0;
i < 2;
i++ ){
451 for (
int j = 0; j < 3; j++ ){
452 for (
int k = 0;
k < 30;
k++ ){
463 int fiber, plate,
sign,
side, station;
471 station = (*it)->GetStationNumber();
472 side = (*it)->GetODSide();
473 plate = (*it)->GetPlateNumber();
474 fiber = (*it)->GetFiberNumber();
475 sign = (*it)->GetSignFiber();
478 ATH_MSG_DEBUG (
"station=" << station <<
", side=" <<
side <<
", plate= "<< plate <<
", fiber=" << fiber <<
", sign=" <<
sign <<
", dep energy=" << ((*it)->GetEnergyDeposit()));
480 if (
sign==0)
m_E_ODfib[station-1][
side-1][plate-1][fiber+15] += ((*it)->GetEnergyDeposit());
481 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 536 of file ALFA_PileUpTool.cxx.
538 ATH_MSG_DEBUG(
" ALFA_PileUpTool::fill_MD_DigitCollection()");
543 double amplitude = 0.;
547 for (
int l = 0;
l < 8;
l++ )
549 for (
int i = 0;
i < 20;
i++ )
551 for (
int j = 0; j < 64; j++ )
564 amplitude = CLHEP::RandGaussZiggurat::shoot(rndEngine, N_photo, sqrt(
pow(
m_sigma0,2)+N_photo*
pow(
m_sigma1,2)));
572 ATH_MSG_DEBUG(
" ALFA_Digitization::fillDigitCollection, amplitude " << amplitude);
573 ATH_MSG_DEBUG(
" station = " <<
l <<
", plate= " <<
i <<
", fiber=" << j );
584 for (
int l = 0;
l < 8;
l++ )
586 for (
int i = 0;
i < 20;
i++ )
588 for (
int j = 0; j < 64; j++ )
592 for (
int f = j+1;
f < 64;
f++)
594 rand_fib = CLHEP::RandFlat::shoot(rndEngine,0.,1.);
605 for (
int f = j-1;
f > -1;
f--)
607 rand_fib = CLHEP::RandFlat::shoot(rndEngine,0.,1.);
621 return StatusCode::SUCCESS;
◆ fill_OD_DigitCollection()
StatusCode ALFA_PileUpTool::fill_OD_DigitCollection |
( |
CLHEP::HepRandomEngine * |
rndEngine | ) |
|
|
private |
Definition at line 628 of file ALFA_PileUpTool.cxx.
634 double amplitude = 0.;
636 for (
int l = 0;
l < 8;
l++ )
638 for (
int i = 0;
i < 2;
i++ )
640 for (
int j = 0; j < 3; j++ )
642 for (
int k = 0;
k < 30;
k++)
659 ATH_MSG_DEBUG(
" ALFA_Digitization::fill_OD_DigitCollection, amplitude " << amplitude);
660 ATH_MSG_DEBUG(
" station = " <<
l <<
", side = " <<
i <<
", plate = " << j <<
", fiber = " <<
k);
671 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 298 of file ALFA_PileUpTool.cxx.
306 CLHEP::HepRandomEngine* rngEngine = rngWrapper->
getEngine(ctx);
308 if (
sc.isFailure()) {
310 return StatusCode::SUCCESS;
317 if (
sc.isFailure()) {
319 return StatusCode::SUCCESS;
322 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 222 of file ALFA_PileUpTool.cxx.
224 ATH_MSG_DEBUG (
"ALFA_PileUpTool::prepareEvent() called for " << nInputEvents <<
" input events" );
228 if (
sc.isFailure()) {
ATH_MSG_FATAL (
" ALFA_PileUpTool::prepareEvent(): Could not record the empty digit container in StoreGate " );
return sc; }
229 else {
ATH_MSG_DEBUG (
" ALFA_PileUpTool::prepareEvent(): Digit container is recorded in StoreGate " ); }
233 if (
sc.isFailure()) {
ATH_MSG_FATAL (
" ALFA_PileUpTool::prepareEvent(): Could not record the empty digit OD container in StoreGate " );
return sc; }
234 else {
ATH_MSG_DEBUG (
" ALFA_PileUpTool::prepareEvent(): Digit OD container is recorded in StoreGate " ); }
239 return StatusCode::SUCCESS;
◆ processAllSubEvents() [1/2]
StatusCode ALFA_PileUpTool::processAllSubEvents |
( |
const EventContext & |
ctx | ) |
|
|
finaloverridevirtual |
Reimplemented from PileUpToolBase.
Definition at line 116 of file ALFA_PileUpTool.cxx.
123 TimedALFAHitCollList tHitCollList;
124 TimedALFAODHitCollList tODHitCollList;
129 ATH_MSG_FATAL (
"Could not fill TimedALFAHitCollList" );
return StatusCode::FAILURE;
138 ATH_MSG_FATAL (
"Could not fill TimedALFAODHitCollList" );
return StatusCode::FAILURE;
140 else {
ATH_MSG_DEBUG (
"Retrieved TimedALFAODHitCollList" ); }
150 while (iHitColl != eHitColl) {
154 tALFAhit.
insert(iHitColl->first, tmpColl);
156 ATH_MSG_DEBUG (
" ALFA_HitCollection found with " << tmpColl->size() <<
" hits " << iHitColl->first );
166 while (iODHitColl != eODHitColl) {
170 tALFAODhit.
insert(iODHitColl->first, tmpColl);
172 ATH_MSG_DEBUG (
" ALFA_ODHitCollection found with " << tmpColl->size() <<
" hits " << iODHitColl->first );
181 ATH_MSG_FATAL (
" ALFA_PileUpTool::processAllSubEvents(): Could not record the empty ALFA digit container in StoreGate " );
return StatusCode::FAILURE;
183 else {
ATH_MSG_DEBUG (
" ALFA_PileUpTool::processAllSubEvents(): ALFA Digit container is recorded in StoreGate " ); }
188 ATH_MSG_FATAL (
" ALFA_PileUpTool::processAllSubEvents(): Could not record the empty ALFA OD digit container in StoreGate " );
return StatusCode::FAILURE;
190 else {
ATH_MSG_DEBUG (
" ALFA_PileUpTool::processAllSubEvents(): ALFA OD Digit container is recorded in StoreGate " ); }
200 CLHEP::HepRandomEngine* rngEngine = rngWrapper->
getEngine(ctx);
202 if (
sc.isFailure()) {
204 return StatusCode::SUCCESS;
211 if (
sc.isFailure()) {
213 return StatusCode::SUCCESS;
216 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 243 of file ALFA_PileUpTool.cxx.
246 ATH_MSG_DEBUG (
"ALFA_PileUpTool::processBunchXing() " << bunchXing );
248 for (; iEvt!=eSubEvents; ++iEvt) {
252 <<
" bunch crossing : " << bunchXing
253 <<
" time offset : " << iEvt->time()
254 <<
" event number : " << iEvt->ptr()->eventNumber()
255 <<
" run number : " << iEvt->ptr()->runNumber()
263 ATH_MSG_ERROR (
"SubEvent ALFA_HitCollection not found in StoreGate " << seStore.name() );
265 return StatusCode::FAILURE;
268 ATH_MSG_DEBUG (
"SubEvent, ALFA_HitCollection found with " << tmpHitColl->
size() <<
" hits");
279 ATH_MSG_ERROR (
"SubEvent ALFA_ODHitCollection not found in StoreGate " << seStore.name() );
281 return StatusCode::FAILURE;
284 ATH_MSG_DEBUG (
"ALFA_ODHitCollection found with " << tmpODHitColl->
size() <<
" hits" );
292 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 675 of file ALFA_PileUpTool.cxx.
677 for (
unsigned int j=0; j<8; j++){
693 throw std::runtime_error(
"FATAL: mapping MD maroc-mapmt not found in Datapath.");
706 for (
unsigned int i=0;
i<127;
i++)
718 return StatusCode::FAILURE;
721 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_filename
std::string ALFA_PileUpTool::m_filename |
|
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_fXTalk
std::ifstream ALFA_PileUpTool::m_fXTalk |
|
private |
◆ 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_s
std::stringstream ALFA_PileUpTool::m_s |
|
private |
◆ 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
void push_back(const T &t)