@@ -195,25 +195,27 @@ void pat::PATLostTracks::produce(edm::StreamID, edm::Event& iEvent, const edm::E
195195 trkStatus[key] = TrkStatus::VTX;
196196 }
197197 }
198- for (const auto & v0 : *lambdas){
198+ for (const auto & v0 : *lambdas) {
199199 double protonCharge = 0 ;
200- for (size_t dIdx=0 ;dIdx<v0.numberOfDaughters (); dIdx++){
201- size_t key= (dynamic_cast <const reco::RecoChargedCandidate*>(v0.daughter (dIdx)))->track ().key ();
202- if (trkStatus[key]==TrkStatus::NOTUSED) trkStatus[key]=TrkStatus::VTX;
200+ for (size_t dIdx = 0 ; dIdx < v0.numberOfDaughters (); dIdx++) {
201+ size_t key = (dynamic_cast <const reco::RecoChargedCandidate*>(v0.daughter (dIdx)))->track ().key ();
202+ if (trkStatus[key] == TrkStatus::NOTUSED)
203+ trkStatus[key] = TrkStatus::VTX;
203204 protonCharge += v0.daughter (dIdx)->charge () * v0.daughter (dIdx)->momentum ().mag2 ();
204205 }
205- if (xiSelection_)
206- {
206+ if (xiSelection_) {
207207 // selecting potential Xi- -> Lambda pi candidates
208208 TLorentzVector p4Lambda;
209- p4Lambda.SetPtEtaPhiM (v0.pt (),v0.eta (),v0.phi (), v0.mass ());
210- for (unsigned int trkIndx=0 ; trkIndx < tracks->size (); trkIndx++){
211- reco::TrackRef trk (tracks,trkIndx);
212- if ((*trk).charge () * protonCharge < 0 ) continue ;
209+ p4Lambda.SetPtEtaPhiM (v0.pt (), v0.eta (), v0.phi (), v0.mass ());
210+ for (unsigned int trkIndx = 0 ; trkIndx < tracks->size (); trkIndx++) {
211+ reco::TrackRef trk (tracks, trkIndx);
212+ if ((*trk).charge () * protonCharge < 0 )
213+ continue ;
213214 TLorentzVector p4pi;
214- p4pi.SetPtEtaPhiM ((*trk).pt (),(*trk).eta (),(*trk).phi (), 0.13957061 );
215- if ((p4Lambda+p4pi).M () < xiMassCut_){ // selecting potential Xi- candidates
216- if (trkStatus[trkIndx]==TrkStatus::NOTUSED) trkStatus[trkIndx]=TrkStatus::VTX;
215+ p4pi.SetPtEtaPhiM ((*trk).pt (), (*trk).eta (), (*trk).phi (), 0.13957061 );
216+ if ((p4Lambda + p4pi).M () < xiMassCut_) { // selecting potential Xi- candidates
217+ if (trkStatus[trkIndx] == TrkStatus::NOTUSED)
218+ trkStatus[trkIndx] = TrkStatus::VTX;
217219 }
218220 }
219221 }
0 commit comments