Skip to content

Commit d5ecdad

Browse files
Fixes to make it work!
1 parent 324b33c commit d5ecdad

File tree

4 files changed

+162
-4
lines changed

4 files changed

+162
-4
lines changed

boosteddmanalysis/Reconstruction/SelectFinalState.cxx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,14 @@ bdm::SelectFinalState::Selection_t bdm::SelectFinalState::select
2828
for (std::size_t index = 0U; index < nParticles; ++index) {
2929
auto const& particle = particles[index];
3030

31-
std::cout << "Particle #" << index << " mother: " << particle.Mother() << std::endl;
32-
3331
// TODO
3432

3533
// filter neutrons out
3634
if (!fKeepNeutrons && (std::abs(particle.PdgCode()) == kAbsNeutron))
3735
continue;
3836

3937
// exclude the particles that are not "primary" (i.e. not generated)
40-
if (particle.Mother() < 0) continue;
38+
if (particle.Mother() > 0) continue;
4139

4240
selected.push_back(index);
4341

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
#
2+
# File: bdmparticlereconstructionchain.fcl
3+
# Brief: Runs Boosted Dark Matter particle selection and reconstruction algorithms.
4+
# Author: Gianluca Petrillo (petrillo@slac.stanford.edu)
5+
# Date: 20181006
6+
# Version: 1.0
7+
#
8+
# This is an example of "full chain" where generated particles are selected
9+
# and "reconstructed".
10+
#
11+
# Input:
12+
# - collection of simb::MCParticle
13+
#
14+
# Output:
15+
# - collection of bdm::SmearedMCParticle
16+
# - text file with the content of the original MCParticle list
17+
# - text file with the content of the reconstructed SmearedMCParticle
18+
#
19+
#
20+
# Changes:
21+
# 20181006 (petrillo@fnal.gov) [v1.0]
22+
# original version
23+
#
24+
#
25+
26+
#include "seedservice.fcl"
27+
#include "particleselectors.fcl"
28+
#include "smearedreconstructionsettings.fcl"
29+
30+
#-------------------------------------------------------------------------------
31+
process_name: RecoSmear
32+
33+
#-------------------------------------------------------------------------------
34+
# no source specified; use -s option from command line
35+
36+
services: {
37+
38+
message: {
39+
# debugModules: [ "*" ]
40+
destinations: {
41+
42+
# grab all the "DumpSmearedMCParticles" messages
43+
# and put them in DumpSmearedMCParticles.log
44+
DumpSmearedMCParticles: {
45+
append: false
46+
categories: {
47+
DumpSmearedMCParticles: { limit: -1 }
48+
default: { limit: 0 }
49+
}
50+
filename: "DumpSmearedMCParticles.log"
51+
threshold: "INFO"
52+
type: "file"
53+
} # DumpSmearedMCParticles
54+
55+
# grab all the "DumpMCParticles" messages
56+
# and put them in DumpMCParticles.log
57+
DumpMCParticles: {
58+
append: false
59+
categories: {
60+
DumpMCParticles: { limit: -1 }
61+
default: { limit: 0 }
62+
}
63+
filename: "DumpMCParticles.log"
64+
threshold: "INFO"
65+
type: "file"
66+
} # DumpMCParticles
67+
68+
LogStandardOut: {
69+
categories: {
70+
DumpMCParticles: { limit: 0 }
71+
DumpSmearedMCParticles: { limit: 0 }
72+
default: { limit: -1 }
73+
}
74+
threshold: "INFO"
75+
type: "cout"
76+
} # LogStandardOut
77+
78+
} # destinations
79+
} # message
80+
81+
RandomNumberGenerator: {}
82+
NuRandomService: @local::per_event_NuRandomService
83+
84+
} # services
85+
86+
87+
#-------------------------------------------------------------------------------
88+
physics: {
89+
90+
producers: {
91+
92+
selector: {
93+
module_type: ParticleSelector
94+
95+
particles: "largeant"
96+
97+
selector: @local::standard_select_final_state
98+
99+
100+
} # selector
101+
102+
smear: {
103+
module_type: SmearedReconstruction
104+
105+
particles: "selector"
106+
107+
reconstruction: @local::smeared_reconstruction_dune10kt
108+
109+
} # smear
110+
111+
} # producers
112+
113+
analyzers: {
114+
115+
dumpmcparticles: {
116+
117+
module_type: DumpMCParticles
118+
119+
OutputCategory: "DumpMCParticles"
120+
InputParticles: "largeant"
121+
122+
} # dumpsmearedmcparticles
123+
124+
dumpsmearedmcparticles: {
125+
126+
module_type: DumpSmearedMCParticles
127+
128+
OutputCategory: "DumpSmearedMCParticles"
129+
InputParticles: "smear"
130+
131+
} # dumpsmearedmcparticles
132+
133+
} # analyzers
134+
135+
136+
reco: [ selector, smear ]
137+
dumpers: [ output ]
138+
stream: [ dumpmcparticles, dumpsmearedmcparticles ]
139+
140+
trigger_paths: [ reco ]
141+
end_paths: [ stream, dumpers ]
142+
143+
} # physics
144+
145+
146+
#-------------------------------------------------------------------------------
147+
outputs: {
148+
output: {
149+
module_type: RootOutput
150+
151+
fileName: "%ifb_%tc_%p.root"
152+
153+
} # output
154+
} # outputs
155+
156+
#-------------------------------------------------------------------------------

boosteddmanalysis/Reconstruction/dump_smearedmcparticles.fcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ physics: {
6969
# output category ("OutputCategory" by default), useful for filtering (see above)
7070
OutputCategory: "DumpSmearedMCParticles"
7171

72-
# specify the label of the simb::MCParticle data product (or producer)
72+
# specify the label of the bdm::SmearedMCParticle data product (or producer)
7373
InputParticles: "smear"
7474

7575
} # dumpsmearedmcparticles

boosteddmanalysis/Reconstruction/particleselectors.fcl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#
2020
#
2121

22+
BEGIN_PROLOG
23+
2224
################################################################################
2325
standard_select_final_state: {
2426

@@ -28,3 +30,5 @@ standard_select_final_state: {
2830

2931

3032
################################################################################
33+
34+
END_PROLOG

0 commit comments

Comments
 (0)