Fork me on GitHub

Opened 8 years ago

Closed 8 years ago

#974 closed Bug (fixed)

Supporting CMS MINIAOD dataset by DelphesCMSFWLite

Reported by: Geonmo Ryu Owned by: Geonmo Ryu
Priority: minor Milestone:
Component: Delphes code Version: Delphes 3
Keywords: Cc: ry840901@…

Description

Dear experts,

I suggest to support CMS miniAOD samples.

Nowadays, the miniAOD is a major format for CMS data.

As I know, only difference is label name between AOD and miniAOD.

So, we can access using "getBranchNameFor" function.

Here is sample code.

if (!((handleLHEEvent.getBranchNameFor(event, "source")).empty())) {
    handleLHEEvent.getByLabel(event, "source");
  }
  else if (!((handleLHEEvent.getBranchNameFor(event, "externalLHEProducer")).empty())) {
    handleLHEEvent.getByLabel(event, "externalLHEProducer");
  }
  else { std::cout<<"Wrong LHEEvent Label! Please, check the input file."<<std::endl; exit(-1);}

  if (!((handleParticle.getBranchNameFor(event, "genParticles")).empty())) {
    handleParticle.getByLabel(event, "genParticles");
  }
  else if (!((handleParticle.getBranchNameFor(event, "prunedGenParticles")).empty())) {
    handleParticle.getByLabel(event, "prunedGenParticles");
  }
  else { std::cout<<"Wrong GenParticle Label! Please, check the input file."<<std::endl; exit(-1);}

Change History (9)

comment:1 by Michele Selvaggi, 8 years ago

Hi,

thanks for you suggestion. I'd like to test this on some miniAOD file.
Could you point to a small event sample on lxplus?
After that I'll push your proposed change.

Michele

comment:2 by Geonmo Ryu, 8 years ago

Hello,

I sent a miniaod file's location by e-mail.

By the way, I also leave the location at this ticket.

/afs/cern.ch/work/g/geonmo/public/miniaod.root

comment:3 by alexandra, 8 years ago

Dear

Many thanks for this thread.
I had tried the suggestion of 'geonmo' in some versions of MINIAOD successfully.

However I found a version where it did not worked, I put an example here

/afs/cern.ch/work/a/acarvalh/public/DiPhotonJetsBoxMINIAODSIM_74X.root

If I follow your example what is missing in the file above is something like the bellow,
*Branch :LHEEventProduct_externalLHEProducerSIM.*

If I ignore to read a similar branch the error I get is

The fwlite::Handle was never set

comment:4 by Michele Selvaggi, 8 years ago

Hi Alexandra,

first let me say that I have pushed "geonmo" suggested modification to DelphesCMSFWLite in the HEAD. You can get it by cloning.

Regardless, after a quick look at your file I see no collection of type LHE, which suggests that the LHE product is simply missing in your input file. Is this possible?

Michele

comment:5 by alexandra, 8 years ago

Hi Michele

yes, the LHE information is not there, because is a file generated by Sherpa,
sorry I missed to write this information.

So, I think that at some point in the reader one should put an 'if' to fill LHE-type information in the tree.
But I am not sure if this is the only thing.

cheers
Alexandra

comment:6 by Michele Selvaggi, 8 years ago

Hi Alexandra,

thanks, we have pushed a modification including your suggestion.
Please test it and tell us whether it suits you.

Michele

comment:7 by alexandra, 8 years ago

Hi Michele

I just want to report here that works for me

thank you very much

comment:8 by Geonmo Ryu, 8 years ago

Cc: ry840901@… added
Owner: set to Geonmo Ryu
Status: newaccepted
Type: EnhancementBug

Dear all,

I found that "prunedGenParticles" can not cover all stable particles like as pion for jet finding.

I made a new "DelphesCMSFWLite" to fix this issue.

Please, see my GitHub link for this file.
https://github.com/geonmo/delphes/blob/bugfix_MINIAOD_Support/readers/DelphesCMSFWLite.cpp

I think that it is a very stupid. However, I don't know how to use one STL container for two different class.

comment:9 by Pavel Demin, 8 years ago

Resolution: fixed
Status: acceptedclosed

Thanks for the fix. It's in the new release (3.4.0).

Note: See TracTickets for help on using tickets.