Fork me on GitHub

Changeset 9047a02 in git for examples/Example1.C


Ignore:
Timestamp:
Dec 6, 2018, 8:19:01 AM (6 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
a7c3c84
Parents:
01f9722
Message:

added accessing to weight in Example1 (commented)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/Example1.C

    r01f9722 r9047a02  
    3030  TClonesArray *branchJet = treeReader->UseBranch("Jet");
    3131  TClonesArray *branchElectron = treeReader->UseBranch("Electron");
     32  TClonesArray *branchEvent = treeReader->UseBranch("Event");
    3233
    3334  // Book histograms
     
    4041    // Load selected branches with data from specified event
    4142    treeReader->ReadEntry(entry);
     43   
     44    //HepMCEvent *event = (HepMCEvent*) branchEvent -> At(0);
     45    //LHEFEvent *event = (LHEFEvent*) branchEvent -> At(0);
     46    //Float_t weight = event->Weight;
    4247
    4348    // If event contains at least 1 jet
     
    4853
    4954      // Plot jet transverse momentum
    50       histJetPT->Fill(jet->PT);
     55      histJetPT->Fill(jet->PT, weight);
    5156
    5257      // Print jet transverse momentum
     
    6469
    6570      // Plot their invariant mass
    66       histMass->Fill(((elec1->P4()) + (elec2->P4())).M());
     71      histMass->Fill(((elec1->P4()) + (elec2->P4())).M(), weight);
    6772    }
    6873  }
Note: See TracChangeset for help on using the changeset viewer.