#/* #* The Big RAT Macro #* #* the_big_rat_macro.mac #* #* Date: 10/12/2009 #* contact: E. Vazquez-Jauregui, SNOLAB (ericvj@snolab.ca) #* #* # only a comment (do not uncomment) #* # command (change according to your needs) #* #* Initialization and exit are not commented #* #* To find out more about any command, look at: #* snocave/sasquatch/dev/doc/companion/html/sasquatch.html #* in your snocave directory #*/ ############################################################# # If don't care about hadrons or muons so quicker not to initialise these processes: #/rat/physics_list/OmitMuonicProcesses true #/rat/physics_list/OmitHadronicProcesses true # Other Physics List commands that can now be implemented # Turn off cerenkov effects #/rat/physics_list/OmitCerenkov true # Turn off Optical Boundary effects such as reflection or refraction #/rat/physics_list/Optical/OmitBoundaryEffects true # Turn off Optical Attenuation #/rat/physics_list/Optical/OmitAttenuation true # Turn off all Physics from the Hadronic PhysicsList #/rat/physics_list/OmitHadronicPhysicsList true ############################################################# # Detector geometry everything: #/rat/db/set DETECTOR geo_file "geo/snoplus.geo" # Load additional geometry: #/rat/db/load geo/calib/BucketSource.geo ############################################################# # Some specific characteristics for geometry: #/rat/db/set GEO[psup] vis_invisible 1 # Make the psup invisible #/rat/db/set GEO[inner_av] material "lightwater_sno" #/rat/db/set GEO[innerPMT] pmt_type "r5912" # Use the r5912 PMT # Parameters to view one PMT: #/rat/db/set GEO[innerPMT] vis_simple 0 #/rat/db/set GEO[innerPMT] add_concentrator [1] #/rat/db/set GEO[innerPMT] add_bucket [0] # tends to obscure view! #/rat/db/set GEO[innerPMT] use_envelope [1] # Parameters to view the scintillator bucket geometry inside the snoplus geometry #/rat/db/set GEO[innerPMT] enable 0 # Enable-disable the PMT geometry #/rat/db/set GEO[source] z 100.0 #/rat/db/set GEO[neutronSource] z 100.0 # Examples of how to change the parameters of the CanSource geometry #/rat/db/set GEO[canSource] innerCanMaterial "stainless_steel" #/rat/db/set GEO[canSource] pmtRadius 5.25 ############################################################## # Set for use of the ELLIE beam: #/rat/db/set ELLIE intensity 5000 # Set the number of photons per beam #/rat/db/set ELLIE mono_wl 400 # Choose a mono-energetic wavelength of 400nm #/rat/db/set ELLIE time_dist "mono" # choose single time #/rat/db/set ELLIE angle_dist "zero" # zero means no angular distribution ############################################################## #/rat/db/set FIT_LIKE histogram_filename "FitLikePDFNtuple.root" # If using the likelihood fitter #/rat/db/set DAQ_RUN_LEVEL n100_hi_thresh 20.0 #/rat/db/set DAQ_RUN_LEVEL n100_med_thresh 18.0 #/rat/db/set DAQ_RUN_LEVEL n100_lo_thresh 16.0 #/rat/db/set DAQ_RUN_LEVEL n20_thresh 20.0 #/rat/db/set DAQ_RUN_LEVEL n20_lb_thresh 20.0 #/rat/db/set DAQ_RUN_LEVEL eshi_thresh 160.0 #/rat/db/set DAQ_RUN_LEVEL eslo_thresh 120.0 #/rat/db/set NOISE_MC noise_flag 0 # Turn off pmt noise hits #/rat/db/set NOISE_RUN_LEVEL average_noiserate 500.0d # Set the average pmt noise rate in Hz #/rat/db/set AFTERPULSING[data_type] data "r1408_snoplus" # Set the after-pulsing data type #/rat/db/set AFTERPULSING[r1408_snoplus] apFlag 1 # turn on pmt after-pulsing ############################################################## /run/initialize # Initialize ############################################################## # For visualization: # See one PMT: #/vis/open OGLIX #/vis/scene/create #/vis/scene/add/volume innerPMT0 # Only show the PMT #/vis/sceneHandler/attach #/vis/viewer/set/viewpointThetaPhi -50 90 # Pick a nice perspective and set to solid shading #/vis/viewer/zoom 1.3 #/vis/viewer/set/style s # See the geometry: #/vis/open HepRepFile #/vis/open DAWNFILE #/vis/open VRML2FILE #/vis/open RayTracer # Viewers (check visualization in sasquatch companion for options) #/vis/scene/create # Add scene to the viewer #/vis/scene/add/volume #/vis/sceneHandler/attach #/vis/viewer/set/upVector 0.0 0.0 1.0 #/vis/viewer/set/viewpointThetaPhi -90 90 #/vis/viewer/set/lightsThetaPhi 90 0 # View point #/vis/viewer/set/zoom 10 # Zoom factor #/vis/viewer/set/style surface # Surfaces wire-frame or filled #/vis/scene/add/trajectories # View trajectories #/vis/scene/add/hits # View hits #/tracking/storeTrajectory 1 #/vis/viewer/flush # View the geometry ################################################################## # BEGIN EVENT LOOP # Input: #/rat/inroot/read filename.root # Input from root files #/rat/innet/listen port # Input from network (input port) #/rat/proc simpledaq # Simple DAQ #/rat/proc frontend # Front end electronics #/rat/proc trigger # Trigger #/rat/proc eventbuilder # Event builder #/rat/proc count # Enable counting for printing to display or log file #/rat/procset update 1 # Print every 1 events #/rat/proc calibratePMT # to calibrate PMT hit information - # needed to run fitters # Fitters: #/rat/proc fitter # Near AV fitter #/rat/procset method "nearAV" #/rat/proc fitter # Centroid fitter #/rat/procset method "centroid" #/rat/proc fitlikepos # Position for the likelihood fitter #/rat/proc fitlikeenergy # Energy for the likelihood fitter #/rat/proc fitposQPDF # Position for the QPDF fitter #/rat/proc fitenergyQPDF # Energy for the QPDF fitter # Prune: #/rat/proc prune # Remove unwanted parts of the data structure #/rat/procset prune "mc.pmt,mc.pmt.photon" # Remove the last two fron data structure # Output: #/rat/proclast outroot # Enable output #/rat/procset file "outputfile.root" # Output file #/rat/proc outnet # Send events trough the network to another rat #/rat/procset host "hostname:port" # Input hostname and port # END EVENT LOOP #################################################################### # Command for generators: #/generator/add GEN_NAME GEN_OPTIONS # GEN_NAME: combo, decaychain, cf, ellie, coincidence # GEN_OPTIONS: VERTEX:POSITION:TIME (if only VERTEX:POSITION specified, Poisson is assumed for TIME) # Options for VERTEX: # gun, gun2, ibd, es, doublebeta, pbomb, decay0, spectrum # Options for POSITION: # point, fill, paint, line # Options for TIME: # uniform, poisson # Some examples: #/generator/add combo es:fill:poisson # Use ES generator #/generator/add combo ibd:fill:poisson # Inverse beta decay generator #/generator/add combo pbomb:point:uniform # Photonbomb generator from fixed point, uniform in time #/generator/add combo spectrum:fill # Spectrum generator #/generator/add combo gun:point # Combo gun and point generator #/generator/add combo gun:fill # Combo gun and fill generator #/generator/add combo gun2:point # Combo gun2 and point generator #/generator/add combo gun:paint:uniform # Combo gun and paint generator, uniform time #/generator/add combo gun:line:uniform # Combo gun and line generator, uniform time #/generator/add ellie # ELLIE generator #/generator/add coincidence doublebeta:fill # Coincidence generator #/generator/add decaychain 232Th:point:uniform # Decay chain generator for Th-232 (all chain) #/generator/add decaychain 214Bi:point:uniform:midchain # Decay chain generator for Bi-214 (start decay chain from Bi-214) #/generator/add decaychain 214Bi:point:uniform # Decay chain generator for Bi-214 (beta decay) #/generator/add decaychain 214Bi:point:uniform:alpha # Decay chain generator for Bi-214 (alpha decay) #/generator/add decaychain 60Co:point:poisson::screen # Decay chain generator for Co-60 (using a screening correction for the decay, no screening is default) #/generator/add cf 252:point:uniform # Cf generator (neutrons and prompt photons from spontaneous fission of Cf252) ##################################################################### #/particle/list # Show the particle list to be used with the generators ##################################################################### # Vertex generator: #/generator/vtx/set PARTICLE PX PY PZ [KE] [POLX POLY POLZ] [MUL RAND] # For gun and gun2 # Input particle, momenta (PX,PY,PZ), kinetic energy (KE) and/or polarization (POLX,POLY,POLZ) #/generator/vtx/set DIR_X DIR_Y DIR_Z # For ibd, es # Input direction in (x,y,z) #/generator/vtx/set NPHOTONS WAVELENGTH # For photobomb # Input number of photons and wavelength #/generator/vtx/set PARTICLE NAME [ELO] [EHI] # For spectrum # Input particle and name= flat (see InputSpectrum.ratdb) # Energy range: ELO (lower energy) and EHI (higher energy) #/generator/vtx/set 2beta [ISOTOPE] [LEVEL] [MODE] [LoELim] [HiELim] # For decay0 - simulation of the double beta decays #/generator/vtx/set backg [ISOTOPE] # For decay0 - simulation of the radioactive decays #--------------------------------------------------------------------- # Position generator: #/generator/pos/set X Y Z # For point, fill and paintn (for latter point must be somewhere inside the required geometry region # Input position in (x,y,z) #/generator/pos/set X1 Y1 Z1 X2 Y2 Z2 # For line # Input two points for line # Specific cases: #/generator/pos/set inner_av # in scintillator #/generator/pos/set av # in AV #/generator/pos/set cavity # in H2O region # Hold-down ropes #/generator/pos/set hold_down_ropes # For surface sources - exchange uniform in /generator/add position argument for paint then use: #/generator/pos/set inner_av 0+ # on interior AV surface #/generator/pos/set av 0+ # on outer AV surface #--------------------------------------------------------------------- # Time generator: #/generator/rate/set TIMEARG #Input TIMEARG (uniform or poisson) #--------------------------------------------------------------------- # Some examples: #/generator/vtx/set 1000 400 0 # photobom: 1000 photons, each of 400nm per pulse #/generator/vtx/set 1 0 0 # ibd or es: along +x #/generator/vtx/set e- flat # spectrum: electrons with flat spectrum (InputSpectrum.ratdb) #/generator/vtx/set e- flat 2.0 4.0 # spectrum: electrons with flat spectrum, lower and higher energy (InputSpectrum.ratdb) #/generator/vtx/set opticalphoton 0 0 0 3.103e-6 0 0 0 1000 # opticalphotons: isotropic (direction = 0,0,0), 3.103 eV, unpolarized, 1000 photons/event #/generator/vtx/set e- 0. 0. 0. 1.0 # electrons isotropically with an energy of 1 MeV #/generator/vtx/set e+ 0. 0. 0. 1.0 # positrons isotropically with an energy of 1 MeV #/generator/vtx/set proton 0. 0. 0. 1.0 # protons isotropically with an energy of 1 MeV #/generator/vtx/set anti_proton 0. 0. 0. 1.0 # anti protons isotropically with an energy of 1 MeV #/generator/vtx/set gamma 0. 0. 0. 0.5 # gammas isotropically with an energy of 0.5 MeV #/generator/vtx/set lambda 0. 0. 0. 2. 0. 0. 1. # lambdas isotropically with an energy of 0.5 MeV polarized in +z #/generator/vtx/set opticalphoton 0. 0. 0. 2. 0. 0. 0. 5. # optical photons with 5 particles per event, with 2 MeV, isotropically #/generator/vtx/set opticalphoton 0. 0. 0. 2. 0. 0. 0. 5. 1. # randomly generate 1,2,3,4 or 5 optical photons per event, with 2 MeV, isotropically #/generator/pos/set 0 0 0 3000 3000 3000 # random points along the line from (0,0,0) to (3000,3000,3000) in mm #/generator/pos/set 3500 0 0 # position (3500,0,0) in mm ######################################################################## # Options for coincidence (example for two neutrino double beta decay): #/generator/coincidence/add decay0:fill # Coincidence with double beta decay #/generator/coincidence/vtx/set 2beta Te130 0 1 # Use te130 #/generator/coincidence/pos/set 0 0 0 # Position for coincidence #/generator/coincidence/timewindow 400 # Input the time window in ns for coincidence #/generator/coincidence/exponential 100. # Exponential timing in ns for coincidence #/generator/coincidence/energyrange 3 4 # Limit the energy of the events produced ########################################################################## #/rat/run/start 100 # Generate 100 events exit