diff --git a/Inputs/DetectorConfiguration/Riken_65mm.detector b/Inputs/DetectorConfiguration/Riken_65mm.detector index 5021536af1898b108b5a6171570a96c956b8ba12..bfd2434e8dcd00f542919d78dbd698ebb13e607b 100644 --- a/Inputs/DetectorConfiguration/Riken_65mm.detector +++ b/Inputs/DetectorConfiguration/Riken_65mm.detector @@ -5,17 +5,17 @@ %Material name according to the target library %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%GeneralTarget +GeneralTarget %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%Target -% THICKNESS= 0.001 -% RADIUS= 45 -% MATERIAL= CD2 -% ANGLE= 45 -% X= 0 -% Y= 0 -% Z= 0 -% +Target + THICKNESS= 0.001 + RADIUS= 45 + MATERIAL= CD2 + ANGLE= 45 + X= 0 + Y= 0 + Z= 0 + %%CryoTarget % THICKNESS= 3 % RADIUS= 45 diff --git a/NPLib/CalibrationManager/CalibrationManager.cxx b/NPLib/CalibrationManager/CalibrationManager.cxx index fa13a6686fad3271786bd3e4c32a42b7cad5aea4..aee072e45bf3e5bea5856a3e3d46b2533e246809 100644 --- a/NPLib/CalibrationManager/CalibrationManager.cxx +++ b/NPLib/CalibrationManager/CalibrationManager.cxx @@ -157,9 +157,8 @@ void CalibrationManager::LoadParameterFromFile() } ////////////////////////////////////////////////////////////////// -double CalibrationManager::ApplyCalibration(const string ParameterPath , const double RawValue) +double CalibrationManager::ApplyCalibration(const string& ParameterPath , const double& RawValue) { - double CalibratedValue = 0 ; map< string , vector<double> >::iterator it ; // Find the good parameter in the Map @@ -183,6 +182,7 @@ double CalibrationManager::ApplyCalibration(const string ParameterPath , const d // The vector size give the degree of calibration // We just apply the coeff and returned the calibrated value + double CalibratedValue = 0 ; for(unsigned int i = 0 ; i < Coeff.size() ; i++) { CalibratedValue += Coeff[i]*pow(RawValue, (double)i); diff --git a/NPLib/CalibrationManager/CalibrationManager.h b/NPLib/CalibrationManager/CalibrationManager.h index 5ea14d5e89a448d5f430e19507baee710d746be2..deb2c3c397cabaccc3a0b7856c12f4fca95dd44e 100644 --- a/NPLib/CalibrationManager/CalibrationManager.h +++ b/NPLib/CalibrationManager/CalibrationManager.h @@ -58,7 +58,7 @@ class CalibrationManager // call like : myCalibrationManager->ApplyCalibration( "MUST2/Telescope5_Si_X38_E" , RawEnergy ) // return the Calibrated value - double ApplyCalibration(const string ParameterPath , const double RawValue); + double ApplyCalibration(const string& ParameterPath , const double& RawValue); public: // To be called after initialisation diff --git a/NPLib/MUST2/TMust2Physics.cxx b/NPLib/MUST2/TMust2Physics.cxx index 755c5e5458c09701134b698cf377749e8541dee9..590f1e09f79489e30f0deb92a4c915b542515326 100644 --- a/NPLib/MUST2/TMust2Physics.cxx +++ b/NPLib/MUST2/TMust2Physics.cxx @@ -69,7 +69,7 @@ TMust2Physics::TMust2Physics() m_SiLi_MatchingX.resize(16,0); m_SiLi_MatchingY.resize(16,0); - for(int i = 0 ; i < 16 ; i++) + for(int i = 0 ; i < 16 ; ++i) { m_SiLi_MatchingX[0]=112; m_SiLi_MatchingY[0]=112; @@ -123,7 +123,7 @@ TMust2Physics::TMust2Physics() m_CsI_Size=32; m_CsI_MatchingX.resize(16,0); m_CsI_MatchingY.resize(16,0); - for(int i = 0 ; i < 16 ; i++) + for(int i = 0 ; i < 16 ; ++i) { m_CsI_MatchingX[0]=112; m_CsI_MatchingY[0]=112; @@ -195,7 +195,7 @@ void TMust2Physics::BuildPhysicalEvent() { vector< TVector2 > couple = Match_X_Y() ; EventMultiplicity = couple.size(); - for(unsigned int i = 0 ; i < couple.size() ; i++) + for(unsigned int i = 0 ; i < couple.size() ; ++i) { check_SILI = false ; check_CSI = false ; @@ -211,7 +211,7 @@ void TMust2Physics::BuildPhysicalEvent() // Search for associate Time double Si_X_T = -1000 ; - for(unsigned int t = 0 ; t < m_PreTreatedData->GetMMStripXTMult() ; t++ ) + for(unsigned int t = 0 ; t < m_PreTreatedData->GetMMStripXTMult() ; ++t ) { if( m_PreTreatedData->GetMMStripXTStripNbr( couple[i].X() ) == m_PreTreatedData->GetMMStripXTStripNbr(t) ||m_PreTreatedData->GetMMStripXTDetectorNbr( couple[i].X() ) == m_PreTreatedData->GetMMStripXTDetectorNbr(t)) @@ -219,7 +219,7 @@ void TMust2Physics::BuildPhysicalEvent() } double Si_Y_T = -1000 ; - for(unsigned int t = 0 ; t < m_PreTreatedData->GetMMStripYTMult() ; t++ ) + for(unsigned int t = 0 ; t < m_PreTreatedData->GetMMStripYTMult() ; ++t ) { if( m_PreTreatedData->GetMMStripYTStripNbr( couple[i].Y() ) == m_PreTreatedData->GetMMStripYTStripNbr(t) ||m_PreTreatedData->GetMMStripYTDetectorNbr( couple[i].Y() ) == m_PreTreatedData->GetMMStripYTDetectorNbr(t)) @@ -241,7 +241,7 @@ void TMust2Physics::BuildPhysicalEvent() Si_EY.push_back(Si_Y_E); ; Si_TY.push_back(Si_Y_T); ; - for(unsigned int j = 0 ; j < m_PreTreatedData->GetMMSiLiEMult() ; j++) + for(unsigned int j = 0 ; j < m_PreTreatedData->GetMMSiLiEMult() ; ++j) { if(m_PreTreatedData->GetMMSiLiEDetectorNbr(j)==N) { @@ -253,7 +253,7 @@ void TMust2Physics::BuildPhysicalEvent() // Look for associate time // Note: in case of use of SiLi "Orsay" time is not coded. - for(int k =0 ; k < m_PreTreatedData->GetMMSiLiTMult() ; k ++) + for(int k =0 ; k < m_PreTreatedData->GetMMSiLiTMult() ; ++k) { // Same Pad, same Detector if( m_PreTreatedData->GetMMSiLiEPadNbr(j)==m_PreTreatedData->GetMMSiLiEPadNbr(k) && m_PreTreatedData->GetMMSiLiEDetectorNbr(j)==m_PreTreatedData->GetMMSiLiTDetectorNbr(k) ) @@ -267,7 +267,7 @@ void TMust2Physics::BuildPhysicalEvent() } } - for( int j = 0 ; j < m_PreTreatedData->GetMMCsIEMult() ; j++) + for( int j = 0 ; j < m_PreTreatedData->GetMMCsIEMult() ; ++j) { if(m_PreTreatedData->GetMMCsIEDetectorNbr(j)==N) @@ -278,7 +278,7 @@ void TMust2Physics::BuildPhysicalEvent() CsI_E.push_back( m_PreTreatedData->GetMMCsIEEnergy(j) ) ; // Look for associate Time - for(int k =0 ; k < m_PreTreatedData->GetMMCsITMult() ; k ++) + for(int k =0 ; k < m_PreTreatedData->GetMMCsITMult() ; ++k) { // Same Cristal; Same Detector if( m_PreTreatedData->GetMMCsIECristalNbr(j)==m_PreTreatedData->GetMMCsITCristalNbr(k) && m_PreTreatedData->GetMMCsIEDetectorNbr(j)==m_PreTreatedData->GetMMCsITDetectorNbr(k) ) @@ -320,7 +320,7 @@ void TMust2Physics::PreTreat() // X // E - for(int i = 0 ; i < m_EventData->GetMMStripXEMult() ; i++) + for(int i = 0 ; i < m_EventData->GetMMStripXEMult() ; ++i) { if( m_EventData->GetMMStripXEEnergy(i)>m_Si_X_E_RAW_Threshold && IsValidChannel("X", m_EventData->GetMMStripXEDetectorNbr(i), m_EventData->GetMMStripXEStripNbr(i)) ) { @@ -336,7 +336,7 @@ void TMust2Physics::PreTreat() } // T - for(int i = 0 ; i < m_EventData->GetMMStripXTMult() ; i++) + for(int i = 0 ; i < m_EventData->GetMMStripXTMult() ; ++i) { if(IsValidChannel("X", m_EventData->GetMMStripXTDetectorNbr(i), m_EventData->GetMMStripXTStripNbr(i))) { @@ -349,7 +349,7 @@ void TMust2Physics::PreTreat() // Y // E - for(int i = 0 ; i < m_EventData->GetMMStripYEMult() ; i++) + for(int i = 0 ; i < m_EventData->GetMMStripYEMult() ; ++i) { if( m_EventData->GetMMStripYEEnergy(i)<m_Si_Y_E_RAW_Threshold && IsValidChannel("Y", m_EventData->GetMMStripYEDetectorNbr(i), m_EventData->GetMMStripYEStripNbr(i))) { @@ -364,7 +364,7 @@ void TMust2Physics::PreTreat() } // T - for(int i = 0 ; i < m_EventData->GetMMStripYTMult() ; i++) + for(int i = 0 ; i < m_EventData->GetMMStripYTMult() ; ++i) { if(IsValidChannel("Y", m_EventData->GetMMStripYTDetectorNbr(i), m_EventData->GetMMStripYTStripNbr(i))) { @@ -377,7 +377,7 @@ void TMust2Physics::PreTreat() // CsI // E - for(int i = 0 ; i < m_EventData->GetMMCsIEMult() ; i++) + for(int i = 0 ; i < m_EventData->GetMMCsIEMult() ; ++i) { if( m_EventData->GetMMCsIEEnergy(i)>m_CsI_E_RAW_Threshold && IsValidChannel("CsI", m_EventData->GetMMCsIEDetectorNbr(i), m_EventData->GetMMCsIECristalNbr(i))) @@ -393,7 +393,7 @@ void TMust2Physics::PreTreat() } // T - for(int i = 0 ; i < m_EventData->GetMMCsITMult() ; i++) + for(int i = 0 ; i < m_EventData->GetMMCsITMult() ; ++i) { if(IsValidChannel("CsI", m_EventData->GetMMCsITDetectorNbr(i), m_EventData->GetMMCsITCristalNbr(i))) { @@ -406,7 +406,7 @@ void TMust2Physics::PreTreat() // SiLi // E - for(int i = 0 ; i < m_EventData->GetMMSiLiEMult() ; i++) + for(int i = 0 ; i < m_EventData->GetMMSiLiEMult() ; ++i) { if( m_EventData->GetMMSiLiEEnergy(i)>m_SiLi_E_RAW_Threshold && IsValidChannel("SiLi", m_EventData->GetMMSiLiEDetectorNbr(i), m_EventData->GetMMSiLiEPadNbr(i))) { @@ -421,7 +421,7 @@ void TMust2Physics::PreTreat() } // T - for(int i = 0 ; i < m_EventData->GetMMSiLiTMult() ; i++) + for(int i = 0 ; i < m_EventData->GetMMSiLiTMult() ; ++i) { if(IsValidChannel("SiLi", m_EventData->GetMMSiLiTDetectorNbr(i), m_EventData->GetMMSiLiTPadNbr(i))) { @@ -467,7 +467,7 @@ vector < TVector2 > TMust2Physics :: Match_X_Y() if( m_PreTreatedData->GetMMStripXEMult() > m_MaximumStripMultiplicityAllowed || m_PreTreatedData->GetMMStripYEMult() > m_MaximumStripMultiplicityAllowed ) return ArrayOfGoodCouple; - for(int i = 0 ; i < m_PreTreatedData->GetMMStripXEMult(); i++) + for(int i = 0 ; i < m_PreTreatedData->GetMMStripXEMult(); ++i) { for(int j = 0 ; j < m_PreTreatedData->GetMMStripYEMult(); j++) { @@ -487,7 +487,7 @@ vector < TVector2 > TMust2Physics :: Match_X_Y() if(m_Ignore_not_matching_CsI) { bool check_validity=false; - for (int hh = 0 ; hh<16 ; hh++ ) + for (int hh = 0 ; hh<16 ; ++hh ) { if( Match_Si_CsI(m_PreTreatedData->GetMMStripXEStripNbr(i), m_PreTreatedData->GetMMStripYEStripNbr(j) , hh+1) ) check_validity=true; @@ -501,7 +501,7 @@ vector < TVector2 > TMust2Physics :: Match_X_Y() if(m_Ignore_not_matching_SiLi) { bool check_validity=false; - for (int hh = 0 ; hh<16 ; hh++ ) + for (int hh = 0 ; hh<16 ; ++hh ) { if( Match_Si_SiLi(m_PreTreatedData->GetMMStripXEStripNbr(i), m_PreTreatedData->GetMMStripYEStripNbr(j) , hh+1) ) check_validity=true; @@ -528,19 +528,18 @@ vector < TVector2 > TMust2Physics :: Match_X_Y() //////////////////////////////////////////////////////////////////////////// bool TMust2Physics :: IsValidChannel(const string DetectorType, const int telescope , const int channel) { + if(DetectorType == "CsI") + return *(m_CsIChannelStatus[telescope].begin()+channel-1); - if(DetectorType == "X") + else if(DetectorType == "SiLi") + return *(m_SiLiChannelStatus[telescope].begin()+channel-1); + + else if(DetectorType == "X") return *(m_XChannelStatus[telescope].begin()+channel-1); else if(DetectorType == "Y") return *(m_YChannelStatus[telescope].begin()+channel-1); - else if(DetectorType == "SiLi") - return *(m_SiLiChannelStatus[telescope].begin()+channel-1); - - else if(DetectorType == "CsI") - return *(m_CsIChannelStatus[telescope].begin()+channel-1); - else return false; } @@ -818,7 +817,7 @@ void TMust2Physics::ReadCalibrationRun() { // X // E - for(int i = 0 ; i < m_EventData->GetMMStripXEMult();i++) + for(int i = 0 ; i < m_EventData->GetMMStripXEMult();++i) { TelescopeNumber_X.push_back(m_EventData->GetMMStripXEDetectorNbr(i)); Si_EX.push_back( fSi_X_E( m_EventData , i) ) ; @@ -826,7 +825,7 @@ void TMust2Physics::ReadCalibrationRun() } // T - for(int i = 0 ; i < m_EventData->GetMMStripXTMult();i++) + for(int i = 0 ; i < m_EventData->GetMMStripXTMult();++i) { TelescopeNumber_X.push_back(m_EventData->GetMMStripXTDetectorNbr(i)); Si_TX.push_back( fSi_X_T( m_EventData , i) ) ; @@ -836,7 +835,7 @@ void TMust2Physics::ReadCalibrationRun() // Y // E - for(int i = 0 ; i < m_EventData->GetMMStripYEMult();i++) + for(int i = 0 ; i < m_EventData->GetMMStripYEMult();++i) { TelescopeNumber_Y.push_back(m_EventData->GetMMStripYEDetectorNbr(i)); Si_EY.push_back( fSi_Y_E( m_EventData , i) ) ; @@ -846,7 +845,7 @@ void TMust2Physics::ReadCalibrationRun() } // T - for(int i = 0 ; i < m_EventData->GetMMStripYTMult();i++) + for(int i = 0 ; i < m_EventData->GetMMStripYTMult();++i) { TelescopeNumber_Y.push_back(m_EventData->GetMMStripYTDetectorNbr(i)); Si_TY.push_back( fSi_Y_T( m_EventData , i) ) ; @@ -855,7 +854,7 @@ void TMust2Physics::ReadCalibrationRun() } //CsI Energy - for( int j = 0 ; j < m_EventData->GetMMCsIEMult() ; j++) + for( int j = 0 ; j < m_EventData->GetMMCsIEMult() ; ++j) { CsI_N.push_back(m_EventData->GetMMCsIECristalNbr(j)) ; CsI_E.push_back(fCsI_E(m_EventData , j)) ; @@ -863,7 +862,7 @@ void TMust2Physics::ReadCalibrationRun() } //CsI Time - for( int j = 0 ; j < m_EventData->GetMMCsITMult() ; j++) + for( int j = 0 ; j < m_EventData->GetMMCsITMult() ; ++j) { //CsI_N.push_back(m_EventData->GetMMCsITCristalNbr(j)) ; CsI_T.push_back(fCsI_T(m_EventData , j)) ; @@ -1111,10 +1110,10 @@ void TMust2Physics::AddParameterToCalibrationManager() { CalibrationManager* Cal = CalibrationManager::getInstance(); - for(int i = 0 ; i < m_NumberOfTelescope ; i++) + for(int i = 0 ; i < m_NumberOfTelescope ; ++i) { - for( int j = 0 ; j < 128 ; j++) + for( int j = 0 ; j < 128 ; ++j) { Cal->AddParameter("MUST2", "T"+itoa(i+1)+"_Si_X"+itoa(j+1)+"_E","MUST2_T"+itoa(i+1)+"_Si_X"+itoa(j+1)+"_E") ; Cal->AddParameter("MUST2", "T"+itoa(i+1)+"_Si_Y"+itoa(j+1)+"_E","MUST2_T"+itoa(i+1)+"_Si_Y"+itoa(j+1)+"_E") ; @@ -1122,13 +1121,13 @@ void TMust2Physics::AddParameterToCalibrationManager() Cal->AddParameter("MUST2", "T"+itoa(i+1)+"_Si_Y"+itoa(j+1)+"_T","MUST2_T"+itoa(i+1)+"_Si_Y"+itoa(j+1)+"_T") ; } - for( int j = 0 ; j < 16 ; j++) + for( int j = 0 ; j < 16 ; ++j) { Cal->AddParameter("MUST2", "T"+itoa(i+1)+"_SiLi"+itoa(j+1)+"_E","MUST2_T"+itoa(i+1)+"_SiLi"+itoa(j+1)+"_E") ; Cal->AddParameter("MUST2", "T"+itoa(i+1)+"_SiLi"+itoa(j+1)+"_T","MUST2_T"+itoa(i+1)+"_SiLi"+itoa(j+1)+"_T") ; } - for( int j = 0 ; j < 16 ; j++) + for( int j = 0 ; j < 16 ; ++j) { Cal->AddParameter("MUST2", "T"+itoa(i+1)+"_CsI"+itoa(j+1)+"_E","MUST2_T"+itoa(i+1)+"_CsI"+itoa(j+1)+"_E") ; Cal->AddParameter("MUST2", "T"+itoa(i+1)+"_CsI"+itoa(j+1)+"_T","MUST2_T"+itoa(i+1)+"_CsI"+itoa(j+1)+"_T") ; @@ -1199,13 +1198,13 @@ void TMust2Physics::AddTelescope( TVector3 C_X1_Y1 , Strip_1_1 = C_X1_Y1 + (U+V) * (StripPitch/2.) ; Strip_1_1+= U*Ushift+V*Vshift ; - for( int i = 0 ; i < 128 ; i++ ) + for( int i = 0 ; i < 128 ; ++i ) { lineX.clear() ; lineY.clear() ; lineZ.clear() ; - for( int j = 0 ; j < 128 ; j++ ) + for( int j = 0 ; j < 128 ; ++j ) { StripCenter = Strip_1_1 + StripPitch*( i*U + j*V ) ; //StripCenter += -TargetPosition ; @@ -1236,14 +1235,14 @@ void TMust2Physics::InitializeStandardParameter() m_CsIChannelStatus.clear() ; ChannelStatus.resize(128,true); - for(int i = 0 ; i < m_NumberOfTelescope ; i ++) + for(int i = 0 ; i < m_NumberOfTelescope ; ++i) { m_XChannelStatus[i] = ChannelStatus; m_YChannelStatus[i] = ChannelStatus; } ChannelStatus.resize(16,true); - for(int i = 0 ; i < m_NumberOfTelescope ; i ++) + for(int i = 0 ; i < m_NumberOfTelescope ; ++i) { m_SiLiChannelStatus[i] = ChannelStatus; m_CsIChannelStatus[i] = ChannelStatus; @@ -1321,14 +1320,14 @@ void TMust2Physics::AddTelescope( double theta , C.SetY( C.Y() - ( Face/2 - StripPitch/2 ) * ( V.Y() + U.Y() ) ) ; C.SetZ( C.Z() - ( Face/2 - StripPitch/2 ) * ( V.Z() + U.Z() ) ) ; - for( int i = 0 ; i < 128 ; i++ ) + for( int i = 0 ; i < 128 ; ++i ) { lineX.clear() ; lineY.clear() ; lineZ.clear() ; - for( int j = 0 ; j < 128 ; j++ ) + for( int j = 0 ; j < 128 ; ++j ) { X = C.X() + StripPitch * ( U.X()*i + V.X()*j ) ; Y = C.Y() + StripPitch * ( U.Y()*i + V.Y()*j ) ; @@ -1406,7 +1405,6 @@ namespace MUST2_LOCAL { return CalibrationManager::getInstance()->ApplyCalibration( "MUST2/T" + itoa( m_EventData->GetMMStripXEDetectorNbr(i) ) + "_Si_X" + itoa( m_EventData->GetMMStripXEStripNbr(i) ) + "_E", m_EventData->GetMMStripXEEnergy(i) ); - } double fSi_X_T(const TMust2Data* m_EventData , const int i) diff --git a/NPLib/MUST2/TMust2Physics.h b/NPLib/MUST2/TMust2Physics.h index 5c109e669a8a4f732d1bd91775455ec0c7e001df..9f9569b4448967e14009e7efb135be8bd4767040 100644 --- a/NPLib/MUST2/TMust2Physics.h +++ b/NPLib/MUST2/TMust2Physics.h @@ -65,8 +65,8 @@ class TMust2Physics : public TObject, public NPA::VDetector vector<int> TelescopeNumber ; // Si - vector<double> Si_E ;//max of Si_EX and Si_EY - vector<double> Si_T ;//min of Si_TX and Si_TY + vector<double> Si_E ; + vector<double> Si_T ; vector<int> Si_X ; vector<int> Si_Y ; diff --git a/NPLib/SSSD/TSSSDPhysics.cxx b/NPLib/SSSD/TSSSDPhysics.cxx index 6768aeef16267df5474dc838911b6e56574c7b24..8c6197d565a696a255fa211c76b41009aacbda53 100644 --- a/NPLib/SSSD/TSSSDPhysics.cxx +++ b/NPLib/SSSD/TSSSDPhysics.cxx @@ -252,10 +252,10 @@ void TSSSDPhysics::AddParameterToCalibrationManager() { CalibrationManager* Cal = CalibrationManager::getInstance(); - for(int i = 0 ; i < NumberOfDetector ; i++) + for(int i = 0 ; i < NumberOfDetector ; ++i) { - for( int j = 0 ; j < 16 ; j++) + for( int j = 0 ; j < 16 ; ++j) { Cal->AddParameter("SSSD", "Detector"+itoa(i+1)+"_Strip"+itoa(j+1)+"_E","SSSD_DETECTOR_"+itoa(i+1)+"_STRIP_"+itoa(j+1)+"_E") ; Cal->AddParameter("SSSD", "Detector"+itoa(i+1)+"_Strip"+itoa(j+1)+"_T","SSSD_DETECTOR_"+itoa(i+1)+"_STRIP_"+itoa(j+1)+"_T") ; @@ -291,14 +291,14 @@ void TSSSDPhysics::BuildSimplePhysicalEvent() { PreTreat(); - for(unsigned int i = 0 ; i < PreTreatedData->GetEnergyMult() ; i++) + for(unsigned int i = 0 ; i < PreTreatedData->GetEnergyMult() ; ++i) { DetectorNumber .push_back( PreTreatedData->GetEnergyDetectorNbr(i) ) ; StripNumber .push_back( PreTreatedData->GetEnergyStripNbr(i) ) ; Energy .push_back( PreTreatedData->GetEnergy(i) ) ; // Look For associate Time - for(unsigned int j = 0 ; j < PreTreatedData->GetTimeMult() ; j ++ ) + for(unsigned int j = 0 ; j < PreTreatedData->GetTimeMult() ; ++j ) { if(PreTreatedData->GetEnergyDetectorNbr(i) == PreTreatedData->GetTimeDetectorNbr(j) && PreTreatedData->GetEnergyStripNbr(i)==PreTreatedData->GetTimeStripNbr(j)) Time.push_back(PreTreatedData->GetTime(j)); @@ -313,7 +313,7 @@ void TSSSDPhysics::PreTreat() ClearPreTreatedData(); // E - for(int i = 0 ; i < EventData->GetEnergyMult() ; i++) + for(int i = 0 ; i < EventData->GetEnergyMult() ; ++i) { if(EventData->GetEnergy(i) > m_Pedestal_Threshold && ChannelStatus[EventData->GetEnergyDetectorNbr(i)][EventData->GetEnergyStripNbr(i)]) { @@ -328,7 +328,7 @@ void TSSSDPhysics::PreTreat() } // T - for(int i = 0 ; i < EventData->GetTimeMult() ; i++) + for(int i = 0 ; i < EventData->GetTimeMult() ; ++i) { if(ChannelStatus[EventData->GetEnergyDetectorNbr(i)][EventData->GetEnergyStripNbr(i)]) { @@ -346,7 +346,7 @@ void TSSSDPhysics::InitializeStandardParameter() vector<bool> TempChannelStatus; ChannelStatus.clear(); TempChannelStatus.resize(16,true); - for(int i = 0 ; i < NumberOfDetector ; i ++) + for(int i = 0 ; i < NumberOfDetector ; ++i) ChannelStatus[i+1] = TempChannelStatus; } /////////////////////////////////////////////////////////////////////////// diff --git a/NPLib/VDetector/Makefile b/NPLib/VDetector/Makefile index 79cc114e76a8237121c82b2e242e45caab953e00..71a25a11f6ed6226a8631d9c2fd151eb4e181769 100644 --- a/NPLib/VDetector/Makefile +++ b/NPLib/VDetector/Makefile @@ -10,7 +10,7 @@ all: $(SHARELIB) ## VDetector ## libVDetector.so: VDetector.o $(LD) $(SOFLAGS) $^ $(OutPutOpt) $@ - + ## VDetector ## libDetectorManager.so: DetectorManager.o $(LD) $(SOFLAGS) $^ $(OutPutOpt) $@ diff --git a/NPSimulation/src/MUST2Array.cc b/NPSimulation/src/MUST2Array.cc index 321e478c5934f2b541960c892115d63cec1b3581..70ac9243977861603a9d7b37058007cbb55372a3 100644 --- a/NPSimulation/src/MUST2Array.cc +++ b/NPSimulation/src/MUST2Array.cc @@ -223,7 +223,7 @@ void MUST2Array::VolumeMaker(G4int TelescopeNumber , if (wSiLi) { G4double SiLiSpace = 8 * mm; - G4RotationMatrix* rotSiLi = new G4RotationMatrix(0,0,-90*deg); //Rotation(0., 0., 0.); + G4RotationMatrix* rotSiLi = new G4RotationMatrix(0,0,0); // G4Box* solidSiLi = new G4Box("SiLi", 0.5*SiLiFaceX, 0.5*SiLiFaceY, 0.5*SiLiThickness); @@ -373,27 +373,27 @@ void MUST2Array::VolumeMaker(G4int TelescopeNumber , // up - PVPBuffer = new G4PVPlacement(0 , positionSiLi_LT_up , logicSiLi_LT , Name + "_SiLi_Pad16" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_RT_up , logicSiLi_RT , Name + "_SiLi_Pad15" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_LC1_up , logicSiLi_LC1 , Name + "_SiLi_Pad14" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_RC1_up , logicSiLi_RC1 , Name + "_SiLi_Pad13" , logicSiLi , false , 0) ; + PVPBuffer = new G4PVPlacement(0 , positionSiLi_LT_up , logicSiLi_LT , Name + "_SiLi_Pad9" , logicSiLi , false , 0) ; + PVPBuffer = new G4PVPlacement(0 , positionSiLi_RT_up , logicSiLi_RT , Name + "_SiLi_Pad10" , logicSiLi , false , 0) ; + PVPBuffer = new G4PVPlacement(0 , positionSiLi_LC1_up , logicSiLi_LC1 , Name + "_SiLi_Pad11" , logicSiLi , false , 0) ; + PVPBuffer = new G4PVPlacement(0 , positionSiLi_RC1_up , logicSiLi_RC1 , Name + "_SiLi_Pad12" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_LB_up , logicSiLi_LB , Name + "_SiLi_Pad9" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_RB_up , logicSiLi_RB , Name + "_SiLi_Pad10" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_LC2_up , logicSiLi_LC2 , Name + "_SiLi_Pad11" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_RC2_up , logicSiLi_RC2 , Name + "_SiLi_Pad12" , logicSiLi , false , 0) ; + PVPBuffer = new G4PVPlacement(0 , positionSiLi_LB_up , logicSiLi_LB , Name + "_SiLi_Pad16" , logicSiLi , false , 0) ; + PVPBuffer = new G4PVPlacement(0 , positionSiLi_RB_up , logicSiLi_RB , Name + "_SiLi_Pad15" , logicSiLi , false , 0) ; + PVPBuffer = new G4PVPlacement(0 , positionSiLi_LC2_up , logicSiLi_LC2 , Name + "_SiLi_Pad14" , logicSiLi , false , 0) ; + PVPBuffer = new G4PVPlacement(0 , positionSiLi_RC2_up , logicSiLi_RC2 , Name + "_SiLi_Pad13" , logicSiLi , false , 0) ; // down - PVPBuffer = new G4PVPlacement(0 , positionSiLi_LT_down , logicSiLi_LT , Name + "_SiLi_Pad7" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_RT_down , logicSiLi_RT , Name + "_SiLi_Pad8" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_LC1_down , logicSiLi_LC1 , Name + "_SiLi_Pad5" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_RC1_down , logicSiLi_RC1 , Name + "_SiLi_Pad6" , logicSiLi , false , 0) ; - - PVPBuffer = new G4PVPlacement(0 , positionSiLi_LB_down , logicSiLi_LB , Name + "_SiLi_Pad2" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_RB_down , logicSiLi_RB , Name + "_SiLi_Pad1" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_LC2_down , logicSiLi_LC2 , Name + "_SiLi_Pad4" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_RC2_down , logicSiLi_RC2 , Name + "_SiLi_Pad3" , logicSiLi , false , 0) ; + PVPBuffer = new G4PVPlacement(0 , positionSiLi_LT_down , logicSiLi_LT , Name + "_SiLi_Pad2" , logicSiLi , false , 0) ; + PVPBuffer = new G4PVPlacement(0 , positionSiLi_RT_down , logicSiLi_RT , Name + "_SiLi_Pad1" , logicSiLi , false , 0) ; + PVPBuffer = new G4PVPlacement(0 , positionSiLi_LC1_down , logicSiLi_LC1 , Name + "_SiLi_Pad4" , logicSiLi , false , 0) ; + PVPBuffer = new G4PVPlacement(0 , positionSiLi_RC1_down , logicSiLi_RC1 , Name + "_SiLi_Pad3" , logicSiLi , false , 0) ; + + PVPBuffer = new G4PVPlacement(0 , positionSiLi_LB_down , logicSiLi_LB , Name + "_SiLi_Pad7" , logicSiLi , false , 0) ; + PVPBuffer = new G4PVPlacement(0 , positionSiLi_RB_down , logicSiLi_RB , Name + "_SiLi_Pad8" , logicSiLi , false , 0) ; + PVPBuffer = new G4PVPlacement(0 , positionSiLi_LC2_down , logicSiLi_LC2 , Name + "_SiLi_Pad5" , logicSiLi , false , 0) ; + PVPBuffer = new G4PVPlacement(0 , positionSiLi_RC2_down , logicSiLi_RC2 , Name + "_SiLi_Pad6" , logicSiLi , false , 0) ; diff --git a/NPSimulation/vis.mac b/NPSimulation/vis.mac index a5d707fb4bdc1aa0e81ebe7c24fcf0af0c750fda..c896f6e11c8d53873c1d77f5db6bfab6aea99f63 100644 --- a/NPSimulation/vis.mac +++ b/NPSimulation/vis.mac @@ -7,8 +7,8 @@ /run/verbose 0 # choose a graphic system -##/vis/open OGLIX -##/vis/open OGLSX +#/vis/open OGLIX +#/vis/open OGLSX #/vis/open VRML2FILE #/vis/scene/create #/vis/drawVolume