1
0
Fork 0
mirror of https://github.com/gwm17/Mask.git synced 2024-11-22 18:28:51 -05:00

Fix a bug in SABRE where the detectors were tilted backwards. Cleanup some code

This commit is contained in:
Gordon McCann 2022-08-31 10:05:13 -04:00
parent 3565f7ae28
commit 96a9aef685
3 changed files with 2 additions and 9 deletions

View File

@ -221,8 +221,6 @@ void SabreArray::DrawDetectorSystem(const std::string& filename)
} }
} }
output<<"SABRE Geometry File -- Coordinates for Detectors"<<std::endl;
output<<"Edges: x y z"<<std::endl;
for(unsigned int i=0; i<ringxs.size(); i++) for(unsigned int i=0; i<ringxs.size(); i++)
output<<ringxs[i]<<" "<<ringys[i]<<" "<<ringzs[i]<<std::endl; output<<ringxs[i]<<" "<<ringys[i]<<" "<<ringzs[i]<<std::endl;
for(unsigned int i=0; i<wedgexs.size(); i++) for(unsigned int i=0; i<wedgexs.size(); i++)
@ -279,7 +277,6 @@ DetectorResult SabreArray::IsSabre(Mask::Nucleus& nucleus)
if(m_deadMap.IsDead(detector.GetDetectorID(), channel.first, 0) || m_deadMap.IsDead(detector.GetDetectorID(), channel.second, 1)) if(m_deadMap.IsDead(detector.GetDetectorID(), channel.first, 0) || m_deadMap.IsDead(detector.GetDetectorID(), channel.second, 1))
break; //dead channel check break; //dead channel check
observation.detectFlag = true;
observation.direction = detector.GetTrajectoryCoordinates(nucleus.vec4.Theta(), nucleus.vec4.Phi()); observation.direction = detector.GetTrajectoryCoordinates(nucleus.vec4.Theta(), nucleus.vec4.Phi());
thetaIncident = std::acos(observation.direction.Dot(detector.GetNormTilted())/(observation.direction.R())); thetaIncident = std::acos(observation.direction.Dot(detector.GetNormTilted())/(observation.direction.R()));
@ -293,6 +290,7 @@ DetectorResult SabreArray::IsSabre(Mask::Nucleus& nucleus)
observation.det_name = "SABRE"+std::to_string(detector.GetDetectorID()); observation.det_name = "SABRE"+std::to_string(detector.GetDetectorID());
observation.energy_deposited = m_detectorEloss.GetEnergyLossTotal(nucleus.Z, nucleus.A, ke, M_PI - thetaIncident); observation.energy_deposited = m_detectorEloss.GetEnergyLossTotal(nucleus.Z, nucleus.A, ke, M_PI - thetaIncident);
observation.detectFlag = true;
return observation; return observation;
} }

View File

@ -32,7 +32,7 @@ private:
bool m_degradedDetectors[5]; bool m_degradedDetectors[5];
//Sabre constants //Sabre constants
static constexpr double s_tilt = 40.0; static constexpr double s_tilt = -40.0;
static constexpr double s_zOffset = -0.1245; static constexpr double s_zOffset = -0.1245;
static constexpr int s_nDets = 5; static constexpr int s_nDets = 5;
static constexpr double s_centerPhiList[s_nDets] = {306.0, 18.0, 234.0, 162.0, 90.0}; static constexpr double s_centerPhiList[s_nDets] = {306.0, 18.0, 234.0, 162.0, 90.0};

View File

@ -13,11 +13,6 @@ static double FullPhi(double phi)
RootPlotter::RootPlotter() RootPlotter::RootPlotter()
{ {
TH1::AddDirectory(kFALSE); TH1::AddDirectory(kFALSE);
//Enforce dictionary linking
if(Mask::EnforceDictionaryLinked())
{
std::cout<<"Dictionary Linked"<<std::endl;
}
} }
RootPlotter::~RootPlotter() {} RootPlotter::~RootPlotter() {}