Skip to content
Snippets Groups Projects
Commit 970bfcd4 authored by Duc Ta's avatar Duc Ta
Browse files

Merge branch '23.0-ZDC_GeoM-ZDC_Simudigitization-Bugfix' into '23.0'

Bugfix for ZDC_GeoM and ZDC_SimuDigitization

See merge request !68352
parents 334bfe52 ff6ef4ef
No related branches found
No related tags found
No related merge requests found
......@@ -200,7 +200,9 @@ void ZDC_DetFactory::buildMaterials(StoredMaterialManager *materialManager){
// Absorption length index of fused silica derrived from
// https://www.heraeus.com/media/media/hca/doc_hca/products_and_solutions_8/optics/Data_and_Properties_Optics_fused_silica_EN.pdf
double silica_ABSL[nEntries] = {302.163 * cm};
double silica_ABSL[nEntries];
for(int i=0; i<nEntries-2; ++i)
silica_ABSL[i] = 302.163 * cm;
silica_ABSL[nEntries - 1] = silica_ABSL[nEntries - 2] = 204.542 * cm;
GeoMaterialPropertiesTable *silicaCoreMPT = new GeoMaterialPropertiesTable();
......
......@@ -162,7 +162,7 @@ StatusCode ZDC_PileUpTool::processAllSubEvents(const EventContext& ctx){
for (int iside : {-1, 1}){
xAOD::ZdcModule* new_sum = new xAOD::ZdcModule();
sumsContainer->push_back(xAOD::ZdcModuleContainer::unique_type(new_sum));
new_sum->setZdcSide((iside==0) ? -1 : 1);
new_sum->setZdcSide(iside);
new_sum->auxdata<uint16_t>("LucrodTriggerSideAmp") = 42;
}
......@@ -323,7 +323,7 @@ TimedHitCollection<ZDC_SimFiberHit> ZDC_PileUpTool::doZDClightGuideCuts(const ZD
//The module hasn't been seen yet, create a new hit with values modified by the efficiency factor
//The ID is modified because we initially used channel to denote the position of the rods for these efficiency cuts
//Now that that's done, we make sure the type is SINGLECHANNEL and the channel is 0
newHits[side][module] = new ZDC_SimFiberHit( m_ZdcID->channel_id(side, module, ZdcIDType::SINGLECHANNEL, 0), efficiency*hit.getNPhotons(), efficiency*hit.getEdep());
newHits[side][module] = new ZDC_SimFiberHit(m_ZdcID->channel_id(m_ZdcID->side(id), module, ZdcIDType::SINGLECHANNEL, 0), efficiency * hit.getNPhotons(), efficiency * hit.getEdep());
}else{
//The module has been seen, add the photons and energy from this new hit to it
newHits[side][module]->Add( efficiency*hit.getNPhotons(), efficiency*hit.getEdep());
......@@ -378,7 +378,7 @@ void ZDC_PileUpTool::createAndStoreWaveform(const ZDC_SimFiberHit &hit, CLHEP::H
std::shared_ptr<ZDCWaveformSampler> wfSampler;
if(module < 4){//It's a ZDC channel
amplitude = CLHEP::RandPoissonQ::shoot(rndEngine, hit.getNPhotons()*m_zdcAdcPerPhoton);
amplitude = CLHEP::RandPoissonQ::shoot(rndEngine, hit.getNPhotons())*m_zdcAdcPerPhoton;
if(m_LTQuadStepFilt){
waveformPtr = std::make_shared<ZDCWaveformLTLinStep>("zdc",m_qsfRiseTime,m_qsfFallTime,m_qsfFilter);
......@@ -389,7 +389,7 @@ void ZDC_PileUpTool::createAndStoreWaveform(const ZDC_SimFiberHit &hit, CLHEP::H
t0 = m_zdct0;
}else{ //It's an RPD channel
amplitude = CLHEP::RandPoissonQ::shoot(rndEngine, hit.getNPhotons()*m_rpdAdcPerPhoton);
amplitude = CLHEP::RandPoissonQ::shoot(rndEngine, hit.getNPhotons())*m_rpdAdcPerPhoton;
waveformPtr = std::make_shared<ZDCWaveformFermiExp>("rpd",m_rpdRiseTime,m_rpdFallTime);
wfSampler = std::make_shared<ZDCWaveformSampler>(m_freqMHz, 0, m_numTimeBins, 12, m_Pedestal, waveformPtr);
t0 = m_rpdt0;
......
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