Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • readers/DelphesCMSFWLite.cpp

    r0a836f2 r480f9ed  
    6767  TObjArray *stableParticleOutputArray, TObjArray *partonOutputArray)
    6868{
     69
    6970  fwlite::Handle< GenEventInfoProduct > handleGenEventInfo;
    70 
    7171  fwlite::Handle< LHEEventProduct > handleLHEEvent;
    72 
    7372  fwlite::Handle< vector< reco::GenParticle > > handleParticle;
     73
    7474  vector< reco::GenParticle >::const_iterator itParticle;
    7575
     
    7878
    7979  handleGenEventInfo.getByLabel(event, "generator");
    80   handleLHEEvent.getByLabel(event, "externalLHEProducer");
    81   handleParticle.getByLabel(event, "genParticles");
     80
     81  if (!((handleLHEEvent.getBranchNameFor(event, "source")).empty()))
     82  {
     83    handleLHEEvent.getByLabel(event, "source");
     84  }
     85  else if (!((handleLHEEvent.getBranchNameFor(event, "externalLHEProducer")).empty()))
     86  {
     87    handleLHEEvent.getByLabel(event, "externalLHEProducer");
     88  }
     89  else
     90  {
     91    std::cout<<"Wrong LHEEvent Label! Please, check the input file."<<std::endl;
     92    exit(-1);
     93  }
     94
     95  if (!((handleParticle.getBranchNameFor(event, "genParticles")).empty()))
     96  {
     97    handleParticle.getByLabel(event, "genParticles");
     98  }
     99  else if (!((handleParticle.getBranchNameFor(event, "prunedGenParticles")).empty()))
     100  {
     101    handleParticle.getByLabel(event, "prunedGenParticles");
     102  }
     103  else
     104  {
     105    std::cout<<"Wrong GenParticle Label! Please, check the input file."<<std::endl;
     106    exit(-1);
     107  }
    82108
    83109  HepMCEvent *element;
Note: See TracChangeset for help on using the changeset viewer.