Skip to content

Commit

Permalink
Merge pull request cms-sw#9 from YoungKwonJo/master
Browse files Browse the repository at this point in the history
added jets_partonflavor
  • Loading branch information
jhgoh committed Feb 10, 2014
2 parents 7b3b957 + 50e55af commit 9ca86bf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion GenericNtuple/interface/GenericEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct GenericEvent
doublesP electrons_scEta_;

doublesP jets_pt_, jets_eta_, jets_phi_, jets_m_;
doublesP jets_bTag_;
doublesP jets_bTag_, jets_partonflavor_;
doublesP jets_JESUp_, jets_JESDn_;
doublesP jets_JER_, jets_JERUp_, jets_JERDn_;

Expand Down
1 change: 1 addition & 0 deletions GenericNtuple/plugins/KGenericNtupleMaker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ void KGenericNtupleMaker::analyze(const edm::Event& event, const edm::EventSetup
fevent_->jets_phi_->push_back(jet.phi());
fevent_->jets_m_ ->push_back(jet.mass());
fevent_->jets_bTag_->push_back(jet.bDiscriminator(bTagType_.c_str()));
fevent_->jets_partonflavor_->push_back(jet.partonFlavour());

fevent_->jets_JESUp_->push_back(fJESUp);
fevent_->jets_JESDn_->push_back(fJESDn);
Expand Down
5 changes: 5 additions & 0 deletions GenericNtuple/src/GenericEvent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ GenericEvent::GenericEvent(bool isMC)
jets_phi_ = new doubles;
jets_m_ = new doubles;
jets_bTag_ = new doubles;
jets_partonflavor_ = new doubles;
jets_JESUp_ = new doubles;
jets_JESDn_ = new doubles;

Expand Down Expand Up @@ -107,6 +108,7 @@ void GenericEvent::book(TTree* tree)
tree_->Branch("jets_phi" , jets_phi_ );
tree_->Branch("jets_m" , jets_m_ );
tree_->Branch("jets_bTag", jets_bTag_);
tree_->Branch("jets_partonflavor", jets_partonflavor_);

tree_->Branch("jets_JESUp", jets_JESUp_);
tree_->Branch("jets_JESDn", jets_JESDn_);
Expand Down Expand Up @@ -198,6 +200,7 @@ void GenericEvent::clear()
jets_phi_->clear();
jets_m_->clear();
jets_bTag_->clear();
jets_partonflavor_->clear();

jets_JESUp_->clear();
jets_JESDn_->clear();
Expand Down Expand Up @@ -275,6 +278,7 @@ void GenericEvent::setBranch(TTree* tree)
tree_->SetBranchAddress("jets_phi" , &jets_phi_ );
tree_->SetBranchAddress("jets_m" , &jets_m_ );
tree_->SetBranchAddress("jets_bTag", &jets_bTag_);
tree_->SetBranchAddress("jets_partonflavor", &jets_partonflavor_);

tree_->SetBranchAddress("jets_JESUp", &jets_JESUp_);
tree_->SetBranchAddress("jets_JESDn", &jets_JESDn_);
Expand Down Expand Up @@ -365,6 +369,7 @@ GenericEvent::~GenericEvent()
delete jets_phi_;
delete jets_m_ ;
delete jets_bTag_;
delete jets_partonflavor_;
delete jets_JESUp_;
delete jets_JESDn_;

Expand Down

0 comments on commit 9ca86bf

Please sign in to comment.