CRV inference #358
Conversation
…::_M_range_check.
…eg faults because _crvInferenceTag is not yet constructed.
…he track, preserving alignment with track branches
AndrewEdmonds11
left a comment
There was a problem hiding this comment.
This looks great, Sam! I think you can go ahead and turn it on by default in the mockdata fcl files. Thanks
Thanks. Before we turn it on by default, it has a dependency on ArtAnalysis which needs to be merged PR-2. I guess this also means ArtAnalysis needs to be included in the EventNtuple musing, if it hasn't been already? |
|
Thanks, Sam. I've just reviewed Mu2e/ArtAnalysis#2. ArtAnalysis will be included in the next set of Analysis musings when we tag new versions. I think you can turn CRV inference on by default in this PR so that we don't forget |
# Conflicts: # src/EventNtupleMaker_module.cc
|
Merged in origin/main and fixed the conflict in the EventNtupleMaker module |
Summary
crvcosmic.branch to EventNtuple, storing CRV cosmic veto BDT scorestrk.branchMVAResultInfoscores, one per CRV coincidence clusterCrvInferenceTagfcl parameterfrom_mcs-mockdata_crvInf.fclfor ntupling with CrvInference enabledExample output
One event with 4 track hypotheses and 2 CRV clusters:
[pyprint] [INFO] -------------------------------------------------------------------------------------
[pyprint] [INFO] trk.trk.pdg: [11, -11, 13, -13]
[pyprint] [INFO] trkfit.trksegs.mom.fCoordinates.fX: [[11.9, -88.8, 63.3, -140, 13.6], [...], ..., [-11.8, 89.3, -61.7, 136, -14.6]]
[pyprint] [INFO] trkfit.trksegs.mom.fCoordinates.fY: [[118, -80.1, -99.5, 90.2, 128], [-118, ...], ..., [-118, 78, 101, -94, -127]]
[pyprint] [INFO] trkfit.trksegs.mom.fCoordinates.fZ: [[129, 129, 129, 56.4, 119], [-129, ...], ..., [-129, -128, -130, -56.9, -119]]
[pyprint] [INFO] trkfit.trksegs.pos.fCoordinates.fX: [[677, 24.8, -40.7, 385, 661], [677, ..., 661], ..., [677, 34.9, -45, 394, 661]]
[pyprint] [INFO] trkfit.trksegs.pos.fCoordinates.fY: [[-87.4, 234, -268, 214, -87.5], [...], ..., [-87.4, 233, -262, 204, -93.8]]
[pyprint] [INFO] trkfit.trksegs.pos.fCoordinates.fZ: [[10.1, -1.63e+03, 1.64e+03, -5.97e+03, -2.59e+03], ..., [10.1, ..., -2.58e+03]]
[pyprint] [INFO] trkfit.trksegs.time: [[1.24e+03, 1.23e+03, 1.25e+03, 1.21e+03, 1.23e+03], ..., [1.24e+03, ...]]
[pyprint] [INFO] trkfit.trksegs.dmom: [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]
[pyprint] [INFO] trkfit.trksegs.momerr: [[0.464, 0.467, 0.459, 0.467, 0.467], ..., [0.537, 0.541, ..., 0.541, 0.541]]
[pyprint] [INFO] trkfit.trksegs.inbounds: [[True, True, True, True, True], [...], ..., [True, True, True, True, True]]
[pyprint] [INFO] trkfit.trksegs.gap: [[False, False, False, False, False], ..., [False, False, ..., False, False]]
[pyprint] [INFO] trkfit.trksegs.sid: [[1, 0, 2, 96, 95], [1, 0, 2, 96, 95], [1, 0, ..., 95], [1, 0, 2, 96, 95]]
[pyprint] [INFO] trkfit.trksegs.sindex: [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]
[pyprint] [INFO] crv.crvcoincs.PEs: [1.74e+03, 1.11e+03]
[pyprint] [INFO] mva.crvcosmic.valid: [[True, True], [True, True], [True, True], [True, True]]
[pyprint] [INFO] mva.crvcosmic.result: [[0.999, 0.97], [0.999, 0.97], [0.999, 0.97], [0.999, 0.97]]
[pyprint] [INFO] -------------------------------------------------------------------------------------
Plots from test
EventNtuplefiles, showing separation of classes.Details
The
CrvInferenceproducer module (inArtAnalysis/CrvInference) pairs everyKalSeedwith everyCrvCoincidenceClusterand computes an XGBoost BDT score indicating the probability that the coincidence is from a genuine cosmic. EventNtupleMaker reads the resultingart::Assns<KalSeed, CrvCoincidenceCluster, MVAResult>and stores the scores in acrvcosmic.branch with fieldsresult(the BDT score) andvalid.The branch uses
fhicl::OptionalAtomso existing fcl configurations are unaffected. To enable, add the input tagphysics.analyzers.EventNtuple.CrvInferenceTag : "CrvInference".