Skip to content
Snippets Groups Projects
Commit 59093353 authored by Alexander Kiselev's avatar Alexander Kiselev
Browse files

Bug fix in ERich_geo.cpp (wrong aerogel radiator)

parent fb83b41a
Branches
No related tags found
No related merge requests found
Pipeline #22490 failed
......@@ -17,7 +17,7 @@
using namespace dd4hep;
#define _SECOND_AEROGEL_LAYER_
//#define _SECOND_AEROGEL_LAYER_
// create the detector
static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetector sens) {
......@@ -184,7 +184,7 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec
// solid and volume: create aerogel and filter sectors
Tube aerogelSolid(radiatorRmin, radiatorRmax, aerogelThickness/2, -radiatorPhiw/2.0, radiatorPhiw/2.0);
Tube filterSolid( radiatorRmin, radiatorRmax, filterThickness/2, -radiatorPhiw/2.0, radiatorPhiw/2.0);
Volume aerogelVol( detName+"_aerogel_"+secName, aerogelSolid, gasvolMat);//aerogelMat );
Volume aerogelVol( detName+"_aerogel_"+secName, aerogelSolid, aerogelMat );
Volume filterVol( detName+"_filter_"+secName, filterSolid, filterMat );
aerogelVol.setVisAttributes(aerogelVis);
filterVol.setVisAttributes(filterVis);
......
......@@ -31,13 +31,13 @@ int main(int argc, char** argv)
auto gas = detector->Radiators()[0];
auto aerogel1 = detector->Radiators()[1];
auto acrylic = detector->Radiators()[2];
auto aerogel3 = detector->Radiators()[3];
//auto aerogel3 = detector->Radiators()[3];
// Assume the reference value was close enough in ERich_geo.cpp; since QE was not accounted,
// this may not be true;
gas ->m_AverageRefractiveIndex = gas ->n();
aerogel1->m_AverageRefractiveIndex = aerogel1->n();
acrylic ->m_AverageRefractiveIndex = acrylic ->n();
aerogel3->m_AverageRefractiveIndex = aerogel3->n();
//aerogel3->m_AverageRefractiveIndex = aerogel3->n();
// TTree interface variable;
auto event = new CherenkovEvent();
......@@ -63,10 +63,10 @@ int main(int argc, char** argv)
auto particle = new ChargedParticle(track.pdgID);
event->AddChargedParticle(particle);
for(unsigned irad=1; irad<2; irad++) {
for(unsigned irad=0; irad<1; irad++) {
auto history = new RadiatorHistory();
// FIXME: yes, for now assume all the photons were produced in aerogel;
particle->StartRadiatorHistory(std::make_pair(irad ? aerogel3 : aerogel1, history));
particle->StartRadiatorHistory(std::make_pair(/*irad ? aerogel3 :*/ aerogel1, history));
//particle->StartRadiatorHistory(std::make_pair(gas, history));
{
// FIXME: need it not at vertex, but in the radiator; as coded here, this can
......@@ -88,6 +88,7 @@ int main(int argc, char** argv)
}
for(auto hit: *hits) {
//printf("New hit!\n");
// FIXME: yes, use MC truth here; not really needed I guess;
if (hit.g4ID != track.ID) continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment