# File: penergy.mac # Brief: Short macro showing how to use the PEnergy fitter # # Date: 2019-05-16 # Contact: W. Heintzelman # # This is an example of how to include a PEnergy fit in a # simulation of electron events in LAB/PPO. /run/initialize # BEGIN EVENT LOOP /rat/proc frontend /rat/proc trigger /rat/proc eventbuilder /rat/proc calibratePMT /rat/proc count /rat/procset update 10 # Run the scintFitter /rat/proc scintFitter # Run PEnergy with the standard PEnergy options and application # of adjustments based on event radius and energy. /rat/proc fitter /rat/procset name "penergy" /rat/procset seed "scintFitter" /rat/procset method "pEnergy" /rat/procset method.energyAdjFn "mar2019_labppo" /rat/procset method.radialAdjFn "mar2019_labppo" /rat/procset selector "null" /rat/procset optimiser "minuit" # Uncomment following set of lines to also make fits using the true event # position as the PEnergy seed, rather than the ScintFitter position #/rat/proc fitter #/rat/procset name "penergyA" #/rat/procset seed "scintFitter" #/rat/procset method "pEnergy" #/rat/procset method.energyAdjFn "mar2019_labppo" #/rat/procset method.radialAdjFn "mar2019_labppo" #/rat/procset method.seedActual 1 #/rat/procset selector "null" #/rat/procset optimiser "minuit" # Output the standard snoplus ntuple /rat/proc outntuple /rat/procset file "StdNtuple" # Uncomment the following to set up an OutROOTProc process #/rat/proc outroot #/rat/procset file "ratout.root" # END EVENTLOOP ************************************************ #/generator/add combo VERTEX:POSITION:TIME /generator/add combo gun:fillshell:poisson # Generate points uniformly distributed in the AV to maximum radius of 4000 mm /generator/pos/set 0 0 0 0 4000 inner_av # Generate electrons isotropically with energy of 3 MeV /generator/vtx/set e- 0 0 0 3 # Poisson event rate of 1 Hz /generator/rate/set 1 # Generate 10 events /rat/run/start 10 exit