Commit 6a55a020 authored by Warren's avatar Warren
Browse files

Removed particle filter and changed particleID to AtomicNumber. Defualt gas now He/Co2 500mbar

parent c52ab052
Pipeline #91784 passed with stages
in 17 minutes and 29 seconds
......@@ -130,7 +130,7 @@ G4LogicalVolume* TACTIC::BuildCylindricalDetector(){
vector<G4Material*> GasComponent;
for(unsigned int i=0; i<NumberOfGasMix; i++){
if(m_GasMaterial[i] == "CO2") GasComponent.push_back(MaterialManager::getInstance()->GetGasFromLibrary(m_GasMaterial[i], 1.0/bar, m_Temperature));
// if(m_GasMaterial[i] == "CO2") GasComponent.push_back(MaterialManager::getInstance()->GetGasFromLibrary(m_GasMaterial[i], 1.0/bar, m_Temperature));
if(m_GasMaterial[i] == "P10_gas") {
//G4Material *P10_gas = new G4Material("P10_gas", 0.00156 * g /cm3, 3, kStateGas, m_Temperature, 1.0/bar); //density for SRIM (1 atm);
G4Material *P10_gas = new G4Material("P10_gas", 0.00156*g/cm3, 3);
......@@ -293,18 +293,18 @@ void TACTIC::ReadSensitive(const G4Event* event ){
m_Event->Clear();
ofstream file;
/*
G4THitsMap<G4double*>* BeamHitMap;
std::map<G4int, G4double**>::iterator Beam_itr;
G4int BeamCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("TACTICScorer/BeamScorer");
BeamHitMap = (G4THitsMap<G4double*>*)(event->GetHCofThisEvent()->GetHC(BeamCollectionID));
*/
file.open("signal.dat", std::ios::app);
file << "Event" << endl;
file.close();
file.open("out.dat",std::ios::app);
/*
for (Beam_itr = BeamHitMap->GetMap()->begin(); Beam_itr != BeamHitMap->GetMap()->end(); Beam_itr++) {
G4double* Info = *(Beam_itr->second);
//file << floor(((Info[3]+TACTIC_NS::active_length*0.5)/(TACTIC_NS::active_length/TACTIC_NS::NumberOfStrips))) << "\t"; // To get PAD number
......@@ -318,7 +318,7 @@ void TACTIC::ReadSensitive(const G4Event* event ){
}
BeamHitMap->clear();
*/
G4THitsMap<G4double*>* EjectHitMap;
std::map<G4int, G4double**>::iterator Eject_itr;
G4int EjectCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("TACTICScorer/EjectScorer");
......@@ -353,16 +353,16 @@ void TACTIC::InitializeScorers() {
// Otherwise the scorer is initialised
G4VPrimitiveScorer* EjectScorer = new TACTICScorer::Gas_Scorer("EjectScorer",1,TACTIC_NS::active_length,(int)TACTIC_NS::NumberOfStrips);
G4VPrimitiveScorer* BeamScorer = new TACTICScorer::Gas_Scorer("BeamScorer",1,TACTIC_NS::active_length,(int)TACTIC_NS::NumberOfStrips);
//G4SDParticleFilter* EjectFilter = new G4SDParticleFilter("EjectFilter","proton");
G4SDParticleFilter* EjectFilter = new G4SDParticleFilter("EjectFilter","alpha"); //For studying alpha source data
G4SDParticleFilter* BeamFilter = new G4SDParticleFilter("BeamFilter");
BeamFilter->addIon(11,21);
BeamFilter->addIon(10,18);
EjectScorer->SetFilter(EjectFilter);
BeamScorer->SetFilter(BeamFilter);
m_Scorer->RegisterPrimitive(BeamScorer);
//G4VPrimitiveScorer* BeamScorer = new TACTICScorer::Gas_Scorer("BeamScorer",1,TACTIC_NS::active_length,(int)TACTIC_NS::NumberOfStrips);
/////G4SDParticleFilter* EjectFilter = new G4SDParticleFilter("EjectFilter","proton");
//G4SDParticleFilter* EjectFilter = new G4SDParticleFilter("EjectFilter","alpha"); //For studying alpha source data
//G4SDParticleFilter* BeamFilter = new G4SDParticleFilter("BeamFilter");
//BeamFilter->addIon(11,21);
//BeamFilter->addIon(10,18);
//EjectScorer->SetFilter(EjectFilter);
//BeamScorer->SetFilter(BeamFilter);
//m_Scorer->RegisterPrimitive(BeamScorer);
m_Scorer->RegisterPrimitive(EjectScorer);
G4SDManager::GetSDMpointer()->AddNewDetector(m_Scorer);
......
......@@ -2,9 +2,9 @@
TACTIC
POS= 0 0 0 mm
Shape= Cylindrical
GasMaterial_1 = P10_gas
% GasMaterial_1 = He_gas
GasMaterial_2 = CO2
% GasMaterial_1 = P10_gas
GasMaterial_1 = He_gas
GasMaterial_2 = G4_CARBON_DIOXIDE
GasFraction_1 = 100
GasFraction_2 = 0
Temperature = 293.15 kelvin
......
......@@ -27,9 +27,10 @@ G4bool Gas_Scorer::ProcessHits(G4Step* aStep, G4TouchableHistory*){
G4double* Infos = new G4double[12];
//G4double w_value = 26.31*eV;
m_Position = aStep->GetPreStepPoint()->GetPosition();
Infos[0] = aStep->GetTrack()->GetTrackID();
/*
Infos[1] = -1.;
if (aStep->GetTrack()->GetDefinition()->GetParticleName() == "Ne18") Infos[1] = 0.;
if (aStep->GetTrack()->GetDefinition()->GetParticleName() == "Na21") Infos[1] = 1.;
......@@ -38,7 +39,10 @@ G4bool Gas_Scorer::ProcessHits(G4Step* aStep, G4TouchableHistory*){
if (aStep->GetTrack()->GetDefinition()->GetParticleName() == "Li8") Infos[1] = 4.;
if (aStep->GetTrack()->GetDefinition()->GetParticleName() == "B11") Infos[1] = 5;
if (aStep->GetTrack()->GetDefinition()->GetParticleName() == "neutron") Infos[1] = 6;
*/
Infos[1] = aStep->GetTrack()->GetParticleDefinition()->GetAtomicNumber();;
Infos[2] = aStep->GetPreStepPoint()->GetGlobalTime();
Infos[3] = aStep->GetPreStepPoint()->GetKineticEnergy();
Infos[4] = aStep->GetTotalEnergyDeposit() - aStep->GetNonIonizingEnergyDeposit();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment