Skip to content

Commit aed420d

Browse files
authored
feat: restore pfRICH dev-scripts support (#46)
2 parents 2fae002 + 9e9c1ad commit aed420d

32 files changed

+832
-4484
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*.exe
66

77
bin
8+
lib
89
macro
910
!macro/.keep
1011
out

Makefile

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,38 @@ DEPS += -I/usr/local/include
1717
LIBS += -L${EIC_SHELL_PREFIX}/lib
1818
LIBS += -lIRT
1919
DEPS += -I${EIC_SHELL_PREFIX}/include/IRT
20+
DEPS += -Isrc
2021

2122
#--------------------------------------------
2223

23-
INSTALL_PREFIX = bin
24-
EXECUTABLES := $(addprefix $(INSTALL_PREFIX)/, $(basename $(notdir $(wildcard src/*.cpp))))
24+
LIB_TARGET = lib
25+
IRTGEO_LIB_NAME = IrtGeo
26+
IRTGEO_LIB = $(LIB_TARGET)/lib$(IRTGEO_LIB_NAME).so
2527

26-
#--------------------------------------------
28+
BIN_TARGET = bin
29+
EXECUTABLES := $(addprefix $(BIN_TARGET)/, $(basename $(notdir $(wildcard src/*.cpp))))
2730

28-
all: $(EXECUTABLES)
29-
30-
clean:
31-
@echo "CLEAN ======================================================"
32-
$(RM) $(EXECUTABLES)
31+
IRTGEO_SOURCES := $(wildcard src/irtgeo/*.cc)
32+
IRTGEO_HEADERS := $(wildcard src/irtgeo/*.h)
3333

3434
#--------------------------------------------
3535

36-
$(INSTALL_PREFIX)/%: src/%.cpp
37-
mkdir -p $(INSTALL_PREFIX)
36+
all: $(IRTGEO_LIB) $(EXECUTABLES)
37+
38+
$(IRTGEO_LIB): $(IRTGEO_HEADERS) $(IRTGEO_SOURCES)
39+
mkdir -p $(LIB_TARGET)
40+
@echo "----- build $@ -----"
41+
$(CXX) $(IRTGEO_SOURCES) -shared -o $@ $(FLAGS) $(DEPS) $(LIBS)
42+
43+
$(BIN_TARGET)/%: src/%.cpp $(IRTGEO_LIB)
44+
mkdir -p $(BIN_TARGET)
3845
@echo "----- build $@.o -----"
39-
$(CXX) -c $^ -o $@.o $(FLAGS) $(DEPS)
46+
$(CXX) -c $< -o $@.o $(FLAGS) $(DEPS)
4047
@echo "--- make executable $@"
41-
$(CXX) -o $@ $@.o $(LIBS)
48+
$(CXX) -o $@ $@.o $(LIBS) -L$(LIB_TARGET) -l$(IRTGEO_LIB_NAME)
4249
$(RM) $@.o
50+
51+
clean:
52+
@echo "CLEAN ======================================================"
53+
$(RM) $(EXECUTABLES) $(IRTGEO_LIB)
54+

README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ of branches for varying configurations.
3737
this is temporarily supported for helping test reconstruction algorithms
3838
- See [doc/athena-branches.md](doc/athena-branches.md) for information about the
3939
development branches and pull requests that were used for the ATHENA proposal
40-
- It is possible that the pfRICH scripts no longer work, since we now focus on
41-
the dRICH
4240

4341
---
4442

@@ -307,12 +305,9 @@ corresponding executables and install them to `bin/`
307305
- reads simulation output and draws raw hit positions and number of hits vs.
308306
momentum
309307
- build with `make`, execute as `bin/draw_hits [simulation_output_file]`
310-
- specific for dRICH; for pfRICH version, see `deprecated/pfrich/`
311308
- `src/draw_segmentation.cpp` (run with `bin/draw_segmentation`)
312309
- reads simulation output and draws the hits within sensor pixels, which is
313310
useful for checking mapping of sensor segmentation (pixels)
314-
- build with `make`, execute with `bin/draw_segmentation [simulation_output_file]`
315-
- specific for dRICH; for pfRICH version, see `deprecated/pfrich/`
316311

317312
## Automated Parameter Variation
318313
- use `scripts/vary_params.rb` to run simulation jobs while varying dRICH compact file parameters
@@ -355,9 +350,9 @@ simulate.py -t 1 -s -n 50
355350

356351
- Run the reconstruction via Juggler, or try the stand-alone reader macro:
357352
```bash
358-
recon.sh -j # to use Juggler (IRTAlgorithm)
359-
recon.sh -r # to use standalone reader (irt/scripts/reader*.C)
360-
recon.sh -h # for usage guide, such as how to specify input/output files
353+
recon.sh -d -j # to use Juggler (IRTAlgorithm), with the dRICH
354+
recon.sh -d -r # to use standalone reader (irt/scripts/reader*.C), with the dRICH
355+
recon.sh # for usage guide, such as how to specify input/output files
361356
```
362357

363358
- Run the evaluation code (use `-h` for usage):

deprecated/pfrich/Makefile

Lines changed: 0 additions & 33 deletions
This file was deleted.

deprecated/pfrich/README.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

deprecated/pfrich/drawHits.cpp

Lines changed: 0 additions & 123 deletions
This file was deleted.

0 commit comments

Comments
 (0)