Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-10-13 09:44:41

0001 #!/usr/bin/bash
0002 
0003 source /opt/detector/epic-main/bin/thisepic.sh
0004 
0005 #source ../../epic_local/install/bin/thisepic.sh #Use local ePIC version
0006 #source ../../eicrecon_local/install/bin/eicrecon-this.sh #Use local EICRecon version
0007 
0008 # Running options
0009 run_set=${1:-0}   # Momentum setting to run
0010 run_npsim=${2:-1} # Run npsim (yes/no)
0011 run_local_map=${3:-0} # 1: Use local material map; 2: Use alternative barrel MPGD digitization
0012 nevents=${4:-1000} # Number of events to run
0013 delta_phi_max=${5:-0.085} # deltaPhiMax seeding parameter
0014 
0015 # Setting 1
0016 # Single negative muons at 500 MeV/c from (0,0,0)
0017 if [ "$run_set" -eq 1 ] || [ "$run_set" -eq 0 ]; then
0018         echo "Running Setting 1!!!"
0019         echo ""
0020         
0021         if [ "$run_npsim" -eq 1 ] ; then
0022                 npsim --compactFile $DETECTOR_PATH/epic_craterlake.xml --enableGun --gun.distribution 'eta' \
0023                 --gun.thetaMax 3.106 --gun.thetaMin 0.036 --gun.momentumMin "0.5*GeV" --gun.momentumMax "0.5*GeV" \
0024                 --numberOfEvents ${nevents} --outputFile output/output_500MeV.edm4hep.root
0025         fi
0026 
0027         if [ "$run_local_map" -eq 1 ] ; then
0028                 eicrecon -Ppodio:output_file=output/eicrecon_out_500MeV.root \
0029                 -Pjana:nevents=${nevents} \
0030                 -Ptracking:CentralTrackSeedingResults:deltaPhiMax=${delta_phi_max} \
0031                 -Pacts:MaterialMap=material-map.cbor \
0032                 -Pdd4hep:xml_files=epic_craterlake.xml output/output_500MeV.edm4hep.root | tee output/log/out_500MeV.txt
0033         else
0034                 eicrecon -Ppodio:output_file=output/eicrecon_out_500MeV.root \
0035                 -Pjana:nevents=${nevents} \
0036                 -Ptracking:CentralTrackSeedingResults:deltaPhiMax=${delta_phi_max} \
0037                 -Pdd4hep:xml_files=epic_craterlake.xml output/output_500MeV.edm4hep.root | tee output/log/out_500MeV.txt
0038         fi
0039 
0040 fi
0041 
0042 # Setting 2
0043 # Single negative muons at 1 GeV/c from (0,0,0)
0044 if [ "$run_set" -eq 2 ] || [ "$run_set" -eq 0 ]; then
0045         echo "Running Setting 2!!!"
0046         echo ""
0047 
0048         if [ "$run_npsim" -eq 1 ] ; then
0049                 npsim --compactFile $DETECTOR_PATH/epic_craterlake.xml --enableGun --gun.distribution 'eta' \
0050                 --gun.thetaMax 3.106 --gun.thetaMin 0.036 --gun.momentumMin "1.0*GeV" --gun.momentumMax "1.0*GeV" \
0051                 --numberOfEvents ${nevents} --outputFile output/output_1GeV.edm4hep.root
0052         fi
0053 
0054         if [ "$run_local_map" -eq 1 ] ; then
0055                 eicrecon -Ppodio:output_file=output/eicrecon_out_1GeV.root \
0056                 -Pjana:nevents=${nevents} \
0057                 -Ptracking:CentralTrackSeedingResults:deltaPhiMax=${delta_phi_max} \
0058                 -Pacts:MaterialMap=material-map.cbor \
0059                 -Pdd4hep:xml_files=epic_craterlake.xml output/output_1GeV.edm4hep.root | tee output/log/out_1GeV.txt
0060         else
0061                 eicrecon -Ppodio:output_file=output/eicrecon_out_1GeV.root \
0062                 -Pjana:nevents=${nevents} \
0063                 -Ptracking:CentralTrackSeedingResults:deltaPhiMax=${delta_phi_max} \
0064                 -Pdd4hep:xml_files=epic_craterlake.xml output/output_1GeV.edm4hep.root | tee output/log/out_1GeV.txt
0065         fi
0066         
0067 fi
0068 
0069 # Setting 3
0070 # Single negative muons at 2 GeV/c from (0,0,0)
0071 if [ "$run_set" -eq 3 ] || [ "$run_set" -eq 0 ]; then
0072         echo "Running Setting 3!!!"
0073         echo ""
0074 
0075         if [ "$run_npsim" -eq 1 ] ; then
0076                 npsim --compactFile $DETECTOR_PATH/epic_craterlake.xml --enableGun --gun.distribution 'eta' \
0077                 --gun.thetaMax 3.106 --gun.thetaMin 0.036 --gun.momentumMin "2.0*GeV" --gun.momentumMax "2.0*GeV" \
0078                 --numberOfEvents ${nevents} --outputFile output/output_2GeV.edm4hep.root
0079         fi
0080 
0081         if [ "$run_local_map" -eq 1 ] ; then
0082                 eicrecon -Ppodio:output_file=output/eicrecon_out_2GeV.root \
0083                 -Pjana:nevents=${nevents} \
0084                 -Ptracking:CentralTrackSeedingResults:deltaPhiMax=${delta_phi_max} \
0085                 -Pacts:MaterialMap=material-map.cbor \
0086                 -Pdd4hep:xml_files=epic_craterlake.xml output/output_2GeV.edm4hep.root | tee output/log/out_2GeV.txt
0087         elif [ "$run_local_map" -eq 2 ] ; then
0088                 eicrecon -Ppodio:output_file=output/eicrecon_out_MpgdDigi_2GeV.root \
0089                 -Pjana:nevents=${nevents} \
0090                 -Ptracking:CentralTrackSeedingResults:deltaPhiMax=${delta_phi_max} \
0091                 -PMPGD:SiFactoryPattern="0x3" \
0092                 -Pdd4hep:xml_files=epic_craterlake.xml output/output_2GeV.edm4hep.root | tee output/log/out_2GeV.txt
0093         else
0094                 eicrecon -Ppodio:output_file=output/eicrecon_out_2GeV.root \
0095                 -Pjana:nevents=${nevents} \
0096                 -Ptracking:CentralTrackSeedingResults:deltaPhiMax=${delta_phi_max} \
0097                 -Pdd4hep:xml_files=epic_craterlake.xml output/output_2GeV.edm4hep.root | tee output/log/out_2GeV.txt
0098         fi
0099 
0100 fi
0101 
0102 # Setting 4
0103 # Single negative muons at 5 GeV/c from (0,0,0)
0104 if [ "$run_set" -eq 4 ] || [ "$run_set" -eq 0 ]; then
0105         echo "Running Setting 4!!!"
0106         echo ""
0107 
0108         if [ "$run_npsim" -eq 1 ] ; then
0109                 npsim --compactFile $DETECTOR_PATH/epic_craterlake.xml --enableGun --gun.distribution 'eta' \
0110                 --gun.thetaMax 3.106 --gun.thetaMin 0.036 --gun.momentumMin "5.0*GeV" --gun.momentumMax "5.0*GeV" \
0111                 --numberOfEvents ${nevents} --outputFile output/output_5GeV.edm4hep.root
0112         fi
0113 
0114         if [ "$run_local_map" -eq 1 ] ; then
0115                 eicrecon -Ppodio:output_file=output/eicrecon_out_5GeV.root \
0116                 -Pjana:nevents=${nevents} \
0117                 -Ptracking:CentralTrackSeedingResults:deltaPhiMax=${delta_phi_max} \
0118                 -Pacts:MaterialMap=material-map.cbor \
0119                 -Pdd4hep:xml_files=epic_craterlake.xml output/output_5GeV.edm4hep.root | tee output/log/out_5GeV.txt
0120         else
0121                 eicrecon -Ppodio:output_file=output/eicrecon_out_5GeV.root \
0122                 -Pjana:nevents=${nevents} \
0123                 -Ptracking:CentralTrackSeedingResults:deltaPhiMax=${delta_phi_max} \
0124                 -Pdd4hep:xml_files=epic_craterlake.xml output/output_5GeV.edm4hep.root | tee output/log/out_5GeV.txt
0125         fi
0126 
0127 fi
0128 
0129 # Setting 5
0130 # Single negative muons at 10 GeV/c from (0,0,0)
0131 if [ "$run_set" -eq 5 ] || [ "$run_set" -eq 0 ]; then
0132         echo "Running Setting 5!!!"
0133         echo ""
0134 
0135         if [ "$run_npsim" -eq 1 ] ; then
0136                 npsim --compactFile $DETECTOR_PATH/epic_craterlake.xml --enableGun --gun.distribution 'eta' \
0137                 --gun.thetaMax 3.106 --gun.thetaMin 0.036 --gun.momentumMin "10.0*GeV" --gun.momentumMax "10.0*GeV" \
0138                 --numberOfEvents ${nevents} --outputFile output/output_10GeV.edm4hep.root
0139         fi
0140 
0141         if [ "$run_local_map" -eq 1 ] ; then
0142                 eicrecon -Ppodio:output_file=output/eicrecon_out_10GeV.root \
0143                 -Pjana:nevents=${nevents} \
0144                 -Ptracking:CentralTrackSeedingResults:deltaPhiMax=${delta_phi_max} \
0145                 -Pacts:MaterialMap=material-map.cbor \
0146                 -Pdd4hep:xml_files=epic_craterlake.xml output/output_10GeV.edm4hep.root | tee output/log/out_10GeV.txt
0147         else
0148                 eicrecon -Ppodio:output_file=output/eicrecon_out_10GeV.root \
0149                 -Pjana:nevents=${nevents} \
0150                 -Ptracking:CentralTrackSeedingResults:deltaPhiMax=${delta_phi_max} \
0151                 -Pdd4hep:xml_files=epic_craterlake.xml output/output_10GeV.edm4hep.root | tee output/log/out_10GeV.txt
0152         fi
0153 
0154 fi
0155 
0156 # Setting 6
0157 # Single negative muons at 20 GeV/c from (0,0,0)
0158 if [ "$run_set" -eq 6 ] || [ "$run_set" -eq 0 ]; then
0159         echo "Running Setting 6!!!"
0160         echo ""
0161 
0162         if [ "$run_npsim" -eq 1 ] ; then
0163                 npsim --compactFile $DETECTOR_PATH/epic_craterlake.xml --enableGun --gun.distribution 'eta' \
0164                 --gun.thetaMax 3.106 --gun.thetaMin 0.036 --gun.momentumMin "20.0*GeV" --gun.momentumMax "20.0*GeV" \
0165                 --numberOfEvents ${nevents} --outputFile output/output_20GeV.edm4hep.root
0166         fi
0167 
0168         if [ "$run_local_map" -eq 1 ] ; then
0169                 eicrecon -Ppodio:output_file=output/eicrecon_out_20GeV.root \
0170                 -Pjana:nevents=${nevents} \
0171                 -Ptracking:CentralTrackSeedingResults:deltaPhiMax=${delta_phi_max} \
0172                 -Pacts:MaterialMap=material-map.cbor \
0173                 -Pdd4hep:xml_files=epic_craterlake.xml output/output_20GeV.edm4hep.root | tee output/log/out_20GeV.txt
0174         else
0175                 eicrecon -Ppodio:output_file=output/eicrecon_out_20GeV.root \
0176                 -Pjana:nevents=${nevents} \
0177                 -Ptracking:CentralTrackSeedingResults:deltaPhiMax=${delta_phi_max} \
0178                 -Pdd4hep:xml_files=epic_craterlake.xml output/output_20GeV.edm4hep.root | tee output/log/out_20GeV.txt
0179         fi
0180 
0181 fi
0182 
0183 echo ""
0184 echo "Done!"