33 using namespace isodeposit;
41 void endJob()
override;
53 TH1F *
IsoZ, *IsoW, *IsoOther;
57 TH1F *
Z_eta, *W_eta, *Other_eta;
59 TH1F *
Z_pt, *W_pt, *Other_pt;
62 enum MuTag { muFromZ, muFromW, muFromOther };
66 void histo(TH1F*
hist,
const char* cx,
const char* cy)
const;
76 int sizem =
p->numberOfMothers();
82 if (moth1 ==
nullptr) {
86 int pdgId1 = moth1->
pdgId();
87 if (
abs(pdgId1) != 13) {
92 if (moth2 ==
nullptr) {
96 int pdgId2 = moth2->
pdgId();
101 if (
abs(pdgId2) == 24)
111 if (it->dR() < dR_max) {
112 double theta = 2 * (TMath::ATan(TMath::Exp(-(it->eta()))));
114 hist->Fill(it->value() / TMath::Sin(
theta));
120 hist->GetXaxis()->SetTitle(cx);
121 hist->GetYaxis()->SetTitle(cy);
122 hist->GetXaxis()->SetTitleOffset(1);
123 hist->GetYaxis()->SetTitleOffset(1.2);
124 hist->GetXaxis()->SetTitleSize(0.04);
125 hist->GetYaxis()->SetTitleSize(0.04);
126 hist->GetXaxis()->SetLabelSize(0.03);
127 hist->GetYaxis()->SetLabelSize(0.03);
132 dRVeto(
pset.getUntrackedParameter<double>(
"veto")),
133 dRTrk(
pset.getUntrackedParameter<double>(
"deltaRTrk")),
134 dREcal(
pset.getUntrackedParameter<double>(
"deltaREcal")),
135 dRHcal(
pset.getUntrackedParameter<double>(
"deltaRHcal")),
139 alpha(
pset.getUntrackedParameter<double>(
"alpha")),
140 beta(
pset.getUntrackedParameter<double>(
"beta")),
141 pt(
pset.getUntrackedParameter<double>(
"pt")),
142 eta(
pset.getUntrackedParameter<double>(
"eta")),
143 iso_cut(
pset.getUntrackedParameter<double>(
"isoCut")) {
145 std::ostringstream str1, str2, str3, str4, str5, str6, str7, str8, str9, str10, n_tracks;
146 str1 <<
"muons from Z with p_{t} > " <<
ptThreshold <<
" GeV/c"
147 <<
" and #Delta R < " <<
dRTrk;
148 str2 <<
"muons from W with p_{t} > " <<
ptThreshold <<
" GeV/c"
149 <<
" and #Delta R < " <<
dRTrk;
150 str3 <<
"muons from Others with p_{t} > " <<
ptThreshold <<
" GeV/c"
151 <<
" and #Delta R < " <<
dRTrk;
152 str4 <<
"muons from Z with p_{t} > " <<
ptThreshold <<
" GeV/c"
153 <<
" and #Delta R < " <<
dRTrk <<
" (alpha = " <<
alpha <<
" , "
154 <<
"beta = " <<
beta <<
" )";
155 str5 <<
"muons from W with p_{t} > " <<
ptThreshold <<
" GeV/c"
156 <<
" and #Delta R < " <<
dRTrk <<
" (alpha = " <<
alpha <<
" , "
157 <<
"beta = " <<
beta <<
" )";
158 str6 <<
"muons from Other with p_{t} > " <<
ptThreshold <<
" GeV/c"
159 <<
" and #Delta R < " <<
dRTrk <<
" (alpha = " <<
alpha <<
" , "
160 <<
"beta = " <<
beta <<
" )";
161 n_tracks <<
"Number of tracks for muon with p_{t} > " <<
ptThreshold <<
" and #Delta R < " <<
dRTrk <<
" GeV/c";
162 str7 <<
"Isolation Vs p_{t} with p_{t} > " <<
ptThreshold <<
" GeV/c"
163 <<
" and #Delta R < " <<
dRTrk <<
"(Tracker)";
164 str8 <<
"Isolation Vs p_{t} with p_{t} > " <<
ptThreshold <<
" GeV/c"
165 <<
" and #Delta R < " <<
dRTrk <<
"(Ecal)";
166 str9 <<
"Isolation Vs p_{t} with p_{t} > " <<
ptThreshold <<
" GeV/c"
167 <<
" and #Delta R < " <<
dRTrk <<
"(Hcal)";
168 str10 <<
"Isolation Vs p_{t} with p_{t} > " <<
ptThreshold <<
" GeV/c"
169 <<
" and #Delta R < " <<
dRTrk <<
" (alpha = " <<
alpha <<
" , "
170 <<
"beta = " <<
beta <<
" )";
171 h_IsoZ_tk = fs->
make<TH1F>(
"ZIso_Tk", str1.str().c_str(), 100, 0., 20.);
172 h_IsoW_tk = fs->
make<TH1F>(
"WIso_Tk", str2.str().c_str(), 100, 0., 20.);
174 h_IsoZ_ecal = fs->
make<TH1F>(
"ZIso_ecal", str1.str().c_str(), 100, 0., 20.);
175 h_IsoW_ecal = fs->
make<TH1F>(
"WIso_ecal", str2.str().c_str(), 100, 0., 20.);
177 h_IsoZ_hcal = fs->
make<TH1F>(
"ZIso_hcal", str1.str().c_str(), 100, 0., 20.);
178 h_IsoW_hcal = fs->
make<TH1F>(
"WIso_hcal", str2.str().c_str(), 100, 0., 20.);
180 IsoZ = fs->
make<TH1F>(
"ZIso", str4.str().c_str(), 100, 0., 20.);
181 IsoW = fs->
make<TH1F>(
"WIso", str5.str().c_str(), 100, 0., 20.);
182 IsoOther = fs->
make<TH1F>(
"otherIso", str6.str().c_str(), 100, 0., 20.);
184 Z_eta = fs->
make<TH1F>(
"Z_eta",
"#eta distribution for muons coming from Z", 40, -
eta,
eta);
185 W_eta = fs->
make<TH1F>(
"W_eta",
"#eta distribution for muons coming from W", 40, -
eta,
eta);
186 Other_eta = fs->
make<TH1F>(
"Other_eta",
"#eta distribution for muons coming from other", 40, -
eta,
eta);
188 "Z_eta_postSelection",
"#eta distribution for muons coming from Z after iso selection", 40, -
eta,
eta);
190 "W_eta_postSelection",
"#eta distribution for muons coming from W after iso selection", 40, -
eta,
eta);
192 "Other_eta_postSelection",
"#eta distribution for muons coming from other after iso selection", 40, -
eta,
eta);
194 Z_pt = fs->
make<TH1F>(
"Z_pt",
"p_{T} distribution for muons coming from Z", 40,
pt, 150.);
195 W_pt = fs->
make<TH1F>(
"W_pt",
"p_{T} distribution for muons coming from W", 40,
pt, 150.);
196 Other_pt = fs->
make<TH1F>(
"Other_pt",
"p_{T} distribution for muons coming from other", 40,
pt, 150.);
198 "Z_pt_postSelection",
"p_{T} distribution for muons coming from Z after iso selection", 40,
pt, 150.);
200 "W_pt_postSelection",
"p_{t} distribution for muons coming from W after iso selection", 40,
pt, 150.);
202 "Other_pt_postSelection",
"p_{t} distribution for muons coming from other after iso selection", 40,
pt, 150.);
204 TkrPt = fs->
make<TH1F>(
"TkrPt",
"IsoDeposit p distribution in the Tracker", 100, 0., 10.);
205 EcalEt = fs->
make<TH1F>(
"EcalEt",
"IsoDeposit E distribution in the Ecal", 100, 0., 5.);
206 HcalEt = fs->
make<TH1F>(
"HcalEt",
"IsoDeposit E distribution in the Hcal", 100, 0., 5.);
208 EcalEtZ = fs->
make<TH1F>(
"VetoEcalEt",
" #Sigma E_{T} deposited in veto cone in the Ecal", 100, 0., 10.);
209 HcalEtZ = fs->
make<TH1F>(
"VetoHcalEt",
" #Sigma E_{T} deposited in veto cone in the Hcal", 100, 0., 10.);
216 for (
unsigned int i = 0;
i <
dimuons->size(); ++
i) {
243 vetos_mu_ecal.push_back(
new ConeVeto(muDir, 0.));
247 vetos_tk_ecal.push_back(
new ConeVeto(tkDir, 0.));
251 vetos_mu_hcal.push_back(
new ConeVeto(muDir, 0.));
255 vetos_tk_hcal.push_back(
new ConeVeto(tkDir, 0.));
261 double Ecal_isovalue =
263 double Hcal_isovalue =
272 (1 -
alpha) * muTrackIso->sumWithin(
dRTrk, vetos_mu);
277 double iso_value =
TMath::Max(iso_value0, iso_value1);
283 IsoZ->Fill(iso_value);
286 Z_eta->Fill(mu1.eta());
288 Z_pt->Fill(mu1.pt());
310 IsoW->Fill(iso_value);
313 W_eta->Fill(mu1.eta());
315 W_pt->Fill(mu1.pt());