Skip to content

Commit 323d1b4

Browse files
authored
Merge pull request #269 from JeffersonLab/v2.2-rc1
Merge v2.2-rc1 into master as new release v2.2.0
2 parents f626940 + 4a7b64f commit 323d1b4

File tree

158 files changed

+4396
-15978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+4396
-15978
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ log
5050
.cproject
5151
.project
5252

53+
#ignore build type file
54+
.buildtype
55+
5356
#ignore dot files
5457
*.dot
5558

.travis.yml

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,24 @@ services:
55
script:
66
- docker build -t jeffersonlab/remoll .
77
- for suite in load validate overlap ; do
8-
docker run -t jeffersonlab/remoll "scripts/tests/test_geometries.sh ${suite}" ;
8+
docker run --rm -t jeffersonlab/remoll scripts/tests/test_geometries.sh ${suite} ;
99
done
10-
- for suite in unit commit release ; do
11-
docker run -t jeffersonlab/remoll "scripts/tests/test_macros.sh ${suite}" || exit 1 ;
12-
docker start $(docker ps -l -q) ;
13-
docker exec $(docker ps -l -q) scripts/tests/targz_macros.sh ${suite} ;
14-
docker cp $(docker ps -l -q):"/jlab/remoll/remolltest.${suite}.log.tar.gz" . ;
15-
docker cp $(docker ps -l -q):"/jlab/remoll/remolltest.${suite}.root.tar.gz" . ;
16-
docker cp $(docker ps -l -q):"/jlab/remoll/remolltest.${suite}.analysis.log.tar.gz" . ;
17-
docker cp $(docker ps -l -q):"/jlab/remoll/remolltest.${suite}.analysis.pdf.tar.gz" . ;
18-
docker cp $(docker ps -l -q):"/jlab/remoll/remolltest.${suite}.analysis.root.tar.gz" . ;
19-
docker stop $(docker ps -l -q) ;
10+
- for suite in unit ; do
11+
docker run --rm -t jeffersonlab/remoll scripts/tests/test_macros.sh ${suite} ;
12+
done
13+
- for suite in commit release ; do
14+
docker run -t jeffersonlab/remoll sh -c "
15+
scripts/tests/test_macros.sh ${suite} &&
16+
scripts/tests/targz_macros.sh ${suite} &&
17+
scripts/tests/watermark.sh ${suite}
18+
" || exit 1 ;
19+
docker cp $(docker ps -l -q):"/jlab/remoll/remolltest.*.*.log.tar.gz" . ;
20+
docker cp $(docker ps -l -q):"/jlab/remoll/remolltest.*.*.root.tar.gz" . ;
21+
docker cp $(docker ps -l -q):"/jlab/remoll/remolltest.*.*.analysis.log.tar.gz" . ;
22+
docker cp $(docker ps -l -q):"/jlab/remoll/remolltest.*.*.analysis.pdf.tar.gz" . ;
23+
docker cp $(docker ps -l -q):"/jlab/remoll/remolltest.*.*.analysis.root.tar.gz" . ;
24+
docker cp $(docker ps -l -q):"/jlab/remoll/rootfiles_tests_*_*_analysis.pdf" . ;
25+
docker rm $(docker ps -l -q) ;
2026
done
2127

2228
after_success:
@@ -34,17 +40,14 @@ deploy:
3440
provider: releases
3541
api_key:
3642
secure: MzvvPA8KxYjEVa8C9rNtAQbtD+mDx2Wn3Em02JKMtwv953Htnv3zRcyGPfF++sLV80RvZ8NZ8pN3WfiAPTBHatUSgWh9w+GRv0G366wxKrAS4O+9BVy96U7A0gFkaXRwXirJWo4u2lJscQ1hC2IDbI2dGAS/VF5Lt1TLjWcPUL8LPcKgF80FG8+9+BUH1cRiW8mULT36EeVAB1K+vwO6Qob5k4ef66eHjkbdpuUktDr6wrehoyGXtFiBfl+XWotvcrer/51J6wn85UqCc/A+KYrVshBH/gKCD7/w6D2akNM2/sJcFdLzv5WkaQOwplsAYuzLn1cNRUKbWay5ClCSm6rsoHGfaagW4/wXk9TxqJhcdmNZ+eeAvNXAxJIeRvb82pwANlSJ658FBw2ov75p3Y6rjvc8CUPsxBXZkw3dzOgwTdjmJI9q+aD4GuVeGiq9MdyJDgXUjxlP2qEtcLJfvvF9q5Bnzy+hoAV+A5yHg0lR0VjsUem2+CdexuHb/LJLx4YVkSrCSyEELAsfyJTCYNLaMKrWKujelqtKwXy4H/rwzaja6IBP77gkisNI82bvnrzn/QsvnueGyWSu/Z2HC2M/d6WAQAl3Et9W6kOb7MK+NAmEMOTW7tzaxjD+lq8aOiLJYndrOYaymin5GLNk3F2iqZMkhMCRC2YcstNr61w=
43+
file_glob: true
3744
file:
38-
- remolltest.commit.log.tar.gz
39-
- remolltest.commit.root.tar.gz
40-
- remolltest.commit.analysis.log.tar.gz
41-
- remolltest.commit.analysis.png.tar.gz
42-
- remolltest.commit.analysis.root.tar.gz
43-
- remolltest.release.log.tar.gz
44-
- remolltest.release.root.tar.gz
45-
- remolltest.release.analysis.log.tar.gz
46-
- remolltest.release.analysis.pdf.tar.gz
47-
- remolltest.release.analysis.root.tar.gz
45+
- "remolltest.*.*.log.tar.gz"
46+
- "remolltest.*.*.root.tar.gz"
47+
- "remolltest.*.*.analysis.log.tar.gz"
48+
- "remolltest.*.*.analysis.pdf.tar.gz"
49+
- "remolltest.*.*.analysis.root.tar.gz"
50+
- "rootfiles_tests_*_*_analysis.pdf"
4851
skip_cleanup: true
4952
on:
5053
repo: JeffersonLab/remoll

CMakeLists.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,18 @@ foreach(file ${exefiles})
236236
)
237237
endforeach()
238238

239+
#
240+
# custom targets
241+
#
242+
add_custom_target(create-manual
243+
COMMAND ./remoll -g ${PROJECT_SOURCE_DIR}/geometry/mollerMother.gdml ${PROJECT_SOURCE_DIR}/macros/manual.mac | awk '/Command directory path/,/Graphics systems deleted/' > manual.txt
244+
BYPRODUCTS manual.txt
245+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
246+
DEPENDS remoll)
247+
add_custom_target(check-manual
248+
COMMAND diff ${PROJECT_SOURCE_DIR}/manual.txt manual.txt || true
249+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
250+
DEPENDS create-manual)
239251

240252
#----------------------------------------------------------------------------
241253
# Copy all scripts to the build directory, i.e. the directory in which we
@@ -307,6 +319,23 @@ install(FILES
307319
${REMOLL_MAP_DIR}/blockyHybrid_rm_3.0.txt
308320
${REMOLL_MAP_DIR}/blockyUpstream_rm_1.1.txt
309321
DESTINATION ${CMAKE_INSTALL_DATADIR}/remoll)
322+
if(ADDITIONAL_FIELDS)
323+
message(STATUS "Ensuring additional fields are available")
324+
file(DOWNLOAD
325+
${REMOLL_DOWNLOADS}/upstreamSymmetric_sensR_0.1.txt
326+
${REMOLL_MAP_DIR}/upstreamSymmetric_sensR_0.1.txt
327+
EXPECTED_MD5 849d9dc5abab0842fc13fef7f4918648)
328+
file(DOWNLOAD
329+
${REMOLL_DOWNLOADS}/hybridSymmetric_sensR_0.1.txt
330+
${REMOLL_MAP_DIR}/hybridSymmetric_sensR_0.1.txt
331+
EXPECTED_MD5 78fad2ffa5b5ae129df11bdf0ce25333)
332+
install(FILES
333+
${REMOLL_MAP_DIR}/upstreamSymmetric_sensR_0.0.txt
334+
${REMOLL_MAP_DIR}/hybridSymmetric_sensR_0.0.txt
335+
DESTINATION ${CMAKE_INSTALL_DATADIR}/remoll)
336+
else()
337+
message(STATUS "Download additional fields with '-DADDITIONAL_FIELDS=ON'.")
338+
endif()
310339

311340

312341
#----------------------------------------------------------------------------

Dockerfile

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
FROM jeffersonlab/jlabce:2.3
22

3+
# Install libgcj and pdftk
4+
RUN wget https://copr.fedorainfracloud.org/coprs/robert/gcj/repo/epel-7/robert-gcj-epel-7.repo -P /etc/yum.repos.d && \
5+
wget https://copr.fedorainfracloud.org/coprs/robert/pdftk/repo/epel-7/robert-pdftk-epel-7.repo -P /etc/yum.repos.d && \
6+
yum install -y pdftk ghostscript
7+
38
ENV JLAB_VERSION=2.3
49
ENV JLAB_ROOT=/jlab
510
ENV JLAB_SOFTWARE=/jlab/2.3/Linux_CentOS7.2.1511-x86_64-gcc4.8.5
@@ -17,14 +22,15 @@ RUN source $JLAB_ROOT/$JLAB_VERSION/ce/jlab.sh && \
1722
make -j$(nproc) && \
1823
make install
1924

20-
# Create entry point bash script
21-
RUN echo '#!/bin/bash' > /usr/local/bin/entrypoint.sh && \
22-
echo 'unset OSRELEASE' >> /usr/local/bin/entrypoint.sh && \
23-
echo 'source $JLAB_ROOT/$JLAB_VERSION/ce/jlab.sh' >> /usr/local/bin/entrypoint.sh && \
24-
echo 'export PATH=${REMOLL}/bin:${PATH}' >> /usr/local/bin/entrypoint.sh && \
25-
echo 'export REMOLL=${REMOLL}' >> /usr/local/bin/entrypoint.sh && \
26-
echo 'cd $REMOLL && exec $*' >> /usr/local/bin/entrypoint.sh && \
27-
chmod +x /usr/local/bin/entrypoint.sh
25+
# Create environment point bash script
26+
RUN echo '#!/bin/bash' > /entrypoint.sh && \
27+
echo 'unset OSRELEASE' >> /entrypoint.sh && \
28+
echo 'source $JLAB_ROOT/$JLAB_VERSION/ce/jlab.sh' >> /entrypoint.sh && \
29+
echo 'export PATH=${REMOLL}/bin:${PATH}' >> /entrypoint.sh && \
30+
echo 'export REMOLL=${REMOLL}' >> /entrypoint.sh && \
31+
echo 'cd $REMOLL && exec "$@"' >> /entrypoint.sh && \
32+
chmod +x /entrypoint.sh
2833

29-
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
34+
ENTRYPOINT ["/entrypoint.sh"]
3035

36+
CMD ["build/remoll","-h"]

analysis/hyperon/hyperon_pion_rates.C

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Run using (for example):
2+
// build/reroot -l -q 'analysis/hyperon/hyperon_pion_rates.C("hyperon_lambda_2M.root")'
3+
4+
void hyperon_pion_rates(const TString& files)
5+
{
6+
TChain* T = new TChain("T");
7+
T->Add(files);
8+
9+
std::vector<remollEventParticle_t>* parts = 0;
10+
std::vector<remollGenericDetectorHit_t>* hits = 0;
11+
12+
T->SetBranchAddress("hit", &hits);
13+
T->SetBranchAddress("part", &parts);
14+
15+
TH1F h_hit_r("h_hit_r","Pion hit radius at the main detector plane",20,0,2000);
16+
17+
// Loop over events
18+
for (size_t iev = 0; iev < T->GetEntries(); iev++) {
19+
T->GetEntry(iev);
20+
21+
// Store hits on main detector
22+
for (size_t ihit = 0; ihit < hits->size(); ihit++) {
23+
remollGenericDetectorHit_t hit = hits->at(ihit);
24+
if (hit.det == 28 && hit.pid == -211) {
25+
h_hit_r.Fill(hit.r);
26+
}
27+
}
28+
for (size_t ipart = 0; ipart < parts->size(); ipart++) {
29+
remollEventParticle_t part = parts->at(ipart);
30+
}
31+
}
32+
33+
TCanvas c;
34+
h_hit_r.Draw();
35+
c.SaveAs("images/hyperon_pion_rates_hit_r.png");
36+
}

analysis/pruneTreeEnvelope/runexample_epelastic_envelope.mac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/remoll/beamcurr 85 microampere
2424
# Make interactions with W, Cu, and Pb
2525
# realistic rather than pure absorbers
26-
/remoll/kryptonite/set true
26+
/control/execute macros/kryptonite.mac
2727
/process/list
2828
# Specify random number seed - DO NOT USE THE SAME SEED OVER AND OVER AGAIN
2929
#/remoll/seed 123456

analysis/pruneTreeEnvelope/runexample_limit_envelope.mac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/remoll/beamcurr 85 microampere
2424
# Make interactions with W, Cu, and Pb
2525
# realistic rather than pure absorbers
26-
/remoll/kryptonite/set true
26+
/control/execute macros/kryptonite.mac
2727
/process/list
2828
# Specify random number seed - DO NOT USE THE SAME SEED OVER AND OVER AGAIN
2929
#/remoll/seed 123456

analysis/pruneTreeEnvelope/runexample_moller_envelope.mac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/remoll/beamcurr 85 microampere
2424
# Make interactions with W, Cu, and Pb
2525
# realistic rather than pure absorbers
26-
/remoll/kryptonite/set true
26+
/control/execute macros/kryptonite.mac
2727
/process/list
2828
# Specify random number seed - DO NOT USE THE SAME SEED OVER AND OVER AGAIN
2929
#/remoll/seed 123456
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
#include <utility>
2+
#include <vector>
3+
#include <TString.h>
4+
#include "TCut.h"
5+
#include <list>
6+
#include <dirent.h>
7+
#include <unistd.h>
8+
#include <fstream>
9+
#include <iostream>
10+
#include <sstream>
11+
#include <string>
12+
#include <algorithm>
13+
#include <TSystem.h>
14+
#include <TChain.h>
15+
#include <TFile.h>
16+
#include <TCanvas.h>
17+
#include <TROOT.h>
18+
#include <TH1.h>
19+
#include <TH2.h>
20+
void plotDetPlaneCuts(Double_t r_outer_cut=0, Int_t n_steps = 15, Double_t r_step = 10.0, Double_t z_cut = 27000.0, Int_t detector = 28, TString type = "moller", Int_t radialCut = 1, TString fname = "NULL"){
21+
/* I want to take a given ROOT output file and plot a specific detector's
22+
* hit.x/y/r/theta, etc. distributions (weighted by rate)
23+
* and using cuts that are set at the z_cut position, cutting out all part.tjr
24+
* (calculated radii) tracks that are > r_outer_cut
25+
*
26+
* I would also like to have this loop over r_outer_cut from some initial
27+
* to final in fine steps and make a plot of the number of cut out/in epelastic/moller
28+
* particles (weighted by rate) vs. that cut radius
29+
*
30+
* I would also like to do a similar scan in z maybe... or at least compare at multiple
31+
* z cut places */
32+
33+
if (r_outer_cut==0) {
34+
std::cout<<"Usage: Load Data Root File to gDirectory, root> .x plotDetPlaneCuts(r_outer_cut=0, n_steps = 15, r_step = 10.0, z_cut = 27000.0, detector = 28, type = \"moller\")\n\n"<<std::endl;
35+
return;
36+
}
37+
38+
TChain * T = new TChain("T");
39+
if (fname == "NULL"){
40+
T = (TChain*)gDirectory->Get("T");
41+
}
42+
else {
43+
T->Add(fname);
44+
}
45+
FILE *fp;
46+
fp = fopen(Form("Output_cuts.txt"),"a");
47+
48+
Int_t n_events = 100000;
49+
Int_t start_event_n = 1;
50+
Double_t z_cut_space = 1.0; // mm
51+
52+
const Int_t n_canvases = 100;
53+
const Int_t n_plots = 1;
54+
Double_t norm_rate_weight_all[n_canvases*n_plots];
55+
Double_t norm_rate_weight_in[n_canvases*n_plots];
56+
Double_t norm_rate_weight_out[n_canvases*n_plots];
57+
TCanvas *canvas[n_canvases];
58+
TH1F *totalRate[n_canvases*n_plots];
59+
TH1F *r_inside[n_canvases*n_plots];
60+
TH1F *r_outside[n_canvases*n_plots];
61+
TH2F *xy_inside[n_canvases*n_plots];
62+
TH2F *xy_outside[n_canvases*n_plots];
63+
64+
for (Int_t n_canvas = 0; n_canvas < n_steps; n_canvas++) {
65+
r_outer_cut = r_outer_cut - r_step;
66+
canvas[n_canvas] = new TCanvas(Form("Plot of %s in detector %d hits for z plane %f, r > %f",type.Data(),detector,z_cut,r_outer_cut),Form("Plot of %s in detector %d hits for z plane %f, r > %f",type.Data(),detector,z_cut,r_outer_cut));
67+
canvas[n_canvas]->Divide(n_plots*2,2);
68+
for (Int_t n_plot = 0; n_plot<n_plots; n_plot++){
69+
std::cout<<"Plot number "<<n_canvas*n_plots+n_plot<<", n_canvas "<<n_canvas<<", n_plot "<<n_plot<<std::endl;
70+
71+
canvas[n_canvas]->cd(n_plot+1);
72+
T->Draw(Form("hit.r[0]>>h_totalRate_%d",n_canvas*n_plots + n_plot),Form("rate*(hit.det[0] == %d && part.tjz > %f-%f && part.tjz < %f+%f)",detector,z_cut,z_cut_space,z_cut,z_cut_space),"",n_events,start_event_n);
73+
totalRate[n_canvas*n_plots + n_plot] = (TH1F*)gROOT->FindObject(Form("h_totalRate_%d",n_canvas*n_plots + n_plot));
74+
norm_rate_weight_all[n_canvas*n_plots + n_plot] = totalRate[n_canvas*n_plots + n_plot]->Integral();
75+
Printf("Normalization total rate weight = %f",norm_rate_weight_all[n_canvas*n_plots + n_plot]);
76+
77+
// Radial
78+
if (radialCut == 1){
79+
T->Draw(Form("hit.r[0]>>h_r_inside_%d",n_canvas*n_plots + n_plot),Form("rate*(hit.det[0] == %d && part.tjz > %f-%f && part.tjz < %f+%f && sqrt((part.tjx*part.tjx)+(part.tjy*part.tjy)) < %f)",detector,z_cut,z_cut_space,z_cut,z_cut_space,r_outer_cut),"",n_events,start_event_n);
80+
}
81+
else {
82+
// X cut
83+
T->Draw(Form("hit.r[0]>>h_r_inside_%d",n_canvas*n_plots + n_plot),Form("rate*(hit.det[0] == %d && part.tjz > %f-%f && part.tjz < %f+%f && part.tjx < %f)",detector,z_cut,z_cut_space,z_cut,z_cut_space,r_outer_cut),"",n_events,start_event_n);
84+
}
85+
r_inside[n_canvas*n_plots + n_plot] = (TH1F*)gROOT->FindObject(Form("h_r_inside_%d",n_canvas*n_plots + n_plot));
86+
norm_rate_weight_in[n_canvas*n_plots + n_plot] = r_inside[n_canvas*n_plots + n_plot]->Integral();
87+
88+
canvas[n_canvas]->cd(n_plot+2);
89+
// Radial
90+
if (radialCut == 1){
91+
T->Draw(Form("hit.r[0]>>h_r_outside_%d",n_canvas*n_plots + n_plot),Form("rate*(hit.det[0] == %d && part.tjz > %f-%f && part.tjz < %f+%f && sqrt((part.tjx*part.tjx)+(part.tjy*part.tjy)) > %f)",detector,z_cut,z_cut_space,z_cut,z_cut_space,r_outer_cut),"",n_events,start_event_n);
92+
// X cut
93+
}
94+
else {
95+
T->Draw(Form("hit.r[0]>>h_r_outside_%d",n_canvas*n_plots + n_plot),Form("rate*(hit.det[0] == %d && part.tjz > %f-%f && part.tjz < %f+%f && part.tjx > %f)",detector,z_cut,z_cut_space,z_cut,z_cut_space,r_outer_cut),"",n_events,start_event_n);
96+
}
97+
r_outside[n_canvas*n_plots + n_plot] = (TH1F*)gROOT->FindObject(Form("h_r_outside_%d",n_canvas*n_plots + n_plot));
98+
norm_rate_weight_out[n_canvas*n_plots + n_plot] = r_outside[n_canvas*n_plots + n_plot]->Integral();
99+
100+
canvas[n_canvas]->cd(n_plot+3);
101+
// Radial
102+
if (radialCut == 1){
103+
T->Draw(Form("hit.y[0]:hit.x[0]>>h_xy_inside_%d",n_canvas*n_plots + n_plot),Form("rate*(hit.det[0] == %d && part.tjz > %f-%f && part.tjz < %f+%f && sqrt((part.tjx*part.tjx)+(part.tjy*part.tjy)) < %f)",detector,z_cut,z_cut_space,z_cut,z_cut_space,r_outer_cut),"",n_events,start_event_n);
104+
}
105+
else {
106+
// X cut
107+
T->Draw(Form("hit.y[0]:hit.x[0]>>h_xy_inside_%d",n_canvas*n_plots + n_plot),Form("rate*(hit.det[0] == %d && part.tjz > %f-%f && part.tjz < %f+%f && part.tjx < %f)",detector,z_cut,z_cut_space,z_cut,z_cut_space,r_outer_cut),"",n_events,start_event_n);
108+
}
109+
xy_inside[n_canvas*n_plots + n_plot] = (TH2F*)gROOT->FindObject(Form("h_xy_inside_%d",n_canvas*n_plots + n_plot));
110+
111+
canvas[n_canvas]->cd(n_plot+4);
112+
// Radial
113+
if (radialCut == 1){
114+
T->Draw(Form("hit.y[0]:hit.x[0]>>h_xy_outside_%d",n_canvas*n_plots + n_plot),Form("rate*(hit.det[0] == %d && part.tjz > %f-%f && part.tjz < %f+%f && sqrt((part.tjx*part.tjx)+(part.tjy*part.tjy)) > %f)",detector,z_cut,z_cut_space,z_cut,z_cut_space,r_outer_cut),"",n_events,start_event_n);
115+
}
116+
// X cut
117+
else {
118+
T->Draw(Form("hit.y[0]:hit.x[0]>>h_xy_outside_%d",n_canvas*n_plots + n_plot),Form("rate*(hit.det[0] == %d && part.tjz > %f-%f && part.tjz < %f+%f && part.tjx > %f)",detector,z_cut,z_cut_space,z_cut,z_cut_space,r_outer_cut),"",n_events,start_event_n);
119+
}
120+
xy_outside[n_canvas*n_plots + n_plot] = (TH2F*)gROOT->FindObject(Form("h_xy_outside_%d",n_canvas*n_plots + n_plot));
121+
122+
// CAMGUIN feature: writeFile_h takes the name of the variable, the value to set it to, the "run number" which is a unique identifier, the split number (which is another unique identifier), and the number of runs (another one)
123+
//writeFile_h("r_outer_cut", r_outer_cut, r_outer_cut, z_cut, detector*1.0);
124+
//writeFile_h("z_cut", z_cut, r_outer_cut, z_cut, detector*1.0);
125+
//writeFile_h("detector", detector*1.0, r_outer_cut, z_cut, detector*1.0);
126+
//writeFile_h(Form("%s_norm_rate_weight_all",type.Data()), norm_rate_weight_all[n_canvas*n_plots + n_plot], r_outer_cut, z_cut, detector*1.0);
127+
//writeFile_h(Form("%s_norm_rate_weight_in",type.Data()), norm_rate_weight_in[n_canvas*n_plots + n_plot], r_outer_cut, z_cut, detector*1.0);
128+
//writeFile_h(Form("%s_norm_rate_weight_out",type.Data()), norm_rate_weight_out[n_canvas*n_plots + n_plot], r_outer_cut, z_cut, detector*1.0);
129+
130+
if(fp!=NULL){
131+
fprintf(fp,"r_outer_cut = %f, z_cut = %f, detector = %d, %s_norm_rate_weight_all = %f, %s_norm_rate_weight_in = %f, %s_norm_rate_weight_out = %f\n",r_outer_cut,z_cut,detector,type.Data(),norm_rate_weight_all[n_canvas*n_plots + n_plot],type.Data(),norm_rate_weight_in[n_canvas*n_plots + n_plot],type.Data(),norm_rate_weight_out[n_canvas*n_plots + n_plot]);
132+
}
133+
}
134+
if (n_canvas == 0 && n_steps != 1){
135+
canvas[n_canvas]->SaveAs(Form("%s_norm_rate_weight.pdf(",type.Data()));
136+
}
137+
else if (n_canvas < n_steps || n_steps==1) {
138+
canvas[n_canvas]->SaveAs(Form("%s_norm_rate_weight.pdf",type.Data()));
139+
}
140+
else {
141+
canvas[n_canvas]->SaveAs(Form("%s_norm_rate_weight.pdf)",type.Data()));
142+
}
143+
}
144+
145+
fclose(fp);
146+
}

cmake/modules/BuildType.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Set a default build type if none was specified
22
set(DEFAULT_CMAKE_BUILD_TYPE "Release")
33
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
4-
set(DEFAULT_CMAKE_BUILD_TYPE "Debug")
4+
set(DEFAULT_CMAKE_BUILD_TYPE "RelWithDebInfo")
5+
endif()
6+
if (EXISTS "${CMAKE_SOURCE_DIR}/.buildtype")
7+
file(STRINGS "${CMAKE_SOURCE_DIR}/.buildtype" DEFAULT_CMAKE_BUILD_TYPE)
58
endif()
69
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
710
message(STATUS "Setting build type to '${DEFAULT_CMAKE_BUILD_TYPE}' as none was specified.")

0 commit comments

Comments
 (0)