36 #include "CLHEP/Units/GlobalPhysicalConstants.h"
112 conversionCollectionProducer_ = pset.
getParameter<std::string>(
"convProducer");
113 conversionCollection_ = pset.
getParameter<std::string>(
"conversionCollection");
115 minPhoEtCut_ = pset.
getParameter<
double>(
"minPhoEtCut");
116 mergedTracks_ = pset.
getParameter<
bool>(
"mergedTracks");
117 isRunCentrally_= pset.
getParameter<
bool>(
"isRunCentrally");
136 nRecConvAssWithEcal_=0;
144 double etMin = parameters_.getParameter<
double>(
"etMin");
145 double etMax = parameters_.getParameter<
double>(
"etMax");
146 int etBin = parameters_.getParameter<
int>(
"etBin");
149 double resMin = parameters_.getParameter<
double>(
"resMin");
150 double resMax = parameters_.getParameter<
double>(
"resMax");
151 int resBin = parameters_.getParameter<
int>(
"resBin");
153 double etaMin = parameters_.getParameter<
double>(
"etaMin");
154 double etaMax = parameters_.getParameter<
double>(
"etaMax");
155 int etaBin = parameters_.getParameter<
int>(
"etaBin");
156 int etaBin2 = parameters_.getParameter<
int>(
"etaBin2");
159 double phiMin = parameters_.getParameter<
double>(
"phiMin");
160 double phiMax = parameters_.getParameter<
double>(
"phiMax");
161 int phiBin = parameters_.getParameter<
int>(
"phiBin");
164 double rMin = parameters_.getParameter<
double>(
"rMin");
165 double rMax = parameters_.getParameter<
double>(
"rMax");
166 int rBin = parameters_.getParameter<
int>(
"rBin");
168 double zMin = parameters_.getParameter<
double>(
"zMin");
169 double zMax = parameters_.getParameter<
double>(
"zMax");
170 int zBin = parameters_.getParameter<
int>(
"zBin");
172 double dPhiTracksMin = parameters_.getParameter<
double>(
"dPhiTracksMin");
173 double dPhiTracksMax = parameters_.getParameter<
double>(
"dPhiTracksMax");
174 int dPhiTracksBin = parameters_.getParameter<
int>(
"dPhiTracksBin");
180 double dCotTracksMin = parameters_.getParameter<
double>(
"dCotTracksMin");
181 double dCotTracksMax = parameters_.getParameter<
double>(
"dCotTracksMax");
182 int dCotTracksBin = parameters_.getParameter<
int>(
"dCotTracksBin");
185 double chi2Min = parameters_.getParameter<
double>(
"chi2Min");
186 double chi2Max = parameters_.getParameter<
double>(
"chi2Max");
189 double rMinForXray = parameters_.getParameter<
double>(
"rMinForXray");
190 double rMaxForXray = parameters_.getParameter<
double>(
"rMaxForXray");
191 int rBinForXray = parameters_.getParameter<
int>(
"rBinForXray");
192 double zMinForXray = parameters_.getParameter<
double>(
"zMinForXray");
193 double zMaxForXray = parameters_.getParameter<
double>(
"zMaxForXray");
194 int zBinForXray = parameters_.getParameter<
int>(
"zBinForXray");
195 int zBin2ForXray = parameters_.getParameter<
int>(
"zBin2ForXray");
197 minPhoPtForEffic = parameters_.getParameter<
double>(
"minPhoPtForEffic");
198 maxPhoEtaForEffic = parameters_.getParameter<
double>(
"maxPhoEtaForEffic");
199 maxPhoZForEffic = parameters_.getParameter<
double>(
"maxPhoZForEffic");
200 maxPhoRForEffic = parameters_.getParameter<
double>(
"maxPhoRForEffic");
201 minPhoPtForPurity = parameters_.getParameter<
double>(
"minPhoPtForPurity");
202 maxPhoEtaForPurity = parameters_.getParameter<
double>(
"maxPhoEtaForPurity");
203 maxPhoZForPurity = parameters_.getParameter<
double>(
"maxPhoZForPurity");
204 maxPhoRForPurity = parameters_.getParameter<
double>(
"maxPhoRForPurity");
215 std::string histname =
"nOfSimConversions";
216 h_nSimConv_[0] =
dbe_->
book1D(histname,
"# of Sim conversions per event ",20,-0.5,19.5);
218 histname =
"h_AllSimConvEta";
219 h_AllSimConv_[0] =
dbe_->
book1D(histname,
" All conversions: simulated #eta",etaBin2,etaMin,etaMax);
220 histname =
"h_AllSimConvPhi";
221 h_AllSimConv_[1] =
dbe_->
book1D(histname,
" All conversions: simulated #phi",phiBin,phiMin,phiMax);
222 histname =
"h_AllSimConvR";
223 h_AllSimConv_[2] =
dbe_->
book1D(histname,
" All conversions: simulated R",rBin,rMin,rMax);
224 histname =
"h_AllSimConvZ";
225 h_AllSimConv_[3] =
dbe_->
book1D(histname,
" All conversions: simulated Z",zBin,zMin,zMax);
226 histname =
"h_AllSimConvEt";
227 h_AllSimConv_[4] =
dbe_->
book1D(histname,
" All conversions: simulated Et",etBin,etMin,etMax);
229 histname =
"nOfVisSimConversions";
230 h_nSimConv_[1] =
dbe_->
book1D(histname,
"# of Sim conversions per event ",20,-0.5,19.5);
231 histname =
"h_VisSimConvEta";
232 h_VisSimConv_[0] =
dbe_->
book1D(histname,
" All vis conversions: simulated #eta",etaBin2,etaMin, etaMax);
233 histname =
"h_VisSimConvPhi";
234 h_VisSimConv_[1] =
dbe_->
book1D(histname,
" All vis conversions: simulated #phi",phiBin,phiMin, phiMax);
235 histname =
"h_VisSimConvR";
236 h_VisSimConv_[2] =
dbe_->
book1D(histname,
" All vis conversions: simulated R",rBin,rMin,rMax);
237 histname =
"h_VisSimConvZ";
238 h_VisSimConv_[3] =
dbe_->
book1D(histname,
" All vis conversions: simulated Z",zBin,zMin, zMax);
239 histname =
"h_VisSimConvEt";
240 h_VisSimConv_[4] =
dbe_->
book1D(histname,
" All vis conversions: simulated Et",etBin,etMin, etMax);
243 histname =
"h_SimConvTwoMTracksEta";
244 h_SimConvTwoMTracks_[0] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated #eta",etaBin2,etaMin, etaMax);
245 histname =
"h_SimConvTwoMTracksPhi";
246 h_SimConvTwoMTracks_[1] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated #phi",phiBin,phiMin, phiMax);
247 histname =
"h_SimConvTwoMTracksR";
248 h_SimConvTwoMTracks_[2] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated R",rBin,rMin, rMax);
249 histname =
"h_SimConvTwoMTracksZ";
250 h_SimConvTwoMTracks_[3] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated Z",zBin,zMin, zMax);
251 histname =
"h_SimConvTwoMTracksEt";
252 h_SimConvTwoMTracks_[4] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks: simulated Et",etBin,etMin, etMax);
254 histname =
"h_SimConvTwoTracksEta";
255 h_SimConvTwoTracks_[0] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco tracks: simulated #eta",etaBin2,etaMin, etaMax);
256 histname =
"h_SimConvTwoTracksPhi";
257 h_SimConvTwoTracks_[1] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco tracks: simulated #phi",phiBin,phiMin, phiMax);
258 histname =
"h_SimConvTwoTracksR";
259 h_SimConvTwoTracks_[2] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco tracks: simulated R",rBin,rMin, rMax);
260 histname =
"h_SimConvTwoTracksZ";
261 h_SimConvTwoTracks_[3] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco tracks: simulated Z",zBin,zMin, zMax);
262 histname =
"h_SimConvTwoTracksEt";
263 h_SimConvTwoTracks_[4] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco tracks: simulated Et",etBin,etMin, etMax);
265 histname =
"h_SimConvTwoMTracksEtaAndVtxPGT0";
266 h_SimConvTwoMTracksAndVtxPGT0_[0] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #eta",etaBin2,etaMin, etaMax);
267 histname =
"h_SimConvTwoMTracksPhiAndVtxPGT0";
268 h_SimConvTwoMTracksAndVtxPGT0_[1] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #phi",phiBin,phiMin, phiMax);
269 histname =
"h_SimConvTwoMTracksRAndVtxPGT0";
270 h_SimConvTwoMTracksAndVtxPGT0_[2] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated R",rBin,rMin, rMax);
271 histname =
"h_SimConvTwoMTracksZAndVtxPGT0";
272 h_SimConvTwoMTracksAndVtxPGT0_[3] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Z",zBin,zMin, zMax);
273 histname =
"h_SimConvTwoMTracksEtAndVtxPGT0";
274 h_SimConvTwoMTracksAndVtxPGT0_[4] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Et",etBin,etMin, etMax);
277 histname =
"h_SimConvTwoMTracksEtaAndVtxPGT0005";
278 h_SimConvTwoMTracksAndVtxPGT0005_[0] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #eta",etaBin2,etaMin, etaMax);
279 histname =
"h_SimConvTwoMTracksPhiAndVtxPGT0005";
280 h_SimConvTwoMTracksAndVtxPGT0005_[1] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated #phi",phiBin,phiMin, phiMax);
281 histname =
"h_SimConvTwoMTracksRAndVtxPGT0005";
282 h_SimConvTwoMTracksAndVtxPGT0005_[2] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated R",rBin,rMin, rMax);
283 histname =
"h_SimConvTwoMTracksZAndVtxPGT0005";
284 h_SimConvTwoMTracksAndVtxPGT0005_[3] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Z",zBin,zMin, zMax);
285 histname =
"h_SimConvTwoMTracksEtAndVtxPGT0005";
286 h_SimConvTwoMTracksAndVtxPGT0005_[4] =
dbe_->
book1D(histname,
" All vis conversions with 2 reco-matching tracks + vertex: simulated Et",etBin,etMin, etMax);
289 h_SimConvEtaPix_[0] =
dbe_->
book1D(
"simConvEtaPix",
" sim converted Photon Eta: Pix ",etaBin,etaMin, etaMax) ;
290 h_simTkPt_ =
dbe_->
book1D(
"simTkPt",
"Sim conversion tracks pt ",etBin*3,0.,etMax);
291 h_simTkEta_ =
dbe_->
book1D(
"simTkEta",
"Sim conversion tracks eta ",etaBin,etaMin,etaMax);
293 h_simConvVtxRvsZ_[0] =
dbe_->
book2D(
"simConvVtxRvsZAll",
" Photon Sim conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
294 h_simConvVtxRvsZ_[1] =
dbe_->
book2D(
"simConvVtxRvsZBarrel",
" Photon Sim conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
295 h_simConvVtxRvsZ_[2] =
dbe_->
book2D(
"simConvVtxRvsZEndcap",
" Photon Sim conversion vtx position",zBin2ForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
296 h_simConvVtxRvsZ_[3] =
dbe_->
book2D(
"simConvVtxRvsZBarrel2",
" Photon Sim conversion vtx position when reco R<4cm",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
297 h_simConvVtxYvsX_ =
dbe_->
book2D(
"simConvVtxYvsXTrkBarrel",
" Photon Sim conversion vtx position, (x,y) eta<1 ",100, -80., 80., 100, -80., 80.);
302 h_nConv_[0][0] =
dbe_->
book1D(histname+
"All",
"Number Of Conversions per isolated candidates per events: All Ecal ",10,-0.5, 9.5);
303 h_nConv_[0][1] =
dbe_->
book1D(histname+
"Barrel",
"Number Of Conversions per isolated candidates per events: Ecal Barrel ",10,-0.5, 9.5);
304 h_nConv_[0][2] =
dbe_->
book1D(histname+
"Endcap",
"Number Of Conversions per isolated candidates per events: Ecal Endcap ",10,-0.5, 9.5);
305 h_nConv_[1][0] =
dbe_->
book1D(histname+
"All_Ass",
"Number Of associated Conversions per isolated candidates per events: All Ecal ",10,-0.5, 9.5);
307 h_convEta_[0][0] =
dbe_->
book1D(
"convEta",
" converted Photon Eta ",etaBin,etaMin, etaMax) ;
308 h_convPhi_[0][0] =
dbe_->
book1D(
"convPhi",
" converted Photon Phi ",phiBin,phiMin,phiMax) ;
309 h_convR_[0][0] =
dbe_->
book1D(
"convR",
" converted photon R",rBin,rMin, rMax);
310 h_convZ_[0][0] =
dbe_->
book1D(
"convZ",
" converted photon Z",zBin,zMin, zMax);
311 h_convPt_[0][0] =
dbe_->
book1D(
"convPt",
" conversions Transverse Energy: all eta ", etBin,etMin, etMax);
313 h_convEta_[1][0] =
dbe_->
book1D(
"convEtaAss",
" Matched converted Photon Eta ",etaBin,etaMin, etaMax) ;
314 h_convPhi_[1][0] =
dbe_->
book1D(
"convPhiAss",
" Matched converted Photon Phi ",phiBin,phiMin,phiMax) ;
315 h_convR_[1][0] =
dbe_->
book1D(
"convRAss",
" Matched converted photon R",rBin,rMin, rMax);
316 h_convZ_[1][0] =
dbe_->
book1D(
"convZAss",
" Matched converted photon Z",zBin,zMin, zMax);
317 h_convPt_[1][0] =
dbe_->
book1D(
"convPtAss",
"Matched conversions Transverse Energy: all eta ", etBin,etMin, etMax);
319 h_convEta_[2][0] =
dbe_->
book1D(
"convEtaFake",
" Fake converted Photon Eta ",etaBin,etaMin, etaMax) ;
320 h_convPhi_[2][0] =
dbe_->
book1D(
"convPhiFake",
" Fake converted Photon Phi ",phiBin,phiMin,phiMax) ;
321 h_convR_[2][0] =
dbe_->
book1D(
"convRFake",
" Fake converted photon R",rBin,rMin, rMax);
322 h_convZ_[2][0] =
dbe_->
book1D(
"convZFake",
" Fake converted photon Z",zBin,zMin, zMax);
323 h_convPt_[2][0] =
dbe_->
book1D(
"convPtFake",
"Fake conversions Transverse Energy: all eta ", etBin,etMin, etMax);
325 h_convRplot_ =
dbe_->
book1D(
"convRplot",
" converted photon R",400, 0.,80.);
326 h_convZplot_ =
dbe_->
book1D(
"convZplot",
" converted photon Z",320,-160.,160.);
329 histname =
"convPtRes";
330 h_convPtRes_[0] =
dbe_->
book1D(histname+
"All",
" Conversion Pt rec/true : All ecal ", resBin,resMin, resMax);
331 h_convPtRes_[1] =
dbe_->
book1D(histname+
"Barrel",
" Conversion Pt rec/true : Barrel ",resBin,resMin, resMax);
332 h_convPtRes_[2] =
dbe_->
book1D(histname+
"Endcap",
" Conversion Pt rec/true : Endcap ",resBin,resMin, resMax);
336 h_invMass_[0][0]=
dbe_->
book1D(histname+
"All_AllTracks",
" Photons:Tracks from conversion: Pair invariant mass: all Ecal ",100, 0., 1.5);
337 h_invMass_[0][1]=
dbe_->
book1D(histname+
"Barrel_AllTracks",
" Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ",100, 0., 1.5);
338 h_invMass_[0][2]=
dbe_->
book1D(histname+
"Endcap_AllTracks",
" Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ",100, 0., 1.5);
340 h_invMass_[1][0]=
dbe_->
book1D(histname+
"All_AssTracks",
" Photons:Tracks from conversion: Pair invariant mass: all Ecal ",100, 0., 1.5);
341 h_invMass_[1][1]=
dbe_->
book1D(histname+
"Barrel_AssTracks",
" Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ",100, 0., 1.5);
342 h_invMass_[1][2]=
dbe_->
book1D(histname+
"Endcap_AssTracks",
" Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ",100, 0., 1.5);
344 h_invMass_[2][0]=
dbe_->
book1D(histname+
"All_FakeTracks",
" Photons:Tracks from conversion: Pair invariant mass: all Ecal ",100, 0., 1.5);
345 h_invMass_[2][1]=
dbe_->
book1D(histname+
"Barrel_FakeTracks",
" Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ",100, 0., 1.5);
346 h_invMass_[2][2]=
dbe_->
book1D(histname+
"Endcap_FaleTracks",
" Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ",100, 0., 1.5);
350 histname=
"hDPhiTracksAtVtx";
351 h_DPhiTracksAtVtx_[0][0] =
dbe_->
book1D(histname+
"All",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: all Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
352 h_DPhiTracksAtVtx_[0][1] =
dbe_->
book1D(histname+
"Barrel",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: Barrel Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
353 h_DPhiTracksAtVtx_[0][2] =
dbe_->
book1D(histname+
"Endcap",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: Endcap Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
354 h_DPhiTracksAtVtx_[1][0] =
dbe_->
book1D(histname+
"All_Ass",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: all Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
355 h_DPhiTracksAtVtx_[1][1] =
dbe_->
book1D(histname+
"Barrel_Ass",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: Barrel Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
356 h_DPhiTracksAtVtx_[1][2] =
dbe_->
book1D(histname+
"Endcap_Ass",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: Endcap Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
357 h_DPhiTracksAtVtx_[2][0] =
dbe_->
book1D(histname+
"All_Fakes",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: all Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
358 h_DPhiTracksAtVtx_[2][1] =
dbe_->
book1D(histname+
"Barrel_Fakes",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: Barrel Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
359 h_DPhiTracksAtVtx_[2][2] =
dbe_->
book1D(histname+
"Endcap_Fakes",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex: Endcap Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
363 histname=
"hDPhiTracksAtVtxVsEta";
364 h2_DPhiTracksAtVtxVsEta_ =
dbe_->
book2D(histname+
"All",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex vs #eta",etaBin2,etaMin, etaMax,100, -0.5, 0.5);
365 histname=
"pDPhiTracksAtVtxVsEta";
366 p_DPhiTracksAtVtxVsEta_ =
dbe_->
bookProfile(histname+
"All",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex vs #eta ",etaBin2,etaMin, etaMax, 100, -0.5, 0.5,
"");
368 histname=
"hDPhiTracksAtVtxVsR";
369 h2_DPhiTracksAtVtxVsR_ =
dbe_->
book2D(histname+
"All",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex vs R",rBin,rMin, rMax,100, -0.5, 0.5);
370 histname=
"pDPhiTracksAtVtxVsR";
371 p_DPhiTracksAtVtxVsR_ =
dbe_->
bookProfile(histname+
"All",
" Photons:Tracks from conversions: #delta#phi Tracks at vertex vs R ",rBin,rMin, rMax,100, -0.5, 0.5,
"");
374 histname=
"hDCotTracks";
375 h_DCotTracks_[0][0]=
dbe_->
book1D(histname+
"All",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: all Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
376 h_DCotTracks_[0][1]=
dbe_->
book1D(histname+
"Barrel",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Barrel Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
377 h_DCotTracks_[0][2]=
dbe_->
book1D(histname+
"Endcap",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Endcap Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
378 h_DCotTracks_[1][0]=
dbe_->
book1D(histname+
"All_Ass",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: all Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
379 h_DCotTracks_[1][1]=
dbe_->
book1D(histname+
"Barrel_Ass",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Barrel Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
380 h_DCotTracks_[1][2]=
dbe_->
book1D(histname+
"Endcap_Ass",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Endcap Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
381 h_DCotTracks_[2][0]=
dbe_->
book1D(histname+
"All_Fakes",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: all Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
382 h_DCotTracks_[2][1]=
dbe_->
book1D(histname+
"Barrel_Fakes",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Barrel Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
383 h_DCotTracks_[2][2]=
dbe_->
book1D(histname+
"Endcap_Fakes",
" Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Endcap Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
386 histname=
"hDCotTracksVsEta";
387 h2_DCotTracksVsEta_ =
dbe_->
book2D(histname+
"All",
" Photons:Tracks from conversions: #delta cotg(#Theta) Tracks vs #eta",etaBin2,etaMin, etaMax,100, -0.2, 0.2);
388 histname=
"pDCotTracksVsEta";
389 p_DCotTracksVsEta_ =
dbe_->
bookProfile(histname+
"All",
" Photons:Tracks from conversions: #delta cotg(#Theta) Tracks vs #eta ",etaBin2,etaMin, etaMax, 100, -0.2, 0.2,
"");
391 histname=
"hDCotTracksVsR";
392 h2_DCotTracksVsR_ =
dbe_->
book2D(histname+
"All",
" Photons:Tracks from conversions: #delta cotg(#Theta) Tracks at vertex vs R",rBin,rMin, rMax,100, -0.2, 0.2);
393 histname=
"pDCotTracksVsR";
394 p_DCotTracksVsR_ =
dbe_->
bookProfile(histname+
"All",
" Photons:Tracks from conversions: #delta cotg(#Theta) Tracks at vertex vs R ",rBin,rMin, rMax,100, -0.2, 0.2,
"");
397 histname=
"hDistMinAppTracks";
398 h_distMinAppTracks_[0][0]=
dbe_->
book1D(histname+
"All",
" Photons:Tracks from conversions Min Approach Dist Tracks: all Ecal ",120, -0.5, 1.0);
399 h_distMinAppTracks_[0][1]=
dbe_->
book1D(histname+
"Barrel",
" Photons:Tracks from conversions Min Approach Dist Tracks: Barrel Ecal ",120, -0.5, 1.0);
400 h_distMinAppTracks_[0][2]=
dbe_->
book1D(histname+
"Endcap",
" Photons:Tracks from conversions Min Approach Dist Tracks: Endcap Ecal ",120, -0.5, 1.0);
401 h_distMinAppTracks_[1][0]=
dbe_->
book1D(histname+
"All_Ass",
" Photons:Tracks from conversions Min Approach Dist Tracks: all Ecal ",120, -0.5, 1.0);
402 h_distMinAppTracks_[1][1]=
dbe_->
book1D(histname+
"Barrel_Ass",
" Photons:Tracks from conversions Min Approach Dist Tracks: Barrel Ecal ",120, -0.5, 1.0);
403 h_distMinAppTracks_[1][2]=
dbe_->
book1D(histname+
"Endcap_Ass",
" Photons:Tracks from conversions Min Approach Dist Tracks: Endcap Ecal ",120, -0.5, 1.0);
404 h_distMinAppTracks_[2][0]=
dbe_->
book1D(histname+
"All_Fakes",
" Photons:Tracks from conversions Min Approach Dist Tracks: all Ecal ",120, -0.5, 1.0);
405 h_distMinAppTracks_[2][1]=
dbe_->
book1D(histname+
"Barrel_Fakes",
" Photons:Tracks from conversions Min Approach Dist Tracks: Barrel Ecal ",120, -0.5, 1.0);
406 h_distMinAppTracks_[2][2]=
dbe_->
book1D(histname+
"Endcap_Fakes",
" Photons:Tracks from conversions Min Approach Dist Tracks: Endcap Ecal ",120, -0.5, 1.0);
409 h_convVtxRvsZ_[0] =
dbe_->
book2D(
"convVtxRvsZAll",
" Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
410 h_convVtxRvsZ_[1] =
dbe_->
book2D(
"convVtxRvsZBarrel",
" Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
411 h_convVtxRvsZ_[2] =
dbe_->
book2D(
"convVtxRvsZEndcap",
" Photon Reco conversion vtx position",zBin2ForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
412 h_convVtxYvsX_ =
dbe_->
book2D(
"convVtxYvsXTrkBarrel",
" Photon Reco conversion vtx position, (x,y) eta<1 ", 1000, -60., 60., 1000, -60., 60.);
414 h_convVtxRvsZ_zoom_[0] =
dbe_->
book2D(
"convVtxRvsZBarrelZoom1",
" Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, -10., 40.);
415 h_convVtxRvsZ_zoom_[1] =
dbe_->
book2D(
"convVtxRvsZBarrelZoom2",
" Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, -10., 20.);
416 h_convVtxYvsX_zoom_[0] =
dbe_->
book2D(
"convVtxYvsXTrkBarrelZoom1",
" Photon Reco conversion vtx position, (x,y) eta<1 ",100, -40., 40., 100, -40., 40.);
417 h_convVtxYvsX_zoom_[1] =
dbe_->
book2D(
"convVtxYvsXTrkBarrelZoom2",
" Photon Reco conversion vtx position, (x,y) eta<1 ",100, -20., 20., 100, -20., 20.);
419 h_convVtxdR_ =
dbe_->
book1D(
"convVtxdR",
" Photon Reco conversion vtx dR",100, -10.,10.);
420 h_convVtxdX_ =
dbe_->
book1D(
"convVtxdX",
" Photon Reco conversion vtx dX",100, -10.,10.);
421 h_convVtxdY_ =
dbe_->
book1D(
"convVtxdY",
" Photon Reco conversion vtx dY",100, -10.,10.);
422 h_convVtxdZ_ =
dbe_->
book1D(
"convVtxdZ",
" Photon Reco conversion vtx dZ",100, -20.,20.);
424 h_convVtxdPhi_ =
dbe_->
book1D(
"convVtxdPhi",
" Photon Reco conversion vtx dPhi",100, -0.01,0.01);
425 h_convVtxdEta_ =
dbe_->
book1D(
"convVtxdEta",
" Photon Reco conversion vtx dEta",100, -0.5,0.5);
427 h_convVtxdR_barrel_ =
dbe_->
book1D(
"convVtxdR_barrel",
" Photon Reco conversion vtx dR, |eta|<=1.2",100, -10.,10.);
428 h_convVtxdX_barrel_ =
dbe_->
book1D(
"convVtxdX_barrel",
" Photon Reco conversion vtx dX, |eta|<=1.2",100, -10.,10.);
429 h_convVtxdY_barrel_ =
dbe_->
book1D(
"convVtxdY_barrel",
" Photon Reco conversion vtx dY, |eta|<=1.2 ",100, -10.,10.);
430 h_convVtxdZ_barrel_ =
dbe_->
book1D(
"convVtxdZ_barrel",
" Photon Reco conversion vtx dZ, |eta|<=1.2,",100, -20.,20.);
432 h_convVtxdR_endcap_ =
dbe_->
book1D(
"convVtxdR_endcap",
" Photon Reco conversion vtx dR, |eta|>1.2 ",100, -10.,10.);
433 h_convVtxdX_endcap_ =
dbe_->
book1D(
"convVtxdX_endcap",
" Photon Reco conversion vtx dX, |eta|>1.2",100, -10.,10.);
434 h_convVtxdY_endcap_ =
dbe_->
book1D(
"convVtxdY_endcap",
" Photon Reco conversion vtx dY, |eta|>1.2",100, -10.,10.);
435 h_convVtxdZ_endcap_ =
dbe_->
book1D(
"convVtxdZ_endcap",
" Photon Reco conversion vtx dZ, |eta|>1.2",100, -20.,20.);
439 h2_convVtxdRVsR_ =
dbe_->
book2D(
"h2ConvVtxdRVsR",
" Conversion vtx dR vsR" ,rBin,rMin, rMax,100, -20.,20.);
440 h2_convVtxdRVsEta_ =
dbe_->
book2D(
"h2ConvVtxdRVsEta",
"Conversion vtx dR vs Eta" ,etaBin2,etaMin, etaMax,100, -20.,20.);
442 p_convVtxdRVsR_ =
dbe_->
bookProfile(
"pConvVtxdRVsR",
" Conversion vtx dR vsR" ,rBin,rMin, rMax ,100, -20.,20.,
"");
443 p_convVtxdRVsEta_ =
dbe_->
bookProfile(
"pConvVtxdRVsEta",
"Conversion vtx dR vs Eta" ,etaBin2,etaMin, etaMax, 100, -20.,20.,
"");
444 p_convVtxdXVsX_ =
dbe_->
bookProfile(
"pConvVtxdXVsX",
"Conversion vtx dX vs X" ,120,-60, 60 ,100, -20.,20.,
"");
445 p_convVtxdYVsY_ =
dbe_->
bookProfile(
"pConvVtxdYVsY",
"Conversion vtx dY vs Y" ,120,-60, 60 ,100, -20.,20.,
"");
446 p_convVtxdZVsZ_ =
dbe_->
bookProfile(
"pConvVtxdZVsZ",
"Conversion vtx dZ vs Z" ,zBin,zMin,zMax ,100, -20.,20.,
"");
448 p_convVtxdZVsR_ =
dbe_->
bookProfile(
"pConvVtxdZVsR",
"Conversion vtx dZ vs R" ,rBin,rMin,rMax ,100, -20.,20.,
"");
449 p2_convVtxdRVsRZ_ =
dbe_->
bookProfile2D(
"p2ConvVtxdRVsRZ",
"Conversion vtx dR vs RZ" ,zBin,zMin, zMax,rBin,rMin,rMax,100, 0.,20.,
"s");
450 p2_convVtxdZVsRZ_ =
dbe_->
bookProfile2D(
"p2ConvVtxdZVsRZ",
"Conversion vtx dZ vs RZ" ,zBin,zMin, zMax,rBin,rMin,rMax,100, 0.,20.,
"s");
454 h2_convVtxRrecVsTrue_ =
dbe_->
book2D(
"h2ConvVtxRrecVsTrue",
"Photon Reco conversion vtx R rec vs true" ,rBin,rMin, rMax,rBin,rMin, rMax);
456 histname=
"vtxChi2Prob";
457 h_vtxChi2Prob_[0][0] =
dbe_->
book1D(histname+
"All",
"vertex #chi^{2} all", 100, 0., 1.);
458 h_vtxChi2Prob_[0][1] =
dbe_->
book1D(histname+
"Barrel",
"vertex #chi^{2} barrel", 100, 0., 1.);
459 h_vtxChi2Prob_[0][2] =
dbe_->
book1D(histname+
"Endcap",
"vertex #chi^{2} endcap", 100, 0., 1.);
460 h_vtxChi2Prob_[1][0] =
dbe_->
book1D(histname+
"All_Ass",
"vertex #chi^{2} all", 100, 0., 1.);
461 h_vtxChi2Prob_[1][1] =
dbe_->
book1D(histname+
"Barrel_Ass",
"vertex #chi^{2} barrel", 100, 0., 1.);
462 h_vtxChi2Prob_[1][2] =
dbe_->
book1D(histname+
"Endcap_Ass",
"vertex #chi^{2} endcap", 100, 0., 1.);
463 h_vtxChi2Prob_[2][0] =
dbe_->
book1D(histname+
"All_Fakes",
"vertex #chi^{2} all", 100, 0., 1.);
464 h_vtxChi2Prob_[2][1] =
dbe_->
book1D(histname+
"Barrel_Fakes",
"vertex #chi^{2} barrel", 100, 0., 1.);
465 h_vtxChi2Prob_[2][2] =
dbe_->
book1D(histname+
"Endcap_Fakes",
"vertex #chi^{2} endcap", 100, 0., 1.);
468 h_zPVFromTracks_[1] =
dbe_->
book1D(
"zPVFromTracks",
" Photons: PV z from conversion tracks",100, -25., 25.);
469 h_dzPVFromTracks_[1] =
dbe_->
book1D(
"dzPVFromTracks",
" Photons: PV Z_rec - Z_true from conversion tracks",100, -5., 5.);
470 h2_dzPVVsR_ =
dbe_->
book2D(
"h2dzPVVsR",
"Photon Reco conversions: dz(PV) vs R" ,rBin,rMin, rMax,100, -3.,3.);
471 p_dzPVVsR_ =
dbe_->
bookProfile(
"pdzPVVsR",
"Photon Reco conversions: dz(PV) vs R" ,rBin,rMin, rMax, 100, -3.,3.,
"");
476 nHits_[0] =
dbe_->
book2D(histname+
"AllTracks",
"Photons:Tracks from conversions: # of hits all tracks",etaBin,etaMin, etaMax,30,0., 30.);
477 nHits_[1] =
dbe_->
book2D(histname+
"AllTracks_Ass",
"Photons:Tracks from conversions: # of hits all tracks ass",etaBin,etaMin, etaMax,30,0., 30.);
478 nHits_[2] =
dbe_->
book2D(histname+
"AllTracks_Fakes",
"Photons:Tracks from conversions: # of hits all tracks fakes",etaBin,etaMin, etaMax,30,0., 30.);
481 histname=
"nHitsVsEta";
482 nHitsVsEta_[0] =
dbe_->
book2D(histname+
"AllTracks",
"Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax,30,0., 30.);
483 nHitsVsEta_[1] =
dbe_->
book2D(histname+
"AllTracks_Ass",
"Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax,30,0., 30.);
484 nHitsVsEta_[2] =
dbe_->
book2D(histname+
"AllTracks_Fakes",
"Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax,30,0., 30.);
485 histname=
"h_nHitsVsEta";
486 p_nHitsVsEta_[0] =
dbe_->
bookProfile(histname+
"AllTracks",
"Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax, 30,-0.5, 29.5,
"");
487 p_nHitsVsEta_[1] =
dbe_->
bookProfile(histname+
"AllTracks_Ass",
"Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax, 30,-0.5, 29.5,
"");
488 p_nHitsVsEta_[2] =
dbe_->
bookProfile(histname+
"AllTracks_Fakes",
"Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax, 30,-0.5, 29.5,
"");
492 nHitsVsR_[0] =
dbe_->
book2D(histname+
"AllTracks",
"Photons:Tracks from conversions: # of hits vs radius all tracks" ,rBin,rMin, rMax,30,0., 30.);
493 nHitsVsR_[1] =
dbe_->
book2D(histname+
"AllTracks_Ass",
"Photons:Tracks from conversions: # of hits vs radius all tracks" ,rBin,rMin, rMax,30,0., 30.);
494 nHitsVsR_[2] =
dbe_->
book2D(histname+
"AllTracks_Fakes",
"Photons:Tracks from conversions: # of hits vs radius all tracks" ,rBin,rMin, rMax,30,0., 30.);
496 histname=
"h_nHitsVsR";
497 p_nHitsVsR_[0] =
dbe_->
bookProfile(histname+
"AllTracks",
"Photons:Tracks from conversions: # of hits vs radius all tracks",rBin,rMin, rMax, 30,-0.5, 29.5,
"");
498 p_nHitsVsR_[1] =
dbe_->
bookProfile(histname+
"AllTracks_Ass",
"Photons:Tracks from conversions: # of hits vs radius all tracks",rBin,rMin, rMax, 30,-0.5, 29.5,
"");
499 p_nHitsVsR_[2] =
dbe_->
bookProfile(histname+
"AllTracks_Fakes",
"Photons:Tracks from conversions: # of hits vs radius all tracks",rBin,rMin, rMax, 30,-0.5, 29.5,
"");
502 h_tkChi2_[0] =
dbe_->
book1D(histname+
"AllTracks",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 100, chi2Min, chi2Max);
503 h_tkChi2_[1] =
dbe_->
book1D(histname+
"AllTracks_Ass",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 100, chi2Min, chi2Max);
504 h_tkChi2_[2] =
dbe_->
book1D(histname+
"AllTracks_Fakes",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 100, chi2Min, chi2Max);
506 histname=
"tkChi2Large";
507 h_tkChi2Large_[0] =
dbe_->
book1D(histname+
"AllTracks",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 1000, 0., 5000.0);
508 h_tkChi2Large_[1] =
dbe_->
book1D(histname+
"AllTracks_Ass",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 1000, 0., 5000.0);
509 h_tkChi2Large_[2] =
dbe_->
book1D(histname+
"AllTracks_Fakes",
"Photons:Tracks from conversions: #chi^{2} of all tracks", 1000, 0., 5000.0);
512 histname=
"h2Chi2VsEta";
513 h2_Chi2VsEta_[0]=
dbe_->
book2D(histname+
"All",
" Reco Track #chi^{2} vs #eta: All ",etaBin2,etaMin, etaMax,100, chi2Min, chi2Max);
514 h2_Chi2VsEta_[1]=
dbe_->
book2D(histname+
"All_Ass",
" Reco Track #chi^{2} vs #eta: All ",etaBin2,etaMin, etaMax,100, chi2Min, chi2Max);
515 h2_Chi2VsEta_[2]=
dbe_->
book2D(histname+
"All_Fakes",
" Reco Track #chi^{2} vs #eta: All ",etaBin2,etaMin, etaMax,100, chi2Min, chi2Max);
516 histname=
"pChi2VsEta";
517 p_Chi2VsEta_[0]=
dbe_->
bookProfile(histname+
"All",
" Reco Track #chi^{2} vs #eta : All ",etaBin2,etaMin, etaMax, 100, chi2Min, chi2Max,
"");
518 p_Chi2VsEta_[1]=
dbe_->
bookProfile(histname+
"All_Ass",
" Reco Track #chi^{2} vs #eta : All ",etaBin2,etaMin, etaMax, 100, chi2Min, chi2Max,
"");
519 p_Chi2VsEta_[2]=
dbe_->
bookProfile(histname+
"All_Fakes",
" Reco Track #chi^{2} vs #eta : All ",etaBin2,etaMin, etaMax, 100, chi2Min, chi2Max,
"");
521 histname=
"h2Chi2VsR";
522 h2_Chi2VsR_[0]=
dbe_->
book2D(histname+
"All",
" Reco Track #chi^{2} vs R: All ",rBin,rMin, rMax,100,chi2Min, chi2Max);
523 h2_Chi2VsR_[1]=
dbe_->
book2D(histname+
"All_Ass",
" Reco Track #chi^{2} vs R: All ",rBin,rMin, rMax,100,chi2Min, chi2Max);
524 h2_Chi2VsR_[2]=
dbe_->
book2D(histname+
"All_Fakes",
" Reco Track #chi^{2} vs R: All ",rBin,rMin, rMax,100,chi2Min, chi2Max);
526 p_Chi2VsR_[0]=
dbe_->
bookProfile(histname+
"All",
" Reco Track #chi^{2} vas R : All ",rBin,rMin,rMax, 100,chi2Min, chi2Max,
"");
527 p_Chi2VsR_[1]=
dbe_->
bookProfile(histname+
"All_Ass",
" Reco Track #chi^{2} vas R : All ",rBin,rMin,rMax, 100,chi2Min, chi2Max,
"");
528 p_Chi2VsR_[2]=
dbe_->
bookProfile(histname+
"All_Fakes",
" Reco Track #chi^{2} vas R : All ",rBin,rMin,rMax, 100,chi2Min, chi2Max,
"");
531 h_TkD0_[0]=
dbe_->
book1D(histname+
"All",
" Reco Track D0*q: All ",200,-0.1,60);
532 h_TkD0_[1]=
dbe_->
book1D(histname+
"All_Ass",
" Reco Track D0*q: Barrel ",200,-0.1,60);
533 h_TkD0_[2]=
dbe_->
book1D(histname+
"All_Fakes",
" Reco Track D0*q: Endcap ",200,-0.1,60);
537 histname=
"hTkPtPull";
538 h_TkPtPull_[0]=
dbe_->
book1D(histname+
"All",
" Reco Track Pt pull: All ",100, -20., 10.);
539 histname=
"hTkPtPull";
540 h_TkPtPull_[1]=
dbe_->
book1D(histname+
"Barrel",
" Reco Track Pt pull: Barrel ",100, -20., 10.);
541 histname=
"hTkPtPull";
542 h_TkPtPull_[2]=
dbe_->
book1D(histname+
"Endcap",
" Reco Track Pt pull: Endcap ",100, -20., 10.);
544 histname=
"h2TkPtPullEta";
545 h2_TkPtPull_[0]=
dbe_->
book2D(histname+
"All",
" Reco Track Pt pull: All ",etaBin2,etaMin, etaMax,100, -20., 10.);
546 histname=
"pTkPtPullEta";
547 p_TkPtPull_[0]=
dbe_->
bookProfile(histname+
"All",
" Reco Track Pt pull: All ",etaBin2,etaMin, etaMax, 100, -20., 10.,
" ");
550 histname=
"PtRecVsPtSim";
551 h2_PtRecVsPtSim_[0]=
dbe_->
book2D(histname+
"All",
"Pt Rec vs Pt sim: All ", etBin,etMin,etMax,etBin,etMin, etMax);
552 h2_PtRecVsPtSim_[1]=
dbe_->
book2D(histname+
"Barrel",
"Pt Rec vs Pt sim: Barrel ", etBin,etMin,etMax,etBin,etMin, etMax);
553 h2_PtRecVsPtSim_[2]=
dbe_->
book2D(histname+
"Endcap",
"Pt Rec vs Pt sim: Endcap ", etBin,etMin,etMax,etBin,etMin, etMax);
555 histname=
"photonPtRecVsPtSim";
556 h2_photonPtRecVsPtSim_=
dbe_->
book2D(histname+
"All",
"Pt Rec vs Pt sim: All ", etBin,etMin,etMax,etBin,etMin, etMax);
560 h_match_=
dbe_->
book1D(
"h_match",
" ", 3, -0.5,2.5);
574 edm::LogInfo(
"ConvertedPhotonProducer") <<
" get magnetic field" <<
"\n";
591 delete thePhotonMCTruthFinder_;
603 const float BARL = 1.4442;
605 const float END_HI = 2.5;
611 LogInfo(
"TkConvValidator") <<
"TkConvValidator Analyzing event number: " << e.
id() <<
" Global Counter " << nEvt_ <<
"\n";
626 e.
getByLabel(conversionCollectionProducer_, conversionCollection_ , convHandle);
628 if (!convHandle.isValid()) {
629 edm::LogError(
"ConversionsProducer") <<
"Error! Can't get the collection "<< std::endl;
636 e.
getByLabel(
"offlinePrimaryVertices", vertexHandle);
637 if (!vertexHandle.isValid()) {
638 edm::LogError(
"TrackerOnlyConversionProducer") <<
"Error! Can't get the product primary Vertex Collection "<<
"\n";
643 bool valid_pvtx =
false;
647 if (the_pvtx.isValid() && fabs(the_pvtx.position().z())<=15 && the_pvtx.position().Rho()<=2){
662 std::vector<SimTrack> theSimTracks;
663 std::vector<SimVertex> theSimVertices;
670 bool useTP= parameters_.getParameter<
bool>(
"useTP");
676 e.
getByLabel(
"tpSelecForEfficiency",TPHandleForEff);
677 tpForEfficiency = *(TPHandleForEff.product());
678 e.
getByLabel(
"tpSelecForFakeRate",TPHandleForFakeRate);
679 tpForFakeRate = *(TPHandleForFakeRate.product());
684 theSimTracks.insert(theSimTracks.end(),SimTk->begin(),SimTk->end());
685 theSimVertices.insert(theSimVertices.end(),SimVtx->begin(),SimVtx->end());
686 std::vector<PhotonMCTruth> mcPhotons=thePhotonMCTruthFinder_->find (theSimTracks, theSimVertices);
695 e.
getByLabel(
"iterativeCone5GenJets",
"",GenJetsHandle);
701 std::map<const reco::Track*,TrackingParticleRef> myAss;
702 std::map<const reco::Track*,TrackingParticleRef>::const_iterator itAss;
704 for ( std::vector<PhotonMCTruth>::const_iterator mcPho=mcPhotons.begin(); mcPho !=mcPhotons.end(); mcPho++) {
706 mcConvPt_= (*mcPho).fourMomentum().et();
707 float mcPhi= (*mcPho).fourMomentum().phi();
708 mcPhi_= phiNormalization(mcPhi);
709 mcEta_= (*mcPho).fourMomentum().pseudoRapidity();
710 mcEta_ = etaTransformation(mcEta_, (*mcPho).primaryVertex().z() );
711 mcConvR_= (*mcPho).vertex().perp();
712 mcConvX_= (*mcPho).vertex().x();
713 mcConvY_= (*mcPho).vertex().y();
714 mcConvZ_= (*mcPho).vertex().z();
715 mcConvEta_= (*mcPho).vertex().eta();
716 mcConvPhi_= (*mcPho).vertex().phi();
718 if ( fabs(mcEta_) > END_HI )
continue;
720 if (mcConvPt_<minPhoPtForEffic)
continue;
721 if (fabs(mcEta_)>maxPhoEtaForEffic)
continue;
722 if (fabs(mcConvZ_)>maxPhoZForEffic)
continue;
723 if (mcConvR_>maxPhoRForEffic)
continue;
726 bool goodSimConversion=
false;
727 bool visibleConversion=
false;
728 bool visibleConversionsWithTwoSimTracks=
false;
729 if ( (*mcPho).isAConversion() == 1 ) {
731 h_AllSimConv_[0]->Fill( mcEta_ ) ;
732 h_AllSimConv_[1]->Fill( mcPhi_ );
733 h_AllSimConv_[2]->Fill( mcConvR_ );
734 h_AllSimConv_[3]->Fill( mcConvZ_ );
735 h_AllSimConv_[4]->Fill( (*mcPho).fourMomentum().et());
737 if ( mcConvR_ <15) h_SimConvEtaPix_[0]->Fill( mcEta_ ) ;
739 if ( ( fabs(mcEta_) <= BARL && mcConvR_ <85 ) ||
740 ( fabs(mcEta_) > BARL && fabs(mcEta_) <=END_HI && fabs( (*mcPho).vertex().z() ) < 210 ) ) visibleConversion=
true;
745 for(
size_t i = 0;
i < tpForEfficiency.size(); ++
i){
747 if ( fabs( tp->vx() - (*mcPho).vertex().x() ) < 0.0001 &&
748 fabs( tp->vy() - (*mcPho).vertex().y() ) < 0.0001 &&
749 fabs( tp->vz() - (*mcPho).vertex().z() ) < 0.0001) {
750 theConvTP_.push_back( tp );
755 if ( theConvTP_.size() == 2 ) visibleConversionsWithTwoSimTracks=
true;
756 goodSimConversion=
false;
758 if ( visibleConversion && visibleConversionsWithTwoSimTracks ) goodSimConversion=
true;
759 if ( goodSimConversion ) {
761 h_VisSimConv_[0]->Fill( mcEta_ ) ;
762 h_VisSimConv_[1]->Fill( mcPhi_ );
763 h_VisSimConv_[2]->Fill( mcConvR_ );
764 h_VisSimConv_[3]->Fill( mcConvZ_ );
765 h_VisSimConv_[4]->Fill( (*mcPho).fourMomentum().et());
770 h_simTkPt_ -> Fill ( (*iTrk)->pt() );
771 h_simTkEta_ -> Fill ( (*iTrk)->eta() );
777 if ( ! (visibleConversion && visibleConversionsWithTwoSimTracks ) )
continue;
779 h_simConvVtxRvsZ_[0] ->Fill ( fabs (mcConvZ_), mcConvR_ ) ;
780 if ( fabs(mcEta_) <=1.) {
781 h_simConvVtxRvsZ_[1] ->Fill ( fabs (mcConvZ_), mcConvR_ ) ;
782 h_simConvVtxYvsX_ ->Fill ( mcConvX_, mcConvY_ ) ;
785 h_simConvVtxRvsZ_[2] ->Fill ( fabs (mcConvZ_), mcConvR_ ) ;
795 for (reco::ConversionCollection::const_iterator
conv = convHandle->begin();
conv!=convHandle->end();++
conv) {
798 if ( mergedTracks_ ) {
806 std::vector<edm::RefToBase<reco::Track> >
tracks = aConv.
tracks();
810 if (tracks.size() !=2 || !(vtx.
isValid()))
continue;
824 bool isAssociated =
false;
828 std::vector<std::pair<RefToBase<reco::Track>,
double> > trackV1, trackV2;
830 int tp_1 = 0, tp_2 = 1;
831 if (q1.
find(theConvTP_[0])!=q1.
end()){
832 trackV1 = (std::vector<std::pair<RefToBase<reco::Track>,
double> >) q1[theConvTP_[0]];
833 }
else if (q1.
find(theConvTP_[1])!=q1.
end()){
834 trackV1 = (std::vector<std::pair<RefToBase<reco::Track>,
double> >) q1[theConvTP_[1]];
837 if (q2.
find(theConvTP_[1])!=q2.
end()){
838 trackV2 = (std::vector<std::pair<RefToBase<reco::Track>,
double> >) q2[theConvTP_[1]];
839 }
else if (q2.
find(theConvTP_[0])!=q2.
end()){
840 trackV2 = (std::vector<std::pair<RefToBase<reco::Track>,
double> >) q2[theConvTP_[0]];
843 if (!(trackV1.size()&&trackV2.size()))
845 if (tp_1 == tp_2)
continue;
851 myAss.insert( std::make_pair (tr1.
get(),theConvTP_[tp_1] ) );
852 myAss.insert( std::make_pair (tr2.
get(),theConvTP_[tp_2]) );
863 h_SimConvTwoMTracks_[0]->Fill( mcEta_ ) ;
864 h_SimConvTwoMTracks_[1]->Fill( mcPhi_ );
865 h_SimConvTwoMTracks_[2]->Fill( mcConvR_ );
866 h_SimConvTwoMTracks_[3]->Fill( mcConvZ_ );
867 h_SimConvTwoMTracks_[4]->Fill( (*mcPho).fourMomentum().et());
871 h_SimConvTwoMTracksAndVtxPGT0_[0]->Fill( mcEta_ ) ;
872 h_SimConvTwoMTracksAndVtxPGT0_[1]->Fill( mcPhi_ );
873 h_SimConvTwoMTracksAndVtxPGT0_[2]->Fill( mcConvR_ );
874 h_SimConvTwoMTracksAndVtxPGT0_[3]->Fill( mcConvZ_ );
875 h_SimConvTwoMTracksAndVtxPGT0_[4]->Fill( (*mcPho).fourMomentum().et());
877 if ( chi2Prob > 0.0005) {
878 h_SimConvTwoMTracksAndVtxPGT0005_[0]->Fill( mcEta_ ) ;
879 h_SimConvTwoMTracksAndVtxPGT0005_[1]->Fill( mcPhi_ );
880 h_SimConvTwoMTracksAndVtxPGT0005_[2]->Fill( mcConvR_ );
881 h_SimConvTwoMTracksAndVtxPGT0005_[3]->Fill( mcConvZ_ );
882 h_SimConvTwoMTracksAndVtxPGT0005_[4]->Fill( (*mcPho).fourMomentum().et());
893 for (reco::ConversionCollection::const_iterator
conv = convHandle->begin();
conv!=convHandle->end();++
conv) {
895 if ( mergedTracks_ ) {
904 std::vector<edm::RefToBase<reco::Track> >
tracks = aConv.
tracks();
907 if (tracks.size() !=2 || !(vtx.
isValid()))
continue;
909 bool phoIsInBarrel=
false;
910 bool phoIsInEndcap=
false;
926 if (
sqrt(p1AtVtx.perp2()) >
sqrt(p2AtVtx.perp2()) )
927 dPhiTracksAtVtx = p1AtVtx.phi() - p2AtVtx.phi();
929 dPhiTracksAtVtx = p2AtVtx.phi() - p1AtVtx.phi();
936 if (fabs(refittedMom.eta())< 1.479 ) {
949 h_convEta_[
match][0]->Fill( refittedMom.eta() );
950 h_convPhi_[
match][0]->Fill( refittedMom.phi() );
955 h_convPt_[
match][0]->Fill(
sqrt(refittedMom.perp2()) );
956 h_invMass_[
match][0] ->Fill( invM);
957 h_vtxChi2Prob_[
match][0] ->Fill (chi2Prob);
962 h_DPhiTracksAtVtx_[
match][0]->Fill( dPhiTracksAtVtx);
963 h2_DPhiTracksAtVtxVsEta_->Fill( mcEta_, dPhiTracksAtVtx);
964 h2_DPhiTracksAtVtxVsR_->Fill( mcConvR_, dPhiTracksAtVtx);
965 p_DPhiTracksAtVtxVsEta_->Fill( mcEta_, dPhiTracksAtVtx);
966 p_DPhiTracksAtVtxVsR_->Fill( mcConvR_, dPhiTracksAtVtx);
974 if ( phoIsInBarrel ) {
975 h_invMass_[
match][1] ->Fill(invM);
976 h_vtxChi2Prob_[
match][1] ->Fill (chi2Prob);
978 h_DPhiTracksAtVtx_[
match][1]->Fill( dPhiTracksAtVtx);
983 if ( phoIsInEndcap ) {
984 h_invMass_[
match][2] ->Fill(invM);
985 h_vtxChi2Prob_[
match][2] ->Fill (chi2Prob);
987 h_DPhiTracksAtVtx_[
match][2]->Fill( dPhiTracksAtVtx);
998 for (
unsigned int i=0;
i<tracks.size();
i++) {
1001 d0 = - tracks[
i]->dxy(the_pvtx.position());
1003 d0 = tracks[
i]->d0();
1006 nHitsVsEta_[
match] ->Fill (mcEta_,
float(tracks[
i]->numberOfValidHits()) );
1007 nHitsVsR_[
match] ->Fill (mcConvR_,
float(tracks[
i]->numberOfValidHits()) );
1008 p_nHitsVsEta_[
match] ->Fill (mcEta_,
float(tracks[
i]->numberOfValidHits()) -0.0001);
1009 p_nHitsVsR_[
match] ->Fill (mcConvR_,
float(tracks[
i]->numberOfValidHits()) -0.0001);
1010 h_tkChi2_[
match] ->Fill (tracks[
i]->normalizedChi2() );
1011 h_tkChi2Large_[
match] ->Fill (tracks[
i]->normalizedChi2() );
1012 h2_Chi2VsEta_[
match] ->Fill( mcEta_, tracks[
i]->normalizedChi2() );
1013 h2_Chi2VsR_[
match] ->Fill( mcConvR_, tracks[
i]->normalizedChi2() );
1014 p_Chi2VsEta_[
match] ->Fill( mcEta_, tracks[
i]->normalizedChi2() );
1015 p_Chi2VsR_[
match] ->Fill( mcConvR_, tracks[
i]->normalizedChi2() );
1019 bool associated =
false;
1020 float mcConvPt_= -99999999;
1023 for ( std::vector<PhotonMCTruth>::const_iterator mcPho=mcPhotons.begin(); mcPho !=mcPhotons.end(); mcPho++) {
1024 mcConvPt_= (*mcPho).fourMomentum().et();
1025 float mcPhi= (*mcPho).fourMomentum().phi();
1026 simPV_Z = (*mcPho).primaryVertex().z();
1027 mcPhi_= phiNormalization(mcPhi);
1028 mcEta_= (*mcPho).fourMomentum().pseudoRapidity();
1029 mcEta_ = etaTransformation(mcEta_, (*mcPho).primaryVertex().z() );
1030 mcConvR_= (*mcPho).vertex().perp();
1031 mcConvX_= (*mcPho).vertex().x();
1032 mcConvY_= (*mcPho).vertex().y();
1033 mcConvZ_= (*mcPho).vertex().z();
1034 mcConvEta_= (*mcPho).vertex().eta();
1035 mcConvPhi_= (*mcPho).vertex().phi();
1036 if ( fabs(mcEta_) > END_HI )
continue;
1037 if (mcConvPt_<minPhoPtForPurity)
continue;
1038 if (fabs(mcEta_)>maxPhoEtaForPurity)
continue;
1039 if (fabs(mcConvZ_)>maxPhoZForPurity)
continue;
1040 if (mcConvR_>maxPhoRForEffic)
continue;
1042 if ( (*mcPho).isAConversion() != 1 )
continue;
1043 if (!( ( fabs(mcEta_) <= BARL && mcConvR_ <85 ) ||
1044 ( fabs(mcEta_) > BARL && fabs(mcEta_) <=END_HI && fabs( (*mcPho).vertex().z() ) < 210 ) ) )
1049 for(
size_t i = 0;
i < tpForFakeRate.size(); ++
i){
1051 if ( fabs( tp->vx() - (*mcPho).vertex().x() ) < 0.0001 &&
1052 fabs( tp->vy() - (*mcPho).vertex().y() ) < 0.0001 &&
1053 fabs( tp->vz() - (*mcPho).vertex().z() ) < 0.0001) {
1054 theConvTP_.push_back( tp );
1060 if ( theConvTP_.size() < 2 )
continue;
1066 std::vector<std::pair<TrackingParticleRef, double> > tp1 = p1[tk1];
1067 std::vector<std::pair<TrackingParticleRef, double> > tp2 = p2[tk2];
1068 if (!(tp1.size()&&tp2.size())){
1072 if (tp1.size()&&tp2.size()) {
1075 if (
abs(tpr1->pdgId())==11&&
abs(tpr2->pdgId())==11) {
1076 if ( (tpr1->parentVertex()->sourceTracks_end()-tpr1->parentVertex()->sourceTracks_begin()==1) &&
1077 (tpr2->parentVertex()->sourceTracks_end()-tpr2->parentVertex()->sourceTracks_begin()==1)) {
1078 if (tpr1->parentVertex().
key()==tpr2->parentVertex().
key() && ((*tpr1->parentVertex()->sourceTracks_begin())->
pdgId()==22)) {
1079 mcConvR_ =
sqrt(tpr1->parentVertex()->position().Perp2());
1080 mcConvZ_ = tpr1->parentVertex()->position().z();
1081 mcConvX_ = tpr1->parentVertex()->position().x();
1082 mcConvY_ = tpr1->parentVertex()->position().y();
1083 mcConvEta_ = tpr1->parentVertex()->position().eta();
1084 mcConvPhi_ = tpr1->parentVertex()->position().phi();
1085 mcConvPt_ =
sqrt((*tpr1->parentVertex()->sourceTracks_begin())->momentum().Perp2());
1102 if ( associated ) match=1;
1106 h_match_->Fill(
float(match));
1108 if ( match == 1) nRecConvAss_++;
1109 h_convEta_[
match][0]->Fill( refittedMom.eta() );
1110 h_convPhi_[
match][0]->Fill( refittedMom.phi() );
1113 h_convPt_[
match][0]->Fill(
sqrt(refittedMom.perp2()) );
1114 h_invMass_[
match][0] ->Fill( invM);
1115 h_vtxChi2Prob_[
match][0] ->Fill (chi2Prob);
1116 h_DPhiTracksAtVtx_[
match][0]->Fill( dPhiTracksAtVtx);
1121 h2_photonPtRecVsPtSim_->Fill ( mcConvPt_,
sqrt(refittedMom.perp2()) );
1122 h_convPtRes_[0]->Fill (
sqrt(refittedMom.perp2())/mcConvPt_);
1125 if ( phoIsInBarrel ) {
1126 h_invMass_[
match][1] ->Fill(invM);
1127 h_vtxChi2Prob_[
match][1] ->Fill (chi2Prob);
1128 h_DPhiTracksAtVtx_[
match][1]->Fill( dPhiTracksAtVtx);
1131 if ( match==1) h_convPtRes_[1]->Fill (
sqrt(refittedMom.perp2())/mcConvPt_);
1135 if ( phoIsInEndcap ) {
1136 h_invMass_[
match][2] ->Fill(invM);
1137 h_vtxChi2Prob_[
match][2] ->Fill (chi2Prob);
1138 h_DPhiTracksAtVtx_[
match][2]->Fill( dPhiTracksAtVtx);
1141 if ( match==1) h_convPtRes_[2]->Fill (
sqrt(refittedMom.perp2())/mcConvPt_);
1163 p2_convVtxdRVsRZ_ ->Fill (mcConvZ_,mcConvR_, dR );
1164 p2_convVtxdZVsRZ_ ->Fill (mcConvZ_,mcConvR_, dZ );
1177 if ( phoIsInBarrel ) {
1184 if ( phoIsInEndcap ) {
1196 for (
unsigned int i=0;
i<tracks.size();
i++) {
1199 itAss= myAss.find( tfrb.get() );
1201 nHitsVsEta_[
match] ->Fill (mcEta_,
float(tracks[
i]->numberOfValidHits()) );
1202 nHitsVsR_[
match] ->Fill (mcConvR_,
float(tracks[
i]->numberOfValidHits()) );
1203 p_nHitsVsEta_[
match] ->Fill (mcEta_,
float(tracks[
i]->numberOfValidHits()) -0.0001);
1204 p_nHitsVsR_[
match] ->Fill (mcConvR_,
float(tracks[
i]->numberOfValidHits()) -0.0001);
1205 h_tkChi2_[
match] ->Fill (tracks[
i]->normalizedChi2() );
1206 h_tkChi2Large_[
match] ->Fill (tracks[
i]->normalizedChi2() );
1207 h2_Chi2VsEta_[
match] ->Fill( mcEta_, tracks[
i]->normalizedChi2() );
1208 h2_Chi2VsR_[
match] ->Fill( mcConvR_, tracks[
i]->normalizedChi2() );
1209 p_Chi2VsEta_[
match] ->Fill( mcEta_, tracks[
i]->normalizedChi2() );
1210 p_Chi2VsR_[
match] ->Fill( mcConvR_, tracks[
i]->normalizedChi2() );
1213 d0 = - tracks[
i]->dxy(the_pvtx.position());
1215 d0 = tracks[
i]->d0();
1220 if ( itAss == myAss.end() )
continue;
1223 float simPt =
sqrt( ((*itAss).second)->momentum().perp2() );
1225 float ptres= recPt - simPt ;
1228 h2_PtRecVsPtSim_[0]->Fill ( simPt, recPt);
1229 h_TkPtPull_[0] ->Fill(ptres/pterror);
1230 h2_TkPtPull_[0] ->Fill(mcEta_, ptres/pterror);
1232 if ( phoIsInBarrel ) {
1233 h_TkPtPull_[1] ->Fill(ptres/pterror);
1234 h2_PtRecVsPtSim_[1]->Fill ( simPt, recPt);
1236 if ( phoIsInEndcap ) {
1237 h_TkPtPull_[2] ->Fill(ptres/pterror);
1238 h2_PtRecVsPtSim_[2]->Fill ( simPt, recPt);
1247 h_nConv_[0][0]->Fill (
float(nRecConv_));
1248 h_nConv_[1][0]->Fill (
float(nRecConvAss_));
1261 std::string
outputFileName = parameters_.getParameter<std::string>(
"OutputFileName");
1262 if ( ! isRunCentrally_ ) {
1266 edm::LogInfo(
"TkConvValidator") <<
"Analyzed " << nEvt_ <<
"\n";
1291 stateAtVtx = propag.
propagate(myTSOS, *theBarrel_);
1293 stateAtVtx = propag.
propagate(myTSOS, *theDisk_);
1309 const float PI = 3.1415927;
1313 if(phi > PI) {phi = phi -
TWOPI;}
1314 if(phi < -PI) {phi = phi +
TWOPI;}
1325 const float PI = 3.1415927;
1328 const float R_ECAL = 136.5;
1335 float ZEcal = R_ECAL*sinh(EtaParticle)+Zvertex;
1337 if(ZEcal != 0.0) Theta = atan(R_ECAL/ZEcal);
1338 if(Theta<0.0) Theta = Theta+
PI ;
1341 if( fabs(ETA) > etaBarrelEndcap )
1344 if(EtaParticle<0.0 ) Zend = -Zend ;
1345 float Zlen = Zend - Zvertex ;
1346 float RR = Zlen/sinh(EtaParticle);
1347 Theta = atan(RR/Zend);
1348 if(Theta<0.0) Theta = Theta+
PI ;
1349 ETA = -
log(
tan(0.5*Theta));
const reco::Vertex & conversionVertex() const
returns the reco conversion vertex
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual void endRun(edm::Run &r, edm::EventSetup const &es)
const Vector & momentum() const
track momentum vector
math::XYZVector refittedPairMomentum() const
Conversion tracks momentum from the tracks refitted with vertex constraint.
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
const_iterator end() const
last iterator over the map (read only)
static HepMC::IO_HEPEVT conv
bool quality(ConversionQuality q) const
math::XYZVector recalculateMomentumAtFittedVertex(const MagneticField &mf, const TrackerGeometry &trackerGeom, const edm::RefToBase< reco::Track > &tk, const reco::Vertex &vtx)
bool isValid() const
Tells whether the vertex is valid.
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
std::vector< GenJet > GenJetCollection
collection of GenJet objects
const_iterator find(const key_type &k) const
find element with specified reference key
virtual void analyze(const edm::Event &, const edm::EventSetup &)
double distOfMinimumApproach() const
double pairCotThetaSeparation() const
Delta cot(Theta) where Theta is the angle in the (y,z) plane between the two tracks. Original tracks are used.
#define TWOPI
EgammaCoreTools.
std::vector< Vertex > VertexCollection
collection of Vertex objects
const std::vector< Track > & refittedTracks() const
Returns the container of refitted tracks.
double pairInvariantMass() const
if nTracks=2 returns the pair invariant mass. Original tracks are used here
const Point & position() const
position
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
virtual ~TkConvValidator()
std::vector< edm::RefToBase< reco::Track > > tracks() const
vector of track to base references
double zOfPrimaryVertexFromTracks() const
z coordinate of the photon origin calculated from the track-pair direction and the position of the ve...
float etaTransformation(float a, float b)
float phiNormalization(float &a)
double pt() const
track transverse momentum
TkConvValidator(const edm::ParameterSet &)
Tan< T >::type tan(const T &t)
double chi2() const
chi-squares
float ChiSquaredProbability(double chiSquared, double nrDOF)
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual TrajectoryStateOnSurface propagate(const TrajectoryStateOnSurface &tsos, const Plane &plane) const
Log< T >::type log(const T &t)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
key_type key() const
Accessor for product key.
T const * product() const
static const float etaBarrelEndcap
static const float Z_Endcap
GlobalVector globalMomentum() const
void push_back(const RefToBase< T > &)
static const float R_ECAL
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
std::vector< TrackingParticle > TrackingParticleCollection
virtual void beginRun(edm::Run const &r, edm::EventSetup const &theEventSetup)
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
value_type const * get() const
void setCurrentFolder(const std::string &fullpath)
double dPhiTracksAtVtx() const
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")