Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factorization of Track Iteration selections in PF #12715

Merged
merged 5 commits into from Dec 14, 2015

Conversation

bachtis
Copy link
Contributor

@bachtis bachtis commented Dec 8, 2015

"Almost" technical PR that defines a common place of the treatment of the track iterations in Particle Flow

Almost -> the PFDisplacedVertexFinder seems to be very out-dated wrt the iterations added therefore
I updated it . In the future we should assign this module to a POG (probably BTV)

@lgray @matteosan1 please have a look at the EGM modules . I think I changed them correctly
One other EGM action item is to clean up the PF EGM code that we dont use . I think 80X is a good place to do this so please make sure somebody does it at some point

@VinInn @makortel @rovere you can start from here to add new iterations
Major issue for tracking: You can-NOT just add iterations in the file as it was done in #12577
All the MET tails we had in 2015 was due to tracking so if one iteration introduces MET tails it needs to have some Dpt/pt cuts . So for every PR that has new iterations one should look at the PFMET distribution before and after in RelVal FlatQCD and even one additional event in the tail is enough to tell you there are problems.
So looking forward to see this in the future

@arizzi @gpetruc FYI

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 8, 2015

A new Pull Request was created by @bachtis (Michalis Bachtis) for CMSSW_8_0_X.

It involves the following packages:

RecoParticleFlow/Benchmark
RecoParticleFlow/PFProducer
RecoParticleFlow/PFTracking

@cmsbuild, @cvuosalo, @davidlange6, @slava77 can you please review it and eventually sign? Thanks.
@mmarionncern, @lgray this is something you requested to watch as well.
@slava77, @Degano, @smuzaffar you are the release manager for this.

Following commands in first line of a comment are recognized

  • +1|approve[d]|sign[ed]: L1/L2's to approve it
  • -1|reject[ed]: L1/L2's to reject it
  • assign <category>[,<category>[,...]]: L1/L2's to request signatures from other categories
  • unassign <category>[,<category>[,...]]: L1/L2's to remove signatures from other categories
  • hold: L1/all L2's/release manager to mark it as on hold
  • unhold: L1/user who put this PR on hold
  • merge: L1/release managers to merge this request
  • [@cmsbuild,] please test: L1/L2 and selected users to start jenkins tests
  • [@cmsbuild,] please test with cms-sw/cmsdist#<PR>: L1/L2 and selected users to start jenkins tests using externals from cmsdist

@slava77
Copy link
Contributor

slava77 commented Dec 8, 2015

@bachtis
can we really see MET tails in RelVal FlatQCD?
How many events should be processed for that?
(I have a feeling that in high-ET jets even with somewhat fake tracks the calorimeter will take over and at least a much larger sample is needed to notice much in QCD dijet).

@lgray
Copy link
Contributor

lgray commented Dec 8, 2015

@bachtis Looks OK to me for EGM tracking business.

I would prefer that you make an enum that defines what the tracking algorithm means, instead of just returning some raw integer value. The fewer magic numbers we have running around in the PF code, the better.

@bachtis
Copy link
Contributor Author

bachtis commented Dec 8, 2015

Hi @slava77 . It is not the best that can be done but it is the best we can do. In the past we have seen changes in the tails of the RelVal by such additions. Calorimeter takes over but usually we have a TeV track not linked to anything that makes the tail ..[at least based on what we saw this year]

@lgray I thought to have an enum but couldnt make a name for that since it is just a purity category ...So at the end I left it like this

@lgray
Copy link
Contributor

lgray commented Dec 8, 2015

@bachtis Well, I just point out that all these categories have some underlying meaning (high quality track or what have you) and it would be useful to make it clear what that meaning is. For you or I it's fine to leave as is, for other people that look at PF it's just a random number and it would be helpful for understanding to label why you're taking a particular iteration.

case reco::TrackBase::lowPtTripletStep:
case reco::TrackBase::pixelPairStep:
case reco::TrackBase::jetCoreRegionalStep:
return 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do these numbers have any conceptual meaning with some intuitive name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well no.. here we group the iterations to some purity categories that are using to apply Dpt/pt cuts.. so if I did enum it would be cat0,cat1 etc...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even just saying "highQuality", "mediumQuality", (since the Dpt/pt cut corresponds to the expected quality of the track), would be useful over cat0,cat1,cat2, or 0,1,2.
It doesn't have to be some deep philosophical concept.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enums are more tractable
for code maintenance

@bachtis
Copy link
Contributor Author

bachtis commented Dec 8, 2015

OK. I can try tomorrow

@makortel
Copy link
Contributor

makortel commented Dec 9, 2015

What concerns phase1, I don't think it is good use of time to tune the cuts in PF until the tracking has somewhat stabilized. I.e. I would just add the new iterations such that a quadruplet iteration gets treated as the "corresponding" triplet iteration is, and we check later if that works as it is or if further tuning is needed here. But maybe we could take the PFMET tails into consideration already during the tuning of phase1 tracking.

@arizzi
Copy link
Contributor

arizzi commented Dec 9, 2015

@bachtis concerning PFDisplacedVertexFinder and BTV POG, there is basically already a vertex finder in the POG capable of doing that (IVF) and studies in the POG to ID Nuc Int (for b-tag rejection).
The merging of IVF with PFDisplacedVertexFinder is in the BTV-GED todo list since 4 years or so... we should try to push for that again.

@bachtis
Copy link
Contributor Author

bachtis commented Dec 9, 2015

@arizzi good. This is what I wanted to know . We should definitely switch to IVF

@bachtis
Copy link
Contributor Author

bachtis commented Dec 9, 2015

Hi , So Looking at the code again I prefer to stay with an unsigned integer :
If we do enum, I will go and put back switch statements everywhere and essentially I will be duplicating the enum of the iterations. So If we are going to add another enum I would stay with the way it was before where the itteration enums were everywhere at the code.

@lgray
Copy link
Contributor

lgray commented Dec 9, 2015

The thinning of the categorization is very important and here you've already taken a good step towards making this more clear, you can still compare by > or == in the if statements you just get something more expressive rather than > 3 or == 0.

@bachtis
Copy link
Contributor Author

bachtis commented Dec 9, 2015

Well but it is a duplication!..We had it like this already

@bachtis
Copy link
Contributor Author

bachtis commented Dec 9, 2015

Well In fact I will go with something totally different ...

@lgray
Copy link
Contributor

lgray commented Dec 9, 2015

How? You already have the mapping of the enums defined in one place and you use them elsewhere. Better yet you can define the various cuts you use centrally in this new file and just have descriptive function names if you want to keep unsigned integers. At least then you are given some context for what the integers are.

Still prefer enums.

@lgray
Copy link
Contributor

lgray commented Dec 9, 2015

Ah, our mails crossed, if you have something different in mind give it a try.

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 9, 2015

Pull request #12715 was updated. @cmsbuild, @cvuosalo, @davidlange6, @slava77 can you please check and sign again.

@bachtis
Copy link
Contributor Author

bachtis commented Dec 9, 2015

OK I prefer it like this

std::cout << ic << " " << *(constituents[ic]) << std::endl;
break;
}
unsigned int iter = trackRef->algo()>6 ? 6: trackRef->algo();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this "reduction" of useful values reasonable or harmless enough?
(track algos were mapped on 8, now only on 6 bins)
Previously values from 0 to 7 had a meaning and 8 was everything else.
Now 0 is useless (invalid iter), 1 to 6 have something meaningful.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please note that #8315 made an attempt to get rid of magic numbers and less/greater than comparisons of TrackBase::algo() (although https://github.com/cms-sw/cmssw/blob/CMSSW_8_0_X/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc#L1409 got omitted and should be fixed; I hope in this PR if possible). I would prefer that the new code would not introduce new uses of either.

I have also a more practical question. The numerical value 6 corresponds to pixelPairStep. What should be done with phase1 highPtTripletStep (numerical value 22)? I would put it (as a reasonable first guess) along initialStep (4), but this code maps it to 6.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well this is not running in RECO . It is just the histogram that is filled. I can look at it again. IN fact we should purge this package at some point

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Is it also not run in DQM or VALIDATION (i.e. does it show up in PR tests or RelVals)? If it is not run in the standard sequences, then I could live with it as it is (assuming I don't have to care about it for Phase1 and beyond).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Matti,
This one I had not seen . In any case I cannot do anything about that since it is EGM code and they should take care of it [In fact I dont think it is running any more either this is why I wanted to have a clean up ]

@slava77
Copy link
Contributor

slava77 commented Dec 9, 2015

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 9, 2015

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/10213/console

@cmsbuild
Copy link
Contributor

Pull request #12715 was updated. @cmsbuild, @cvuosalo, @davidlange6, @slava77 can you please check and sign again.

@slava77
Copy link
Contributor

slava77 commented Dec 11, 2015

@cmsbuild please test

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/10267/console

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

@slava77
Copy link
Contributor

slava77 commented Dec 12, 2015

+1

for #12715 9459cc1

  • changes in the code are in line with the description. In fact, this PR is essentially technical
  • jenkins tests pass and comparisons with the baseline show no differences

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_8_0_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @Degano, @smuzaffar

@davidlange6
Copy link
Contributor

+1

cmsbuild added a commit that referenced this pull request Dec 14, 2015
Factorization of Track Iteration selections in PF
@cmsbuild cmsbuild merged commit 1762561 into cms-sw:CMSSW_8_0_X Dec 14, 2015
@makortel
Copy link
Contributor

Now that we have an IB with this PR in, when could we expect the "EGM PR"?

@matteosan1
Copy link
Contributor

Hi,
just to make sure, do you want us to fix the two issues pointed out by
Slava in this thread ?

Regards,
Matteo.

+++++++++++
Matteo Sani
University of California, San Diego, US.
Tel: +41227671577
CERN Office: 40-3-A02

On Mon, Dec 14, 2015 at 4:16 PM, Matti Kortelainen <notifications@github.com

wrote:

Now that we have an IB with this PR in, when could we expect the "EGM PR"?


Reply to this email directly or view it on GitHub
#12715 (comment).

@VinInn
Copy link
Contributor

VinInn commented Dec 15, 2015

@matteosan1,
yes please

@makortel
Copy link
Contributor

@matteosan1 I let Slave to comment what he wants fixed in subsequent PRs, but I'm referring to this
https://github.com/bachtis/cmssw/blob/PFTrackFactorization/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc#L1410
where the track iteration check should be

  • moved to PFTrackAlgoTools
  • transformed to (e.g.) a switch and list the iterations explicitly (i.e. to not to use less/greater than comparison)

(if we (TRK) are expected to migrate the iteration check for phase1 iterations)

@slava77
Copy link
Contributor

slava77 commented Dec 15, 2015

@matteosan1
As noted by Matti,
it's about the remaining uses of iteration enums.
The fixes that I have asked for are not coupled to the Phase 1 tracking
code updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants