Skip to content

Commit

Permalink
Merge pull request #475 from rest-for-physics/remove-pandaX-validation
Browse files Browse the repository at this point in the history
Remove PandaX from validation pipeline
  • Loading branch information
lobis authored Sep 26, 2023
2 parents 200e8f2 + 918475e commit 9c2fae7
Show file tree
Hide file tree
Showing 15 changed files with 93 additions and 1,355 deletions.
132 changes: 2 additions & 130 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,72 +213,15 @@ jobs:
with:
key: ${{ env.BRANCH_NAME }}-${{ github.sha }}
path: ${{ env.REST_PATH }}
- name: 02_PandaXiiiMC
- name: PandaXIII Geant4
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd framework/pipeline/pandaxiii_MC
restG4 ${{ env.REST_PATH }}/examples/restG4/05.PandaXIII/Xe136bb0n.rml -o Xe136bb0n.root
restRoot -b -q ${{ env.REST_PATH }}/examples/restG4/05.PandaXIII/Validate.C'("Xe136bb0n.root")'
# - name: 02_PandaXiiiMC small for reference # We can use these artifacts to update the validation reference file
# run: |
# source ${{ env.REST_PATH }}/thisREST.sh
# cd framework/pipeline/pandaxiii_MC
# restG4 ${{ env.REST_PATH }}/examples/restG4/05.PandaXIII/Xe136bb0n.rml -o Xe136bb0n_small_reference_pipeline.root -n 5
# restManager --c AllProcesses.rml --i Xe136bb0n_small_reference_pipeline.root --o Xe136bb0n_small_reference_processed_pipeline.root
# restRoot -b -q ../MakeBasicTree.C'("Xe136bb0n_small_reference_processed_pipeline.root", "Xe136bb0n_validation_pipeline.root")'
# - name: Upload Artifacts
# uses: actions/upload-artifact@v3
# with:
# name: Xe136bb
# path: |
# framework/pipeline/pandaxiii_MC/Xe136bb0n.root
# framework/pipeline/pandaxiii_MC/Xe136bb0n_small_reference_pipeline.root
# framework/pipeline/pandaxiii_MC/Xe136bb0n_small_reference_processed_pipeline.root
# framework/pipeline/pandaxiii_MC/Xe136bb0n_validation_pipeline.root
# retention-days: 1
- name: PandaXIII Topological
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd framework/pipeline/pandaxiii_MC
restManager --c AllProcesses.rml --i Xe136bb0n_small_reference.root --o Xe136bb0n_small_reference_processed.root
restRoot -b -q ../MakeBasicTree.C'("Xe136bb0n_small_reference_processed.root")'
restRoot -b -q ../ValidateTrees.C'("Xe136bb0n_validation.root")'
# restManager --c plots.rml --i Xe136bb0n_small_reference_processed.root
# This command is failing in the docker, reproducible locally, not clear why...
# echo | sleep 5 | restManager --c plots.rml --i testOutput.root
# - name: Upload Artifacts
# uses: actions/upload-artifact@v3
# with:
# name: PandaTrackParam
# path: framework/pipeline/pandaxiii_MC/trackParameter.png
# retention-days: 1
- name: PandaXIII Topological from Geant4
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd framework/pipeline/pandaxiii_MC
echo "using just-generated g4 file"
restManager --c AllProcesses.rml --i Xe136bb0n.root --o Xe136bb0n_processed.root --j 1 --e 5
restRoot -b -q ../MakeBasicTree.C'("Xe136bb0n_processed.root")'
restRoot -b -q ../ValidateTrees.C'("Xe136bb0n_validation.root")'
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: PandaTestOutput
path: framework/pipeline/pandaxiii_MC/Xe136bb0n_processed.root
retention-days: 1
- name: PandaXIII Data
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd framework/pipeline/pandaxiii_data
cd framework/pipeline/panda-x
restManager --c P3AutoChain.rml --i CoBo_AsAd0_2019-03-15.graw --o testOutput.root --j 1
restRoot -b -q ../MakeBasicTree.C'("testOutput.root")'
restRoot -b -q ../ValidateTrees.C'("validation.root")'
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: PandaTriggerRate
path: framework/pipeline/pandaxiii_data/TriggerRate.png
retention-days: 1
trex-dm:
name: "TREX-DM"
Expand Down Expand Up @@ -455,77 +398,6 @@ jobs:
key: ${{ env.BRANCH_NAME }}-${{ github.sha }}
path: ${{ env.REST_PATH }}


pandax-iii-reference:
name: "PandaX-III on reference version"
runs-on: ubuntu-latest
container:
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics-reference-jun2022
needs: [ framework-install-reference ]
steps:
- uses: actions/checkout@v3
with:
repository: rest-for-physics/framework
path: framework
- name: Checkout framework branch
run: |
cd framework
./scripts/checkoutRemoteBranch.sh ${{ env.BRANCH_NAME }}
- name: Restore cache
uses: actions/cache@v3
id: framework-install-cache-reference
with:
key: ${{ env.BRANCH_NAME }}-${{ github.sha }}
path: ${{ env.REST_PATH }}
- name: 02_PandaXiiiMC
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd framework/pipeline/pandaxiii_MC
restG4 ${{ env.REST_PATH }}/examples/restG4/05.PandaXIII/Xe136bb0n.rml -o Xe136bb0n.root
restRoot -b -q ${{ env.REST_PATH }}/examples/restG4/05.PandaXIII/Validate.C'("Xe136bb0n.root")'
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: Xe136bbRef
path: framework/pipeline/pandaxiii_MC/Xe136bb0n.root
retention-days: 1
- name: PandaXIII Topological
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd framework/pipeline/pandaxiii_MC
restManager --c AllProcesses.rml --i Xe136bb0n_small_reference.root --o Xe136bb0n_small_reference_processed.root --j 1 --e 5
restRoot -b -q ../MakeBasicTree.C'("Xe136bb0n_small_reference_processed.root")'
restRoot -b -q ../ValidateTrees.C'("Xe136bb0n_validation.root")'
# restManager --c plots.rml --i Xe136bb0n_small_reference_processed.root
- name: PandaXIII Topological from Geant4
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd framework/pipeline/pandaxiii_MC
echo "using just-generated g4 file"
restManager --c AllProcesses.rml --i Xe136bb0n.root --o Xe136bb0n_processed.root --j 1 --e 5
restRoot -b -q ../MakeBasicTree.C'("Xe136bb0n_processed.root")'
# TODO: regenerate reference file
# restRoot -b -q ../ValidateTrees.C'("Xe136bb0n_validation_G4_v10.4.3.root")'
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: PandaTestOutputRef
path: framework/pipeline/pandaxiii_MC/Xe136bb0n_processed.root
retention-days: 1
- name: PandaXIII Data
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd framework/pipeline/pandaxiii_data
restManager --c P3AutoChain.rml --i CoBo_AsAd0_2019-03-15.graw --o testOutput.root --j 1
restRoot -b -q ../MakeBasicTree.C'("testOutput.root")'
restRoot -b -q ../ValidateTrees.C'("validation.root")'
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: PandaTriggerRateRef
path: framework/pipeline/pandaxiii_data/TriggerRate.png
retention-days: 1

examples-reference:
name: Run examples on reference version
runs-on: ubuntu-latest
Expand Down
File renamed without changes.
91 changes: 91 additions & 0 deletions pipeline/panda-x/P3AutoChain.rml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>

<!--In this example, when launching the analysis, we are doing following operations inside TRestManager:
1. Initialize TRestRun
1.1 set input and output file for TRestRun(here input and output is in "globals")
1.2 addMetadata to TRestRun
2. Initialize TRestProcessRunner
2.1 set number of events to process
2.2 set thread number
2.3 set output tree branches
2.4 add multiple processes
2.4.1 override some parameters in the process
2.4.1 add additional observables in the process
3. Add a task to call TRestProcessRunner to run
-->

<TRestManager name="CoBoDataAnalysis" title="Example" verboseLevel="info">

<TRestRun name="SJTU_Proto">
<parameter name="runNumber" value="auto"/>//change this value to "auto" to enable database
<parameter name="inputFileName" value="auto"/>
</TRestRun>

<TRestProcessRunner name="Processor" verboseLevel="info">
<parameter name="eventsToProcess" value="0"/>
<parameter name="threadNumber" value="2"/>

<parameter name="inputAnalysisStorage" value="on"/>
<parameter name="inputEventStorage" value="off"/>
<parameter name="outputEventStorage" value="on"/>

<addProcess type="TRestRawMultiCoBoAsAdToSignalProcess" name="virtualDAQ" value="ON"/>
<addProcess type="TRestRawSignalAnalysisProcess" name="sAna" value="ON">
<parameter name="pointsOverThreshold" value="3"/>
/// We define all observables except MinValue because it is not yet in validation chain
<observable name="BaseLineMean" value="ON"/>
<observable name="BaseLineSigmaMean" value="ON"/>
<observable name="TimeBinsLength" value="ON"/>
<observable name="FullIntegral" value="ON"/>
<observable name="ThresholdIntegral" value="ON"/>
<observable name="RiseSlopeAvg" value="ON"/>
<observable name="SlopeIntegral" value="ON"/>
<observable name="RateOfChangeAvg" value="ON"/>
<observable name="RiseTimeAvg" value="ON"/>
<observable name="TripleMaxIntegral" value="ON"/>
<observable name="IntegralBalance" value="ON"/>
<observable name="AmplitudeIntegralRatio" value="ON"/>
<observable name="MinPeakAmplitude" value="ON"/>
<observable name="MaxPeakAmplitude" value="ON"/>
<observable name="PeakAmplitudeIntegral" value="ON"/>
<observable name="AmplitudeRatio" value="ON"/>
<observable name="MaxPeakTime" value="ON"/>
<observable name="MinPeakTime" value="ON"/>
<observable name="MaxPeakTimeDelay" value="ON"/>
<observable name="AveragePeakTime" value="ON"/>

</addProcess>
<addProcess type="TRestEventRateAnalysisProcess" name="rateAna" value="ON" observable="all"/>
<addProcess type="TRestRawToDetectorSignalProcess" name="rawSignalToSignal" value="ON">
<parameter name="sampling" value="0.2us"/>
<parameter name="zeroSuppression" value="true"/>
<parameter name="nPointsOverThreshold" value="3"/>
</addProcess>

<addProcess type="TRestRealTimeDrawingProcess" name="rD" value="ON" drawInterval="1000">
<TRestAnalysisPlot name="TriggerRatePlot" previewPlot="false">
<canvas size="(1000,800)" save="TriggerRate.png"/>
<plot name="TriggerRate" title="Trigger Rate" xlabel="Seconds From Start" ylabel="Counts" value="ON"
stats="ON">
<variable name="rateAna_SecondsFromStart" range="auto" nbins="100"/>
</plot>
</TRestAnalysisPlot>
</addProcess>


</TRestProcessRunner>

<addTask type="processEvents" value="ON"/>


<globals>
<searchPath value="$ENV{REST_INPUTDATA}/definitions/"/>
<parameter name="mainDataPath" value=""/>

<parameter name="pointThreshold" value="3"/>
</globals>

</TRestManager>


<!--parameter here is accessible to all the classes-->
68 changes: 0 additions & 68 deletions pipeline/pandaxiii_MC/AllProcesses.rml

This file was deleted.

13 changes: 0 additions & 13 deletions pipeline/pandaxiii_MC/README.md

This file was deleted.

Binary file removed pipeline/pandaxiii_MC/Xe136bb0n_small_reference.root
Binary file not shown.
Binary file removed pipeline/pandaxiii_MC/Xe136bb0n_validation.root
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 9c2fae7

Please sign in to comment.