Fork me on GitHub

Changeset 5df97ac in git


Ignore:
Timestamp:
Nov 10, 2016, 3:15:56 PM (8 years ago)
Author:
Pavel Demin <pavel.demin@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
9e24b7b
Parents:
a7c9002
Message:

fix formatting in DelphesCMSFWLite.cpp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • readers/DelphesCMSFWLite.cpp

    ra7c9002 r5df97ac  
    6464
    6565void ConvertInput(fwlite::Event &event, Long64_t eventCounter,
    66     ExRootTreeBranch *branchEvent, ExRootTreeBranch *branchRwgt,
    67     DelphesFactory *factory, TObjArray *allParticleOutputArray,
    68     TObjArray *stableParticleOutputArray, TObjArray *partonOutputArray, Bool_t firstEvent)
     66  ExRootTreeBranch *branchEvent, ExRootTreeBranch *branchRwgt,
     67  DelphesFactory *factory, TObjArray *allParticleOutputArray,
     68  TObjArray *stableParticleOutputArray, TObjArray *partonOutputArray, Bool_t firstEvent)
    6969{
    7070
     
    8282  handleGenEventInfo.getByLabel(event, "generator");
    8383
    84   if (!((handleLHEEvent.getBranchNameFor(event, "source")).empty()))
    85   { 
     84  if(!((handleLHEEvent.getBranchNameFor(event, "source")).empty()))
     85  {
    8686    handleLHEEvent.getByLabel(event, "source");
    8787  }
    88   else if (!((handleLHEEvent.getBranchNameFor(event, "externalLHEProducer")).empty()))
     88  else if(!((handleLHEEvent.getBranchNameFor(event, "externalLHEProducer")).empty()))
    8989  {
    9090    handleLHEEvent.getByLabel(event, "externalLHEProducer");
    9191  }
    92   else if (firstEvent)
    93   {
    94     std::cout<<"Wrong LHEEvent Label! Please, check the input file."<<std::endl;
    95   }
    96 
    97   if (!((handleParticle.getBranchNameFor(event, "genParticles")).empty()))
     92  else if(firstEvent)
     93  {
     94    cout << "Wrong LHEEvent Label! Please, check the input file." << endl;
     95  }
     96
     97  if(!((handleParticle.getBranchNameFor(event, "genParticles")).empty()))
    9898  {
    9999    handleParticle.getByLabel(event, "genParticles");
    100100  }
    101   else if (!((handlePackedParticle.getBranchNameFor(event, "packedGenParticles")).empty()) && !((handleParticle.getBranchNameFor(event,"prunedGenParticles")).empty()))
     101  else if(!((handlePackedParticle.getBranchNameFor(event, "packedGenParticles")).empty()) && !((handleParticle.getBranchNameFor(event,"prunedGenParticles")).empty()))
    102102  {
    103103    handleParticle.getByLabel(event, "prunedGenParticles");
     
    146146  element->ProcTime = 0.0;
    147147
    148 
    149148  if(foundLHE)
    150149  {
     
    156155      weight = static_cast<Weight *>(branchRwgt->NewEntry());
    157156      weight->Weight = itWeightsInfo->wgt;
    158     } 
     157    }
    159158  }
    160159
     
    164163  {
    165164    const reco::GenParticle &particle = *itParticle;
    166     if( !isMiniAOD || particle.status() != 1 ) vectorCandidate.push_back(&*itParticle);
     165    if(!isMiniAOD || particle.status() != 1) vectorCandidate.push_back(&*itParticle);
    167166  }
    168167
     
    173172    pid = particle.pdgId();
    174173    status = particle.status();
    175     if( isMiniAOD && particle.status() == 1 ) continue;
     174    if(isMiniAOD && particle.status() == 1) continue;
    176175    px = particle.px(); py = particle.py(); pz = particle.pz(); e = particle.energy(); mass = particle.mass();
    177176    x = particle.vx(); y = particle.vy(); z = particle.vz();
     
    208207    if(!pdgParticle) continue;
    209208
    210     if( status == 1)
     209    if(status == 1)
    211210    {
    212211      // Prevent duplicated particle.
    213       if ( !isMiniAOD ) stableParticleOutputArray->Add(candidate);
     212      if(!isMiniAOD) stableParticleOutputArray->Add(candidate);
    214213    }
    215214    else if(pdgCode <= 5 || pdgCode == 21 || pdgCode == 15)
     
    218217    }
    219218  }
    220   if ( !isMiniAOD) return ;
     219
     220  if(!isMiniAOD) return;
    221221  // For MiniAOD sample,
    222222  // Only status==1 particles are saved to packedGenParticles.
     
    378378      {
    379379        ConvertInput(event, eventCounter, branchEvent, branchRwgt, factory,
    380             allParticleOutputArray, stableParticleOutputArray, partonOutputArray, firstEvent);
     380          allParticleOutputArray, stableParticleOutputArray, partonOutputArray, firstEvent);
    381381        modularDelphes->ProcessTask();
    382382
Note: See TracChangeset for help on using the changeset viewer.