Fork me on GitHub

Changeset c614dd7 in git for modules/FastJetFinder.cc


Ignore:
Timestamp:
Sep 23, 2019, 5:29:37 PM (5 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, master
Children:
3051358a, 84a097e
Parents:
ededa33
Message:

added neutral and charged energy fraction to jets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/FastJetFinder.cc

    rededa33 rc614dd7  
    316316  Double_t deta, dphi, detaMax, dphiMax;
    317317  Double_t time, timeWeight;
     318  Double_t neutralEnergyFraction, chargedEnergyFraction;
     319
    318320  Int_t number, ncharged, nneutrals;
    319321  Int_t charge;
     
    418420    nneutrals = 0;
    419421
     422    neutralEnergyFraction =0.;
     423    chargedEnergyFraction =0.;
     424
    420425    inputList.clear();
    421426    inputList = sequence->constituents(*itOutputList);
     
    432437
    433438      if(constituent->Charge == 0)
     439      {
    434440        nneutrals++;
     441        neutralEnergyFraction += constituent->Momentum.E();
     442      }
    435443      else
     444      {
    436445        ncharged++;
    437 
     446        chargedEnergyFraction += constituent->Momentum.E();
     447      }
     448     
    438449      time += TMath::Sqrt(constituent->Momentum.E()) * (constituent->Position.T());
    439450      timeWeight += TMath::Sqrt(constituent->Momentum.E());
     
    454465    candidate->NNeutrals = nneutrals;
    455466    candidate->NCharged = ncharged;
     467
     468    candidate->NeutralEnergyFraction = (momentum.E() > 0 ) ? neutralEnergyFraction/momentum.E() : 0.0;
     469    candidate->ChargedEnergyFraction = (momentum.E() > 0 ) ? chargedEnergyFraction/momentum.E() : 0.0;
    456470
    457471    //for exclusive clustering, access y_n,n+1 as exclusive_ymerge (fNJets);
Note: See TracChangeset for help on using the changeset viewer.