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

Efficiency of a stripping line #13

Closed
betatim opened this issue May 8, 2015 · 13 comments
Closed

Efficiency of a stripping line #13

betatim opened this issue May 8, 2015 · 13 comments

Comments

@betatim
Copy link
Member

betatim commented May 8, 2015

How do I calculate the stripping efficiency using signal MC? -> TupleToolStripping

@alexpearce
Copy link
Member

Use of TupleToolStripping comes with the caveats that:

  1. The stripping reports in the MC are for the same stripping version as in your data
  2. I don't think prescales are applied to stripping lines in MC, so you need to take that efficiency in to account
  3. Generally, you need to do something else if you have PID cuts in your stripping line

@alexpearce
Copy link
Member

Although on 1 you can rerun any stripping lines and specify the location of the selection reports, so you could give TupleToolStripping this location and it should give you the correct decisions.

@betatim
Copy link
Member Author

betatim commented May 8, 2015

What is an alternative way of doing this to avoid TupleToolStripping?

We should gear everything towards the fact that we re-run the stripping for
our line of choice unless the bookkeeping suddenly has stripping21
"flagged" simulation samples.

On Fri, May 8, 2015 at 11:27 AM Alex Pearce notifications@github.com
wrote:

Although on 1 you can rerun any stripping lines and specify the location
of the selection reports, so you could give TupleToolStripping this
location and it should give you the correct decisions.


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

@betatim
Copy link
Member Author

betatim commented May 8, 2015

Regarding (3), what do you do? Maybe we should just use that as the default. Following the idea of presenting just one (obvious) way of doing things.

@alexpearce
Copy link
Member

Unfortunately it somewhat depends: either you care about the reconstruction efficiency, in between the generator level cuts and the stripping, or you don't.

In the latter case you just run the stripping on your MC and count how much (truth-matched) signal you have in your ntuple. The ratio (N_stripped/N_accepted) gives you the combined reconstruction and stripping efficiency. (N_accepted is the number passing the generator level cut defined in the decay file.)

In the former case you also need access to the candidates before the stripping, which you can do with CombineParticles and the mcMatch functor. Then the reconstruction efficiency is (N_reconstructed/N_accepted) and the stripping efficiency is (N_stripped/N_reconstructed). Often the product of these two is equal to (N_stripped/N_accepted), but I'm not wise enough to say under what circumstances.

For 3, you can copy the stripping module that defines your stripping line and alter it to remove PID cuts. If the PID cuts are completely configured by the line's configuration dictionary then you can just change that without needing the copy Python files around. (So only if you use the NoPIDs containers.)

@alexpearce
Copy link
Member

I guess though it's more useful to show them the techniques. Deciding what specifics things to use in their analyses is a problem they need to tackle themselves.

@betatim
Copy link
Member Author

betatim commented May 8, 2015

You will write this bit then? 😄

I think we should pick a way of doing it that isn't too simplistic (maybe also not the most complicated one) and show that off with a note (as usual): other methods are available

@alexpearce alexpearce self-assigned this May 8, 2015
@alexpearce
Copy link
Member

We come after #12 so everyone knows how to look at a stripping line and understands what the cuts mean and do, and after #7 and #10 so people know how to make ntuples in DaVinci.

The steps are then:

  1. Understand what you want to measure. Broadly explain the efficiencies you can compute with MC
  2. Understand the limitations. If a selection variable is not well modelled, studying it's efficiency with standard (untouched) MC is wrong.
  3. If all your selection variables are well modelled and the correct stripping version is run on your MC, use TupleToolStripping. Code here.
  4. If your stripping version was not run over your MC, you need to rerun it. Code here.
  5. If a selection variable is not well modelled by MC, you need to either edit the configuration dictionary or the copy and modify the stripping line itself in order to disable the cut on it. Code here.

Mention alternative methods: apply the well-modelled stripping cuts yourself on truth-matched reconstructed particles (people should understand CombineParticles from #12).

@ibab
Copy link
Contributor

ibab commented May 26, 2015

@alexpearce: Does this mean that my efficiency will already be wrong if StdLooseKaons (with PIDK > -5) is used in the stripping line?
Do I have to rerun the stripping line without that cut and use PIDCalib to get the correct efficiency?

@apuignav
Copy link
Contributor

Yes, I think that is true. However, the PIDK > -5 is so loose that it probably doesn't matter unless you need a very large precision.

@alexpearce
Copy link
Member

Yes, that's right. I would be very wary of having any PID cuts at all in the MC (@apuignav such a loose cut is probably close to 100% efficient for many signals, but it's an assumption I personally would not make).

In the case that PID cuts can't be removed just by altering a configuration dictionary, what I've done in the past is copy the stripping module from StrippingArchive and edit it to remove all PID cuts.

@betatim
Copy link
Member Author

betatim commented Jun 1, 2015

For the moment I conclude that determining the efficiency of a stripping line is "subtle" and so we punt it to second-analysis-steps or add a lesson later on.

@betatim betatim closed this as completed Jun 1, 2015
@alexpearce
Copy link
Member

👍

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

No branches or pull requests

4 participants