|
ATLAS Offline Software
|
#include <AFP_PileUpTool.h>
|
StatusCode | fillTDDigiCollection (AFP_TDSimHitCollection &AFP_TDSimHitColl, CLHEP::HepRandomEngine *rndEngine, const EventContext &ctx) |
|
StatusCode | fillTDDigiCollection (TimedHitCollection< AFP_TDSimHit > &thpcAFP, CLHEP::HepRandomEngine *, const EventContext &ctx, std::unique_ptr< AFP_TDDigiCollection > &digitCollection) |
|
StatusCode | fillSiDigiCollection (AFP_SIDSimHitCollection &AFP_SIDSimHitColl, const EventContext &ctx) |
|
StatusCode | fillSiDigiCollection (TimedHitCollection< AFP_SIDSimHit > &thpcAFP, const EventContext &ctx, std::unique_ptr< AFP_SiDigiCollection > &siDigiCollection) |
|
void | createTDDigi (int Station, int Detector, int SensitiveElement, float GlobalTime, float WafeLength, CLHEP::HepRandomEngine *rndEngine) |
|
StatusCode | StoreTDDigi (const EventContext &ctx, std::unique_ptr< AFP_TDDigiCollection > &digitCollection) const |
|
void | createSiDigi (const EventContext &ctx, int Station, int Detector, int PixelRow, int PixelCol, float PreStepX, float PreStepY, float PreStepZ, float PostStepX, float PostStepY, float PostStepZ, float DepEnergy) |
|
StatusCode | StoreSiDigi (const EventContext &ctx, std::unique_ptr< AFP_SiDigiCollection > &siDigiCollection) |
|
void | setupQuantumEff () |
|
void | setupTDCOffsets () |
|
double | generateSiNoise (CLHEP::HepRandomEngine *rndEngine) const |
| Function that provides random noise (in charge units) More...
|
|
double | generateSiCCE (CLHEP::HepRandomEngine *rndEngine) const |
| Function that provides charge collection efficiency. More...
|
|
int | charge2tot (int) const |
| Function that converts quasi-continous charge to discrete time-over-threshold. More...
|
|
int | tot2charge (int) const |
| Function that converts discrete time-over-threshold to discrete charge. More...
|
|
void | addSignalFunc (TH1F &, double) const |
| Adds pre-calculated single photoelectron signal function stored in m_SignalVect to the passed histogram. More...
|
|
double | getQE (double) const |
| Provides quantum efficiency for given wavelength (in nm) More...
|
|
void | resetSignalHistograms () |
| Invokes Reset() on all m_SignalHist objects. More...
|
|
bool | isPhotoelectronInduced (double, CLHEP::HepRandomEngine *) const |
| Returns random response if the photon of given wavelegth induces the photoelectron. More...
|
|
void | addPhotoconvTimeSmear (double &, CLHEP::HepRandomEngine *) const |
| Modifies the hit time passed as an argument by the photoconversion time smearing. More...
|
|
double | getTDC (const TH1F &) const |
| Returns the TDC determined from the signal shape passed as an argument. More...
|
|
double | getADC (const TH1F &, const double) const |
| Returns the ADC determined from the signal shape passed as an (1st) argument; 2nd arg is peak value. More...
|
|
double | SignalFun (double Time, double RiseTime, double FallTime, double offset=0.0) const |
|
|
Gaudi::Property< std::string > | m_totToChargeTransfExpr {this, "TotToChargeTransfExpr", "1909 + x*363 + x*x*141", "Function that transforms time-over-threshold to charge"} |
| Function that transforms time-over-threshold to charge. More...
|
|
Gaudi::Property< std::string > | m_totToChargeTransfName {this, "TotToChargeTransfName", "TotToChargeTransfFunction", "Name of the function that transforms time-over-threshold to charge"} |
|
TF1 | m_totToChargeTransformation |
|
ServiceHandle< PileUpMergeSvc > | m_mergeSvc {this, "mergeSvc", "PileUpMergeSvc", ""} |
|
ServiceHandle< IAthRNGSvc > | m_randomSvc {this, "RndmSvc", "AthRNGSvc", ""} |
|
Gaudi::Property< std::string > | m_randomStreamName {this, "RandomStreamName", "AFPRndEng", ""} |
|
BooleanProperty | m_onlyUseContainerName {this, "OnlyUseContainerName", true, "Don't use the ReadHandleKey directly. Just extract the container name from it."} |
|
SG::ReadHandleKey< AFP_TDSimHitCollection > | m_TDSimHitCollectionKey {this, "TDSimHitCollectionName", "AFP_TDSimHitCollection"} |
|
std::string | m_TDSimHitCollectionName {""} |
|
SG::WriteHandleKey< AFP_TDDigiCollection > | m_TDDigiCollectionKey {this, "TDDigiCollectionName", "AFP_TDDigiCollection", "Name of the Collection to hold the output from the AFP digitization, TD part"} |
|
SG::WriteHandleKey< xAOD::AFPToFHitContainer > | m_AFPHitsContainerNameToF {this, "AFPHitsContainerNameToF", "AFPToFHitContainer"} |
|
SG::ReadHandleKey< AFP_SIDSimHitCollection > | m_SIDSimHitCollectionKey {this, "SIDSimHitCollectionName", "AFP_SIDSimHitCollection"} |
|
std::string | m_SIDSimHitCollectionName {""} |
|
SG::WriteHandleKey< AFP_SiDigiCollection > | m_SiDigiCollectionKey {this, "SiDigiCollectionName", "AFP_SiDigiCollection", "Name of the Collection to hold the output from the AFP digitization, SiD part"} |
|
SG::WriteHandleKey< xAOD::AFPSiHitContainer > | m_AFPSiHitsContainerName {this, "AFPSiHitsContainerName", "AFPSiHitContainer",""} |
|
Gaudi::Property< double > | m_CollectionEff {this, "CollectionEff", 0.6, "Collection efficiency"} |
|
Gaudi::Property< double > | m_ConversionSpr {this, "ConversionSpr", 40.0, " Photon-Electron conversion spread in ps"} |
|
Gaudi::Property< double > | m_RiseTime {this, "RiseTime", 400., "Pulse rise time in ps"} |
|
Gaudi::Property< double > | m_FallTime {this, "FallTime", 1200., "Pulse fall time in ps"} |
|
Gaudi::Property< double > | m_TofSignalTimeRangeLength {this, "TofSignalTimeRangeLength", 4000., "in ps"} |
|
Gaudi::Property< double > | m_TimeOffset {this, "TimeOffset", 104500., "Offset reflecting time that proton travels from IP to AFP"} |
|
Gaudi::Property< double > | m_CfSignalDelay {this, "CfSignalDelay", 200., "Pulse delay for const. frac. discrimination"} |
|
Gaudi::Property< double > | m_CfdThr {this, "CfdThr", 0.5, "Constant fraction threshold"} |
|
Gaudi::Property< double > | m_SiT_ChargeCollEff {this, "SiT_ChargeCollEff", 0.55, "CCE, adjusted to describe data"} |
|
Gaudi::Property< double > | m_SiT_ChargeCollEffSigma {this, "SiT_ChargeCollEffSigma", 0.2, "sigma(CCE), adjusted to describe data"} |
|
Gaudi::Property< double > | m_SiT_NoiseMu {this, "SiT_NoiseMu", 160., "unit = number of eh pairs"} |
|
Gaudi::Property< double > | m_SiT_NoiseSigma {this, "SiT_NoiseSigma", 10., "unit = number of eh pairs"} |
|
Gaudi::Property< double > | m_SiT_Energy2ChargeFactor {this, "SiT_Energy2ChargeFactor", 1000000./3.6, "number of eh pairs per MeV"} |
|
Gaudi::Property< int > | m_SiT_ToTThresholdForHit {this, "SiT_ChargeThresholdForHit", 1, ""} |
|
Gaudi::Property< int > | m_QEffVer {this, "QEffVer", 1, "quantum efficiency version; QE1=1, QE2=2, nQEffOpts=3"} |
|
AFP_TDSimHitCollection | m_mergedTDSimHitList |
|
AFP_SIDSimHitCollection | m_mergedSIDSimHitList |
|
double | m_QuantumEff_PMT [82] |
|
double | m_TDC_offsets [4][4][4] |
|
int | m_ChargeVsTot_LUT [16] |
|
const int | m_ArrSize |
|
std::vector< float > | m_deposited_charge |
|
std::vector< float > | m_deposited_energy |
|
std::vector< double > | m_SignalVect |
| vector with pre-calculated single signal from the photoelectron More...
|
|
TH1F | m_SignalHist [4][4][4] |
| array of histograms storing final signals in the PMTs More...
|
|
Definition at line 43 of file AFP_PileUpTool.h.
◆ QEFF_VER
◆ AFP_PileUpTool()
AFP_PileUpTool::AFP_PileUpTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~AFP_PileUpTool()
virtual AFP_PileUpTool::~AFP_PileUpTool |
( |
| ) |
|
|
inlinevirtual |
◆ addPhotoconvTimeSmear()
void AFP_PileUpTool::addPhotoconvTimeSmear |
( |
double & |
t, |
|
|
CLHEP::HepRandomEngine * |
rndEngine |
|
) |
| const |
|
private |
Modifies the hit time passed as an argument by the photoconversion time smearing.
Definition at line 523 of file AFP_PileUpTool.cxx.
◆ addSignalFunc()
void AFP_PileUpTool::addSignalFunc |
( |
TH1F & |
h, |
|
|
double |
x |
|
) |
| const |
|
private |
Adds pre-calculated single photoelectron signal function stored in m_SignalVect to the passed histogram.
Definition at line 707 of file AFP_PileUpTool.cxx.
709 int xDiscrete =
static_cast<int>(
x);
710 int iMin = xDiscrete;
711 int iMax =
h.GetNbinsX();
715 iMax =
h.GetNbinsX() + xDiscrete - 1;
717 for(
int i = iMin;
i<=iMax; ++
i){
◆ charge2tot()
int AFP_PileUpTool::charge2tot |
( |
int |
ch | ) |
const |
|
private |
Function that converts quasi-continous charge to discrete time-over-threshold.
Definition at line 148 of file AFP_PileUpTool.cxx.
◆ createSiDigi()
void AFP_PileUpTool::createSiDigi |
( |
const EventContext & |
ctx, |
|
|
int |
Station, |
|
|
int |
Detector, |
|
|
int |
PixelRow, |
|
|
int |
PixelCol, |
|
|
float |
PreStepX, |
|
|
float |
PreStepY, |
|
|
float |
PreStepZ, |
|
|
float |
PostStepX, |
|
|
float |
PostStepY, |
|
|
float |
PostStepZ, |
|
|
float |
DepEnergy |
|
) |
| |
|
private |
Definition at line 624 of file AFP_PileUpTool.cxx.
626 ATH_MSG_DEBUG (
" iterating Pmt, station " << Station <<
", detector " <<
Detector <<
", pixel_col " << PixelCol <<
", pixel_row " << PixelRow <<
", dep_energy" << DepEnergy <<
" (x,y,z)_pre (" << PreStepX <<
"," << PreStepY <<
"," << PreStepZ <<
"), (x,y,z)_post (" << PostStepX <<
"," << PostStepY <<
"," << PostStepZ <<
")" );
630 CLHEP::HepRandomEngine* rngEngine = rngWrapper->
getEngine(ctx);
635 ATH_MSG_DEBUG (
"deposted charge for given hit " << depositedCharge );
637 if ((PixelCol>=336) || (PixelRow >= 80) || (Station >= 4) || (
Detector >= 6 ) )
641 ATH_MSG_DEBUG (
"Hit in the vacuum layer in front of the station " << Station );
645 ATH_MSG_WARNING (
"WRONG NUMBER of PIXEL coordinates or station or detector !!!:" );
646 ATH_MSG_WARNING (
"station [max 4] " << Station <<
", detector [max 6]" <<
Detector <<
", pixel_col [max 336] " << PixelCol <<
", pixel_row [max 80] " << PixelRow );
◆ createTDDigi()
void AFP_PileUpTool::createTDDigi |
( |
int |
Station, |
|
|
int |
Detector, |
|
|
int |
SensitiveElement, |
|
|
float |
GlobalTime, |
|
|
float |
WafeLength, |
|
|
CLHEP::HepRandomEngine * |
rndEngine |
|
) |
| |
|
private |
Definition at line 529 of file AFP_PileUpTool.cxx.
531 ATH_MSG_DEBUG (
" iterating Pmt " << Station <<
" " <<
Detector <<
" " << SensitiveElement <<
" " << GlobalTime <<
" " << WaveLength );
533 if ( Station >3 || Station < 0 || Detector >49 ||
Detector < 10 || (SensitiveElement-1)/2>1 || (SensitiveElement-1)/2<0) {
534 ATH_MSG_ERROR (
"Wrong station, detector or sensitive detector id" );
543 if (train<0 or train >3 or bar<0 or bar>3){
544 ATH_MSG_ERROR (
"Wrong train or bar; allowed values are 0-3, actual values "<<train<<
", "<<
bar);
◆ fillSiDigiCollection() [1/2]
Definition at line 489 of file AFP_PileUpTool.cxx.
496 for (;
it != itend; ++
it) {
497 int Station =
it->m_nStationID;
499 int PixelRow =
it->m_nPixelRow;
500 int PixelCol =
it->m_nPixelCol;
501 float PreStepX =
it->m_fPreStepX;
502 float PreStepY =
it->m_fPreStepY;
503 float PreStepZ =
it->m_fPreStepZ;
504 float PostStepX =
it->m_fPostStepX;
505 float PostStepY =
it->m_fPostStepY;
506 float PostStepZ =
it->m_fPostStepZ;
507 float DepEnergy =
it->m_fEnergyDeposit;
509 createSiDigi(ctx, Station,
Detector, PixelRow, PixelCol, PreStepX, PreStepY, PreStepZ, PostStepX, PostStepY, PostStepZ, DepEnergy);
512 return StatusCode::SUCCESS;
◆ fillSiDigiCollection() [2/2]
Definition at line 460 of file AFP_PileUpTool.cxx.
469 int Station = (*it)->m_nStationID;
470 int Detector = (*it)->m_nDetectorID;
471 int PixelRow = (*it)->m_nPixelRow;
472 int PixelCol = (*it)->m_nPixelCol;
473 float PreStepX = (*it)->m_fPreStepX;
474 float PreStepY = (*it)->m_fPreStepY;
475 float PreStepZ = (*it)->m_fPreStepZ;
476 float PostStepX = (*it)->m_fPostStepX;
477 float PostStepY = (*it)->m_fPostStepY;
478 float PostStepZ = (*it)->m_fPostStepZ;
479 float DepEnergy = (*it)->m_fEnergyDeposit;
481 createSiDigi(ctx, Station,
Detector, PixelRow, PixelCol, PreStepX, PreStepY, PreStepZ, PostStepX, PostStepY, PostStepZ, DepEnergy);
485 return StatusCode::SUCCESS;
◆ fillTDDigiCollection() [1/2]
StatusCode AFP_PileUpTool::fillTDDigiCollection |
( |
AFP_TDSimHitCollection & |
AFP_TDSimHitColl, |
|
|
CLHEP::HepRandomEngine * |
rndEngine, |
|
|
const EventContext & |
ctx |
|
) |
| |
|
private |
Definition at line 437 of file AFP_PileUpTool.cxx.
444 for (;
it != itend; ++
it) {
445 int Station =
it->m_nStationID;
447 int SensitiveElement =
it->m_nSensitiveElementID;
448 float GlobalTime =
it->m_fGlobalTime;
449 float WaveLength =
it->m_fWaveLength;
451 if(SensitiveElement%2 == 1)
createTDDigi(Station,
Detector, SensitiveElement, GlobalTime, WaveLength, rndEngine);
456 return StatusCode::SUCCESS;
◆ fillTDDigiCollection() [2/2]
Definition at line 413 of file AFP_PileUpTool.cxx.
422 int Station = (*it)->m_nStationID;
423 int Detector = (*it)->m_nDetectorID;
424 int SensitiveElement = (*it)->m_nSensitiveElementID;
425 float GlobalTime = (*it)->m_fGlobalTime;
426 float WaveLength = (*it)->m_fWaveLength;
428 if(SensitiveElement%2 == 1)
createTDDigi(Station,
Detector, SensitiveElement, GlobalTime, WaveLength, rndEngine);
433 return StatusCode::SUCCESS;
◆ filterPassed()
virtual bool PileUpToolBase::filterPassed |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ finalize()
StatusCode AFP_PileUpTool::finalize |
( |
| ) |
|
|
finaloverridevirtual |
◆ generateSiCCE()
double AFP_PileUpTool::generateSiCCE |
( |
CLHEP::HepRandomEngine * |
rndEngine | ) |
const |
|
private |
◆ generateSiNoise()
double AFP_PileUpTool::generateSiNoise |
( |
CLHEP::HepRandomEngine * |
rndEngine | ) |
const |
|
inlineprivate |
◆ getADC()
double AFP_PileUpTool::getADC |
( |
const TH1F & |
hSignal, |
|
|
const double |
threshold |
|
) |
| const |
|
private |
Returns the ADC determined from the signal shape passed as an (1st) argument; 2nd arg is peak value.
Definition at line 574 of file AFP_PileUpTool.cxx.
578 while( hSignal.GetBinContent(++last) >
threshold && last < hSignal.GetNbinsX() );
◆ getQE()
double AFP_PileUpTool::getQE |
( |
double |
lambda | ) |
const |
|
private |
Provides quantum efficiency for given wavelength (in nm)
Definition at line 723 of file AFP_PileUpTool.cxx.
725 int id = (
static_cast<int>(lambda)-200)/5;
726 if(
id > 81 ||
id < 0)
return 0;
◆ getTDC()
double AFP_PileUpTool::getTDC |
( |
const TH1F & |
hSignal | ) |
const |
|
private |
Returns the TDC determined from the signal shape passed as an argument.
Definition at line 555 of file AFP_PileUpTool.cxx.
558 TH1F hSignal_delayed(hSignal);
559 for(
int l = hSignal.GetNbinsX();
l>0;
l-- ){
560 double val =
l > nBinsDelay ? hSignal.GetBinContent(
l-nBinsDelay) : 0;
561 hSignal_delayed.SetBinContent(
l,
val);
563 TH1F hSignal_forTDC(hSignal);
564 hSignal_forTDC.Add(&hSignal, &hSignal_delayed, -
m_CfdThr, 1);
566 const int bin = hSignal_forTDC.FindFirstBinAbove(0);
567 double TDC = hSignal_forTDC.GetBinCenter(
bin );
568 if(
bin-1 <= nBinsDelay )
◆ initialize()
StatusCode AFP_PileUpTool::initialize |
( |
| ) |
|
|
finaloverridevirtual |
Reimplemented from PileUpToolBase.
Definition at line 29 of file AFP_PileUpTool.cxx.
41 for(
int i=0;
i<4; ++
i){
42 for(
int j=0; j<4; ++j){
43 for(
int k=0;
k<4; ++
k){
51 for(
int i=0;
i<16; ++
i)
63 for(
int i=0;
i<4;
i++) {
64 for(
int j=0; j<4; j++) {
65 for(
int k=0;
k<4;
k++) {
87 return StatusCode::FAILURE;
91 return StatusCode::FAILURE;
118 return StatusCode::SUCCESS;
◆ isPhotoelectronInduced()
bool AFP_PileUpTool::isPhotoelectronInduced |
( |
double |
lambda, |
|
|
CLHEP::HepRandomEngine * |
rndEngine |
|
) |
| const |
|
private |
Returns random response if the photon of given wavelegth induces the photoelectron.
Definition at line 516 of file AFP_PileUpTool.cxx.
518 double qEff =
getQE( lambda );
519 return CLHEP::RandFlat::shoot(rndEngine, 0.0, 1.0) < qEff*
m_CollectionEff;
◆ mergeEvent()
StatusCode AFP_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 376 of file AFP_PileUpTool.cxx.
380 CLHEP::HepRandomEngine* rngEngine = rngWrapper->
getEngine(ctx);
391 return StatusCode::SUCCESS;
◆ newXAODHitSi()
Method that creates a new AFPSiHit and sets it valus according to #digi collection.
Definition at line 165 of file AFP_PileUpTool.cxx.
170 for (;
it != itend; ++
it) {
171 auto * xAODSiHit = siHitContainer->
push_back(std::make_unique<xAOD::AFPSiHit>());
173 xAODSiHit->setStationID(
it->m_nStationID);
174 xAODSiHit->setPixelLayerID(
it->m_nDetectorID);
175 xAODSiHit->setPixelColIDChip(80-
it->m_nPixelRow);
176 xAODSiHit->setPixelRowIDChip(336-
it->m_nPixelCol);
177 xAODSiHit->setDepositedCharge(
it->m_fADC );
180 xAODSiHit->setTimeOverThreshold(
tot );
◆ newXAODHitToF()
Method that creates a new AFPToFHit and sets it valus according to #digi collection.
Definition at line 202 of file AFP_PileUpTool.cxx.
207 for (;
it != itend; ++
it) {
208 auto * xAODToFHit = tofHitContainer->
push_back(std::make_unique<xAOD::AFPToFHit>());
209 xAODToFHit->setStationID(
it->m_nStationID);
210 xAODToFHit->setHptdcChannel(-1);
211 xAODToFHit->setBarInTrainID(
it->m_nDetectorID%10-1);
212 xAODToFHit->setTrainID(
it->m_nDetectorID/10-1);
213 xAODToFHit->setHptdcID(-1);
214 xAODToFHit->setPulseLength(
it->m_fADC);
215 xAODToFHit->setTime(
it->m_fTDC);
◆ prepareEvent()
StatusCode AFP_PileUpTool::prepareEvent |
( |
const EventContext & |
ctx, |
|
|
const unsigned int |
nInputEvents |
|
) |
| |
|
finaloverridevirtual |
called before the subevts loop. Not (necessarily) able to access SubEvents
Definition at line 316 of file AFP_PileUpTool.cxx.
318 ATH_MSG_DEBUG (
"AFP_PileUpTool::prepareEvent() called for " << nInputEvents <<
" input events" );
326 return StatusCode::SUCCESS;
◆ processAllSubEvents() [1/2]
StatusCode AFP_PileUpTool::processAllSubEvents |
( |
const EventContext & |
ctx | ) |
|
|
finaloverridevirtual |
Reimplemented from PileUpToolBase.
Definition at line 220 of file AFP_PileUpTool.cxx.
232 if (!hitCollection.isValid()) {
233 ATH_MSG_ERROR(
"Could not get AFP_TDSimHitCollection container " << hitCollection.name() <<
" from store " << hitCollection.store());
234 return StatusCode::FAILURE;
239 thpcAFP_TDPmt.
insert(0, hitCollection.cptr());
240 ATH_MSG_DEBUG(
"AFP_TDSimHitCollection found with " << hitCollection->size() <<
" hits");
243 TimedTDSimHitCollList TDSimHitCollList;
244 unsigned int numberOfTDSimHits{0};
247 return StatusCode::FAILURE;
254 while (iColl != endColl) {
256 thpcAFP_TDPmt.
insert(iColl->first, tmpColl);
257 ATH_MSG_DEBUG (
" AFP_TDSimHitCollection found with " << tmpColl->size() <<
" hits " << iColl->first );
264 if (!hitCollection.isValid()) {
265 ATH_MSG_ERROR(
"Could not get AFP_SIDSimHitCollection container " << hitCollection.name() <<
" from store " << hitCollection.store());
266 return StatusCode::FAILURE;
271 thpcAFP_SiPmt.
insert(0, hitCollection.cptr());
272 ATH_MSG_DEBUG(
"AFP_SIDSimHitCollection found with " << hitCollection->size() <<
" hits");
275 TimedSIDSimHitCollList SIDSimHitCollList;
276 unsigned int numberOfSIDSimHits{0};
279 return StatusCode::FAILURE;
286 while (iSiColl != endSiColl) {
288 thpcAFP_SiPmt.
insert(iSiColl->first, tmpSiColl);
289 ATH_MSG_DEBUG (
" AFP_SIDSimHitCollection found with " << tmpSiColl->size() <<
" hits " << iSiColl->first );
296 CLHEP::HepRandomEngine* rngEngine = rngWrapper->
getEngine(ctx);
298 std::unique_ptr<AFP_TDDigiCollection> digitCollection = std::make_unique<AFP_TDDigiCollection>();
299 std::unique_ptr<AFP_SiDigiCollection> siDigiCollection = std::make_unique<AFP_SiDigiCollection>();
307 ATH_CHECK( digitWriteHandle.record(std::move(digitCollection)) );
310 ATH_CHECK( siDigiWriteHandle.record(std::move(siDigiCollection)) );
312 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 330 of file AFP_PileUpTool.cxx.
332 ATH_MSG_DEBUG (
"AFP_PileUpTool::processBunchXing() " << bunchXing );
334 for (; iEvt!=eSubEvents; ++iEvt) {
337 <<
" bunch crossing : " << bunchXing
338 <<
" time offset : " << iEvt->time()
339 <<
" event number : " << iEvt->ptr()->eventNumber()
340 <<
" run number : " << iEvt->ptr()->runNumber()
346 ATH_MSG_ERROR (
"SubEvent AFP_TDSimHitCollection not found in StoreGate " << seStore.name() );
347 return StatusCode::FAILURE;
350 ATH_MSG_DEBUG (
"AFP_TDSimHitCollection found with " << tmpColl->
size() <<
" hits" );
360 ATH_MSG_ERROR (
"SubEvent AFP_SIDSimHitCollection not found in StoreGate " << seStore.name() );
361 return StatusCode::FAILURE;
364 ATH_MSG_DEBUG (
"AFP_TDSimHitCollection found with " << tmpSiColl->
size() <<
" hits" );
372 return StatusCode::SUCCESS;
◆ recoAll()
◆ recoSiHits()
StatusCode AFP_PileUpTool::recoSiHits |
( |
const EventContext & |
ctx, |
|
|
std::unique_ptr< AFP_SiDigiCollection > & |
siDigiCollection |
|
) |
| const |
Creates xAOD for silicon detector.
Definition at line 131 of file AFP_PileUpTool.cxx.
133 auto afpSiHits=std::make_unique<xAOD::AFPSiHitContainer>();
134 auto afpSiHitsAux=std::make_unique<xAOD::AFPSiHitAuxContainer>();
135 afpSiHits->setStore(afpSiHitsAux.get());
139 ATH_MSG_DEBUG(
"AFP_PileUpTool: after newXAODHitSi, simulated digi container size = "<<siDigiCollection->
size()<<
", got afpSiHits with size "<<afpSiHits->size());
142 ATH_CHECK( siHitContainer.record(std::move(afpSiHits), std::move(afpSiHitsAux)) );
144 return StatusCode::SUCCESS;
◆ recoToFHits()
StatusCode AFP_PileUpTool::recoToFHits |
( |
const EventContext & |
ctx, |
|
|
std::unique_ptr< AFP_TDDigiCollection > & |
digitCollection |
|
) |
| const |
Creates xAOD for time-of-flight detector.
Definition at line 185 of file AFP_PileUpTool.cxx.
187 auto afpToFHits=std::make_unique<xAOD::AFPToFHitContainer>();
188 auto afpToFHitsAux=std::make_unique<xAOD::AFPToFHitAuxContainer>();
189 afpToFHits->setStore(afpToFHitsAux.get());
193 ATH_MSG_DEBUG(
"AFP_PileUpTool: after recoToFHits, simulated TD digi container size = "<<digitCollection->
size()<<
", got afpToFHits with size "<<afpToFHits->size());
196 ATH_CHECK(ToFHitsContainer.record(std::move(afpToFHits),std::move(afpToFHitsAux)));
198 return StatusCode::SUCCESS;
◆ resetFilter()
virtual void PileUpToolBase::resetFilter |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ resetSignalHistograms()
void AFP_PileUpTool::resetSignalHistograms |
( |
| ) |
|
|
private |
Invokes Reset() on all m_SignalHist objects.
Definition at line 401 of file AFP_PileUpTool.cxx.
403 for(
int i=0;
i<4;
i++) {
404 for(
int j=0; j<4; j++) {
405 for(
int k=0;
k<4;
k++) {
◆ setupQuantumEff()
void AFP_PileUpTool::setupQuantumEff |
( |
| ) |
|
|
private |
◆ setupTDCOffsets()
void AFP_PileUpTool::setupTDCOffsets |
( |
| ) |
|
|
private |
◆ SignalFun()
double AFP_PileUpTool::SignalFun |
( |
double |
Time, |
|
|
double |
RiseTime, |
|
|
double |
FallTime, |
|
|
double |
offset = 0.0 |
|
) |
| const |
|
private |
Definition at line 731 of file AFP_PileUpTool.cxx.
735 if (
Time < 0)
return f;
736 double p = (FallTime-RiseTime*TMath::Log(1.+FallTime/RiseTime))/TMath::Log(10.);
737 f = TMath::Power(
Time/
p,RiseTime/
p)*TMath::Exp(-(
Time/
p));
738 f /= (TMath::Power(RiseTime/
p,RiseTime/
p)*TMath::Exp(-(RiseTime/
p)));
◆ StoreSiDigi()
StatusCode AFP_PileUpTool::StoreSiDigi |
( |
const EventContext & |
ctx, |
|
|
std::unique_ptr< AFP_SiDigiCollection > & |
siDigiCollection |
|
) |
| |
|
private |
Definition at line 662 of file AFP_PileUpTool.cxx.
666 CLHEP::HepRandomEngine* rngEngine = rngWrapper->
getEngine(ctx);
681 int station =
static_cast<int>(
index/(80*336*6));
682 int detector =
static_cast<int>((
index-station*80*336*6)/(80*336));
703 return StatusCode::SUCCESS;
◆ StoreTDDigi()
StatusCode AFP_PileUpTool::StoreTDDigi |
( |
const EventContext & |
ctx, |
|
|
std::unique_ptr< AFP_TDDigiCollection > & |
digitCollection |
|
) |
| const |
|
private |
Definition at line 584 of file AFP_PileUpTool.cxx.
586 for(
int i=0;
i<4;
i++) {
587 for(
int j=0; j<4; j++) {
588 for(
int k=0;
k<4;
k++){
591 const double peakVal = hSignal.GetBinContent( hSignal.GetMaximumBin() );
595 const double TDC =
getTDC( hSignal );
596 const double ADC =
getADC( hSignal, 0.5*peakVal );
611 return StatusCode::SUCCESS;
◆ toProcess()
virtual bool PileUpToolBase::toProcess |
( |
int |
bunchXing | ) |
const |
|
inlineoverridevirtualinherited |
◆ tot2charge()
int AFP_PileUpTool::tot2charge |
( |
int |
tot | ) |
const |
|
inlineprivate |
Function that converts discrete time-over-threshold to discrete charge.
Definition at line 159 of file AFP_PileUpTool.cxx.
◆ m_AFPHitsContainerNameToF
◆ m_AFPSiHitsContainerName
◆ m_ArrSize
const int AFP_PileUpTool::m_ArrSize |
|
private |
◆ m_CfdThr
Gaudi::Property<double> AFP_PileUpTool::m_CfdThr {this, "CfdThr", 0.5, "Constant fraction threshold"} |
|
private |
◆ m_CfSignalDelay
Gaudi::Property<double> AFP_PileUpTool::m_CfSignalDelay {this, "CfSignalDelay", 200., "Pulse delay for const. frac. discrimination"} |
|
private |
◆ m_ChargeVsTot_LUT
int AFP_PileUpTool::m_ChargeVsTot_LUT[16] |
|
private |
◆ m_CollectionEff
Gaudi::Property<double> AFP_PileUpTool::m_CollectionEff {this, "CollectionEff", 0.6, "Collection efficiency"} |
|
private |
◆ m_ConversionSpr
Gaudi::Property<double> AFP_PileUpTool::m_ConversionSpr {this, "ConversionSpr", 40.0, " Photon-Electron conversion spread in ps"} |
|
private |
◆ m_deposited_charge
std::vector<float> AFP_PileUpTool::m_deposited_charge |
|
private |
◆ m_deposited_energy
std::vector<float> AFP_PileUpTool::m_deposited_energy |
|
private |
◆ m_digitCollection
◆ m_FallTime
Gaudi::Property<double> AFP_PileUpTool::m_FallTime {this, "FallTime", 1200., "Pulse fall time in ps"} |
|
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_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_mergedSIDSimHitList
◆ m_mergedTDSimHitList
◆ m_mergeSvc
◆ m_onlyUseContainerName
BooleanProperty AFP_PileUpTool::m_onlyUseContainerName {this, "OnlyUseContainerName", true, "Don't use the ReadHandleKey directly. Just extract the container name from it."} |
|
private |
◆ m_QEffVer
◆ m_QuantumEff_PMT
double AFP_PileUpTool::m_QuantumEff_PMT[82] |
|
private |
◆ m_randomStreamName
Gaudi::Property<std::string> AFP_PileUpTool::m_randomStreamName {this, "RandomStreamName", "AFPRndEng", ""} |
|
private |
◆ m_randomSvc
◆ m_RiseTime
Gaudi::Property<double> AFP_PileUpTool::m_RiseTime {this, "RiseTime", 400., "Pulse rise time in ps"} |
|
private |
◆ m_SiDigiCollection
◆ m_SiDigiCollectionKey
◆ m_SIDSimHitCollectionKey
◆ m_SIDSimHitCollectionName
std::string AFP_PileUpTool::m_SIDSimHitCollectionName {""} |
|
private |
◆ m_SignalHist
TH1F AFP_PileUpTool::m_SignalHist[4][4][4] |
|
private |
array of histograms storing final signals in the PMTs
Definition at line 182 of file AFP_PileUpTool.h.
◆ m_SignalVect
std::vector<double> AFP_PileUpTool::m_SignalVect |
|
private |
vector with pre-calculated single signal from the photoelectron
Definition at line 179 of file AFP_PileUpTool.h.
◆ m_SiT_ChargeCollEff
Gaudi::Property<double> AFP_PileUpTool::m_SiT_ChargeCollEff {this, "SiT_ChargeCollEff", 0.55, "CCE, adjusted to describe data"} |
|
private |
◆ m_SiT_ChargeCollEffSigma
Gaudi::Property<double> AFP_PileUpTool::m_SiT_ChargeCollEffSigma {this, "SiT_ChargeCollEffSigma", 0.2, "sigma(CCE), adjusted to describe data"} |
|
private |
◆ m_SiT_Energy2ChargeFactor
Gaudi::Property<double> AFP_PileUpTool::m_SiT_Energy2ChargeFactor {this, "SiT_Energy2ChargeFactor", 1000000./3.6, "number of eh pairs per MeV"} |
|
private |
◆ m_SiT_NoiseMu
Gaudi::Property<double> AFP_PileUpTool::m_SiT_NoiseMu {this, "SiT_NoiseMu", 160., "unit = number of eh pairs"} |
|
private |
◆ m_SiT_NoiseSigma
Gaudi::Property<double> AFP_PileUpTool::m_SiT_NoiseSigma {this, "SiT_NoiseSigma", 10., "unit = number of eh pairs"} |
|
private |
◆ m_SiT_ToTThresholdForHit
Gaudi::Property<int> AFP_PileUpTool::m_SiT_ToTThresholdForHit {this, "SiT_ChargeThresholdForHit", 1, ""} |
|
private |
◆ m_TDC_offsets
double AFP_PileUpTool::m_TDC_offsets[4][4][4] |
|
private |
◆ m_TDDigiCollectionKey
◆ m_TDSimHitCollectionKey
◆ m_TDSimHitCollectionName
std::string AFP_PileUpTool::m_TDSimHitCollectionName {""} |
|
private |
◆ m_TimeOffset
Gaudi::Property<double> AFP_PileUpTool::m_TimeOffset {this, "TimeOffset", 104500., "Offset reflecting time that proton travels from IP to AFP"} |
|
private |
◆ m_TofSignalTimeRangeLength
Gaudi::Property<double> AFP_PileUpTool::m_TofSignalTimeRangeLength {this, "TofSignalTimeRangeLength", 4000., "in ps"} |
|
private |
◆ m_totToChargeTransfExpr
Gaudi::Property<std::string> AFP_PileUpTool::m_totToChargeTransfExpr {this, "TotToChargeTransfExpr", "1909 + x*363 + x*x*141", "Function that transforms time-over-threshold to charge"} |
|
private |
◆ m_totToChargeTransfName
Gaudi::Property<std::string> AFP_PileUpTool::m_totToChargeTransfName {this, "TotToChargeTransfName", "TotToChargeTransfFunction", "Name of the function that transforms time-over-threshold to charge"} |
|
private |
◆ m_totToChargeTransformation
TF1 AFP_PileUpTool::m_totToChargeTransformation |
|
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< AFP_SIDSimHit >::const_iterator AFP_SIDSimHitConstIter
#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
AtlasHitsVector< AFP_SIDSimHit > AFP_SIDSimHitCollection
CONT::const_iterator const_iterator
AtlasHitsVector< AFP_TDSimHit > AFP_TDSimHitCollection
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)
AtlasHitsVector< AFP_SiDigi >::const_iterator AFP_SiDigiConstIter
AtlasHitsVector< AFP_TDDigi >::const_iterator AFP_TDDigiConstIter
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.
int m_nSensitiveElementID
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
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
AtlasHitsVector< AFP_TDSimHit >::const_iterator AFP_TDSimHitConstIter
void push_back(const T &t)