37 #include "TLorentzVector.h" 101 desc.addUntracked<
double>(
"maxEta", 2.4);
102 desc.addUntracked<
double>(
"minPt", 5);
103 desc.addUntracked<
double>(
"maxDeltaPhiInEB", 0.15);
104 desc.addUntracked<
double>(
"maxDeltaEtaInEB", 0.007);
105 desc.addUntracked<
double>(
"maxHOEEB", 0.12);
106 desc.addUntracked<
double>(
"maxSigmaiEiEEB", 0.01);
107 desc.addUntracked<
double>(
"maxDeltaPhiInEE", 0.1);
108 desc.addUntracked<
double>(
"maxDeltaEtaInEE", 0.009);
109 desc.addUntracked<
double>(
"maxHOEEB_", .10);
110 desc.addUntracked<
double>(
"maxSigmaiEiEEE", 0.03);
111 desc.addUntracked<
double>(
"maxNormChi2", 10);
112 desc.addUntracked<
double>(
"maxD0", 0.02);
113 desc.addUntracked<
double>(
"maxDz", 20.);
114 desc.addUntracked<uint32_t>(
"minPixelHits", 1);
115 desc.addUntracked<uint32_t>(
"minStripHits", 8);
116 desc.addUntracked<
double>(
"maxIso", 0.3);
117 desc.addUntracked<
double>(
"minPtHighest", 24);
118 desc.addUntracked<
double>(
"minInvMass", 75);
119 desc.addUntracked<
double>(
"maxInvMass", 105);
121 desc.addUntracked<
bool>(
"isMC",
false);
122 desc.addUntracked<
bool>(
"doPUCorrection",
false);
123 desc.addUntracked<
std::string>(
"puScaleFactorFile",
"PileupScaleFactor.root");
128 : moduleName_(ps.getUntrackedParameter<
std::
string>(
"moduleName",
"ZEEDetails")),
129 folderName_(ps.getUntrackedParameter<
std::
string>(
"folderName",
"ElectronTracks")),
130 electronTag_(ps.getUntrackedParameter<
edm::
InputTag>(
"electronInputTag",
edm::
InputTag(
"gedGsfElectrons"))),
133 vertexTag_(ps.getUntrackedParameter<
edm::
InputTag>(
"vertexTag",
edm::
InputTag(
"offlinePrimaryVertices"))),
138 maxEta_(ps.getUntrackedParameter<double>(
"maxEta", 2.4)),
139 minPt_(ps.getUntrackedParameter<double>(
"minPt", 5)),
140 maxDeltaPhiInEB_(ps.getUntrackedParameter<double>(
"maxDeltaPhiInEB", 0.15)),
141 maxDeltaEtaInEB_(ps.getUntrackedParameter<double>(
"maxDeltaEtaInEB", 0.007)),
142 maxHOEEB_(ps.getUntrackedParameter<double>(
"maxHOEEB", 0.12)),
143 maxSigmaiEiEEB_(ps.getUntrackedParameter<double>(
"maxSigmaiEiEEB", 0.01)),
144 maxDeltaPhiInEE_(ps.getUntrackedParameter<double>(
"maxDeltaPhiInEE", 0.1)),
145 maxDeltaEtaInEE_(ps.getUntrackedParameter<double>(
"maxDeltaEtaInEE", 0.009)),
146 maxHOEEE_(ps.getUntrackedParameter<double>(
"maxHOEEB_", .10)),
147 maxSigmaiEiEEE_(ps.getUntrackedParameter<double>(
"maxSigmaiEiEEE", 0.03)),
148 maxNormChi2_(ps.getUntrackedParameter<double>(
"maxNormChi2", 10)),
149 maxD0_(ps.getUntrackedParameter<double>(
"maxD0", 0.02)),
150 maxDz_(ps.getUntrackedParameter<double>(
"maxDz", 20.)),
151 minPixelHits_(ps.getUntrackedParameter<uint32_t>(
"minPixelHits", 1)),
152 minStripHits_(ps.getUntrackedParameter<uint32_t>(
"minStripHits", 8)),
153 maxIso_(ps.getUntrackedParameter<double>(
"maxIso", 0.3)),
154 minPtHighest_(ps.getUntrackedParameter<double>(
"minPtHighest", 24)),
155 minInvMass_(ps.getUntrackedParameter<double>(
"minInvMass", 75)),
156 maxInvMass_(ps.getUntrackedParameter<double>(
"maxInvMass", 105)),
157 trackQuality_(ps.getUntrackedParameter<
std::
string>(
"trackQuality",
"highPurity")),
158 isMC_(ps.getUntrackedParameter<
bool>(
"isMC",
false)),
159 doPUCorrection_(ps.getUntrackedParameter<
bool>(
"doPUCorrection",
false)),
160 puScaleFactorFile_(ps.getUntrackedParameter<
std::
string>(
"puScaleFactorFile",
"PileupScaleFactor.root")) {
164 TH1F* h1 =
dynamic_cast<TH1F*
>(
f1->Get(
"pileupweight"));
165 for (
int i = 1;
i <= h1->GetNbinsX(); ++
i)
166 vpu_.push_back(h1->GetBinContent(
i));
174 Zpt_ = ibook.
book1D(
"Zpt",
"Z-Boson p_{T}", 100, 0.0, 100.0);
176 EoverP_ = ibook.
book3D(
"EoverP",
"EoverP", 48, -2.4, 2.4, 36, -3.2, 3.2, 100, 0, 10);
180 std::vector<TLorentzVector> list;
181 std::vector<int> chrgeList;
182 std::vector<reco::GsfElectron> finalelectrons;
192 for (
auto const& ele : *electronColl) {
193 if (!ele.ecalDriven())
198 if (!(ele.isEB() || ele.isEE()))
201 double hOverE = ele.hadronicOverEm();
202 double sigmaee = ele.sigmaIetaIeta();
203 double deltaPhiIn = ele.deltaPhiSuperClusterTrackAtVtx();
204 double deltaEtaIn = ele.deltaEtaSuperClusterTrackAtVtx();
211 }
else if (ele.isEE()) {
223 double chi2 = trk->chi2();
224 double ndof = trk->ndof();
229 double trkd0 = trk->d0();
231 trkd0 = -(trk->dxy(
beamSpot->position()));
235 if (std::fabs(trkd0) >=
maxD0_)
258 lv.SetPtEtaPhiE(ele.pt(), ele.eta(), ele.phi(), ele.energy());
260 chrgeList.push_back(ele.charge());
261 finalelectrons.push_back(ele);
273 if (vertexColl->empty()) {
274 edm::LogError(
"ZEEDetails") <<
"No good vertex in the event!!";
280 if (!
iEvent.isRealData()) {
285 for (
auto const&
v : *PupInfo) {
286 int bx =
v.getBunchCrossing();
301 for (
unsigned int I = 0;
I != finalelectrons.size();
I++) {
303 finalelectrons[
I].superCluster()->
phi(),
304 finalelectrons[
I].eEleClusterOverPout(),
308 if (list.size() >= 2) {
309 if (chrgeList[0] + chrgeList[1] == 0) {
311 TLorentzVector
zv = list[0] + list[1];
int numberOfValidPixelHits() const
const edm::InputTag puSummaryTag_
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
virtual void setCurrentFolder(std::string const &fullpath)
const std::string folderName_
const std::string trackQuality_
float sumPUPt
sum pt of charged Particles not from PV (for Pu corrections)
const edm::InputTag electronTag_
bool isNonnull() const
Checks for non-null.
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::vector< float > vpu_
Log< level::Error, false > LogError
std::vector< Vertex > VertexCollection
const double maxDeltaPhiInEE_
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
int numberOfValidStripHits() const
const bool doPUCorrection_
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
const std::string moduleName_
const edm::EDGetTokenT< std::vector< PileupSummaryInfo > > puSummaryToken_
const double maxDeltaEtaInEB_
const edm::EDGetTokenT< reco::GsfElectronCollection > electronToken_
const double maxDeltaEtaInEE_
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
const std::complex< double > I
const double maxNormChi2_
#define DEFINE_FWK_MODULE(type)
float sumNeutralHadronEt
sum pt of neutral hadrons // old float neutralHadronIso ;
const double maxDeltaPhiInEB_
const edm::InputTag vertexTag_
std::vector< float > vtrack_
static TrackQuality qualityByName(const std::string &name)
const std::string puScaleFactorFile_
ZEEDetails(const edm::ParameterSet &)
const edm::EDGetTokenT< reco::VertexCollection > vertexToken_
const double maxSigmaiEiEEE_
const double minPtHighest_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
const double maxSigmaiEiEEB_
MonitorElement * ZInvMass_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
const edm::InputTag bsTag_
MonitorElement * book3D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, FUNC onbooking=NOOP())