void DiElectronAnalyser::analyse(const EventPtr event, const ElectronCollection electrons) { histMan_->setCurrentHistogramFolder(histogramFolder_); weight_ = event->weight() * prescale_ * scale_; if (electrons.size() == 2) { ElectronPointer leadingElectron = electrons.front(); ElectronPointer secondElectron = electrons.at(1); //both histMan_->H1D_BJetBinned("diLepton_Mass")->Fill(leadingElectron->invariantMass(secondElectron), weight_); histMan_->H1D_BJetBinned("diLepton_DeltaR")->Fill(leadingElectron->deltaR(secondElectron), weight_); //lead histMan_->H1D_BJetBinned("LeadLepton_Pt")->Fill(leadingElectron->pt(), weight_); histMan_->H1D_BJetBinned("LeadLepton_Eta")->Fill(leadingElectron->eta(), weight_); histMan_->H1D_BJetBinned("LeadLepton_AbsEta")->Fill(abs(leadingElectron->eta()), weight_); histMan_->H1D_BJetBinned("LeadLepton_Phi")->Fill(leadingElectron->phi(), weight_); histMan_->H1D_BJetBinned("LeadLepton_RelIso")->Fill(leadingElectron->pfRelativeIsolationRhoCorrected(), weight_); histMan_->H1D_BJetBinned("LeadLepton_HadOverEM")->Fill(leadingElectron->HadOverEm(), weight_); histMan_->H1D_BJetBinned("LeadLepton_dB")->Fill(leadingElectron->d0_wrtBeamSpot(), weight_); //second histMan_->H1D_BJetBinned("SecondLepton_Pt")->Fill(secondElectron->pt(), weight_); histMan_->H1D_BJetBinned("SecondLepton_Eta")->Fill(secondElectron->eta(), weight_); histMan_->H1D_BJetBinned("SecondLepton_AbsEta")->Fill(abs(secondElectron->eta()), weight_); histMan_->H1D_BJetBinned("SecondLepton_Phi")->Fill(secondElectron->phi(), weight_); histMan_->H1D_BJetBinned("SecondLepton_RelIso")->Fill(secondElectron->pfRelativeIsolationRhoCorrected(), weight_); histMan_->H1D_BJetBinned("SecondLepton_HadOverEM")->Fill(secondElectron->HadOverEm(), weight_); histMan_->H1D_BJetBinned("SecondLepton_dB")->Fill(secondElectron->d0_wrtBeamSpot(), weight_); } }
ElectronPointer TestObjectFactory::goodCaloElectron() { ElectronPointer electron = ElectronPointer(new Electron(100., 99., 13., 5.)); electron->setUsedAlgorithm(ElectronAlgorithm::Calo); electron->setSuperClusterEta(0); electron->setD0_wrtBeamSpot(0); VertexPointer pv = TestObjectFactory::goodVertex(); electron->setZDistanceToPrimaryVertex(0); electron->setDEtaIn(0); electron->setDPhiIn(0); electron->setHadOverEm(0); electron->setSigmaIEtaIEta(0); electron->setNumberOfMissingInnerLayerHits(0); electron->setDCotThetaToNextTrack(0.5); electron->setDistToNextTrack(0.5); if (electron->isGood() == false) { cout << "Et " << electron->et() << endl; cout << "Eta " << electron->eta() << endl; cout << "VBTF 70 " << electron->VBTF_W70_ElectronID() << endl; cout << "d0 " << electron->d0_wrtBeamSpot() << endl; cout << "Et " << electron->et() << endl; } assert(electron->isGood()); assert(electron->isFromConversion() == false); assert(electron->isIsolated() == false); return electron; }