diff --git a/NPLib/Tiara/TTiaraHyballPhysics.cxx b/NPLib/Tiara/TTiaraHyballPhysics.cxx index 8fd56cc60b158517fe28d1a74560bd2075cd19de..da7ec91cd63d56953fbcc1794f700d4c7b8c1e57 100644 --- a/NPLib/Tiara/TTiaraHyballPhysics.cxx +++ b/NPLib/Tiara/TTiaraHyballPhysics.cxx @@ -181,6 +181,7 @@ void TTiaraHyballPhysics::PreTreat(){ m_PreTreatedData->SetSectorTTime( Sector_T ); } } + return; } @@ -212,16 +213,17 @@ vector < TVector2 > TTiaraHyballPhysics :: Match_Ring_Sector(){ for(unsigned int j = 0 ; j < sizeS ; j++){ // if same detector check energy if ( m_PreTreatedData->GetRingEDetectorNbr(i) == m_PreTreatedData->GetSectorEDetectorNbr(j) ){ - // Look if energy match - if( abs( (m_PreTreatedData->GetRingEEnergy(i)-m_PreTreatedData->GetSectorEEnergy(j))/2. ) < m_StripEnergyMatchingNumberOfSigma*m_StripEnergyMatchingSigma ) - ArrayOfGoodCouple . push_back ( TVector2(i,j) ) ; + // Look if energy match + if( abs( (m_PreTreatedData->GetRingEEnergy(i)-m_PreTreatedData->GetSectorEEnergy(j))/2. ) + < m_StripEnergyMatchingNumberOfSigma*m_StripEnergyMatchingSigma ) { + ArrayOfGoodCouple . push_back ( TVector2(i,j) ) ; + } } } } - // Prevent to treat event with ambiguous matchin beetween X and Y if( ArrayOfGoodCouple.size() > m_PreTreatedData->GetRingEMult() ) ArrayOfGoodCouple.clear() ; - + return ArrayOfGoodCouple; } @@ -700,12 +702,12 @@ namespace TiaraHyball_LOCAL{ // Sector double fStrip_Sector_E(const TTiaraHyballData* m_EventData , const int i){ - return CalibrationManager::getInstance()->ApplyCalibration( "TIARAHYBALL/D" + itoa( m_EventData->GetSectorTDetectorNbr(i) ) + "_STRIP_SECTOR" + itoa( m_EventData->GetSectorTStripNbr(i) ) +"_E", + return CalibrationManager::getInstance()->ApplyCalibration( "TIARAHYBALL/D" + itoa( m_EventData->GetSectorEDetectorNbr(i) ) + "_STRIP_SECTOR" + itoa( m_EventData->GetSectorEStripNbr(i) ) +"_E", fStrip_Sector_Matchstick(m_EventData,i) ); } double fStrip_Sector_Matchstick(const TTiaraHyballData* m_EventData , const int i){ - return CalibrationManager::getInstance()->ApplyCalibration( "TIARAHYBALL/D" + itoa( m_EventData->GetSectorTDetectorNbr(i) ) + "_STRIP_SECTOR" + itoa( m_EventData->GetSectorTStripNbr(i) ) +"_MATCHSTICK", + return CalibrationManager::getInstance()->ApplyCalibration( "TIARAHYBALL/D" + itoa( m_EventData->GetSectorEDetectorNbr(i) ) + "_STRIP_SECTOR" + itoa( m_EventData->GetSectorEStripNbr(i) ) +"_MATCHSTICK", m_EventData->GetSectorEEnergy(i) ); } diff --git a/NPSimulation/SSSD/ThinSi.cc b/NPSimulation/SSSD/ThinSi.cc index d97c587b9995f291d50e48aaaef27b7b845f1251..ed777a5e7c7103cff000a1349a05df8d58341466 100644 --- a/NPSimulation/SSSD/ThinSi.cc +++ b/NPSimulation/SSSD/ThinSi.cc @@ -131,7 +131,6 @@ void ThinSi::VolumeMaker( G4int DetNumber , Number << NbrTelescopes ; DetectorNumber = Number.str() ; - //////////////////////////////////////////////////////////////// /////////General Geometry Parameter Definition ///////////////// //////////////////////////////////////////////////////////////// @@ -445,8 +444,8 @@ void ThinSi::ReadConfiguration(string Path) // Construct detector and inialise sensitive part. // Called After DetecorConstruction::AddDetector Method -void ThinSi::ConstructDetector(G4LogicalVolume* world) -{ +void ThinSi::ConstructDetector(G4LogicalVolume* world){ + G4RotationMatrix* Det_rot = NULL; G4ThreeVector Det_pos = G4ThreeVector(0, 0, 0); G4ThreeVector Det_u = G4ThreeVector(0, 0, 0); @@ -546,6 +545,17 @@ void ThinSi::ReadSensitive(const G4Event* event) //////////////////////// Used to Read Event Map of detector ////////////////////////// ////////////////////////////////////////////////////////////////////////////////////// + + + + + + + + + + + // Si G4THitsMap<G4int>* DetNbrHitMap; G4THitsMap<G4int>* StripNbrHitMap;