Changeset 19812 for trunk/Mars
- Timestamp:
- 10/27/19 18:24:16 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/hawc/runranger.sh
r19801 r19812 5 5 OUT=ranger.csv 6 6 TRAINRATIO=0.7 7 #TREE=Events 7 8 8 9 # Classical reconstruction parameters … … 13 14 #TRUEVAR="MeanY*conv" 14 15 15 # Impact on ground 16 #TRUEVAR="TMath::Hypot(X,Y)" 17 #TRUEVAR="atan2(X,Y)*TMath::RadToDeg()" 16 # Impact on ground (We can not use GroundR here, see --no-indirection) 17 #TRUEVAR="GroundR" 18 #TRUEVAR="GroundPhi" 19 #TRUEVAR="X" 20 #TRUEVAR="Y" 18 21 19 22 echo --------------------------------- Creating input files ------------------------- … … 29 32 30 33 # Some cuts to remove events with strange contents 31 selector= NumUsedPixels>2.5 && lgArea>-1 && abs(SlopeTrans/conv)<134 selector=lgArea>-1 && abs(SlopeTrans/conv)<2.5 32 35 33 36 # Define some alias for easier use and use in the selector … … 35 38 conv=1.14112295210361481e-01 36 39 lgArea=log10(TMath::TwoPi()*Width*Length*conv^2) 40 GroundR=sqrt(X*X + Y*Y) 41 GroundPhi=atan2(Y, X) 37 42 38 43 # Add additonal columns … … 46 51 Delta = Delta 47 52 Angle = atan2(MeanX, MeanY) 48 M3L = M3Long* TMath::Sign(1,CosDeltaAlpha)*conv53 M3L = M3Long*sign(CosDeltaAlpha)*conv 49 54 M3T = M3Trans*conv 50 55 Asym = Asym*conv … … 55 60 ConcCore = ConcCore 56 61 ConcCOG = ConcCOG 57 SlopeL = SlopeLong* TMath::Sign(1,CosDeltaAlpha)/conv62 SlopeL = SlopeLong*sign(CosDeltaAlpha)/conv 58 63 SlopeT = SlopeTrans/conv 64 MeanX = MeanX 65 MeanY = MeanY 59 66 60 67 TimeSpread = TimeSpread … … 68 75 69 76 # Be careful, this is true MC information 70 #GroundR = TMath::Hypot(X,Y)71 #GroundPhi = atan2(Y,X)77 #GroundR = GroundR 78 #GroundPhi = GroundPhi 72 79 #GroundX = X 73 #GroundY Y= Y80 #GroundY = Y 74 81 EOF 75 82 … … 93 100 --file ${TRAIN} --outprefix ${OUT} --depvarname True \ 94 101 --verbose --treetype 3 --impmeasure 1 --write 102 if [ $? != 0 ]; then 103 exit 1 104 fi 95 105 96 106 echo "" … … 105 115 --file ${TEST} --outprefix ${OUT} --predict ${OUT}.forest \ 106 116 --verbose --treetype 3 107 108 echo --------------------------------- Creating root file ---------------------------109 ${NICE} ${CSV2ROOT} ${TEST} ${OUT}.root --force110 117 if [ $? != 0 ]; then 111 118 exit 1 112 119 fi 113 120 114 ${NICE} ${CSV2ROOT} ${OUT}.prediction ${OUT}.root --update 121 echo --------------------------------- Creating root file --------------------------- 122 ${NICE} ${CSV2ROOT} ${TEST} ${OUT}.root ${TREE} --force 115 123 if [ $? != 0 ]; then 116 124 exit 1 117 125 fi 118 126 127 ${NICE} ${CSV2ROOT} ${OUT}.prediction ${OUT}.root ${TREE} --update 128 if [ $? != 0 ]; then 129 exit 1 130 fi
Note:
See TracChangeset
for help on using the changeset viewer.