Skip to content

Commit

Permalink
added pt, eta & phi for electrons, muons and jets (#275) (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
kreczko authored and EmyrClement committed Jan 18, 2017
1 parent 3ee7d4f commit 002b4d5
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/BristolNTuple_Electrons.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ BristolNTuple_Electrons::BristolNTuple_Electrons(const edm::ParameterSet& iConfi
produces < std::vector<double> > (prefix + "Py" + suffix);
produces < std::vector<double> > (prefix + "Pz" + suffix);
produces < std::vector<double> > (prefix + "Energy" + suffix);

// extra kinematic variables for easier debugging
produces<std::vector<double> >(prefix + "Pt" + suffix);
produces<std::vector<double> >(prefix + "Eta" + suffix);
produces<std::vector<double> >(prefix + "Phi" + suffix);

//extra properties
produces < std::vector<int> > (prefix + "Charge" + suffix);
produces < std::vector<double> > (prefix + "ecalDrivenMomentum.Px" + suffix);
Expand Down Expand Up @@ -122,6 +128,10 @@ void BristolNTuple_Electrons::produce(edm::Event& iEvent, const edm::EventSetup&
std::auto_ptr < std::vector<double> > py(new std::vector<double>());
std::auto_ptr < std::vector<double> > pz(new std::vector<double>());
std::auto_ptr < std::vector<double> > energy(new std::vector<double>());
// extra kinematic variables for easier debugging
std::auto_ptr<std::vector<double> > pt_store(new std::vector<double>());
std::auto_ptr<std::vector<double> > eta_store(new std::vector<double>());
std::auto_ptr<std::vector<double> > phi_store(new std::vector<double>());
//extra properties
std::auto_ptr < std::vector<int> > charge(new std::vector<int>());
std::auto_ptr < std::vector<double> > ecalDrivenMomentumPx(new std::vector<double>());
Expand Down Expand Up @@ -252,6 +262,12 @@ void BristolNTuple_Electrons::produce(edm::Event& iEvent, const edm::EventSetup&
py->push_back(it->py());
pz->push_back(it->pz());
energy->push_back(it->energy());

// extra kinematic variables for easier debugging
pt_store->push_back(it->pt());
eta_store->push_back(it->eta());
phi_store->push_back(it->phi());

//extra properties
charge->push_back(it->charge());
ecalDrivenMomentumPx->push_back(it->ecalDrivenMomentum().Px());
Expand Down Expand Up @@ -341,6 +357,12 @@ void BristolNTuple_Electrons::produce(edm::Event& iEvent, const edm::EventSetup&
iEvent.put(py, prefix + "Py" + suffix);
iEvent.put(pz, prefix + "Pz" + suffix);
iEvent.put(energy, prefix + "Energy" + suffix);

// extra kinematic variables for easier debugging
iEvent.put(pt_store, prefix + "Pt" + suffix);
iEvent.put(eta_store, prefix + "Eta" + suffix);
iEvent.put(phi_store, prefix + "Phi" + suffix);

//extra properties
iEvent.put(charge, prefix + "Charge" + suffix);
iEvent.put(ecalDrivenMomentumPx, prefix + "ecalDrivenMomentum.Px" + suffix);
Expand Down
22 changes: 22 additions & 0 deletions src/BristolNTuple_Muons.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ BristolNTuple_Muons::BristolNTuple_Muons(const edm::ParameterSet& iConfig) :
produces < std::vector<double> > (prefix + "Py" + suffix);
produces < std::vector<double> > (prefix + "Pz" + suffix);
produces < std::vector<double> > (prefix + "Energy" + suffix);

// extra kinematic variables for easier debugging
produces<std::vector<double> >(prefix + "Pt" + suffix);
produces<std::vector<double> >(prefix + "Eta" + suffix);
produces<std::vector<double> >(prefix + "Phi" + suffix);

//extra properties
produces < std::vector<int> > (prefix + "Charge" + suffix);

Expand Down Expand Up @@ -105,6 +111,11 @@ void BristolNTuple_Muons::produce(edm::Event& iEvent, const edm::EventSetup& iSe
std::auto_ptr < std::vector<double> > pz(new std::vector<double>());
std::auto_ptr < std::vector<double> > energy(new std::vector<double>());

// extra kinematic variables for easier debugging
std::auto_ptr<std::vector<double> > pt_store(new std::vector<double>());
std::auto_ptr<std::vector<double> > eta_store(new std::vector<double>());
std::auto_ptr<std::vector<double> > phi_store(new std::vector<double>());

//extra properties
std::auto_ptr < std::vector<int> > charge(new std::vector<int>());

Expand Down Expand Up @@ -206,6 +217,12 @@ void BristolNTuple_Muons::produce(edm::Event& iEvent, const edm::EventSetup& iSe
py->push_back(it->py());
pz->push_back(it->pz());
energy->push_back(it->energy());

// extra kinematic variables for easier debugging
pt_store->push_back(it->pt());
eta_store->push_back(it->eta());
phi_store->push_back(it->phi());

//extra properties
charge->push_back(it->charge());

Expand Down Expand Up @@ -293,6 +310,11 @@ void BristolNTuple_Muons::produce(edm::Event& iEvent, const edm::EventSetup& iSe
iEvent.put(pz, prefix + "Pz" + suffix);
iEvent.put(energy, prefix + "Energy" + suffix);

// extra kinematic variables for easier debugging
iEvent.put(pt_store, prefix + "Pt" + suffix);
iEvent.put(eta_store, prefix + "Eta" + suffix);
iEvent.put(phi_store, prefix + "Phi" + suffix);

//extra properties
iEvent.put(charge, prefix + "Charge" + suffix);

Expand Down
20 changes: 20 additions & 0 deletions src/BristolNTuple_PFJets.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ BristolNTuple_PFJets::BristolNTuple_PFJets(const edm::ParameterSet& iConfig) :
produces < std::vector<double> > (prefix + "PyRAW" + suffix);
produces < std::vector<double> > (prefix + "PzRAW" + suffix);
produces < std::vector<double> > (prefix + "EnergyRAW" + suffix);
// extra kinematic variables for easier debugging
produces < std::vector<double> > (prefix + "Pt" + suffix);
produces < std::vector<double> > (prefix + "Eta" + suffix);
produces < std::vector<double> > (prefix + "Phi" + suffix);
//extra properties
produces < std::vector<double> > (prefix + "Charge" + suffix);
produces < std::vector<double> > (prefix + "Mass" + suffix);
Expand Down Expand Up @@ -122,6 +126,10 @@ void BristolNTuple_PFJets::produce(edm::Event& iEvent, const edm::EventSetup& iS
std::auto_ptr < std::vector<double> > py_raw(new std::vector<double>());
std::auto_ptr < std::vector<double> > pz_raw(new std::vector<double>());
std::auto_ptr < std::vector<double> > energy_raw(new std::vector<double>());
// extra kinematic variables for easier debugging
std::auto_ptr<std::vector<double> > pt_store(new std::vector<double>());
std::auto_ptr<std::vector<double> > eta_store(new std::vector<double>());
std::auto_ptr<std::vector<double> > phi_store(new std::vector<double>());
//extra properties
std::auto_ptr < std::vector<double> > charge(new std::vector<double>());
std::auto_ptr < std::vector<double> > mass(new std::vector<double>());
Expand Down Expand Up @@ -339,6 +347,12 @@ void BristolNTuple_PFJets::produce(edm::Event& iEvent, const edm::EventSetup& iS
py_raw->push_back(it->correctedJet("Uncorrected").py());
pz_raw->push_back(it->correctedJet("Uncorrected").pz());
energy_raw->push_back(it->correctedJet("Uncorrected").energy());

// extra kinematic variables for easier debugging
pt_store->push_back(it->pt());
eta_store->push_back(it->eta());
phi_store->push_back(it->phi());

//extra properties
charge->push_back(it->jetCharge());
mass->push_back(it->mass());
Expand Down Expand Up @@ -420,6 +434,12 @@ void BristolNTuple_PFJets::produce(edm::Event& iEvent, const edm::EventSetup& iS
iEvent.put(py_raw, prefix + "PyRAW" + suffix);
iEvent.put(pz_raw, prefix + "PzRAW" + suffix);
iEvent.put(energy_raw, prefix + "EnergyRAW" + suffix);

// extra kinematic variables for easier debugging
iEvent.put(pt_store, prefix + "Pt" + suffix);
iEvent.put(eta_store, prefix + "Eta" + suffix);
iEvent.put(phi_store, prefix + "Phi" + suffix);

//extra properties
iEvent.put(charge, prefix + "Charge" + suffix);
iEvent.put(mass, prefix + "Mass" + suffix);
Expand Down

0 comments on commit 002b4d5

Please sign in to comment.