diff --git a/NPLib/Detectors/Tiara/TTiaraBarrelPhysics.cxx b/NPLib/Detectors/Tiara/TTiaraBarrelPhysics.cxx index e2e0958cc89a4ada3372c7bf95a2321ca85b80e0..733b2cced2409762cc232b6762d337e23a5a335e 100644 --- a/NPLib/Detectors/Tiara/TTiaraBarrelPhysics.cxx +++ b/NPLib/Detectors/Tiara/TTiaraBarrelPhysics.cxx @@ -9,7 +9,7 @@ * Original Author: Adrien MATTA contact address: matta@lpccaen.in2p3.fr * * * * Creation Date : November 2012 * - * Last update : * + * Last update : May 2018 * *---------------------------------------------------------------------------* * Decription: * * This class hold TiaraBarrel treated data * @@ -58,11 +58,12 @@ ClassImp(TTiaraBarrelPhysics) m_Take_E_Strip= true; m_Take_T_Back=true; - m_Strip_E_Threshold = 300 ; //keV - m_Back_E_Threshold = 10 ; //keV - m_Maximum_FrontBack_Difference = 30 ; // keV -//by Shuya 171208 - m_OuterBack_E_Threshold = 50; //ch or keV + + m_Strip_E_Threshold = 300*keV; + m_Back_E_Threshold = 10*keV; + m_Maximum_FrontBack_Difference = 30*keV; + m_OuterBack_E_Threshold = 50*keV; + m_Spectra = NULL ; } @@ -176,11 +177,11 @@ void TTiaraBarrelPhysics::PreTreat(){ } - for(unsigned int i = 0 ; i < sizeO ; i++){ + for(unsigned int i = 0 ; i < sizeO ; i++){ //by Shuya 171208 //double EO = m_EventData->GetOuterEEnergy(i); double EO = Cal_OuterBarrel_E(i); - //by Shuya 180426. This was pulled by git pull but ignored. + //by Shuya 180426. This was pulled by git pull but ignored. //for(unsigned int i = 0 ; i < sizeO ; i++){ //double EO = m_EventData->GetOuterEEnergy(i); @@ -207,7 +208,7 @@ for (it= m_mapU.begin(); it!=m_mapU.end(); ++it){ EU=ED=EUms=EDms=0; // skip any event where U and D are not present simultaneously if (m_mapU[key].size()==1 && m_mapD[key].size()==1){ - if( (m_mapU[key][0]+m_mapD[key][0])> m_Strip_E_Threshold ){ // U+D greater than threshold + if( (m_mapU[key][0]+m_mapD[key][0])> m_Strip_E_Threshold && IsValidChannel("InnerBarrelStripUpstream", det, strip) && IsValidChannel("InnerBarrelStripDownstream", det, strip) ){ // U+D greater than threshold EU = m_mapU[key][0]; ED = m_mapD[key][0]; EUms = m_mapMSU[key][0]; @@ -265,6 +266,71 @@ bool TTiaraBarrelPhysics :: IsValidChannel(const string DetectorType, const int /////////////////////////////////////////////////////////////////////////// void TTiaraBarrelPhysics::ReadAnalysisConfig(){ + bool ReadingStatus = false; + + // path to file + string FileName = "./configs/ConfigTiaraBarrel.dat"; + + // open analysis config file + ifstream AnalysisConfigFile; + AnalysisConfigFile.open(FileName.c_str()); + + if (!AnalysisConfigFile.is_open()) { + cout << " No ConfigTiaraBarrel.dat found: Default parameter loaded for Analayis " << FileName << endl; + return; + } + cout << " Loading user parameter for Analysis from ConfigTiaraBarrel.dat " << endl; + + // Save it in a TAsciiFile + TAsciiFile* asciiConfig = RootOutput::getInstance()->GetAsciiFileAnalysisConfig(); + asciiConfig->AppendLine("%%% ConfigTiaraBarrel.dat %%%"); + asciiConfig->Append(FileName.c_str()); + asciiConfig->AppendLine(""); + + // read analysis config file + string LineBuffer,DataBuffer,whatToDo; + while (!AnalysisConfigFile.eof()) { + // Pick-up next line + getline(AnalysisConfigFile, LineBuffer); + if (LineBuffer.compare(0, 17, "ConfigTiaraBarrel") == 0) ReadingStatus = true; + + // loop on tokens and data + while (ReadingStatus ) { + whatToDo=""; + AnalysisConfigFile >> whatToDo; + // Search for comment symbol (%) + if (whatToDo.compare(0, 1, "%") == 0) { + AnalysisConfigFile.ignore(numeric_limits<streamsize>::max(), '\n' ); + } + else if (whatToDo== "DISABLE_ALL") { + AnalysisConfigFile >> DataBuffer; + cout << whatToDo << " " << DataBuffer << endl; + int Detector = atoi(DataBuffer.substr(2,1).c_str()); + vector< bool > ChannelStatus; + ChannelStatus.resize(8,false); + m_InnerBarrelStripUpstreamChannelStatus[Detector-1] = ChannelStatus; + m_InnerBarrelStripDownstreamChannelStatus[Detector-1] = ChannelStatus; + } + else if (whatToDo == "DISABLE_CHANNEL") { + AnalysisConfigFile >> DataBuffer; + cout << whatToDo << " " << DataBuffer << endl; + int Detector = atoi(DataBuffer.substr(2,1).c_str()); + int channel = -1; + if (DataBuffer.compare(3,5,"STRIP") == 0) { + channel = atoi(DataBuffer.substr(8).c_str()); + *(m_InnerBarrelStripUpstreamChannelStatus[Detector-1].begin()+channel-1) = false; + *(m_InnerBarrelStripDownstreamChannelStatus[Detector-1].begin()+channel-1) = false; + *(m_InnerBarrelBackChannelStatus[Detector-1].begin()+channel-1) = false; + } + else cout << "Warning: token name for TiaraBarrel unknown!" << endl; + } + + else { + ReadingStatus = false; + } + + } + } } /////////////////////////////////////////////////////////////////////////// @@ -486,8 +552,8 @@ TVector3 TTiaraBarrelPhysics::GetPositionOfInteraction(const int i) const{ double INNERBARREL_ActiveWafer_Length = 94.80; double INNERBARREL_ActiveWafer_Width = 22.60; // was 24.60 double StripPitch = INNERBARREL_ActiveWafer_Width/4.0; - - //Calculate position locally as if it's detector 3 (at 12'oclock) that is hit + + //Calculate position locally as if it's detector 3 (at 12'oclock) that is hit double X = (Strip_N[i]-0.5)*StripPitch - 0.5*INNERBARREL_ActiveWafer_Width; double Y = INNERBARREL_PCB_Width*(0.5+sin(45*deg)); double Z = Strip_Pos[i]*(0.5*INNERBARREL_ActiveWafer_Length); @@ -511,23 +577,23 @@ TVector3 TTiaraBarrelPhysics::GetRandomisedPositionOfInteraction(const int i) co } /////////////////////////////////////////////////////////////////////////////// void TTiaraBarrelPhysics::InitializeStandardParameter(){ - /* // Enable all channel - vector< bool > ChannelStatus; - m_RingChannelStatus.clear() ; - m_SectorChannelStatus.clear() ; - - ChannelStatus.resize(16,true); - for(int i = 0 ; i < m_NumberOfDetector ; ++i){ - m_RingChannelStatus[i] = ChannelStatus; - } - - ChannelStatus.resize(8,true); - for(int i = 0 ; i < m_NumberOfDetector ; ++i){ - m_SectorChannelStatus[i] = ChannelStatus; - } + // Enable all channel + vector< bool > ChannelStatus; + m_InnerBarrelStripUpstreamChannelStatus.clear() ; + m_InnerBarrelStripDownstreamChannelStatus.clear() ; + m_OuterBarrelStripChannelStatus.clear() ; + m_InnerBarrelBackChannelStatus.clear() ; + m_OuterBarrelBackChannelStatus.clear() ; + + ChannelStatus.resize(8,true); + for(int i = 0 ; i < m_NumberOfDetector ; ++i){ + m_InnerBarrelStripUpstreamChannelStatus[i] = ChannelStatus; + m_InnerBarrelStripDownstreamChannelStatus[i] = ChannelStatus; + m_OuterBarrelStripChannelStatus[i] = ChannelStatus; + m_InnerBarrelBackChannelStatus[i] = ChannelStatus; + m_OuterBarrelBackChannelStatus[i] = ChannelStatus; + } - m_MaximumStripMultiplicityAllowed = m_NumberOfDetector ; - */ return; } /////////////////////////////////////////////////////////////////////////////// diff --git a/NPLib/Physics/NPBeam.h b/NPLib/Physics/NPBeam.h index 574937e1109eec1ac5980586a1033db183214b1b..7ddc9f081487e2eca5299a47073cdc2d3768116a 100644 --- a/NPLib/Physics/NPBeam.h +++ b/NPLib/Physics/NPBeam.h @@ -79,6 +79,7 @@ namespace NPL{ // Set // void SetBeamNucleus (Nucleus* BeamNucleus) {delete fBeamNucleus ; fBeamNucleus = new Nucleus(BeamNucleus->GetZ(),BeamNucleus->GetA());} void SetEnergy (double Energy) {fEnergy=Energy;} + void SetExcitationEnergy(double Excitation) {fExcitationEnergy=Excitation;} void SetSigmaEnergy (double SigmaEnergy) {fSigmaEnergy=SigmaEnergy;} void SetMeanX (double MeanX) {fMeanX=MeanX;} void SetMeanY (double MeanY) {fMeanY=MeanY;} diff --git a/NPSimulation/Detectors/Tiara/Tiara.cc b/NPSimulation/Detectors/Tiara/Tiara.cc index 453506bf5f558f641010537ac4e05691c65c213b..0fcb4bfe64c7468fc3acc8c9851850e1008e5248 100644 --- a/NPSimulation/Detectors/Tiara/Tiara.cc +++ b/NPSimulation/Detectors/Tiara/Tiara.cc @@ -178,20 +178,20 @@ void Tiara::ReadSensitive(const G4Event* event){ for (InnerBarrel_itr = InnerBarrelHitMap->GetMap()->begin() ; InnerBarrel_itr != InnerBarrelHitMap->GetMap()->end() ; InnerBarrel_itr++){ G4double* Info = *(InnerBarrel_itr->second); - // Upstream Energy - double EU = RandGauss::shoot(Info[0],ResoEnergyInnerBarrel); - if(EU>EnergyThreshold){ - m_EventBarrel->SetFrontUpstreamE(Info[3],Info[4],EU); - m_EventBarrel->SetFrontUpstreamT(Info[3],Info[4],Info[2]); - } - // Downstream Energy - double ED = RandGauss::shoot(Info[1],ResoEnergyInnerBarrel); + double ED = RandGauss::shoot(Info[0],ResoEnergyInnerBarrel); if(ED>EnergyThreshold){ m_EventBarrel->SetFrontDownstreamE(Info[3],Info[4],ED); m_EventBarrel->SetFrontDownstreamT(Info[3],Info[4],Info[2]); } + // Upstream Energy + double EU = RandGauss::shoot(Info[1],ResoEnergyInnerBarrel); + if(EU>EnergyThreshold){ + m_EventBarrel->SetFrontUpstreamE(Info[3],Info[4],EU); + m_EventBarrel->SetFrontUpstreamT(Info[3],Info[4],Info[2]); + } + // Back Energy double EB = RandGauss::shoot(Info[1]+Info[0],ResoEnergyInnerBarrel); if(EB>EnergyThreshold){ diff --git a/NPSimulation/Scorers/SiliconScorers.cc b/NPSimulation/Scorers/SiliconScorers.cc index d5667a8c54187802a4536ad42d6506fa6b95e756..961783ee1852f188c182819752d3fdb65d862830 100644 --- a/NPSimulation/Scorers/SiliconScorers.cc +++ b/NPSimulation/Scorers/SiliconScorers.cc @@ -43,7 +43,7 @@ G4bool PS_Silicon_Images::ProcessHits(G4Step* aStep, G4TouchableHistory*){ t_DetectorNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(m_Level); t_Position = aStep->GetPreStepPoint()->GetPosition(); - + // Interaction coordinates (used to fill the InteractionCoordinates branch) // N.B: Theta and phi are calculated with respect to (0,0,0) t_X = t_Position.x(); @@ -70,7 +70,7 @@ G4bool PS_Silicon_Images::ProcessHits(G4Step* aStep, G4TouchableHistory*){ t_Energy+=dummy; } - m_Energy[t_Index] = t_Energy; + m_Energy[t_Index] = t_Energy; m_Time[t_Index] = t_Time; m_DetectorNbr[t_Index] = t_DetectorNbr; m_PixelFront[t_Index] = t_PixelFront; @@ -80,10 +80,10 @@ G4bool PS_Silicon_Images::ProcessHits(G4Step* aStep, G4TouchableHistory*){ m_Z[t_Index] = t_Z; m_Theta[t_Index] = t_Theta; m_Phi[t_Index] = t_Phi; - + return TRUE; - + } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... @@ -113,7 +113,7 @@ vector<unsigned int> PS_Silicon_Images::GetIndexes(){ map<unsigned int , double>::iterator it; for(it=m_Energy.begin(); it!=m_Energy.end();it++) indexes.push_back(it->first); - + return indexes; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... @@ -135,7 +135,7 @@ void PS_Silicon_Images::GetARGBFront(unsigned int index,unsigned int& a,unsigned //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void PS_Silicon_Images::GetARGBBack(unsigned int index,unsigned int& a,unsigned int& r,unsigned int& g,unsigned int& b){ unsigned int Info =m_PixelBack[index]; - + a = (Info>>24)&0xff; r = (Info>>16)&0xff; g = (Info>>8)&0xff; @@ -184,7 +184,7 @@ PS_Silicon_Rectangle::PS_Silicon_Rectangle(G4String name,G4int Level, G4double S m_StripPitchWidth = m_StripPlaneWidth / m_NumberOfStripWidth; m_Level = Level; m_Axis=axis; - + m_Position = G4ThreeVector(-1000,-1000,-1000); m_DetectorNumber = -1; m_StripLengthNumber = -1; @@ -198,24 +198,24 @@ PS_Silicon_Rectangle::~PS_Silicon_Rectangle(){ //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... G4bool PS_Silicon_Rectangle::ProcessHits(G4Step* aStep, G4TouchableHistory*){ - + // contain Energy Time, DetNbr, StripFront and StripBack G4double* Infos = new G4double[10]; Infos[0] = aStep->GetTotalEnergyDeposit(); Infos[1] = aStep->GetPreStepPoint()->GetGlobalTime(); - + m_DetectorNumber = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(m_Level); m_Position = aStep->GetPreStepPoint()->GetPosition(); - + // Interaction coordinates (used to fill the InteractionCoordinates branch) Infos[2] = m_Position.x(); Infos[3] = m_Position.y(); Infos[4] = m_Position.z(); Infos[5] = m_Position.theta(); Infos[6] = m_Position.phi(); - + m_Position = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(m_Position); - + if(m_Axis=="xy"){ m_StripLengthNumber = (int)((m_Position.x() + m_StripPlaneLength / 2.) / m_StripPitchLength ) + 1 ; m_StripWidthNumber = (int)((m_Position.y() + m_StripPlaneWidth / 2.) / m_StripPitchWidth ) + 1 ; @@ -228,17 +228,17 @@ G4bool PS_Silicon_Rectangle::ProcessHits(G4Step* aStep, G4TouchableHistory*){ m_StripLengthNumber = (int)((m_Position.x() + m_StripPlaneLength / 2.) / m_StripPitchLength ) + 1 ; m_StripWidthNumber = (int)((m_Position.z() + m_StripPlaneWidth / 2.) / m_StripPitchWidth ) + 1 ; } - + //Rare case where particle is close to edge of silicon plan if (m_StripLengthNumber > m_NumberOfStripLength) m_StripLengthNumber = m_NumberOfStripLength; if (m_StripWidthNumber > m_NumberOfStripWidth) m_StripWidthNumber = m_NumberOfStripWidth; - + Infos[7] = m_DetectorNumber; Infos[8] = m_StripLengthNumber; Infos[9] = m_StripWidthNumber; - + m_Index = aStep->GetTrack()->GetTrackID() + m_DetectorNumber * 1e3 + m_StripLengthNumber * 1e6 + m_StripWidthNumber * 1e9; - + // Check if the particle has interact before, if yes, add up the energies. map<G4int, G4double**>::iterator it; it= EvtMap->GetMap()->find(m_Index); @@ -246,7 +246,7 @@ G4bool PS_Silicon_Rectangle::ProcessHits(G4Step* aStep, G4TouchableHistory*){ G4double* dummy = *(it->second); Infos[0]+=dummy[0]; } - + EvtMap->set(m_Index, Infos); return TRUE; } @@ -276,7 +276,7 @@ void PS_Silicon_Rectangle::clear(){ //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void PS_Silicon_Rectangle::DrawAll(){ - + } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... @@ -291,7 +291,7 @@ void PS_Silicon_Rectangle::PrintAll(){ //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... PS_Silicon_Annular::PS_Silicon_Annular(G4String name,G4int Level, G4double StripPlaneInnerRadius, G4double StripPlaneOuterRadius, G4double PhiStart,G4double PhiStop, G4int NumberOfStripRing,G4int NumberOfStripSector,G4int NumberOfQuadrant,G4int depth) :G4VPrimitiveScorer(name, depth),HCID(-1){ - + m_StripPlaneInnerRadius = StripPlaneInnerRadius; m_StripPlaneOuterRadius = StripPlaneOuterRadius; m_PhiStart = PhiStart; @@ -303,7 +303,7 @@ PS_Silicon_Annular::PS_Silicon_Annular(G4String name,G4int Level, G4double Strip m_StripPitchSector = (m_PhiStop-m_PhiStart)/m_NumberOfStripSector; m_StripPitchQuadrant = (m_PhiStop-m_PhiStart)/m_NumberOfStripQuadrant; m_Level = Level; - + m_Position = G4ThreeVector(-1000,-1000,-1000); m_uz = G4ThreeVector(0,0,1); m_DetectorNumber = -1; @@ -321,12 +321,12 @@ G4bool PS_Silicon_Annular::ProcessHits(G4Step* aStep, G4TouchableHistory*){ // contain Energy Time, DetNbr, StripFront and StripBack G4double* Infos = new G4double[11]; Infos[0] = aStep->GetTotalEnergyDeposit(); - + Infos[1] = aStep->GetPreStepPoint()->GetGlobalTime(); - + m_DetectorNumber = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(m_Level); m_Position = aStep->GetPreStepPoint()->GetPosition(); - + // Interaction coordinates (used to fill the InteractionCoordinates branch) Infos[2] = m_Position.x(); Infos[3] = m_Position.y(); @@ -342,7 +342,7 @@ G4bool PS_Silicon_Annular::ProcessHits(G4Step* aStep, G4TouchableHistory*){ // we need it in [0;2pi] to calculate sector nbr in [1,NSectors] // only add 360 if the value is negative double phi = (m_Position.phi()<0)? m_Position.phi()+2*pi : m_Position.phi() ; - + // factor out the extra 360 degrees before strip/quad calculation m_StripSectorNumber = (int) ( fmod((phi - m_PhiStart),2*pi) / m_StripPitchSector ) + 1 ; m_StripQuadrantNumber = (int) ( fmod((phi - m_PhiStart),2*pi) / m_StripPitchQuadrant) + 1 ; @@ -351,14 +351,14 @@ G4bool PS_Silicon_Annular::ProcessHits(G4Step* aStep, G4TouchableHistory*){ if (m_StripRingNumber > m_NumberOfStripRing) m_StripRingNumber = m_NumberOfStripRing; if (m_StripSectorNumber > m_NumberOfStripSector) m_StripSectorNumber = m_NumberOfStripSector; if (m_StripQuadrantNumber > m_NumberOfStripQuadrant) m_StripQuadrantNumber = m_NumberOfStripQuadrant; - + Infos[7] = m_DetectorNumber; Infos[8] = m_StripRingNumber; Infos[9] = m_StripSectorNumber; Infos[10] = m_StripQuadrantNumber; - + m_Index = aStep->GetTrack()->GetTrackID() + m_DetectorNumber * 1e3 + m_StripRingNumber * 1e6 + m_NumberOfStripSector * 1e9; - + // Check if the particle has interact before, if yes, add up the energies. map<G4int, G4double**>::iterator it; it= EvtMap->GetMap()->find(m_Index); @@ -366,7 +366,7 @@ G4bool PS_Silicon_Annular::ProcessHits(G4Step* aStep, G4TouchableHistory*){ G4double* dummy = *(it->second); Infos[0]+=dummy[0]; } - + EvtMap->set(m_Index, Infos); return TRUE; } @@ -390,13 +390,13 @@ void PS_Silicon_Annular::clear(){ for (MapIterator = EvtMap->GetMap()->begin() ; MapIterator != EvtMap->GetMap()->end() ; MapIterator++){ delete *(MapIterator->second); } - + EvtMap->clear(); } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void PS_Silicon_Annular::DrawAll(){ - + } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... @@ -413,7 +413,7 @@ PS_Silicon_Resistive::PS_Silicon_Resistive(G4String name,G4int Level, G4double S m_NumberOfStripWidth = NumberOfStripWidth; m_StripPitchWidth = m_StripPlaneWidth / m_NumberOfStripWidth; m_Level = Level; - + m_Position = G4ThreeVector(-1000,-1000,-1000); m_DetectorNumber = -1; m_StripWidthNumber = -1; @@ -426,44 +426,44 @@ PS_Silicon_Resistive::~PS_Silicon_Resistive(){ //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... G4bool PS_Silicon_Resistive::ProcessHits(G4Step* aStep, G4TouchableHistory*){ - + // contain Energy Total, E1, E2, Time, DetNbr, and StripWidth G4double* EnergyAndTime = new G4double[10]; - + EnergyAndTime[2] = aStep->GetPreStepPoint()->GetGlobalTime(); - + m_DetectorNumber = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(m_Level); m_Position = aStep->GetPreStepPoint()->GetPosition(); - + // Interaction coordinates (used to fill the InteractionCoordinates branch) EnergyAndTime[5] = m_Position.x(); EnergyAndTime[6] = m_Position.y(); EnergyAndTime[7] = m_Position.z(); EnergyAndTime[8] = m_Position.theta(); EnergyAndTime[9] = m_Position.phi(); - + m_Position = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(m_Position); - + m_StripWidthNumber = (int)((m_Position.x() + m_StripPlaneWidth / 2.) / m_StripPitchWidth ) + 1 ; // m_StripWidthNumber = m_NumberOfStripWidth - m_StripWidthNumber + 1 ; - + // The energy is divided in two depending on the position // position along the resistive strip double P = (m_Position.z())/(0.5*m_StripPlaneLength); - // Upstream Energy - EnergyAndTime[0] = aStep->GetTotalEnergyDeposit()*(1+P)*0.5; - // Downstream Energy + EnergyAndTime[0] = aStep->GetTotalEnergyDeposit()*(1+P)*0.5; // downsteam collects MORE energy when P is positive + + // Upstream Energy EnergyAndTime[1] = aStep->GetTotalEnergyDeposit()-EnergyAndTime[0]; - + EnergyAndTime[3] = m_DetectorNumber; EnergyAndTime[4] = m_StripWidthNumber; - + //Rare case where particle is close to edge of silicon plan if (m_StripWidthNumber > m_NumberOfStripWidth) m_StripWidthNumber = m_NumberOfStripWidth; - + m_Index = aStep->GetTrack()->GetTrackID() + m_DetectorNumber * 1e3 + m_StripWidthNumber * 1e6; - + // Check if the particle has interact before, if yes, add up the energies. map<G4int, G4double**>::iterator it; it= EvtMap->GetMap()->find(m_Index); @@ -495,13 +495,13 @@ void PS_Silicon_Resistive::clear(){ for (MapIterator = EvtMap->GetMap()->begin() ; MapIterator != EvtMap->GetMap()->end() ; MapIterator++){ delete *(MapIterator->second); } - + EvtMap->clear(); } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void PS_Silicon_Resistive::DrawAll(){ - + } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... @@ -510,5 +510,3 @@ void PS_Silicon_Resistive::PrintAll(){ G4cout << " PrimitiveScorer " << GetName() << G4endl ; G4cout << " Number of entries " << EvtMap->entries() << G4endl ; } - -