Draft: update hlt2 reco with functional MuonID
needs Rec!2501 (closed) and LHCb!3190 (closed)
Merge request reports
Activity
mentioned in merge request LHCb!3190 (closed)
I made an MR for the change in the
Track
: LHCb!3190 (closed)303 InputTracks=best_tracks["v1"], 304 RestrictToType="Downstream").OutputTracks 305 #muon_pids_long = make_muon_id_hlt2(best_long_soa) 306 muon_pids_down = make_muon_id_hlt2(best_down_soa) 307 #data += [muon_pids_long] 308 data += [muon_pids_down] 309 # do the zipping between muonPIDs and tracks 310 #long_tracks_with_muonID = MakeZip__BestTracks__PrMuonPIDs( 311 # Input1=best_long_soa, Input2=muon_pids_long).Output 312 #down_tracks_with_muonID = MakeZip__BestTracks__PrMuonPIDs( 313 # Input1=best_down_soa, Input2=muon_pids_down).Output 314 #zipped_tracks_muonID = {"BestDownWithMuonID": down_tracks_with_muonID, 315 # "BestLongWithMuonID": long_tracks_with_muonID} 302 316 303 317 # Add proto particles 304 318 charged_protos = make_charged_protoparticles( this calls
ChargedProtoParticleAddMuonInfo
which expectsLHCb::MuonPID
objects but with the changes in Rec!2501 (closed), the newMuonIDHlt2Alg
returnsLHCb::Pr::Muon::PIDs
instead. So this won't work and it is probably the cause for the segfault you reported by email (although it's hard to tell for sure without seeing the actual error).While we are not able to create v2 particles directly in the reconstruction, I think we will need either a converter from
LHCb::Pr::Muon::PIDs
toLHCb::MuonPID
or to modifyChargedProtoParticleAddMuonInfo
to useLHCb::Pr::Muon::PIDs
directly.However,
LHCb::Pr::Muon::PIDs
were developed for HLT1 AFAIK and contain less information thanLHCb::MuonPID
, is this enough for what we need in HLT2?Looking at this: https://gitlab.cern.ch/lhcb/LHCb/-/blob/master/Event/RecEvent/include/Event/PrMuonPIDs.h#L29
would one not also need some information about the hits / track in the muon system? I know that the
v1
MuonPID
had such a pointer, but in this class I don't see it anymore.Edited by Michel De CianYes, but the track from the reconstruction does not have the muon hits. What I meant was a pointer to the track object in the muon system, such that you can later keep track what hits were actually used for the ID.
Unless of course you would zip both, the muon-system track and the MuonPID object to the rest, but I was assuming this is not the case.
There is not a "muon-system track" (never was) similar to an LHCb::Track. We don't estimate any momentun or do any type of fitting with the hits. What we had in the past was a link to the track, but as @cmarinbe said the zipping should avoid having the link and we removed it from the new MuonPID to reduce the size of the event. We can add the closest muon hits in the FOI to the MuonPID as those are the ones from where the rest of the variables are extracted and can be helpful for TISTOSing.
Well, this muon-system track (whatever it is) was used at some point for tracking efficiencies, so at least the
LHCbIDs
of it must have existed.But if I understand correctly you have a set of hits that you use for the MuonPID? Is this strictly one per layer, or is there at least an upper bound?
I think that this track was not created by the MuonID and this is what Rec/!2496 (merged) is about, right? The used hits for the MuonPID are at most one per layer as in some cases we can skip a hit but still provide a valid MuonPID object (those I will add).
Yes, please, adding the Muon hits used in the MuonPID sounds cheap and useful. I guess this can be done in a separate MR though, AFAIU they are not used by the
ChargedProtoParticleAddMuonInfo
.Coming back to the original issue, a temporal solution can be to write a converter from
LHCb::Pr::Muon::PIDs
+ input_tracks toLHCb::MuonPID
and use the latter as input toChargedProtoParticleAddMuonInfo
, what do you think @rvazquez ?How disruptive would be to change directly the input type in
ChargedProtoParticleAddMuonInfo
to theLHCb::MuonPID
? The MuonPID object will be the same between Hlt1 and Hlt2, and in this way we will avoid to come back to this in the future, and also can be prepared if PID information will be ported upfront to the Hlt1 (although not for now).the main problem I see is that a reference to the
LHCb::MuonPID
object is added to the ProtoParticles in ChargedProtoParticleAddMuonInfo so the code downstream might rely on this information being present. It also would require to somehow keep track of the links between tracks andLHCb::Pr::Muon::PIDs
(probably by order in the containers) and to clean-up some of the information that is not present anymore (or set it to a default value so code downstream doesn't complain).Since the long term goal is to deprecate ProtoParticles in favour of the v2 event model, I don't think it's worth the effort to update this code to work with
LHCb::Pr::Muon::PIDs
. But you know these objects better and probably understand better whatChargedProtoParticleAddMuonInfo
requires, so if you think it's easier to modify it than to write a transformer, please go ahead.Ok, I am writing a Converter from a v2 to a v1 MuonPID getting inspiration from the v2 to v1 track converter. The only difference between the two are the links (actually SmartRefs) to the track and the trackID. I will put some dummy object on it and leave for a separate MR the proper addition of the hits.
I will also change the name / namespace of the MuonPID to something like
LHCb::Event::Muon::PIDs
Edited by Ricardo Vazquez Gomezwhat's the status of this @rvazquez do you still get the segfault after rebasing?
changed this line in version 3 of the diff
added Configuration Muon hlt2 labels
mentioned in merge request Rec!2501 (closed)
mentioned in merge request !1141 (merged)
I have created a new MR !1141 (merged) as I got too many problems trying to align with master. The content is the same as in this one. This one can be closed.
Superseded by !1141 (merged)