extern void printMuon(const MuonPointer muon) {
	printParticle(muon);
	cout << "Muon Information" << endl;
	cout << setw(30) << "is global" 		<< setw(30) << "PF RelIso DR=0.4" << setw(30) << "----" << endl;
	cout << setw(30) << muon->isGlobal() 	<< setw(30) << muon->PFRelIso04() << setw(30) << "" << endl;

}
Example #2
0
void MuonAnalyser::analyse(const EventPtr event) {
	if (singleMuonOnly_)
		return;
	histMan_->setCurrentHistogramFolder(histogramFolder_);
	weight_ = event->weight() * prescale_ * scale_;
	const MuonCollection muons = event->Muons();

	histMan_->H1D("Number_Of_Muons")->Fill(muons.size(), weight_);
	for (unsigned int index = 0; index < muons.size(); ++index) {
		const MuonPointer muon(muons.at(index));

		histMan_->H1D("All_Muon_Pt")->Fill(muon->pt(), weight_);
		histMan_->H1D("All_Muon_Eta")->Fill(muon->eta(), weight_);
		histMan_->H1D("All_Muon_AbsEta")->Fill(fabs(muon->eta()), weight_);
		histMan_->H1D("All_Muon_Phi")->Fill(muon->phi(), weight_);
		histMan_->H1D("All_Muon_pfIsolation_03")->Fill(muon->PFRelIso03(), weight_);
		histMan_->H1D("All_Muon_pfIsolation_04")->Fill(muon->PFRelIso04(), weight_);

		histMan_->H1D("All_Muon_dB")->Fill(muon->d0(), weight_);
	}
}