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

Skip running on gen information for data #8

Closed
ram1123 opened this issue Aug 30, 2023 · 3 comments · Fixed by #10
Closed

Skip running on gen information for data #8

ram1123 opened this issue Aug 30, 2023 · 3 comments · Fixed by #10
Assignees
Labels
bug Something isn't working urgent

Comments

@ram1123
Copy link
Owner

ram1123 commented Aug 30, 2023

Currently, this code also looks for generator information in the data, which is not there. Need to fix.

More information

  • In data, we don't have generator-level information.

  • If you pick a data root file and try to run. Then, the code will try to find the generator-level information in the data root file, which is not there. And then it will, through error, say that no branch exists.

Possible solution

  • Utilize the variable isMCTrueFalse defined in post-proc (its better to rename isMCTrueFalse -> isMC):

    isMCTrueFalse = True

    and pass it to module HZZAnalysisCppProducer. Furthermore it would be good if it does this automatically. It can be achieved like:

    if testfilelist[0].find("\data\") != -1: isMC = False
  • Then use this to skip all gen related part. something like this:

    if (isMC):
       genparts = Collection(event, "GenPart")
    
    if (ifMC):
         for xg in genparts:
             self.worker.SetGenParts(xg.pt)
@ram1123 ram1123 added the bug Something isn't working label Aug 30, 2023
@ram1123 ram1123 added this to the H4l_nanoAOD milestone Aug 30, 2023
@ram1123
Copy link
Owner Author

ram1123 commented Aug 30, 2023

Hi @YujiLee301 ,

Can you try to fix this issue?

@ram1123 ram1123 added the urgent label Aug 30, 2023
@YujiLee301
Copy link
Collaborator

Hi @YujiLee301 ,

Can you try to fix this issue?

Yes. I can try to find out it

@ram1123 ram1123 linked a pull request Sep 1, 2023 that will close this issue
@ram1123
Copy link
Owner Author

ram1123 commented Sep 25, 2023

Fixed by PR#10

@ram1123 ram1123 closed this as completed Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants