Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Track Length in the water & Energy Reconstruction #248

Merged
merged 7 commits into from
Feb 16, 2024
Prev Previous commit
Next Next commit
Fixed units of MC track length in mrd in FindTrackLengthInWater tool …
…and converted reconstructed track length in the water and energy in [m] and [GeV] before passing them to the ANNIEEvent store.
  • Loading branch information
ckaragian committed Dec 10, 2023
commit d1ee6a9e287042fc1ba3ee9738043dc9cdae2dea
2 changes: 1 addition & 1 deletion UserTools/BDTMuonEnergyPredict/BDTMuonEnergyPredict.py
Original file line number Diff line number Diff line change
@@ -148,7 +148,7 @@ def Execute(self):
#Set the BDTMuonEnergy in the EnergyReco boost store to be loaded by other tools
BDTMuonEnergy=float(recoEnergy[0])
EnergyRecoBoostStore.Set("BDTMuonEnergy", BDTMuonEnergy)
self.m_data.Stores.at("ANNIEEvent").Set("RecoMuonEnergy", BDTMuonEnergy)#Set the BDTMuonEnergy in the ANNIEEvent store
self.m_data.Stores.at("ANNIEEvent").Set("RecoMuonEnergy", BDTMuonEnergy/1000.)#Set the BDTMuonEnergy in the ANNIEEvent store in [GeV]

EnergyRecoBoostStore.Save("EnergyRecoStore.bs")#Append each entry to file in case we want to make plots

2 changes: 1 addition & 1 deletion UserTools/DNNTrackLengthPredict/DNNTrackLengthPredict.py
Original file line number Diff line number Diff line change
@@ -175,7 +175,7 @@ def Execute(self):
#Set the DNNRecoLength in the EnergyReco boost store for next tools
DNNRecoLength=float(y_predicted[0])
EnergyRecoBoostStore.Set("DNNRecoLength", DNNRecoLength)
self.m_data.Stores.at("ANNIEEvent").Set("RecoTrackLengthInTank", DNNRecoLength)#Set the DNNRecoLength in the ANNIEEvent store
self.m_data.Stores.at("ANNIEEvent").Set("RecoTrackLengthInTank", DNNRecoLength/100.)#Set the DNNRecoLength in the ANNIEEvent store in [m]
return 1

def Finalise(self):
Original file line number Diff line number Diff line change
@@ -273,7 +273,7 @@ bool FindTrackLengthInWater::Execute(){
float recoDWallR2 = recoDWallR/tank_radius;
float recoDWallZ2 = recoDWallZ/tank_halfheight*2.;
float TrueTrackLengthInWater2 = TrueTrackLengthInWater*100.; // convert to [cm]
float TrueTrackLengthInMrd2 = TrueTrackLengthInMrd*100.; // convert to [cm]
float TrueTrackLengthInMrd2 = TrueTrackLengthInMrd; // it is already in [cm]
// we need to normalise the digit time and lambda vectors to fixed dimensions to match the MaxTotalHitsToDNN

lambda_vector.resize(maxhits0);