Definition at line 53 of file EcalZmassTask.cc.
EcalZmassTask::EcalZmassTask | ( | const edm::ParameterSet & | parameters | ) | [explicit] |
Definition at line 119 of file EcalZmassTask.cc.
References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), prefixME_, and theElectronCollectionLabel.
{ prefixME_ = parameters.getUntrackedParameter < std::string > ("prefixME", ""); theElectronCollectionLabel = parameters.getParameter < edm::InputTag > ("electronCollection"); }
EcalZmassTask::~EcalZmassTask | ( | ) |
Definition at line 129 of file EcalZmassTask.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
void EcalZmassTask::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 146 of file EcalZmassTask.cc.
References MonitorElement::Fill(), edm::Event::getByLabel(), h_ee_invMass_BB, h_ee_invMass_EB, h_ee_invMass_EE, and theElectronCollectionLabel.
{ using namespace edm; Handle < reco::GsfElectronCollection > electronCollection; iEvent.getByLabel (theElectronCollectionLabel, electronCollection); if (!electronCollection.isValid ()) return; //get GSF Tracks Handle < reco::GsfTrackCollection > gsftracks_h; iEvent.getByLabel ("electronGsfTracks", gsftracks_h); bool isIsolatedBarrel; bool isIDBarrel; bool isConvertedBarrel; bool isIsolatedEndcap; bool isIDEndcap; bool isConvertedEndcap; int elIsAccepted=0; int elIsAcceptedEB=0; int elIsAcceptedEE=0; std::vector<TLorentzVector> LV; for (reco::GsfElectronCollection::const_iterator recoElectron = electronCollection->begin (); recoElectron != electronCollection->end (); recoElectron++) { if (recoElectron->et () <= 25) continue; // Define Isolation variables double IsoTrk = (recoElectron->dr03TkSumPt () / recoElectron->et ()); double IsoEcal = (recoElectron->dr03EcalRecHitSumEt () / recoElectron->et ()); double IsoHcal = (recoElectron->dr03HcalTowerSumEt () / recoElectron->et ()); double HE = (recoElectron->hcalOverEcal ()); //Define ID variables float DeltaPhiTkClu = recoElectron->deltaPhiSuperClusterTrackAtVtx (); float DeltaEtaTkClu = recoElectron->deltaEtaSuperClusterTrackAtVtx (); float sigmaIeIe = recoElectron->sigmaIetaIeta (); //Define Conversion Rejection Variables float Dcot = recoElectron->convDcot (); float Dist = recoElectron->convDist (); int NumberOfExpectedInnerHits = recoElectron->gsfTrack ()->trackerExpectedHitsInner (). numberOfHits (); //quality flags isIsolatedBarrel = false; isIDBarrel = false; isConvertedBarrel = false; isIsolatedEndcap = false; isIDEndcap = false; isConvertedEndcap = false; /***** Barrel WP80 Cuts *****/ if (fabs (recoElectron->eta ()) <= 1.4442) { /* Isolation */ if (IsoTrk < 0.09 && IsoEcal < 0.07 && IsoHcal < 0.10) { isIsolatedBarrel = true; } /* Identification */ if (fabs (DeltaEtaTkClu) < 0.004 && fabs (DeltaPhiTkClu) < 0.06 && sigmaIeIe < 0.01 && HE < 0.04) { isIDBarrel = true; } /* Conversion Rejection */ if ((fabs (Dist) >= 0.02 || fabs (Dcot) >= 0.02) && NumberOfExpectedInnerHits <= 1.0) { isConvertedBarrel = true; } } if (isIsolatedBarrel && isIDBarrel && isConvertedBarrel) { elIsAccepted++; elIsAcceptedEB++; TLorentzVector b_e2(recoElectron->momentum ().x (),recoElectron->momentum ().y (),recoElectron->momentum ().z (), recoElectron->p ()); LV.push_back(b_e2); } /***** Endcap WP80 Cuts *****/ if (fabs (recoElectron->eta ()) >= 1.5660 && fabs (recoElectron->eta ()) <= 2.5000) { /* Isolation */ if (IsoTrk < 0.04 && IsoEcal < 0.05 && IsoHcal < 0.025) { isIsolatedEndcap = true; } /* Identification */ if (fabs (DeltaEtaTkClu) < 0.007 && fabs (DeltaPhiTkClu) < 0.03 && sigmaIeIe < 0.031 && HE < 0.15) { isIDEndcap = true; } /* Conversion Rejection */ if ((fabs (Dcot) > 0.02 || fabs (Dist) > 0.02) && NumberOfExpectedInnerHits <= 1.0) { isConvertedEndcap = true; } } if (isIsolatedEndcap && isIDEndcap && isConvertedEndcap) { elIsAccepted++; elIsAcceptedEE++; TLorentzVector e_e2(recoElectron->momentum ().x (),recoElectron->momentum ().y (),recoElectron->momentum ().z (), recoElectron->p ()); LV.push_back(e_e2); } } // Calculate the Z invariant masses if (elIsAccepted>1){ double e_ee_invMass=0; if (elIsAccepted>2) edm::LogWarning("EwkAnalyzer") << "WARNING: In this events we have more than two electrons accpeted!!!!!!!"; if (LV.size()==2){ TLorentzVector e_pair = LV[0] + LV[1]; e_ee_invMass = e_pair.M (); } if (elIsAcceptedEB==2){ h_ee_invMass_BB->Fill(e_ee_invMass); } if (elIsAcceptedEE==2){ h_ee_invMass_EE->Fill(e_ee_invMass); } if (elIsAcceptedEB==1 && elIsAcceptedEE==1){ h_ee_invMass_EB->Fill(e_ee_invMass); } LV.clear(); } }
void EcalZmassTask::beginJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 308 of file EcalZmassTask.cc.
References DQMStore::book1D(), h_ee_invMass_BB, h_ee_invMass_EB, h_ee_invMass_EE, LogTrace, cppFunctionSkipper::operator, prefixME_, and DQMStore::setCurrentFolder().
{ DQMStore *theDbe; h_ee_invMass_EB = 0; h_ee_invMass_EE = 0; h_ee_invMass_BB = 0; LogTrace ("EwkAnalyzer") << "Parameters initialization"; theDbe = edm::Service < DQMStore > ().operator-> (); if (theDbe != 0) { theDbe->setCurrentFolder (prefixME_ + "/Zmass"); // Use folder with name of PAG h_ee_invMass_EB = theDbe->book1D ("Z peak - WP80 EB-EE", "Z peak - WP80 EB-EE;InvMass (GeV)", 60, 60.0, 120.0); h_ee_invMass_EE = theDbe->book1D ("Z peak - WP80 EE-EE", "Z peak - WP80 EE-EE;InvMass (Gev)", 60, 60.0, 120.0); h_ee_invMass_BB = theDbe->book1D ("Z peak - WP80 EB-EB", "Z peak - WP80 EB-EB;InvMass (Gev)", 60, 60.0, 120.0); } }
void EcalZmassTask::beginLuminosityBlock | ( | edm::LuminosityBlock const & | , |
edm::EventSetup const & | |||
) | [private, virtual] |
void EcalZmassTask::beginRun | ( | edm::Run const & | , |
edm::EventSetup const & | |||
) | [private, virtual] |
void EcalZmassTask::endJob | ( | void | ) | [private, virtual] |
void EcalZmassTask::endLuminosityBlock | ( | edm::LuminosityBlock const & | , |
edm::EventSetup const & | |||
) | [private, virtual] |
void EcalZmassTask::endRun | ( | edm::Run const & | , |
edm::EventSetup const & | |||
) | [private, virtual] |
void EcalZmassTask::fillDescriptions | ( | edm::ConfigurationDescriptions & | descriptions | ) | [static] |
Reimplemented from edm::EDAnalyzer.
Definition at line 373 of file EcalZmassTask.cc.
References edm::ParameterSetDescription::setUnknown().
{ //The following says we do not know what parameters are allowed so do no validation // Please change this to state exactly what you do use, even if it is no parameters edm::ParameterSetDescription desc; desc.setUnknown (); descriptions.addDefault (desc); }
MonitorElement* EcalZmassTask::h_95_ee_invMass_BB [private] |
Definition at line 115 of file EcalZmassTask.cc.
MonitorElement* EcalZmassTask::h_95_ee_invMass_EB [private] |
Definition at line 111 of file EcalZmassTask.cc.
MonitorElement* EcalZmassTask::h_95_ee_invMass_EE [private] |
Definition at line 113 of file EcalZmassTask.cc.
MonitorElement* EcalZmassTask::h_e1_et [private] |
Definition at line 99 of file EcalZmassTask.cc.
MonitorElement* EcalZmassTask::h_e1_eta [private] |
Definition at line 103 of file EcalZmassTask.cc.
MonitorElement* EcalZmassTask::h_e1_phi [private] |
Definition at line 107 of file EcalZmassTask.cc.
MonitorElement* EcalZmassTask::h_e2_et [private] |
Definition at line 101 of file EcalZmassTask.cc.
MonitorElement* EcalZmassTask::h_e2_eta [private] |
Definition at line 105 of file EcalZmassTask.cc.
MonitorElement* EcalZmassTask::h_e2_phi [private] |
Definition at line 109 of file EcalZmassTask.cc.
MonitorElement* EcalZmassTask::h_ee_invMass [private] |
Definition at line 97 of file EcalZmassTask.cc.
MonitorElement* EcalZmassTask::h_ee_invMass_BB [private] |
Definition at line 95 of file EcalZmassTask.cc.
Referenced by analyze(), and beginJob().
MonitorElement* EcalZmassTask::h_ee_invMass_EB [private] |
Definition at line 91 of file EcalZmassTask.cc.
Referenced by analyze(), and beginJob().
MonitorElement* EcalZmassTask::h_ee_invMass_EE [private] |
Definition at line 93 of file EcalZmassTask.cc.
Referenced by analyze(), and beginJob().
std::string EcalZmassTask::prefixME_ [private] |
Definition at line 85 of file EcalZmassTask.cc.
Referenced by beginJob(), and EcalZmassTask().
Definition at line 88 of file EcalZmassTask.cc.
Referenced by analyze(), and EcalZmassTask().