Skip to content

Commit

Permalink
Change the binnings in PN DQM
Browse files Browse the repository at this point in the history
  • Loading branch information
tvami authored Feb 12, 2025
1 parent a868e9d commit c5c2579
Showing 1 changed file with 49 additions and 43 deletions.
92 changes: 49 additions & 43 deletions DQM/python/dqm.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class HCalDQM(ldmxcfg.Analyzer) :



def __init__(self,name="hcal_dqm", pe_threshold=5, section=0, max_hit_time = 50.0) :
def __init__(self,name="hcal_dqm", pe_threshold=8, section=0, max_hit_time = 50.0) :
self.section = section
section_names = ['back', 'top', 'bottom', 'right', 'left']
section_name = section_names[section]
Expand Down Expand Up @@ -169,7 +169,7 @@ def __init__(self,name="hcal_dqm", pe_threshold=5, section=0, max_hit_time = 50.
self.build1DHistogram('max_pe_time',
f"Max PE hit time ({section_name}) [ns]",
*time_bins)
self.build1DHistogram('hit_z', 'Reconstructed Z position in the HCal ({section_name}) [mm]',
self.build1DHistogram('hit_z', f"Reconstructed Z position in the HCal ({section_name}) [mm]",
1000, 0, 6000
)

Expand Down Expand Up @@ -197,7 +197,7 @@ def __init__(self,name="HcalVetoResults") :

class HcalInefficiencyAnalyzer(ldmxcfg.Analyzer):
def __init__(self,name="HcalInefficiencyAnalyzer", num_sections=5,
pe_threshold=5, max_hit_time=50.0):
pe_threshold=8, max_hit_time=50.0):
super().__init__(name,'dqm::HcalInefficiencyAnalyzer','DQM')

self.sim_coll_name = "HcalSimHits"
Expand Down Expand Up @@ -275,6 +275,9 @@ def __init__(self,name="EcalDigiVerify") :
self.build1DHistogram( "num_noise_hits" ,
"Number of noisy RecHits" , 100 , -0.5 , 99.5 )

self.build1DHistogram( "is_noise_hit" ,
"Is noise hit?" , 2 , -0.5 , 1.5 )

self.build1DHistogram( "total_rec_energy" ,
"Total Reconstructed Energy in ECal [MeV]" , 800 , 0. , 11000. )

Expand Down Expand Up @@ -499,69 +502,72 @@ def __init__(self,name='PN', verbose=False, count_light_ions=True) :
self.build1DHistogram("1n_event_type" , "", 7, -1, 6)
self.build1DHistogram("pn_particle_mult" , "Photo-nuclear Multiplicity", 200, 0, 200)
self.build1DHistogram("pn_neutron_mult", "Photo-nuclear Neutron Multiplicity", 200,0, 200)
self.build1DHistogram("pn_gamma_energy" , "#gamma Energy (MeV)", 500, 0, 10000)
self.build1DHistogram("pn_total_ke" , "Total Kineitc Energy of Photo-Nuclear Products(MeV)", 500, 0, 10000)
self.build1DHistogram("pn_total_neutron_ke" , "Total Kineitc Energy of Photo-Nuclear Neutrons (MeV)", 500, 0, 10000)
self.build1DHistogram("1n_neutron_energy" , "Neutron Energy (MeV)", 500, 0, 10000)
self.build1DHistogram("1n_energy_diff" , "E(#gamma_{PN}) - E(n) (MeV)", 500, 0, 10000)
self.build1DHistogram("1n_energy_frac" , "E(n)/E(#gamma_{PN}) (MeV)", 500, 0, 1)
self.build1DHistogram("2n_n2_energy" , "Energy of second hardest neutron (MeV)", 500, 0, 10000)
self.build1DHistogram("2n_energy_frac" , "E(n)/E(#gamma_{PN}) (MeV)", 500, 0, 1)
self.build1DHistogram("2n_energy_other" , "E_{other} (MeV)", 500, 0, 10000)
self.build1DHistogram("1kp_energy" , "Charged Kaon Energy (MeV)", 500, 0, 10000)
self.build1DHistogram("1kp_energy_diff" , "E(#gamma_{PN}) - E(K#pm) (MeV)", 500, 0, 100000)
self.build1DHistogram("1kp_energy_frac" , "E(K#pm)/E(#gamma_{PN}) (MeV)", 500, 0, 1)
self.build1DHistogram("1k0_energy" , "K0 Energy (MeV)", 500, 0, 10000)
self.build1DHistogram("1k0_energy_diff" , "E(#gamma_{PN}) - E(K0) (MeV)", 500, 0, 10000)
self.build1DHistogram("1k0_energy_frac" , "E(K0)/E(#gamma_{PN}) (MeV)", 500, 0, 1)
self.build1DHistogram("pn_gamma_energy" , "#gamma Energy (MeV)", 100, 0, 10000)
self.build1DHistogram("pn_total_ke" , "Total Kineitc Energy of Photo-Nuclear Products (MeV)", 100, 0, 10000)
self.build1DHistogram("pn_total_neutron_ke" , "Total Kineitc Energy of Photo-Nuclear Neutrons (MeV)", 100, 0, 10000)
self.build1DHistogram("1n_neutron_energy" , "Neutron Energy (MeV)", 100, 0, 10000)
self.build1DHistogram("1n_energy_diff" , "E(#gamma_{PN}) - E(n) (MeV)", 100, 0, 10000)
self.build1DHistogram("1n_energy_frac" , "E(n)/E(#gamma_{PN}) (MeV)", 100, 0, 1)
self.build1DHistogram("2n_n2_energy" , "Energy of second hardest neutron (MeV)", 100, 0, 10000)
self.build1DHistogram("2n_energy_frac" , "E(n)/E(#gamma_{PN}) (MeV)", 100, 0, 1)
self.build1DHistogram("2n_energy_other" , "E_{other} (MeV)", 100, 0, 10000)
self.build1DHistogram("1kp_energy" , "Charged Kaon Energy (MeV)", 100, 0, 10000)
self.build1DHistogram("1kp_energy_diff" , "E(#gamma_{PN}) - E(K#pm) (MeV)", 100, 0, 100000)
self.build1DHistogram("1kp_energy_frac" , "E(K#pm)/E(#gamma_{PN}) (MeV)", 100, 0, 1)
self.build1DHistogram("1k0_energy" , "K0 Energy (MeV)", 100, 0, 10000)
self.build1DHistogram("1k0_energy_diff" , "E(#gamma_{PN}) - E(K0) (MeV)", 100, 0, 10000)
self.build1DHistogram("1k0_energy_frac" , "E(K0)/E(#gamma_{PN}) (MeV)", 100, 0, 1)

self.build1DHistogram("recoil_vertex_x", "Recoil e^{-} Vertex - x (mm)", 40, -40, 40)
self.build1DHistogram("recoil_vertex_y", "Recoil e^{-} Vertex - y (mm)", 80, -80, 80)
self.build1DHistogram("recoil_vertex_z", "Recoil e^{-} Vertex - z (mm)", 20, -950, -850)

self.build1DHistogram("pn_gamma_int_z", "#gamma Interaction Vertex (mm)", 50, 200, 400)
self.build1DHistogram("pn_gamma_vertex_z", "#gamma Vertex (mm)", 1000, -5, 5)
self.build1DHistogram("pn_gamma_vertex_x", "#gamma Vertex (mm)", 80, -40, 40)
self.build1DHistogram("pn_gamma_vertex_y", "#gamma Vertex (mm)", 160, -80, 80)
self.build1DHistogram("pn_gamma_int_x", "#gamma Interaction Vertex - x (mm)", 40, 200, 400)
self.build1DHistogram("pn_gamma_int_y", "#gamma Interaction Vertex - y (mm)", 40, 200, 400)
self.build1DHistogram("pn_gamma_int_z", "#gamma Interaction Vertex - z (mm)", 40, 200, 400)

self.build1DHistogram("pn_gamma_vertex_x", "#gamma Vertex - y (mm)", 40, -40, 40)
self.build1DHistogram("pn_gamma_vertex_y", "#gamma Vertex - y (mm)", 80, -80, 80)
self.build1DHistogram("pn_gamma_vertex_z", "#gamma Vertex - z (mm)", 10, -5, 5)

self.build1DHistogram("hardest_ke", "Kinetic Energy Hardest Photo-nuclear Particle (MeV)", 400, 0, 8000)
self.build1DHistogram("hardest_theta", "#theta of Hardest Photo-nuclear Particle (Degrees)", 360, 0, 180)
self.build1DHistogram("hardest_p_ke", "Kinetic Energy Hardest Photo-nuclear Proton (MeV)", 400, 0, 8000)
self.build1DHistogram("hardest_p_theta", "#theta of Hardest Photo-nuclear Proton (Degrees)", 360, 0, 180)
self.build1DHistogram("hardest_n_ke", "Kinetic Energy Hardest Photo-nuclear Neutron (MeV)", 400, 0, 8000)
self.build1DHistogram("hardest_n_theta", "#theta of Hardest Photo-nuclear Neutron (Degrees)", 360, 0, 180)
self.build1DHistogram("hardest_pi_ke", "Kinetic Energy Hardest Photo-nuclear #pi (MeV)", 400, 0, 8000)
self.build1DHistogram("hardest_pi_theta", "#theta of Hardest Photo-nuclear #pi (Degrees)", 360, 0, 180)
self.build1DHistogram("hardest_ke", "Kinetic Energy Hardest Photo-nuclear Particle (MeV)", 200, 0, 8000)
self.build1DHistogram("hardest_theta", "#theta of Hardest Photo-nuclear Particle (Degrees)", 180, 0, 180)
self.build1DHistogram("hardest_p_ke", "Kinetic Energy Hardest Photo-nuclear Proton (MeV)", 200, 0, 8000)
self.build1DHistogram("hardest_p_theta", "#theta of Hardest Photo-nuclear Proton (Degrees)", 180, 0, 180)
self.build1DHistogram("hardest_n_ke", "Kinetic Energy Hardest Photo-nuclear Neutron (MeV)", 200, 0, 8000)
self.build1DHistogram("hardest_n_theta", "#theta of Hardest Photo-nuclear Neutron (Degrees)", 180, 0, 180)
self.build1DHistogram("hardest_pi_ke", "Kinetic Energy Hardest Photo-nuclear #pi (MeV)", 200, 0, 8000)
self.build1DHistogram("hardest_pi_theta", "#theta of Hardest Photo-nuclear #pi (Degrees)", 180, 0, 180)

self.build2DHistogram("h_ke_h_theta",
"Kinetic Energy Hardest Photo-nuclear Particle (MeV)",
400, 0, 8000,
200, 0, 8000,
"#theta of Hardest Photo-nuclear Particle (Degrees)",
360, 0, 180)
180, 0, 180)

self.build2DHistogram("1n_ke:2nd_h_ke",
"Kinetic Energy of Leading Neutron (MeV)",
400, 0, 8000,
"Kinetic Energy of 2nd Hardest Particle",
400, 0, 8000)
200, 0, 8000,
"Kinetic Energy of 2nd Hardest Particle (MeV)",
200, 0, 8000)

self.build2DHistogram("1kp_ke:2nd_h_ke",
"Kinetic Energy of Leading Charged Kaon (MeV)",
400, 0, 8000,
"Kinetic Energy of 2nd Hardest Particle",
400, 0, 8000)
200, 0, 8000,
"Kinetic Energy of 2nd Hardest Particle (MeV)",
200, 0, 8000)

self.build2DHistogram("1k0_ke:2nd_h_ke",
"Kinetic Energy of Leading K0 (MeV)",
400, 0, 8000,
"Kinetic Energy of 2nd Hardest Particle",
400, 0, 8000)
200, 0, 8000,
"Kinetic Energy of 2nd Hardest Particle (MeV)",
200, 0, 8000)

self.build2DHistogram("recoil_vertex_x:recoil_vertex_y",
"Recoil electron vertex x (mm)",
160, -40, 40,
80, -40, 40,
"Recoil electron vertex y (mm)",
320, -80, 80)
160, -80, 80)

class TrkDeDxMassEstFeatures(ldmxcfg.Analyzer) :
"""Configured TrkDeDxMassEstFeatures python object
Expand Down

0 comments on commit c5c2579

Please sign in to comment.