diff --git a/current/cal_current.py b/current/cal_current.py index 61ca845002c570eb1a9368cd48ab78b6bc64dd34..1503432331e8fe659b037172fd010875729b8954 100644 --- a/current/cal_current.py +++ b/current/cal_current.py @@ -16,7 +16,7 @@ import numpy as np import ROOT from .model import Material -from particle.carrier_list import CarrierListFromG4P, StripCarrierListFromG4P +from particle.carrier_list import CarrierListFromG4P from util.math import Vector, signal_convolution from util.output import create_path diff --git a/particle/carrier_list.py b/particle/carrier_list.py index 27f430c845b13f6cde1960a53db17aff7bed295b..ecbfc632cc02f01e61576249c792040b6a8a6382 100644 --- a/particle/carrier_list.py +++ b/particle/carrier_list.py @@ -38,6 +38,7 @@ class CarrierListFromG4P: raise ValueError elif batch == 0 and my_g4p.geant4_model == "Si_strip": + # P13 cut condition h1 = ROOT.TH1F("Edep_device", "Energy deposition in Detector", 100, 0, max(my_g4p.edep_devices)*1.1) for i in range (len(my_g4p.edep_devices)): h1.Fill(my_g4p.edep_devices[i]) @@ -67,27 +68,4 @@ class CarrierListFromG4P: self.tracks_step = my_g4p.energy_steps[j] self.tracks_t_energy_deposition = my_g4p.edep_devices[j] #涓轰粈涔堜笉浣跨敤锛� self.ionized_pairs = [step*1e6/self.energy_loss for step in self.tracks_step] - - -class StripCarrierListFromG4P: - # P13 cut condition - def __init__(self, material, my_g4p, batch): - if (material == "SiC"): - self.energy_loss = 8.4 #ev - elif (material == "Si"): - self.energy_loss = 3.6 #ev - - - - if batch == 0: - print("=========RASER info ===========\nGeant4:the sensor didn't have particles hitted\n==========================") - raise ValueError - else: - self.batch_def(my_g4p,batch) - - def batch_def(self,my_g4p,j): - self.beam_number = j - self.track_position = [[single_step[0],single_step[1],single_step[2],1e-9] for single_step in my_g4p.p_steps_current[j]] - self.tracks_step = my_g4p.energy_steps[j] - self.tracks_t_energy_deposition = my_g4p.edep_devices[j] #涓轰粈涔堜笉浣跨敤锛� - self.ionized_pairs = [step*1e6/self.energy_loss for step in self.tracks_step] + \ No newline at end of file