Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
calypso
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
Savannah Rose Shively
calypso
Commits
cdbdcd03
Commit
cdbdcd03
authored
2 years ago
by
Savannah Rose Shively
Browse files
Options
Downloads
Patches
Plain Diff
storage
parent
69073d68
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#5048855
passed
2 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Tracker/TrackerRecAlgs/PairVertex/scripts/Storage.py
+250
-1
250 additions, 1 deletion
Tracker/TrackerRecAlgs/PairVertex/scripts/Storage.py
with
250 additions
and
1 deletion
Tracker/TrackerRecAlgs/PairVertex/scripts/Storage.py
+
250
−
1
View file @
cdbdcd03
from
PairVertexReader
import
*
def
BoolWhatever
(
event
):
boollist
=
[
BoolDaughtersMatched
(
event
),
event
.
TrackCount
>=
2
]
td2i
=
None
td3i
=
None
for
i
in
range
(
event
.
TrackCount
):
if
event
.
tracksTruthBarcode
[
i
]
==
2
:
td2i
=
i
if
event
.
tracksTruthBarcode
[
i
]
==
3
:
td3i
=
i
if
event
.
tracksDoF
[
i
]
==
0
:
boollist
+=
[
False
]
else
:
boollist
+=
[
event
.
tracksChi2
[
i
]
/
event
.
tracksDoF
[
i
]
<=
10
]
if
type
(
td2i
)
==
int
and
type
(
td3i
)
==
int
:
boollist
+=
[
event
.
tracksNLayersHit
[
td2i
]
>=
7
and
event
.
tracksNLayersHit
[
td3i
]
>=
7
]
else
:
boollist
+=
[
False
]
return
all
(
boollist
)
ArrayStorageDict
=
{
'
TruthMaxMomentum
'
:{
'
array
'
:[],
'
lambda
'
:
lambda
event
:
max
(
event
.
tracksTruthPmag
),
...
...
@@ -88,4 +108,233 @@ ArrayStorageDict={ 'TruthMaxMomentum':{
'
plotterfunc
'
:
configBasicHist
,
'
plotkwargs
'
:
{
'
bins
'
:
25
,
'
kwargs
'
:{
'
range
'
:[
0
,
25
]}},
'
descr
'
:
'
How many clusters have energy deposits from both daughter particles and fail track cuts?
'
},}
\ No newline at end of file
},
'
CountSharedCluster
'
:{
'
array
'
:[],
'
lambda
'
:
CountSharedCluster
,
'
plotterfunc
'
:
configBasicHist
,
'
plotkwargs
'
:
{
'
bins
'
:
25
,
'
kwargs
'
:{
'
range
'
:[
0
,
25
]},
'
pckwargs
'
:{
'
xlabel
'
:
'
# Shared Clusters
'
}},
'
descr
'
:
'
How many clusters have energy deposits from both daughter particles and fail track cuts?
'
},
'
DPDecayVertexZ
'
:{
'
array
'
:[],
'
lambda
'
:
lambda
event
:
event
.
vertexPos
[
2
],
'
plotterfunc
'
:
configBasicHist
,
'
plotkwargs
'
:
{},
'
descr
'
:
'
Dark photon decay vertex coordinate along beamline
'
},
'
DPDecayVertexZ_Compare
'
:{
'
array
'
:[[],[],[]],
'
lambda
'
:
VertexZCompare
,
'
plotterfunc
'
:
configMultiHist
,
'
plotkwargs
'
:
{
'
label
'
:[
'
No Cuts
'
,
'
Has Shared Clusters
'
,
'
No Shared Clusters
'
],
'
bins
'
:
25
,
'
kwargs
'
:{
'
range
'
:[
-
1600
,
0
]},
'
pckwargs
'
:{
'
xscale
'
:
'
linear
'
,
'
legend
'
:
True
,
'
legloc
'
:
'
center right
'
}},
'
descr
'
:
'
Compare dp-decay z-coordinate cuts
'
,
'
SepHist
'
:
'
arrays allowed to have different lengths
'
},
'
NumClusters
'
:{
'
array
'
:[],
'
lambda
'
:
lambda
event
:
event
.
clusterCount
,
'
plotterfunc
'
:
configBasicHist
,
'
plotkwargs
'
:{
'
kwargs
'
:{
'
range
'
:[
0
,
200
]}},
},
'
NumClustersBool
'
:{
'
array
'
:[],
'
lambda
'
:
lambda
event
:
event
.
clusterCount
<
200
,
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
'
descr
'
:
'
How many events have a cluster count in a certain range?
'
},
'
ClusterStation
'
:{
'
array
'
:[],
'
lambda
'
:
lambda
event
:
[
i
for
i
in
event
.
clusterLocStation
],
'
plotterfunc
'
:
configBasicHist
,
'
plotkwargs
'
:{
'
bins
'
:
8
,
'
kwargs
'
:{
'
range
'
:[
0
,
4
]},
'
pckwargs
'
:{
'
xlabel
'
:
'
Station #
'
,
'
ylabel
'
:
'
#Clusters
'
}},
'
descr
'
:
'
Where are any clusters?
'
},
'
SharedClusterLocation
'
:{
'
array
'
:[],
'
lambda
'
:
SharedClusterLocation
,
'
plotterfunc
'
:
configBasicHist
,
'
plotkwargs
'
:{
'
bins
'
:
8
,
'
kwargs
'
:{
'
range
'
:[
0
,
4
]},
'
pckwargs
'
:{
'
xlabel
'
:
'
Station #
'
,
'
ylabel
'
:
'
#Clusters
'
}},
'
descr
'
:
'
Where are the shared clusters?
'
},
'
FiducialDaughters
'
:{
'
array
'
:[],
'
lambda
'
:
BoolDaughtersFiducial
,
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
'
descr
'
:
''
},
'
FiducialMatchedDaughters
'
:{
'
array
'
:[],
'
lambda
'
:
BoolDaughtersMatchedFiducial
,
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
'
descr
'
:
''
},
'
BoolDaughtersUltraFiducial
'
:{
'
array
'
:[],
'
lambda
'
:
BoolDaughtersUltraFiducial
,
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
'
descr
'
:
''
},
'
BoolDaughtersUltraFiducialMatched
'
:{
'
array
'
:[],
'
lambda
'
:
BoolDaughtersUltraFiducial
,
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
'
descr
'
:
''
},
'
ClustersPerDaughter
'
:{
'
array
'
:[],
'
lambda
'
:
ClustersPerDaughter
,
'
plotterfunc
'
:
configBasicHist
,
'
plotkwargs
'
:{
'
bins
'
:
41
,
'
kwargs
'
:{
'
range
'
:[
0
,
41
]},
'
pckwargs
'
:{
'
xlabel
'
:
'
# of Clusters
'
,
'
ylabel
'
:
'
# Daughter Particle
'
}},
'
descr
'
:
'
How many clusters does a daughter particle cause?
'
},
'
PercentDaughterClusterShared
'
:{
'
array
'
:[],
'
lambda
'
:
PercentDaughterClusterShared
,
'
plotterfunc
'
:
configBasicHist
,
'
plotkwargs
'
:{
'
pckwargs
'
:{
'
xlabel
'
:
'
Percent of clusters shared
'
,
'
ylabel
'
:
'
# Daughter Paricles
'
}},
'
descr
'
:
'
How many clusters does a daughter particle cause?
'
},
'
Chi2DoF
'
:{
'
array
'
:[],
'
lambda
'
:
lambda
e
:
max
(
Chi2DoF
(
e
)),
'
plotterfunc
'
:
configBasicHist
,
'
plotkwargs
'
:{
'
kwargs
'
:{
'
range
'
:[
0
,
20
]},
'
pckwargs
'
:{
'
xlabel
'
:
'
Chi2/DoF
'
,
'
ylabel
'
:
'
# Tracks
'
}},
'
descr
'
:
'
How many clusters does a daughter particle cause?
'
},
# 1-24-23 plots
'
Efficiency0
'
:{
'
array
'
:[],
'
lambda
'
:
FlexiBool
,
'
lkwargs
'
:{
'
stage
'
:
0
},
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
},
'
Efficiency1
'
:{
'
array
'
:[],
'
lambda
'
:
FlexiBool
,
'
lkwargs
'
:{
'
stage
'
:
1
},
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
'
descr
'
:
'
Fiducial, track, shared, matched
'
},
'
Efficiency2
'
:{
'
array
'
:[],
'
lambda
'
:
FlexiBool
,
'
lkwargs
'
:{
'
stage
'
:
2
},
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
'
descr
'
:
'
Fiducial, track, not shared, matched
'
},
'
Efficiency3
'
:{
'
array
'
:[],
'
lambda
'
:
FlexiBool
,
'
lkwargs
'
:{
'
stage
'
:
3
},
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
'
descr
'
:
'
Fiducial,shared
'
},
'
Efficiency4
'
:{
'
array
'
:[],
'
lambda
'
:
FlexiBool
,
'
lkwargs
'
:{
'
stage
'
:
4
},
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
'
descr
'
:
'
Fiducial, no shared
'
},
'
Efficiency5
'
:{
'
array
'
:[],
'
lambda
'
:
FlexiBool
,
'
lkwargs
'
:{
'
stage
'
:
5
},
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
'
descr
'
:
'
Track
'
},
'
Efficiency6
'
:{
'
array
'
:[],
'
lambda
'
:
FlexiBool
,
'
lkwargs
'
:{
'
stage
'
:
6
},
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
'
descr
'
:
'
Fid vol
'
},
'
Efficiency7
'
:{
'
array
'
:[],
'
lambda
'
:
FlexiBool
,
'
lkwargs
'
:{
'
stage
'
:
7
},
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
},
'
Efficiency8
'
:{
'
array
'
:[],
'
lambda
'
:
FlexiBool
,
'
lkwargs
'
:{
'
stage
'
:
8
},
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
},
'
Efficiency9
'
:{
'
array
'
:[],
'
lambda
'
:
FlexiBool
,
'
lkwargs
'
:{
'
stage
'
:
9
},
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
},
'
Efficiency10
'
:{
'
array
'
:[],
'
lambda
'
:
FlexiBool
,
'
lkwargs
'
:{
'
stage
'
:
10
},
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
},
'
Efficiency11
'
:{
'
array
'
:[],
'
lambda
'
:
FlexiBool
,
'
lkwargs
'
:{
'
stage
'
:
11
},
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
},
'
RecoMinMomentum
'
:{
'
array
'
:[],
'
lambda
'
:
lambda
event
:
min
(
event
.
tracksPmag
),
'
plotterfunc
'
:
configBasicHist
,
'
plotkwargs
'
:
{
'
pckwargs
'
:{
'
xlabel
'
:
'
Minimum P_mag (MeV)
'
,
'
xscale
'
:
'
log
'
}}
#'rrange':[10**2,10**7],
},
'
NTracks
'
:{
'
array
'
:[],
'
lambda
'
:
FlexiBool
,
'
lkwargs
'
:{
'
stage
'
:
6
},
'
plotterfunc
'
:
configBasicHist
,
'
plotkwargs
'
:
{
'
pckwargs
'
:{}}
},
'
BoolWhatever
'
:{
'
array
'
:[],
'
lambda
'
:
BoolChi2DoF
,
'
plotterfunc
'
:
PrintBoolPercent
,
'
plotkwargs
'
:{},
'
descr
'
:
'
something with efficiency
'
}
}
#1-24-23 Plots
# GeneralPlotter(MakePlotDict('Efficiency0'),dcuts=[{}],lcuts=[])
# GeneralPlotter(MakePlotDict([f'Efficiency{i}' for i in range(7,12)]),dcuts=[{}],lcuts=[])
# print()
# GeneralPlotter(MakePlotDict('Efficiency4'),dcuts=[{}],lcuts=[BoolDaughtersFiducial,BoolHasSharedCluster])
# GeneralPlotter(MakePlotDict('Efficiency4'),dcuts=[{}],lcuts=[BoolDaughtersFiducial,BoolNotHasSharedCluster])
# GeneralPlotter(MakePlotDict('Chi2DoF'),dcuts=[{'TrackCount':[0,None,None,None]}],lcuts=[],label='All Events',showplot=False)
# GeneralPlotter(MakePlotDict('Chi2DoF'),dcuts=[{'TrackCount':[0,None,None,None]}],lcuts=[BoolDaughtersMatched,BoolDaughtersFiducial],label='Daughters Matched & Fiducial')
# GeneralPlotter(MakePlotDict('CountSharedCluster'),dcuts=[],lcuts=[],label='All Events',showplot=False)
# GeneralPlotter(MakePlotDict('CountSharedCluster'),dcuts=[{'TrackCount':[1,None,None,None]}],lcuts=[BoolDaughtersMatched,BoolDaughtersFiducial,BoolChi2DoF, BoolLayersHit],label='Passes Track Cuts',showplot=False)
# GeneralPlotter(MakePlotDict('CountSharedCluster'),dcuts=[{'TrackCount':[None,None,None,2]}],lcuts=[BoolDaughtersMatched,BoolDaughtersFiducial,BoolAntiTrack],label='Fails Track Cuts')
#GeneralPlotter(MakePlotDict('SharedClusterLocation'),dcuts=[],lcuts=[],label='Shared Cllusters')
# GeneralPlotter(MakePlotDict('DPDecayVertexZ_Compare'),dcuts=[],lcuts=[])
#GeneralPlotter(MakePlotDict('RecoMinMomentum'),dcuts=[{'TrackCount':[None,None,2,None]},WaveformCuts],lcuts=[BoolDaughtersMatched,BoolDaughtersFiducial,BoolChi2DoF, BoolLayersHit,BoolTEMP]+WaveformCuts2)
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