Skip to content

Commit 855bd8a

Browse files
committed
Add option for different Zenith angles with autoscale NSB (and other small improvements).
1 parent 0c74f03 commit 855bd8a

File tree

5 files changed

+58
-37
lines changed

5 files changed

+58
-37
lines changed

IPRgeneration/mergeIPRGraphs.C

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
*
66
* root -l -q -b 'mergeIPRGraphs.C( "output.root", "inputdirectory/" )'
77
*.
8-
*. If the output file name contains the word "halfmoon", e.g., prod5-halfmoon-IPR.root,
8+
*. If the output file name contains the word "halfmoon", e.g., prod5-halfmoon-ze-20-IPR.root,
99
*. then the halfmoon pedestal files are merged.
1010
*/
1111

12-
void mergeIPRGraphs( string iMergedFile = "prod5-IPR.root",
12+
void mergeIPRGraphs( string iMergedFile = "prod5-ze-20-IPR.root",
1313
string iUnMergedFileDirectory = "./" )
1414
{
1515
TFile *f = new TFile( iMergedFile.c_str(), "RECREATE" );
@@ -29,10 +29,14 @@ void mergeIPRGraphs( string iMergedFile = "prod5-IPR.root",
2929
if (iMergedFile.find("halfmoon") != std::string::npos) {
3030
moon = "-halfmoon";
3131
}
32+
string ze = "20";
33+
if (iMergedFile.find("60") != std::string::npos) {
34+
ze = "60";
35+
}
3236

3337
for( unsigned int i = 0; i < fTelTypes.size(); i++ )
3438
{
35-
string iName = iUnMergedFileDirectory + "./pedestals-" + fTelTypes[i] + moon + ".root";
39+
string iName = iUnMergedFileDirectory + "./pedestals-" + fTelTypes[i] + moon + "-ze-" + ze + ".root";
3640
TFile *iF = new TFile( iName.c_str() );
3741
if( iF->IsZombie() )
3842
{

IPRgeneration/produceDST.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
SCRATCH="USER_SET_SCRATCH"
1212
CDIR=$(pwd)
1313

14+
ZE="20"
15+
# ZE="60"
16+
1417
MOONOPT="" # Set to -DHALFMOON for half moon or leave empty or dark conditions (i.e., MOONOPT="")
1518
MOON=`echo "${MOONOPT#*-D}" | tr "[:upper:]" "[:lower:]"`
1619

@@ -20,32 +23,32 @@ MOON=`echo "${MOONOPT#*-D}" | tr "[:upper:]" "[:lower:]"`
2023
# LST
2124
#####################################################################
2225

23-
sourceFile="${SCRATCH}/pedestals-lst${MOON}-1k.simtel.gz"
26+
sourceFile="${SCRATCH}/pedestals-lst${MOON}-ze-${ZE}-1k.simtel.gz"
2427

25-
$EVNDISPSYS/bin/CTA.convert_hessio_to_VDST -a ${CDIR}/geometry-1-telescope.lis -f 2 -o ${SCRATCH}/pedestals-lst${MOON}-dst.root $sourceFile >& lst${MOON}-dst.log &
28+
$EVNDISPSYS/bin/CTA.convert_hessio_to_VDST -a ${CDIR}/geometry-1-telescope.lis -f 2 -o ${SCRATCH}/pedestals-lst${MOON}-ze-${ZE}-dst.root $sourceFile >& lst${MOON}-ze-${ZE}-dst.log &
2629

2730

2831
#####################################################################
2932
# MST-NectarCam
3033
#####################################################################
3134

32-
sourceFile="${SCRATCH}/pedestals-mst-nc${MOON}-1k.simtel.gz"
35+
sourceFile="${SCRATCH}/pedestals-mst-nc${MOON}-ze-${ZE}-1k.simtel.gz"
3336

34-
$EVNDISPSYS/bin/CTA.convert_hessio_to_VDST -a ${CDIR}/geometry-1-telescope.lis -f 2 -o ${SCRATCH}/pedestals-mst-nc${MOON}-dst.root $sourceFile >& mst-nc${MOON}-dst.log &
37+
$EVNDISPSYS/bin/CTA.convert_hessio_to_VDST -a ${CDIR}/geometry-1-telescope.lis -f 2 -o ${SCRATCH}/pedestals-mst-nc${MOON}-ze-${ZE}-dst.root $sourceFile >& mst-nc${MOON}-ze-${ZE}-dst.log &
3538

3639

3740
#####################################################################
3841
# MST-FlashCam
3942
#####################################################################
4043

41-
sourceFile="${SCRATCH}/pedestals-mst-fc${MOON}-1k.simtel.gz"
44+
sourceFile="${SCRATCH}/pedestals-mst-fc${MOON}-ze-${ZE}-1k.simtel.gz"
4245

43-
$EVNDISPSYS/bin/CTA.convert_hessio_to_VDST -a ${CDIR}/geometry-1-telescope.lis -f 2 -o ${SCRATCH}/pedestals-mst-fc${MOON}-dst.root $sourceFile >& mst-fc${MOON}-dst.log &
46+
$EVNDISPSYS/bin/CTA.convert_hessio_to_VDST -a ${CDIR}/geometry-1-telescope.lis -f 2 -o ${SCRATCH}/pedestals-mst-fc${MOON}-ze-${ZE}-dst.root $sourceFile >& mst-fc${MOON}-ze-${ZE}-dst.log &
4447

4548
#####################################################################
4649
# SST
4750
#####################################################################
4851

49-
sourceFile="${SCRATCH}/pedestals-sst${MOON}-1k.simtel.gz"
52+
sourceFile="${SCRATCH}/pedestals-sst${MOON}-ze-${ZE}-1k.simtel.gz"
5053

51-
$EVNDISPSYS/bin/CTA.convert_hessio_to_VDST -a ${CDIR}/geometry-1-telescope.lis -f 2 -o ${SCRATCH}/pedestals-sst${MOON}-dst.root $sourceFile >& sst${MOON}-dst.log &
54+
$EVNDISPSYS/bin/CTA.convert_hessio_to_VDST -a ${CDIR}/geometry-1-telescope.lis -f 2 -o ${SCRATCH}/pedestals-sst${MOON}-ze-${ZE}-dst.root $sourceFile >& sst${MOON}-ze-${ZE}-dst.log &

IPRgeneration/produceGraphFromDST.sh

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
SCRATCH="USER_SET_SCRATCH"
1212

13+
ZE="20"
14+
# ZE="60"
15+
1316
MOONOPT="" # Set to -DHALFMOON for half moon or leave empty or dark conditions (i.e., MOONOPT="")
1417
MOON=`echo "${MOONOPT#*-D}" | tr "[:upper:]" "[:lower:]"`
1518

@@ -23,11 +26,11 @@ ADC="" # Set to -ignoredstgains if you want to produce graphs in ADC counts rath
2326

2427
echo "Producing IPR graphs for LST"
2528

26-
sourceFile="${SCRATCH}/pedestals-lst${MOON}-dst.root"
29+
sourceFile="${SCRATCH}/pedestals-lst${MOON}-ze-${ZE}-dst.root"
2730

28-
$EVNDISPSYS/bin/evndisp -nevents=1000 -sourcefile $sourceFile -runmode=1 -singlepedestalrootfile=1 -donotusepeds -usePedestalsInTimeSlices=0 -calibrationsumwindow=10 -calibrationsumfirst=0 -reconstructionparameter EVNDISP.prod5.reconstruction.runparameter -nopedestalsintimeslices -combine_pedestal_channels ${ADC} >& pedestals-lst${MOON}.log;
31+
$EVNDISPSYS/bin/evndisp -nevents=1000 -sourcefile $sourceFile -runmode=1 -singlepedestalrootfile=1 -donotusepeds -usePedestalsInTimeSlices=0 -calibrationsumwindow=10 -calibrationsumfirst=0 -reconstructionparameter EVNDISP.prod5.reconstruction.runparameter -nopedestalsintimeslices -combine_pedestal_channels ${ADC} >& pedestals-lst${MOON}-ze-${ZE}.log;
2932

30-
mv -f dst.root pedestals-lst${MOON}.root;
33+
mv -f dst.root pedestals-lst${MOON}-ze-${ZE}.root;
3134

3235

3336
#####################################################################
@@ -36,32 +39,32 @@ mv -f dst.root pedestals-lst${MOON}.root;
3639

3740
echo "Producing IPR graphs for MST-NectarCam"
3841

39-
sourceFile="${SCRATCH}/pedestals-mst-nc${MOON}-dst.root"
42+
sourceFile="${SCRATCH}/pedestals-mst-nc${MOON}-ze-${ZE}-dst.root"
4043

41-
$EVNDISPSYS/bin/evndisp -nevents=1000 -sourcefile $sourceFile -runmode=1 -singlepedestalrootfile=1 -donotusepeds -usePedestalsInTimeSlices=0 -calibrationsumwindow=10 -calibrationsumfirst=0 -reconstructionparameter EVNDISP.prod5.reconstruction.runparameter -nopedestalsintimeslices -combine_pedestal_channels ${ADC} >& pedestals-mst-nc${MOON}.log;
44+
$EVNDISPSYS/bin/evndisp -nevents=1000 -sourcefile $sourceFile -runmode=1 -singlepedestalrootfile=1 -donotusepeds -usePedestalsInTimeSlices=0 -calibrationsumwindow=10 -calibrationsumfirst=0 -reconstructionparameter EVNDISP.prod5.reconstruction.runparameter -nopedestalsintimeslices -combine_pedestal_channels ${ADC} >& pedestals-mst-nc${MOON}-ze-${ZE}.log;
4245

43-
mv -f dst.root pedestals-mst-nc${MOON}.root;
46+
mv -f dst.root pedestals-mst-nc${MOON}-ze-${ZE}.root;
4447

4548
#####################################################################
4649
# MST-FlashCam
4750
#####################################################################
4851

4952
echo "Producing IPR graphs for MST-FlashCam"
5053

51-
sourceFile="${SCRATCH}/pedestals-mst-fc${MOON}-dst.root"
54+
sourceFile="${SCRATCH}/pedestals-mst-fc${MOON}-ze-${ZE}-dst.root"
5255

53-
$EVNDISPSYS/bin/evndisp -nevents=1000 -sourcefile $sourceFile -runmode=1 -singlepedestalrootfile=1 -donotusepeds -usePedestalsInTimeSlices=0 -calibrationsumwindow=10 -calibrationsumfirst=0 -reconstructionparameter EVNDISP.prod5.reconstruction.runparameter -nopedestalsintimeslices -combine_pedestal_channels ${ADC} >& pedestals-mst-fc${MOON}.log;
56+
$EVNDISPSYS/bin/evndisp -nevents=1000 -sourcefile $sourceFile -runmode=1 -singlepedestalrootfile=1 -donotusepeds -usePedestalsInTimeSlices=0 -calibrationsumwindow=10 -calibrationsumfirst=0 -reconstructionparameter EVNDISP.prod5.reconstruction.runparameter -nopedestalsintimeslices -combine_pedestal_channels ${ADC} >& pedestals-mst-fc${MOON}-ze-${ZE}.log;
5457

55-
mv -f dst.root pedestals-mst-fc${MOON}.root;
58+
mv -f dst.root pedestals-mst-fc${MOON}-ze-${ZE}.root;
5659

5760
#####################################################################
5861
# SST
5962
#####################################################################
6063

6164
echo "Producing IPR graphs for SST"
6265

63-
sourceFile="${SCRATCH}/pedestals-sst${MOON}-dst.root"
66+
sourceFile="${SCRATCH}/pedestals-sst${MOON}-ze-${ZE}-dst.root"
6467

65-
$EVNDISPSYS/bin/evndisp -nevents=1000 -sourcefile $sourceFile -runmode=1 -singlepedestalrootfile=1 -donotusepeds -usePedestalsInTimeSlices=0 -calibrationsumwindow=10 -calibrationsumfirst=0 -reconstructionparameter EVNDISP.prod5.reconstruction.runparameter -nopedestalsintimeslices -combine_pedestal_channels ${ADC} >& pedestals-sst${MOON}.log;
68+
$EVNDISPSYS/bin/evndisp -nevents=1000 -sourcefile $sourceFile -runmode=1 -singlepedestalrootfile=1 -donotusepeds -usePedestalsInTimeSlices=0 -calibrationsumwindow=10 -calibrationsumfirst=0 -reconstructionparameter EVNDISP.prod5.reconstruction.runparameter -nopedestalsintimeslices -combine_pedestal_channels ${ADC} >& pedestals-sst${MOON}-ze-${ZE}.log;
6669

67-
mv -f dst.root pedestals-sst${MOON}.root;
70+
mv -f dst.root pedestals-sst${MOON}-ze-${ZE}.root;

IPRgeneration/producePedestals.sh

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ CDIR=$(pwd)
1212
SIMTEL="USER_SET_SIM_TELARRAY"
1313
SCRATCH="USER_SET_SCRATCH"
1414

15+
ZENITH="20.0"
16+
# ZENITH="60.0"
17+
ZE=${ZENITH%.*} # For the file names
18+
19+
echo "Zenith angle set to ${ZENITH}"
20+
1521
MOONOPT="" # Set to -DHALFMOON for half moon or leave empty or dark conditions (i.e., MOONOPT="")
1622
MOON=`echo "${MOONOPT#*-D}" | tr "[:upper:]" "[:lower:]"`
1723

@@ -22,64 +28,64 @@ MOON=`echo "${MOONOPT#*-D}" | tr "[:upper:]" "[:lower:]"`
2228
# LST
2329
#####################################################################
2430

25-
outputFile="${SCRATCH}/pedestals-lst${MOON}-1k.simtel.gz"
31+
outputFile="${SCRATCH}/pedestals-lst${MOON}-ze-${ZE}-1k.simtel.gz"
2632
rm -f $outputFile
2733

2834
${SIMTEL}/bin/sim_telarray -c ${SIMTEL}/cfg/CTA/CTA-PROD4-LST.cfg \
2935
-Icfg/CTA -C Altitude=2150 -C iobuf_maximum=1000000000 \
3036
${MOONOPT} -DNUM_TELESCOPES=1 -C maximum_telescopes=1 \
3137
-C atmospheric_transmission=atm_trans_2150_1_10_0_0_2150.dat \
32-
-C telescope_theta=20.0 -C telescope_phi=180 \
38+
-DNSB_AUTOSCALE -C telescope_theta=${ZENITH} -C telescope_phi=180 \
3339
-C pedestal_events=1000 \
3440
-C output_file=$outputFile \
35-
${CDIR}/dummy1.corsika.gz >& sim_telarray${MOON}-lst.log
41+
${CDIR}/dummy1.corsika.gz >& sim_telarray${MOON}-lst-ze-${ZE}.log
3642

3743

3844
#####################################################################
3945
# MST-NectarCam
4046
#####################################################################
4147

42-
outputFile="${SCRATCH}/pedestals-mst-nc${MOON}-1k.simtel.gz"
48+
outputFile="${SCRATCH}/pedestals-mst-nc${MOON}-ze-${ZE}-1k.simtel.gz"
4349
rm -f $outputFile
4450

4551
${SIMTEL}/bin/sim_telarray -c ${SIMTEL}/cfg/CTA/CTA-PROD4-MST-NectarCam.cfg \
4652
-Icfg/CTA -C Altitude=2150 -C iobuf_maximum=1000000000 \
4753
${MOONOPT} -DNUM_TELESCOPES=1 -C maximum_telescopes=1 \
4854
-C atmospheric_transmission=atm_trans_2150_1_10_0_0_2150.dat \
49-
-C telescope_theta=20.0 -C telescope_phi=180 \
55+
-DNSB_AUTOSCALE -C telescope_theta=${ZENITH} -C telescope_phi=180 \
5056
-C pedestal_events=1000 \
5157
-C output_file=$outputFile \
52-
${CDIR}/dummy1.corsika.gz >& sim_telarray${MOON}-mst-nc.log
58+
${CDIR}/dummy1.corsika.gz >& sim_telarray${MOON}-mst-nc-ze-${ZE}.log
5359

5460

5561
#####################################################################
5662
# MST-FlashCam
5763
#####################################################################
5864

59-
outputFile="${SCRATCH}/pedestals-mst-fc${MOON}-1k.simtel.gz"
65+
outputFile="${SCRATCH}/pedestals-mst-fc${MOON}-ze-${ZE}-1k.simtel.gz"
6066
rm -f $outputFile
6167

6268
${SIMTEL}/bin/sim_telarray -c ${SIMTEL}/cfg/CTA/CTA-PROD4-MST-FlashCam.cfg \
6369
-Icfg/CTA -C Altitude=2150 -C iobuf_maximum=1000000000 \
6470
${MOONOPT} -DNUM_TELESCOPES=1 -C maximum_telescopes=1 \
6571
-C atmospheric_transmission=atm_trans_2150_1_10_0_0_2150.dat \
66-
-C telescope_theta=20.0 -C telescope_phi=180 \
72+
-DNSB_AUTOSCALE -C telescope_theta=${ZENITH} -C telescope_phi=180 \
6773
-C pedestal_events=1000 \
6874
-C output_file=$outputFile \
69-
${CDIR}/dummy1.corsika.gz >& sim_telarray${MOON}-mst-fc.log
75+
${CDIR}/dummy1.corsika.gz >& sim_telarray${MOON}-mst-fc-ze-${ZE}.log
7076

7177
#####################################################################
7278
# SST
7379
#####################################################################
7480

75-
outputFile="${SCRATCH}/pedestals-sst${MOON}-1k.simtel.gz"
81+
outputFile="${SCRATCH}/pedestals-sst${MOON}-ze-${ZE}-1k.simtel.gz"
7682
rm -f $outputFile
7783

7884
${SIMTEL}/bin/sim_telarray -c ${SIMTEL}/cfg/CTA/CTA-PROD5-SST.cfg \
7985
-Icfg/CTA -C Altitude=2150 -C iobuf_maximum=1000000000 \
8086
${MOONOPT} -DNUM_TELESCOPES=1 -C maximum_telescopes=1 \
8187
-C atmospheric_transmission=atm_trans_2150_1_10_0_0_2150.dat \
82-
-C telescope_theta=20.0 -C telescope_phi=180 \
88+
-DNSB_AUTOSCALE -C telescope_theta=${ZENITH} -C telescope_phi=180 \
8389
-C pedestal_events=1000 \
8490
-C output_file=$outputFile \
85-
${CDIR}/dummy1.corsika.gz >& sim_telarray${MOON}-sst.log
91+
${CDIR}/dummy1.corsika.gz >& sim_telarray${MOON}-sst-ze-${ZE}.log

IPRgeneration/saveLogFiles.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,19 @@
77
# Change the two variables at the top:
88
# MOONOPT: option to produce pedestals for halfmoon NSB or dark time
99

10+
ZE="20"
11+
# ZE="60"
12+
13+
echo "Zenith angle set to ${ZE}"
14+
1015
MOONOPT="" # Set to -DHALFMOON for half moon or leave empty or dark conditions (i.e., MOONOPT="")
1116
MOON=`echo "${MOONOPT#*-D}" | tr "[:upper:]" "[:lower:]"`
1217

1318
[ -z "$MOON" ] && echo "Running dark conditions" || MOON="-${MOON}"
1419

15-
for logFileNow in $(ls *.log)
20+
for logFileNow in $(ls *${MOON}*"ze-"${ZE}*.log)
1621
do
1722
logFile=$(basename -- "$logFileNow")
1823
fileTitle="${logFile%.*}"
19-
$EVNDISPSYS/bin/logFile log-$fileTitle prod5${MOON}-IPR.root $logFile
24+
$EVNDISPSYS/bin/logFile log-$fileTitle prod5${MOON}-ze-${ZE}-IPR.root $logFile
2025
done

0 commit comments

Comments
 (0)