Plotting updates
This commit is contained in:
parent
9848725f58
commit
ff2171c2f1
|
|
@ -119,7 +119,7 @@ int main(int argc, char **argv){
|
|||
// define vertex position uniform distribution ranges (mm)
|
||||
double vertexXRange[2] = { -5, 5}; // mm - 5, 5
|
||||
double vertexYRange[2] = { -5, 5}; // -5, 5
|
||||
double vertexZRange[2] = { -174.3, 174.3}; // -174.3, 174.3 (full length of gas volume, centered at 0)
|
||||
double vertexZRange[2] = { -174.3, 34.86}; // -174.3, 174.3 (full length of gas volume, centered at 0)
|
||||
const double beamEntranceZ = -280; //vertexZRange[0]; // mm, assumed beam entrance into the gas
|
||||
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1408,8 +1408,8 @@ class MyInteractiveApp(cmd.Cmd):
|
|||
plt.xlabel("Eqqq")
|
||||
plt.ylabel("Edet")
|
||||
plt.title("Eqqq vs Edet")
|
||||
#plt.yscale("log")
|
||||
#plt.xscale("log")
|
||||
plt.yscale("log")
|
||||
plt.xscale("log")
|
||||
plt.colorbar(label="counts")
|
||||
plt.tight_layout()
|
||||
plt.savefig(f"{base}/Eqqq_vs_Edet.png")
|
||||
|
|
@ -1459,6 +1459,7 @@ class MyInteractiveApp(cmd.Cmd):
|
|||
cb = plt.colorbar(label="Counts")
|
||||
|
||||
# overlay 0.1 / sin(theta) path (cm)
|
||||
plt.axhline(y=0.1, color='white', linestyle='--', linewidth=2)
|
||||
sin_th = np.sin(theta_rad)
|
||||
sin_th = np.where(np.abs(sin_th) < 1e-6, 1e-6, sin_th)
|
||||
path_cm = 0.1 / sin_th
|
||||
|
|
@ -1641,6 +1642,22 @@ class MyInteractiveApp(cmd.Cmd):
|
|||
except ValueError:
|
||||
print("Value error")
|
||||
|
||||
try:
|
||||
mask1 = ~np.isnan(Edet) & (Edet > 0) & sx3_theta_plot_mask
|
||||
plt.figure(figsize=(7,6))
|
||||
plt.hist2d(Edet[mask1], np.sin(np.deg2rad(data["thetab"][mask1])) * Eprop[mask1], bins=200, norm="log")
|
||||
plt.ylabel("PCEnergy x sin(theta)")
|
||||
plt.xlabel("SX3 Energy Detected (MeV)")
|
||||
plt.title(f"{particle} ({treename}) Energy Propagation Difference vs SX3 Energy Detected")
|
||||
plt.colorbar(label="Counts")
|
||||
#plt.xlim(0,30)
|
||||
#plt.ylim(0,.5)
|
||||
plt.tight_layout()
|
||||
plt.savefig(f"{base}/Eprop_vs_Edet_log.png", dpi=300)
|
||||
plt.show()
|
||||
except ValueError:
|
||||
print("Value error")
|
||||
|
||||
|
||||
mask1 = (
|
||||
~np.isnan(EdetQ)
|
||||
|
|
@ -1661,6 +1678,25 @@ class MyInteractiveApp(cmd.Cmd):
|
|||
plt.savefig(f"{base}/Eprop_vs_EdetQ.png", dpi=300)
|
||||
plt.show()
|
||||
|
||||
mask1 = (
|
||||
~np.isnan(EdetQ)
|
||||
& (EdetQ > 0)
|
||||
& ~np.isnan(EpropQ)
|
||||
& ~np.isnan(thetabqqq)
|
||||
& qqq_theta_plot_mask
|
||||
)
|
||||
plt.figure(figsize=(7,6))
|
||||
plt.hist2d(EdetQ[mask1], (np.sin(np.deg2rad(thetabqqq[mask1])) * EpropQ[mask1]), bins=200, norm="log")
|
||||
plt.ylabel("PCEnergy x sin(theta)")
|
||||
plt.xlabel("Eqqq detected (MeV)")
|
||||
plt.title(f"{particle} ({treename}) EDet QQQ vs PCEnergy * sin(theta)")
|
||||
plt.colorbar(label="Counts")
|
||||
#plt.xlim(0,30)
|
||||
#plt.ylim(0,0.45)
|
||||
plt.tight_layout()
|
||||
plt.savefig(f"{base}/Eprop_vs_EdetQ_log.png", dpi=300)
|
||||
plt.show()
|
||||
|
||||
|
||||
branch_names = []
|
||||
for key in self.tree.keys():
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user