Skip to content
Snippets Groups Projects
Commit 35783987 authored by Cyril Lenain's avatar Cyril Lenain :surfer_tone3:
Browse files

Fixing errors in TMinosPhysics

parent f9c35338
No related branches found
No related tags found
No related merge requests found
Pipeline #45351 passed
...@@ -72,7 +72,7 @@ void TMinosPhysics::AddDetector(double R, double Theta, double Phi, string shape ...@@ -72,7 +72,7 @@ void TMinosPhysics::AddDetector(double R, double Theta, double Phi, string shape
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
void TMinosPhysics::BuildSimplePhysicalEvent() { void TMinosPhysics::BuildSimplePhysicalEvent() {
BuildPhysicalEvent(); /* BuildPhysicalEvent(); */
} }
...@@ -80,50 +80,50 @@ void TMinosPhysics::BuildSimplePhysicalEvent() { ...@@ -80,50 +80,50 @@ void TMinosPhysics::BuildSimplePhysicalEvent() {
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
void TMinosPhysics::BuildPhysicalEvent() { void TMinosPhysics::BuildPhysicalEvent() {
// apply thresholds and calibration // apply thresholds and calibration
PreTreat(); /* PreTreat(); */
// match energy and time together // match energy and time together
unsigned int mysizeE = m_PreTreatedData->GetMultEnergy(); /* unsigned int mysizeE = m_PreTreatedData->GetMultEnergy(); */
unsigned int mysizeT = m_PreTreatedData->GetMultTime(); /* unsigned int mysizeT = m_PreTreatedData->GetMultTime(); */
for (UShort_t e = 0; e < mysizeE ; e++) { /* for (UShort_t e = 0; e < mysizeE ; e++) { */
for (UShort_t t = 0; t < mysizeT ; t++) { /* for (UShort_t t = 0; t < mysizeT ; t++) { */
if (m_PreTreatedData->GetE_DetectorNbr(e) == m_PreTreatedData->GetT_DetectorNbr(t)) { /* if (m_PreTreatedData->GetE_DetectorNbr(e) == m_PreTreatedData->GetT_DetectorNbr(t)) { */
DetectorNumber.push_back(m_PreTreatedData->GetE_DetectorNbr(e)); /* DetectorNumber.push_back(m_PreTreatedData->GetE_DetectorNbr(e)); */
Energy.push_back(m_PreTreatedData->Get_Energy(e)); /* Energy.push_back(m_PreTreatedData->Get_Energy(e)); */
Time.push_back(m_PreTreatedData->Get_Time(t)); /* Time.push_back(m_PreTreatedData->Get_Time(t)); */
} /* } */
} /* } */
} /* } */
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
void TMinosPhysics::PreTreat() { void TMinosPhysics::PreTreat() {
// This method typically applies thresholds and calibrations /* // This method typically applies thresholds and calibrations */
// Might test for disabled channels for more complex detector /* // Might test for disabled channels for more complex detector */
// clear pre-treated object /* // clear pre-treated object */
ClearPreTreatedData(); /* ClearPreTreatedData(); */
// instantiate CalibrationManager /* // instantiate CalibrationManager */
static CalibrationManager* Cal = CalibrationManager::getInstance(); /* static CalibrationManager* Cal = CalibrationManager::getInstance(); */
// Energy /* // Energy */
unsigned int mysize = m_EventData->GetMultEnergy(); /* unsigned int mysize = m_EventData->GetMultEnergy(); */
for (UShort_t i = 0; i < mysize ; ++i) { /* for (UShort_t i = 0; i < mysize ; ++i) { */
if (m_EventData->Get_Energy(i) > m_E_RAW_Threshold) { /* if (m_EventData->Get_Energy(i) > m_E_RAW_Threshold) { */
Double_t Energy = Cal->ApplyCalibration("Minos/ENERGY"+NPL::itoa(m_EventData->GetE_DetectorNbr(i)),m_EventData->Get_Energy(i)); /* Double_t Energy = Cal->ApplyCalibration("Minos/ENERGY"+NPL::itoa(m_EventData->GetE_DetectorNbr(i)),m_EventData->Get_Energy(i)); */
if (Energy > m_E_Threshold) { /* if (Energy > m_E_Threshold) { */
m_PreTreatedData->SetEnergy(m_EventData->GetE_DetectorNbr(i), Energy); /* m_PreTreatedData->SetEnergy(m_EventData->GetE_DetectorNbr(i), Energy); */
} /* } */
} /* } */
} /* } */
// Time /* // Time */
mysize = m_EventData->GetMultTime(); /* mysize = m_EventData->GetMultTime(); */
for (UShort_t i = 0; i < mysize; ++i) { /* for (UShort_t i = 0; i < mysize; ++i) { */
Double_t Time= Cal->ApplyCalibration("Minos/TIME"+NPL::itoa(m_EventData->GetT_DetectorNbr(i)),m_EventData->Get_Time(i)); /* Double_t Time= Cal->ApplyCalibration("Minos/TIME"+NPL::itoa(m_EventData->GetT_DetectorNbr(i)),m_EventData->Get_Time(i)); */
m_PreTreatedData->SetTime(m_EventData->GetT_DetectorNbr(i), Time); /* m_PreTreatedData->SetTime(m_EventData->GetT_DetectorNbr(i), Time); */
} /* } */
} }
......
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