Hi @jiuzhao , When a reconstructed particle has no match with the truth particle, then the TRUEP* information will give you nan. Are you always getting a nan? If not, then you will have to prune them with a cut e.g. mum_TRUEPZ!=TMath::QuiteNaN() or !TMath::IsNaN(mum_TRUEPZ).
Aside: Note that you can also specify an invalid value yourself using F.VALUE_OR functor.
In-fact it is mandatory to specify this when using "interger" functors + F.MAP_INPUT e.g. TRUEID of the particle (FunTuple will complain if you don't for such a case). See example on how to do that.
Little surprising that there are no associated truth info being found at all. How many events do you run over? All the events in the DST file? And all of them have no truth info? I see you are running over sprucing output, is it in passthrough mode (i.e. Turbo) or do you have a dedicated Sprucing line with extra selection on top of Hlt2 line?
Also it looks like you are missing process=options.process in your configured_MCTruthAndBkgCatAlg which has led to empty / wrong output for me (related: #59 (closed))
Edit: oops, sorry, should have read above discussion more closely. Anyway hope the above link helps.
@nskidmor I want to select events from the HLT2 high PT dimuon line (persist reco enabled) and then sprucing selection for Z->mu mu events. The MCtruth info will be saved.
# WARNING: Following 4 lines were automatically excluded:# WARNING: Name of Line ---- list of found algos that are known to be not thread safe# WARNING: Hlt2SingleHighPtMuonLine ---- [FilterDesktop('FilterDesktop')]# WARNING: Hlt2SingleHighPtMuonPrescaleLine ---- [FilterDesktop('FilterDesktop')]# WARNING: Hlt2SingleHighPtMuonIsoLine ---- [FilterDesktop('FilterDesktop')]# WARNING: Hlt2SingleHighPtMuonNoMuIDLine ---- [FilterDesktop('FilterDesktop')]
Hi @jiuzhao , Saw your private message where you are encountering the following error:
HiveDataBrokerSvc FATAL in sysInitialize(): exception with tag=mapProducers is caughtHiveDataBrokerSvc ERROR mapProducers Unknown requested input by MCTruthAndBkgCatAlg/MCTruthAndBkgCatAlg#1 : '/Event/Spruce/SpruceQEE_ZToMuMuLine/Particles'.You can set the OutputLevel of HiveDataBrokerSvc to DEBUG to get a list of inputs and outputs of every registered algorithm. StatusCode=FAILUREHiveDataBrokerSvc ERROR Exception stack trace
Which branch of DV are you using? Unfortunately I can only take a look at it later in the evening, however I see @nskidmor has already managed to make an nTuple, perhaps you can liaise with her.