Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pftruth-standalone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alessandro Brusamolino
pftruth-standalone
Commits
5a1fb497
Commit
5a1fb497
authored
3 months ago
by
brusale
Browse files
Options
Downloads
Patches
Plain Diff
run merging from COCOA output
parent
d5520adc
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
COCOATruth.cc
+30
-0
30 additions, 0 deletions
COCOATruth.cc
run-workflow.sh
+9
-9
9 additions, 9 deletions
run-workflow.sh
with
39 additions
and
9 deletions
COCOATruth.cc
0 → 100644
+
30
−
0
View file @
5a1fb497
#include
"interface/ROOTLoader.h"
#include
"interface/SimHistoryTool.h"
#include
"interface/SimClusterMerger.h"
#include
<memory>
int
main
()
{
std
::
unique_ptr
<
ROOTLoader
>
rootLoader
=
std
::
make_unique
<
ROOTLoader
>
(
"/ceph/abrusamolino/PFTruthSamples/COCOATests/SingleElectron_Geant4_FlatEtaPt.root"
,
"Out_Tree"
);
const
std
::
vector
<
HitsSoA
>
hitsSoA
=
rootLoader
->
getHitsSoA
();
std
::
vector
<
SimShowerCollection
>
simShowers
=
rootLoader
->
getSimShowers
();
std
::
cout
<<
__FILE__
<<
" "
<<
__LINE__
<<
std
::
endl
;
const
std
::
vector
<
SimTrackCollection
>
simTracks
=
rootLoader
->
getSimTracks
();
const
std
::
vector
<
SimVertexCollection
>
simVertices
=
rootLoader
->
getSimVertices
();
Long64_t
nEvents
=
rootLoader
->
nEvents
();
std
::
vector
<
SimShowerCollection
>
mergedSimShowers
;
mergedSimShowers
.
resize
(
nEvents
);
for
(
unsigned
int
i
=
0
;
i
<
nEvents
;
++
i
)
{
const
SimHistoryTool
shtools
(
simTracks
[
i
],
simVertices
[
i
]);
SimClusterMerger
scMerger
(
&
hitsSoA
[
i
],
&
shtools
);
std
::
vector
<
std
::
vector
<
size_t
>>
idx
;
std
::
vector
<
SimShower
>
mergedSimShower
=
scMerger
.
merge
(
simShowers
[
i
],
idx
);
mergedSimShowers
[
i
].
reserve
(
mergedSimShower
.
size
());
mergedSimShowers
[
i
]
=
mergedSimShower
;
mergedSimShower
.
clear
();
}
rootLoader
->
saveMergedSimShowers
(
mergedSimShowers
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
run-workflow.sh
+
9
−
9
View file @
5a1fb497
#!/bin/sh
usage
=
"
$(
basename
"
$0
"
)
[-h] [-r] [-g] [-m] N
EVENTS NWORKER
S -- script to run the workflow
usage
=
"
$(
basename
"
$0
"
)
[-h] [-r] [-g] [-m] N
WORKERS NEVENT
S -- script to run the workflow
where:
-h show this help text
...
...
@@ -34,14 +34,14 @@ parse_yml() {
python3
-c
"import yaml; print(yaml.safe_load(open('data/config.yml')))"
}
print_step
"Sourcing the LCG
environment
"
print_step
"Sourcing the LCG
stack
"
source
/cvmfs/sft.cern.ch/lcg/views/LCG_105/x86_64-el9-gcc11-opt/setup.sh
export
CONFIG_DIRECTORY
=
"/ceph/abrusamolino/PFTruth/config"
export
CSV_DIRECTORY
=
"/ceph/abrusamolino/PFTruth/csv"
export
CONFIG_DIRECTORY
=
"/ceph/abrusamolino/PFTruth/config
-test
"
export
CSV_DIRECTORY
=
"/ceph/abrusamolino/PFTruth/csv
-test
"
N
EVENTS
=
$2
N
WORKERS
=
$3
N
WORKERS
=
${
2
:-
4
}
N
EVENTS
=
${
3
:-
0
}
CURRENT_DIR
=
$(
pwd
)
...
...
@@ -54,16 +54,16 @@ fi
cd
$CURRENT_DIR
# Compile the project if executable does not exist
if
[
!
-f
"pftruth"
]
||
$recompile
;
then
if
$recompile
;
then
print_step
"Cleaning up before recompiling"
make clean
-s
print_step
"Recompiling"
make
-s
make
-s
-j
$NWORKERS
fi
if
$run_merging
;
then
print_step
"Running the cluster merging"
./
pftruth
./
COCOATruth /ceph/abrusamolino/PFTruthSamples/COCOATests/SingleElectron_Geant4_FlatEtaPt.root
fi
print_step
"Done"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment