1 #include "services_dune.fcl"
2 #include "caldata_dune.fcl"
3 #include "hitfindermodules_dune.fcl"
4 #include "cluster_dune.fcl"
5 #include "trackfindermodules_dune.fcl"
6 #include "pandoramodules_dune.fcl"
7 #include "calorimetry_dune10kt.fcl"
8 #include "mctrutht0matching.fcl"
10 #include "particleid.fcl"
11 #include "showerfindermodules_dune.fcl"
12 #include "tools_dune.fcl"
16 # Load the service that manages root files for histograms.
17 TFileService: { fileName: "hist.root" }
20 RandomNumberGenerator: {} #ART native random number generator
21 message: @local::dune_message_services_prod_debug
22 FileCatalogMetadata: @local::art_file_catalog_mc
23 @table::dunedphase3x1x1_reco_services_legacy
29 services.RawDigitPrepService.DoNoiseRemoval: false
30 services.RawDigitPrepService.DoDeconvolution: false
31 services.RawDigitPrepService.DoEarlySignalFinding: false
32 services.RawDigitPrepService.DoMitigation: false
33 services.RawDigitPrepService.SkipBad: false
34 services.RawDigitPrepService.SkipNoisy: false
35 services.RawDigitPrepService.DoROI: true
37 #services.RawDigitExtractService.ROIBuilderTool: adcDPhase3x1x1LocalRoiBuilder
39 services.RawDigitExtractService.PedestalOption: 3 #1: pedestal saved in rawDigit, 2: pedestal set during detsim, 3: either mean or median (see next line)
41 services.PedestalEvaluationService: @local::adcped_median #adcped_median for median, adcped_mean for mean
42 services.PedestalEvaluationService.SkipSignals: false # Skip ROI when calculating the pedestal. Only works when services.RawDigitExtractService.ROIBuilderTool is defined
46 #source is now a root file
49 module_type: RootInput
51 fileNames: ["detsim.root"]
55 # Define and configure some modules to do work on each event.
56 # First modules are defined; they are scheduled later.
57 # Modules are grouped by type.
63 rns: { module_type: RandomNumberSaver }
64 caldata: @local::producer_adcprep
65 dprawhit: @local::dunefddphase_dprawhitfinder
66 linecluster: @local::dunefd_linecluster
67 trajcluster: @local::dunefdmc_trajcluster
68 pmtrack: @local::dunefd_pmalgtrackmaker
69 pmtrackcalo: @local::dune10kt_calomc
70 pmtrackpid: @local::standard_chi2pid
73 #define the producer and filter modules for this path, order matters,
74 #filters reject all following items. see lines starting physics.producers below
75 reco: [ rns, caldata, dprawhit, linecluster, pmtrack, pmtrackcalo, pmtrackpid ]
81 #define the output stream, there could be more than one if using filters
91 module_type: RootOutput
92 fileName: "%ifb_reco.root"
93 dataTier: "full-reconstructed"
100 ### Here, we overwrite ALL module labels with the ones defined above.
101 physics.producers.caldata.DoGroups: false
105 services.AdcRoiBuildingService.NSigmaStart: -20 # only pulses with ADC >= NSigmaStart*8 are considered for hit finding. This reduces fake noise hits.
106 services.AdcRoiBuildingService.NSigmaEnd: -20 # only pulses with ADC >= NSigmaStart*8 are considered for hit finding. This reduces fake noise hits.
108 ### Hit finding parameters ###
109 physics.producers.dprawhit.LogLevel: 0 # Log level
110 physics.producers.dprawhit.NumBinsToAverage: 0 # 0 or 1 = no averaging.
111 physics.producers.dprawhit.ChargeNorm: 1 # Normalization for fit integral. Should be set to 1.
112 physics.producers.dprawhit.WidthNormalization: 2.335 # standard width of the fitted hit is the FWHM of the fitted function (full width at half maximum).
113 # This width is divied by 'WidthNormalization' and saved to the recob::Hit.
114 # standard value is chosen to be 2.335 = 2*sqrt(2*ln(2)), which is the relation between FWHM and standard deviation for the Gaussian distribution.
117 physics.producers.dprawhit.MinSig: 3.9 # peak threshold for peak finding (in ADC). Peaks with lower amplitudes are neither fitted nor stored.
118 physics.producers.dprawhit.TicksToStopPeakFinder: 5 # when walking along waveform to find start and end points of a peak, stop when current tick is followed by minimum "TicksToStopPeakFinder" ticks
119 # with equal or higher ADC counts (=inflection point). Stop anyway if ADC count of a tick is <= 0.
121 physics.producers.dprawhit.GroupMaxDistance: 5 # maximum distance (in ticks) between two peaks to be grouped.
122 physics.producers.dprawhit.GroupMinADC: -1 # minimum ADC count between two peaks to be grouped.
125 physics.producers.dprawhit.DoMergePeaks: true # true: merge two peaks of the same group into one before fitting
126 physics.producers.dprawhit.MergeADCSumThreshold: 0.05 # merge two peaks if (ADC sum of the smaller peak) < MergeADCSumThreshold*(ADC sum of the bigger peak) AND
127 physics.producers.dprawhit.MergeMaxADCThreshold: 0.2 # merge two peaks if (height of the smaller peak) < MergeMaxADCThreshold*(height of the bigger peak) OR
128 physics.producers.dprawhit.MinRelativePeakHeightLeft: 0.1 # merge two peaks if (relative peak height of the smaller peak) < MinRelativePeakHeight*(peak height of the smaller peak)
129 physics.producers.dprawhit.MinRelativePeakHeightRight: 0.1 # merge two peaks if (relative peak height of the smaller peak) < MinRelativePeakHeight*(peak height of the smaller peak)
130 physics.producers.dprawhit.MergeMaxADCLimit: 25 # merge two peaks only if (peak height of either peak) <= MergeMaxADCLimit
132 #filterings grouped and merged peaks
133 physics.producers.dprawhit.MinADCSum: 10.0 # threshold for ADC sum (in ADC*ticks). Groups of peaks with smaller values are neither fitted nor stored.
134 physics.producers.dprawhit.MinWidth: 5 # threshold for width (in ticks). Groups of peaks with smaller values are neither fitted nor stored.
135 physics.producers.dprawhit.MinADCSumOverWidth: 0.0 # threshold for ADC sum over width (in ADC*ticks/ticks). Groups of peaks with smaller values are neither fitted nor stored.
137 #splitting up long groups of peaks and calculate hit paramter directly from waveform (no fit).
138 physics.producers.dprawhit.MaxMultiHit: 6 # maximum number of peaks in a group for the group to be fitted. If more, split the group in equally spaced hits without fitting.
139 # When refitting, maximum number of peaks in group can be up to 3x number of peaks before re-fitting.
140 physics.producers.dprawhit.MaxFluctuations: 1667 # If the sum of fluctuations in all peaks is > MaxFluctuations, split the group in equally spaced hits without fitting.
141 physics.producers.dprawhit.MaxGroupLength: 1667 # Maximum length of group of peaks for the group to be fitted, in ticks. If more, split the group in equally spaced hits without fitting.
143 physics.producers.dprawhit.LongPulseWidth: 40 # max widths for hits in long pulse trains
144 physics.producers.dprawhit.LongMaxHits: 20 # max number hits in long pulse trains
146 #fitting groups of peaks
147 physics.producers.dprawhit.SameShape: true # if true: fits within same group are forced to have identical shape
148 physics.producers.dprawhit.MinTau: 0.01 # minimum value of the rising and falling time constants of the fit, in microseconds.
149 physics.producers.dprawhit.MaxTau: 20 # maximum value of the rising and falling time constants of the fit, in microseconds.
150 physics.producers.dprawhit.FitPeakMeanRange: 5 # range in that the fitter can move the mean of the fit function w.r.t. the peak.
152 #refitting fitted groups of peaks peaks
153 physics.producers.dprawhit.TryNplus1Fits: false # true: will try to re-fit poorly modeled groups of peaks (chi2PerNDF>Chi2NDFRetry) while adding (an) additional peak(s).
154 physics.producers.dprawhit.Chi2NDFRetry: 100 # for single peaks: if the first fit returns a Chi2/NDF greater than this, try to re-fit.
155 physics.producers.dprawhit.Chi2NDFRetryFactorMultiHits: 2 # for groups of peaks (2 or more): if the first fit returns a Chi2/NDF greater than Chi2NDFRetryFactorMultiHits*Chi2NDFRetry, try to re-fit.
157 #filtering (re)fitted groups of peaks. groups of peaks with a higher chi2/ndf are split up.
158 physics.producers.dprawhit.Chi2NDFMax: 2000 # for single peaks: maximum chi square / NDF allowed for a fit to be stored as recob::Hits. Otherwise, handle peak as long pulse train.
159 physics.producers.dprawhit.Chi2NDFMaxFactorMultiHits: 2 # for groups of peaks (2 or more): maximum chi square / NDF allowed for a fit to be stored as recob::Hit. Otherwise, handle group as long pulse train.
167 ###Linecluster configuration###
168 physics.producers.linecluster.HitFinderModuleLabel: "dprawhit"
170 physics.producers.linecluster.ClusterCrawlerAlg.NumPass: 3 # number of passes through the hit list. 0 = no cluster reco
171 physics.producers.linecluster.ClusterCrawlerAlg.MaxHitsFit: [ 960, 8, 4] # number of hits fitted to a line !!CHANGED!!
172 physics.producers.linecluster.ClusterCrawlerAlg.MinHits: [ 20, 8, 3] # minimum size of a cluster !!CHANGED!!
173 physics.producers.linecluster.ClusterCrawlerAlg.NHitsAve: [ 20, 8, 2] # number of hits to find the average charge and width at the end of the cluster. NHitsAve should be 1 or 2
174 physics.producers.linecluster.ClusterCrawlerAlg.ChgCut: [ .8, .8, .8] # max fractional hit charge difference for adding hits
175 physics.producers.linecluster.ClusterCrawlerAlg.ChiCut: [ 4, 8, 10] # stop adding hits to clusters if ChiCut is reached
176 physics.producers.linecluster.ClusterCrawlerAlg.MaxWirSkip: [25, 8, 0] # max number of wires to skip without adding a hit
177 physics.producers.linecluster.ClusterCrawlerAlg.MinWirAfterSkip: [2, 2, 1] # min reqd number of consecutive wires with a hit after a skip
178 physics.producers.linecluster.ClusterCrawlerAlg.KinkChiRat: [1.2, 1.2, 0.] # Max consecutive chisq increase for the last 3 hits on the cluster 0. = no kink check when following
179 physics.producers.linecluster.ClusterCrawlerAlg.KinkAngCut: [0.4, 0.4, 1.5] # kink angle cut (radians) used to follow and merge
180 physics.producers.linecluster.ClusterCrawlerAlg.DoMerge: [false, true, true] # run cluster merging code?
181 physics.producers.linecluster.ClusterCrawlerAlg.TimeDelta: [ 8, 8, 20] # max time difference for cluster merging
182 physics.producers.linecluster.ClusterCrawlerAlg.MergeChgCut: [0.8, 0.8, 0.8] # max charge ratio for cluster merging
183 physics.producers.linecluster.ClusterCrawlerAlg.FindVertices: [true, true, true] # make 2D vertices after clustering?
184 physics.producers.linecluster.ClusterCrawlerAlg.LACrawl: [true, true, true] # crawl Large Angle clusters?
185 physics.producers.linecluster.ClusterCrawlerAlg.LAClusAngleCut: 60 # Large cluster angle cut (0 < 90 degrees). <0 to turn off
186 physics.producers.linecluster.ClusterCrawlerAlg.LAClusMaxHitsFit: 4 #
187 physics.producers.linecluster.ClusterCrawlerAlg.MinHitFrac: 0.6 # Drop clusters having < (#hits/#wires)
188 physics.producers.linecluster.ClusterCrawlerAlg.MinAmp: [5, 5, 5] # Min hit signal amplitude for merging
189 physics.producers.linecluster.ClusterCrawlerAlg.ChgNearWindow: 40 # #of ticks for summing charge near a cluster
190 physics.producers.linecluster.ClusterCrawlerAlg.ChgNearCut: 1.5 # Cluster end is shower-like if (nearby chg)/(cls chg)> cut
191 physics.producers.linecluster.ClusterCrawlerAlg.HitMergeChiCut: -1 # Merge cluster hit-multiplets if the separation chisq is < cut. Set < 0 for no merging !!CHANGED!!
192 physics.producers.linecluster.ClusterCrawlerAlg.MergeAllHits: false # merge all hits before reconstructing clusters
193 physics.producers.linecluster.ClusterCrawlerAlg.MergeOverlapAngCut: 0.1 # Set <= 0 to turn off overlapping cluster merging
194 physics.producers.linecluster.ClusterCrawlerAlg.ChkClusterDS: true # Check reconstruction at DS end of clusters?
195 physics.producers.linecluster.ClusterCrawlerAlg.KillGarbageClusters: 0.1 # Kill ghost clusters, set to 0 to turn off
196 physics.producers.linecluster.ClusterCrawlerAlg.VtxClusterSplit: true # Split clusters that cross vertices
197 physics.producers.linecluster.ClusterCrawlerAlg.FindStarVertices: true # Find vertices with a star topology
198 physics.producers.linecluster.ClusterCrawlerAlg.HitErrFac: 0.2 # hit time error for fitting = fHitErrFac * (hit width)
199 physics.producers.linecluster.ClusterCrawlerAlg.HitMinAmp: 2 # ignore hits with PH < this value
200 physics.producers.linecluster.ClusterCrawlerAlg.ClProjErrFac: 3 # cluster projection error factor
201 physics.producers.linecluster.ClusterCrawlerAlg.AllowNoHitWire: 1 # Allow skipping N wires w no hits (if poor purity)
202 physics.producers.linecluster.ClusterCrawlerAlg.Vertex2DCut: 10 # Max chisq cut for attaching a cluster to a vtx
203 physics.producers.linecluster.ClusterCrawlerAlg.Vertex3DCut: 5 # 2D vtx -> 3D vtx matching cut (chisq)
204 physics.producers.linecluster.ClusterCrawlerAlg.FindHammerClusters: true # look for hammer type clusters
205 physics.producers.linecluster.ClusterCrawlerAlg.RefineVertexClusters: false # (not ready)
206 physics.producers.linecluster.ClusterCrawlerAlg.FindVLAClusters: false # find Very Large Angle clusters (not ready)
207 physics.producers.linecluster.ClusterCrawlerAlg.DebugPlane: -1 # print info only in this plane
208 physics.producers.linecluster.ClusterCrawlerAlg.DebugWire: 0 # set to the Begin Wire and Hit of a cluster to print
209 physics.producers.linecluster.ClusterCrawlerAlg.DebugHit: 0 # out detailed information while crawling
214 ###pmtrack configuration###
216 physics.producers.pmtrack.WireModuleLabel: "caldata" # deconvoluted adc is also used for tracks validation
217 physics.producers.pmtrack.HitModuleLabel: "linecluster"
218 physics.producers.pmtrack.ClusterModuleLabel: "linecluster"
219 physics.producers.pmtrack.EmClusterModuleLabel: "" # EM-like clusters, will be excluded from tracking if provided
220 physics.producers.pmtrack.SaveOnlyBranchingVtx: false # use true to save only vertices interconnecting many tracks, otherwise. vertex is added to the front of each track
221 physics.producers.pmtrack.SavePmaNodes: false # save track nodes (only for algorithm development purposes)
225 physics.producers.pmtrack.ProjectionMatchingAlg: @local::standard_projectionmatchingalg
226 physics.producers.pmtrack.ProjectionMatchingAlg.OptimizationEps: 0.01 # relative change of the obj.fn which stops optimization after adding a node
227 physics.producers.pmtrack.ProjectionMatchingAlg.FineTuningEps: 0.0001 # relative change of the obj.fn which stops fine-tuning of optimized track
228 physics.producers.pmtrack.ProjectionMatchingAlg.TrkValidationDist2D: 1.0 # max. distance [cm] used in the track validation in the "third" plane
229 physics.producers.pmtrack.ProjectionMatchingAlg.HitTestingDist2D: 0.5 # max. distance [cm] used in testing compatibility of hits with the track
230 physics.producers.pmtrack.ProjectionMatchingAlg.MinTwoViewFraction: 0.4 # min. fraction of track length covered with hits from many 2D views intertwinted with each other
231 physics.producers.pmtrack.ProjectionMatchingAlg.NodeMargin3D: 3.0 # margin in [cm] around TPC for allowed track node positions
232 physics.producers.pmtrack.ProjectionMatchingAlg.HitWeightZ: 1.0 # weights used for hits in U, V, Z planes:
233 physics.producers.pmtrack.ProjectionMatchingAlg.HitWeightV: 1.0 # - use lower values for planes where hit position is less reliable (e.g. due to S/N)
234 physics.producers.pmtrack.ProjectionMatchingAlg.HitWeightU: 1.0 # - relative ratios matter, sum does not need to be 1.0
237 physics.producers.pmtrack.PMAlgTracking: @local::standard_pmalgtracker
238 physics.producers.pmtrack.PMAlgTracking.MinSeedSize1stPass: 20 # min. cluster size used to start building a track in the 1st pass
239 physics.producers.pmtrack.PMAlgTracking.MinSeedSize2ndPass: 4 # ..and in the 2nd pass: differentiate to speed up finding long tracks
240 # w/o checking large number of possibilities, then use as small size
241 # as reasonnable for used clustering algorithm to complete the search
243 physics.producers.pmtrack.PMAlgTracking.TrackLikeThreshold: 0.0 # CNN output threshold for track-like recognition; ClusterModuleLabel
244 # needs to be associated to CNN outputs in case of threshold > 0; will
245 # exclude obvious EM from tracking and tag clean electron tracks as PDG=11
247 physics.producers.pmtrack.PMAlgTracking.RunVertexing: true # find vertices, join with tracks, reoptimize track-vertex structure
249 physics.producers.pmtrack.PMAlgTracking.FlipToBeam: false # set the track direction to increasing Z values
250 physics.producers.pmtrack.PMAlgTracking.FlipDownward: false # set the track direction to decreasing Y values (like cosmic rays in single phase)
251 physics.producers.pmtrack.PMAlgTracking.FlipToX: true # set the track direction to decreasing X values (like cosmic rays in dual phase)
252 physics.producers.pmtrack.PMAlgTracking.AutoFlip_dQdx: false # set the track direction to increasing dQ/dx (overrides FlipToBeam
253 # and FlipDownward if significant rise of dQ/dx at the track end)
255 physics.producers.pmtrack.PMAlgTracking.MergeWithinTPC: false # merge witnin single TPC; finds tracks best matching by angle, with limits:
256 physics.producers.pmtrack.PMAlgTracking.MergeTransverseShift: 2.0 # - max. transverse displacement [cm] between tracks
257 physics.producers.pmtrack.PMAlgTracking.MergeAngle: 2.0 # - max. angle [degree] between tracks (nearest segments)
259 physics.producers.pmtrack.PMAlgTracking.StitchBetweenTPCs: false # stitch between TPCs; finds tracks best matching by angle, with limits:
260 physics.producers.pmtrack.PMAlgTracking.StitchDistToWall: 3.0 # - max. track endpoint distance [cm] to TPC boundary
261 physics.producers.pmtrack.PMAlgTracking.StitchTransverseShift: 3.0 # - max. transverse displacement [cm] between tracks
262 physics.producers.pmtrack.PMAlgTracking.StitchAngle: 10.0 # - max. angle [degree] between tracks (nearest segments)
264 physics.producers.pmtrack.PMAlgTracking.MatchT0inAPACrossing: false # match T0 of APA-crossing tracks using PMAlgStitcher
265 physics.producers.pmtrack.PMAlgTracking.MatchT0inCPACrossing: false # match T0 of CPA-crossing tracks using PMAlgStitcher
267 physics.producers.pmtrack.PMAlgTracking.Validation: "hits" # "hits": uses hits to validate track
268 # "adc": uses adc image to validate tracks
269 # "calib": uses hits to validate tracks and produce histograms to find adc thresholds
270 # which should be used in "adc" mode
271 physics.producers.pmtrack.PMAlgTracking.AdcValidationThr: [1.0, 1.0, 1.0] # threshold for not-empty pixel in the ADC image used for the track validation, per plane
272 physics.producers.pmtrack.PMAlgTracking.AdcImageAlg: @local::standard_dataprovideralg
273 physics.producers.pmtrack.PMAlgTracking.AdcImageAlg.CalibrateLifetime: false
274 physics.producers.pmtrack.PMAlgTracking.AdcImageAlg.CalibrateAmpl: false
276 physics.producers.pmtrack.PMAlgCosmicTagging: @local::standard_pmalgtagger
277 physics.producers.pmtrack.PMAlgVertexing: @local::standard_pmavertexalg
278 physics.producers.pmtrack.PMAlgStitching: @local::standard_pmastitchalg
281 ###pmtrackcalo configuration###
282 physics.producers.pmtrackcalo.TrackModuleLabel: "pmtrack"
283 physics.producers.pmtrackcalo.SpacePointModuleLabel: "pmtrack"
284 physics.producers.pmtrackcalo.T0ModuleLabel: ""
285 physics.producers.pmtrackcalo.CaloAlg.CalAreaConstants: [ 4.966e-2, 4.966e-2 ]
287 ###pmtrackpid configuration###
288 physics.producers.pmtrackpid.CalorimetryModuleLabel: "pmtrackcalo"
289 physics.producers.pmtrackpid.TrackModuleLabel: "pmtrack"