35 #include "TLorentzVector.h" 85 if (!electronCollection.
isValid())
92 bool isIsolatedBarrel;
94 bool isConvertedBarrel;
95 bool isIsolatedEndcap;
97 bool isConvertedEndcap;
100 int elIsAcceptedEB = 0;
101 int elIsAcceptedEE = 0;
103 std::vector<TLorentzVector>
LV;
105 for (reco::GsfElectronCollection::const_iterator recoElectron = electronCollection->begin();
106 recoElectron != electronCollection->end();
108 if (recoElectron->et() <= 25)
112 double IsoTrk = (recoElectron->dr03TkSumPt() / recoElectron->et());
113 double IsoEcal = (recoElectron->dr03EcalRecHitSumEt() / recoElectron->et());
114 double IsoHcal = (recoElectron->dr03HcalTowerSumEt() / recoElectron->et());
115 double HE = (recoElectron->hcalOverEcal());
119 float DeltaPhiTkClu = recoElectron->deltaPhiSuperClusterTrackAtVtx();
120 float DeltaEtaTkClu = recoElectron->deltaEtaSuperClusterTrackAtVtx();
121 float sigmaIeIe = recoElectron->sigmaIetaIeta();
125 float Dcot = recoElectron->convDcot();
126 float Dist = recoElectron->convDist();
127 int NumberOfExpectedInnerHits =
132 isIsolatedBarrel =
false;
134 isConvertedBarrel =
false;
135 isIsolatedEndcap =
false;
137 isConvertedEndcap =
false;
141 if (fabs(recoElectron->eta()) <= 1.4442) {
143 if (IsoTrk < 0.09 && IsoEcal < 0.07 && IsoHcal < 0.10) {
144 isIsolatedBarrel =
true;
148 if (fabs(DeltaEtaTkClu) < 0.004 && fabs(DeltaPhiTkClu) < 0.06 && sigmaIeIe < 0.01 && HE < 0.04) {
153 if ((fabs(Dist) >= 0.02 || fabs(Dcot) >= 0.02) && NumberOfExpectedInnerHits <= 1.0) {
154 isConvertedBarrel =
true;
158 if (isIsolatedBarrel && isIDBarrel && isConvertedBarrel) {
162 recoElectron->momentum().x(), recoElectron->momentum().y(), recoElectron->momentum().z(), recoElectron->p());
168 if (fabs(recoElectron->eta()) >= 1.5660 && fabs(recoElectron->eta()) <= 2.5000) {
170 if (IsoTrk < 0.04 && IsoEcal < 0.05 && IsoHcal < 0.025) {
171 isIsolatedEndcap =
true;
175 if (fabs(DeltaEtaTkClu) < 0.007 && fabs(DeltaPhiTkClu) < 0.03 && sigmaIeIe < 0.031 && HE < 0.15) {
180 if ((fabs(Dcot) > 0.02 || fabs(Dist) > 0.02) && NumberOfExpectedInnerHits <= 1.0) {
181 isConvertedEndcap =
true;
184 if (isIsolatedEndcap && isIDEndcap && isConvertedEndcap) {
188 recoElectron->momentum().x(), recoElectron->momentum().y(), recoElectron->momentum().z(), recoElectron->p());
195 if (elIsAccepted > 1) {
196 double e_ee_invMass = 0;
197 if (LV.size() == 2) {
198 TLorentzVector e_pair = LV[0] + LV[1];
199 e_ee_invMass = e_pair.M();
202 if (elIsAcceptedEB == 2) {
205 if (elIsAcceptedEE == 2) {
208 if (elIsAcceptedEB == 1 && elIsAcceptedEE == 1) {
223 LogTrace(logTraceName) <<
"Parameters initialization";
227 h_ee_invMass_EB = iBooker.
book1D(
"Z peak - WP80 EB-EE",
"Z peak - WP80 EB-EE;InvMass (GeV)", 60, 60.0, 120.0);
228 h_ee_invMass_EE = iBooker.
book1D(
"Z peak - WP80 EE-EE",
"Z peak - WP80 EE-EE;InvMass (Gev)", 60, 60.0, 120.0);
229 h_ee_invMass_BB = iBooker.
book1D(
"Z peak - WP80 EB-EB",
"Z peak - WP80 EB-EB;InvMass (Gev)", 60, 60.0, 120.0);
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
MonitorElement * h_e2_eta
MonitorElement * h_ee_invMass_EB
const std::string prefixME_
MonitorElement * h_e1_phi
MonitorElement * h_95_ee_invMass_EE
MonitorElement * h_95_ee_invMass_EB
bool getByToken(EDGetToken token, Handle< PROD > &result) const
math::XYZTLorentzVectorD LV
void setCurrentFolder(std::string const &fullpath)
const edm::EDGetTokenT< reco::GsfElectronCollection > electronCollectionToken_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
EcalZmassTask(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
std::vector< GsfTrack > GsfTrackCollection
collection of GsfTracks
MonitorElement * h_ee_invMass_EE
MonitorElement * h_ee_invMass
void analyze(const edm::Event &, const edm::EventSetup &) override
~EcalZmassTask() override
MonitorElement * h_95_ee_invMass_BB
MonitorElement * h_ee_invMass_BB
const edm::EDGetTokenT< reco::GsfTrackCollection > trackCollectionToken_
MonitorElement * h_e2_phi
MonitorElement * h_e1_eta