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

Make option to do full matching+trigger efficiency plots #82

Open
artlbv opened this issue Aug 20, 2024 · 3 comments
Open

Make option to do full matching+trigger efficiency plots #82

artlbv opened this issue Aug 20, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@artlbv
Copy link
Collaborator

artlbv commented Aug 20, 2024

As this always comes up during the reviews, we need to add the possibility to produce "proper" trigger efficiency plots, which are essentially matching + trigger , i.e. the efficiency of matching a gen/ref object to a L1 object passing a certain threshold.

I suggest to produce these directly from the existing trigger plot configs, i.e. adding these plots to the trigger-only efficiency plots.

@danielhundhausen can you look into this?

@artlbv artlbv added the enhancement New feature or request label Aug 20, 2024
@danielhundhausen danielhundhausen self-assigned this Aug 21, 2024
@danielhundhausen
Copy link
Collaborator

Is this something that needs development on the code or is this "just" config writing? Maybe something @LukasEbeling can do to gain familiarity with the code?

@artlbv
Copy link
Collaborator Author

artlbv commented Oct 22, 2024

Not really config writing: I was thinking we could remove the need for separate matching and trigger configs -> and just add an option to do the trigger plot too.

Basically I would like to define 1 config e.g. Electron_Barrel, that would produce (selectable) three types of plots:

  1. Matching efficiency
  2. Trigger efficiency (as now i.e. after matching)
  3. "Proper" trigger efficiency -> matching+trigger (pt>x) efficiency combined.

There is not need to have three configs imo. I think you have the better overview Daniel, so I let you decide how to implement that best.

@danielhundhausen
Copy link
Collaborator

danielhundhausen commented Oct 23, 2024

Just to understand what we're talking about:

matching

ElectronsMatchingEndcap:
  sample: DYLL_M50
  version: V44nano
  match_test_to_ref: True
  reference_object:
    object: "GenPart"
    x_arg: "pt"
    label: "Gen Electrons"
    cuts:
      event:
        - "(({statusFlags}>>7)&1) == 1"
        - "abs({pdgId}) == 11"
        - "abs({eta}) > 1.5"
      object:
        - "abs({eta}) < 2.4"
  test_objects:
    L1EG:default: "pt"
    L1tkElectron:NoIso: "pt"
    # L1tkElectron:NoIsoNoLowPtID: "pt"
    L1tkElectron:Iso: "pt"
  xlabel: "Gen. $p_T$ (GeV)"
  ylabel: "Matching Efficiency (Endcap)"
  binning:
    min: 0
    max: 100
    step: 3

trigger efficiency

ElectronsTriggerEndcap:
  sample: DYLL_M50
  version: V44nano
  match_test_to_ref: False
  reference_object:
    object: "GenPart"
    x_arg: "pt"
    label: "Gen Electrons"
    cuts:
      event:
        - "(({statusFlags}>>7)&1) == 1"
        - "abs({pdgId}) == 11"
        - "abs({eta}) > 1.5"
      object:
        - "abs({eta}) < 2.8"
  test_objects:
    L1EG:default:endcap: "pt"
    L1tkElectron:NoIso:endcap: "pt"
    # L1tkElectron:NoIsoNoLowPtID:endcap: "pt"
    L1tkElectron:Iso:endcap: "pt"
  thresholds: [10, 20, 30, 40]
  scalings:
    method: "naive"
    threshold: 0.95
  xlabel: "Gen. pT (GeV)"
  ylabel: "Trigger Efficiency (endcap, L1 $p_T > <threshold>$ GeV)"
  binning:
    min: 0
    max: 100
    step: 1.5

proper trigger efficiency

ElectronsTriggerEndcap:
  sample: DYLL_M50
  version: V44nano
  match_test_to_ref: True
  reference_object:
    object: "GenPart"
    x_arg: "pt"
    label: "Gen Electrons"
    cuts:
      event:
        - "(({statusFlags}>>7)&1) == 1"
        - "abs({pdgId}) == 11"
        - "abs({eta}) > 1.5"
      object:
        - "abs({eta}) < 2.8"
  test_objects:
    L1EG:default:endcap: "pt"
    L1tkElectron:NoIso:endcap: "pt"
    # L1tkElectron:NoIsoNoLowPtID:endcap: "pt"
    L1tkElectron:Iso:endcap: "pt"
  thresholds: [10, 20, 30, 40]
  scalings:
    method: "naive"
    threshold: 0.95
  xlabel: "Gen. pT (GeV)"
  ylabel: "Trigger Efficiency (endcap, L1 $p_T > <threshold>$ GeV)"
  binning:
    min: 0
    max: 100
    step: 1.5

Do you suggest leaving the plot definitions as they are and just putting them all in one file? In that case the feature would be to implement different command options that specify which plot you want.
Or do you suggest merging the three Plot configs blocks into one, e.g. called ElectronEndcap and then modifying the config dynamically to match specified case in the command (e.g. matching)?

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

No branches or pull requests

2 participants