File indexing completed on 2024-04-06 12:33:06
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 setenv TYPE Photons
0020 setenv CMSSWver1 3_1_1
0021 setenv CMSSWver2 3_1_2
0022 setenv OLDRELEASE 312PreProd
0023 setenv NEWRELEASE 312PreProd
0024 setenv OLDPRERELEASE
0025 setenv NEWPRERELEASE
0026
0027 setenv OLDRELEASE ${OLDRELEASE}${OLDPRERELEASE}
0028 setenv NEWRELEASE ${NEWRELEASE}${NEWPRERELEASE}
0029
0030
0031
0032
0033
0034
0035 setenv SAMPLE PhotonJetPt15
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060 setenv OLDFILE /afs/cern.ch/user/n/nancy/scratch0/PreProductionValidation/CMSSW_${CMSSWver2}/src/Validation/RecoEgamma/test/results/PhotonJetPt15_XrayFromData.root
0061 setenv NEWFILE /afs/cern.ch/user/n/nancy/scratch0/PreProductionValidation/CMSSW_${CMSSWver2}/src/Validation/RecoEgamma/test/results/PhotonJetPt15_XrayFromData.root
0062
0063
0064
0065
0066
0067 if ($SAMPLE == SingleGammaPt10IDEAL) then
0068
0069 setenv OLDFILE /data/test/CMSSW_${CMSSWver1}/src/Validation/RecoEgamma/test/PhotonValidationRelVal${OLDRELEASE}_SingleGammaPt10.root
0070 setenv NEWFILE /data/test/CMSSW_${CMSSWver2}/src/Validation/RecoEgamma/test/PhotonValidationRelVal${NEWRELEASE}_SingleGammaPt10.root
0071
0072 else if ($SAMPLE == SingleGammaPt35IDEAL) then
0073
0074 setenv OLDFILE /data/test/CMSSW_${CMSSWver1}/src/Validation/RecoEgamma/test/PhotonValidationRelVal${OLDRELEASE}_SingleGammaPt35.root
0075 setenv NEWFILE /data/test/CMSSW_${CMSSWver2}/src/Validation/RecoEgamma/test/PhotonValidationRelVal${NEWRELEASE}_SingleGammaPt35.root
0076
0077 else if ($SAMPLE == H130GGgluonfusionSTARTUP) then
0078
0079 setenv OLDFILE /data/test/CMSSW_${CMSSWver1}/src/Validation/RecoEgamma/test/PhotonValidationRelVal${OLDRELEASE}_H130GGgluonfusion.root
0080 setenv NEWFILE /data/test/CMSSW_${CMSSWver2}/src/Validation/RecoEgamma/test/PhotonValidationRelVal${NEWRELEASE}_H130GGgluonfusion.root
0081
0082 else if ($SAMPLE == GammaJets_Pt_80_120STARTUP) then
0083
0084 setenv OLDFILE /data/test/CMSSW_${CMSSWver1}/src/Validation/RecoEgamma/test/PhotonValidationRelVal${OLDRELEASE}_GammaJets_Pt_80_120.root
0085 setenv NEWFILE /data/test/CMSSW_${CMSSWver2}/src/Validation/RecoEgamma/test/PhotonValidationRelVal${NEWRELEASE}_GammaJets_Pt_80_120.root
0086
0087 else if ($SAMPLE == QCD_Pt_80_120STARTUP) then
0088
0089 setenv OLDFILE /data/test/CMSSW_${CMSSWver}_${OLDPRERELEASE}/src/Validation/RecoEgamma/test/PhotonValidationRelVal${OLDRELEASE}_QCD_Pt_80_120.root
0090 setenv NEWFILE /data/test/CMSSW_${CMSSWver}_${NEWPRERELEASE}/src/Validation/RecoEgamma/test/PhotonValidationRelVal${NEWRELEASE}_QCD_Pt_80_120.root
0091
0092
0093 endif
0094
0095
0096
0097
0098
0099
0100 setenv CURRENTDIR $PWD
0101 setenv OUTPATH /afs/cern.ch/cms/Physics/egamma/www/validation
0102 cd $OUTPATH
0103 if (! -d $NEWRELEASE) then
0104 mkdir $NEWRELEASE
0105 endif
0106 setenv OUTPATH $OUTPATH/$NEWRELEASE
0107 cd $OUTPATH
0108 if (! -d ${TYPE}) then
0109 mkdir ${TYPE}
0110 endif
0111
0112 setenv OUTPATH $OUTPATH/${TYPE}
0113
0114 setenv OUTDIR $OUTPATH/${SAMPLE}
0115 if (! -d $OUTDIR) then
0116 cd $OUTPATH
0117 mkdir $OUTDIR
0118 cd $OUTDIR
0119 mkdir gifs
0120 endif
0121 cd $OUTDIR
0122
0123
0124
0125
0126 if ( $TYPE == Photons ) then
0127
0128
0129 cat > efficiencyForPhotons <<EOF
0130 recoEffVsEta
0131 recoEffVsPhi
0132 recoEffVsEt
0133 deadChVsEta
0134 deadChVsPhi
0135 deadChVsEt
0136
0137 EOF
0138
0139 cat > scaledhistosForPhotons <<EOF
0140
0141 gamgamMassAll
0142 gamgamMassBarrel
0143 gamgamMassEndcap
0144 gamgamMassNoConvAll
0145 gamgamMassNoConvBarrel
0146 gamgamMassNoConvEndcap
0147 gamgamMassConvAll
0148 gamgamMassConvBarrel
0149 gamgamMassConvEndcap
0150 scEta
0151 scPhi
0152 scEAll
0153 scEtAll
0154 phoEta
0155 phoPhi
0156 phoDEta
0157 phoDPhi
0158 phoEAll
0159 phoEtAll
0160 eResAll
0161 eResBarrel
0162 eResEndcap
0163 eResunconvAll
0164 eResunconvBarrel
0165 eResunconvEndcap
0166 eResconvAll
0167 eResconvBarrel
0168 eResconvEndcap
0169 r9All
0170 r9Barrel
0171 r9Endcap
0172 r1All
0173 r1Barrel
0174 r1Endcap
0175 r2All
0176 r2Barrel
0177 r2Endcap
0178 sigmaIetaIetaAll
0179 sigmaIetaIetaBarrel
0180 sigmaIetaIetaEndcap
0181 hOverEAll
0182 hOverEBarrel
0183 hOverEEndcap
0184 ecalRecHitSumEtConeDR04Barrel
0185 ecalRecHitSumEtConeDR04Endcap
0186 hcalTowerSumEtConeDR04Barrel
0187 hcalTowerSumEtConeDR04Endcap
0188 isoTrkSolidConeDR04All
0189 isoTrkSolidConeDR04Barrel
0190 isoTrkSolidConeDR04Endcap
0191 nTrkSolidConeDR04All
0192 nTrkSolidConeDR04Barrel
0193 nTrkSolidConeDR04Endcap
0194
0195
0196
0197 EOF
0198
0199 cat > unscaledhistosForPhotons <<EOF
0200 pEResVsR9All
0201 pEResVsR9Barrel
0202 pEResVsR9Endcap
0203 scpEResVsR9All
0204 scpEResVsR9Barrel
0205 scpEResVsR9Endcap
0206 pEResVsEtAll
0207 pEResVsEtBarrel
0208 pEResVsEtEndcap
0209 pEcalRecHitSumEtConeDR04VsEtaAll
0210 pEcalRecHitSumEtConeDR04VsEtBarrel
0211 pEcalRecHitSumEtConeDR04VsEtEndcap
0212
0213 EOF
0214
0215
0216
0217 cat > 2dhistosForPhotons <<EOF
0218 R9VsEtaAll
0219 R1VsEtaAll
0220 R2VsEtaAll
0221 sigmaIetaIetaVsEtaAll
0222 hOverEVsEtaAll
0223 ecalRecHitSumEtConeDR04VsEtaAll
0224 hcalTowerSumEtConeDR04VsEtaAll
0225 isoTrkSolidConeDR04VsEtaAll
0226 nTrkSolidConeDR04VsEtaAll
0227 R9VsEtAll
0228 R1VsEtAll
0229 R2VsEtAll
0230 sigmaIetaIetaVsEtAll
0231 hOverEVsEtAll
0232 ecalRecHitSumEtConeDR04VsEtBarrel
0233 ecalRecHitSumEtConeDR04VsEtEndcap
0234 hcalTowerSumEtConeDR04VsEtBarrel
0235 hcalTowerSumEtConeDR04VsEtEndcap
0236 isoTrkSolidConeDR04VsEtAll
0237 nTrkSolidConeDR04VsEtAll
0238 eResVsR9All
0239 eResVsR9Barrel
0240 eResVsR9Endcap
0241 sceResVsR9All
0242 sceResVsR9Barrel
0243 sceResVsR9Endcap
0244
0245 EOF
0246
0247
0248
0249 cat > efficiencyForConvertedPhotons <<EOF
0250
0251 convEffVsEtaTwoTracks
0252 convEffVsPhiTwoTracks
0253 convEffVsRTwoTracks
0254 convEffVsZTwoTracks
0255 convEffVsEtTwoTracks
0256 convEffVsEtaTwoTracksAndVtxProbGT0
0257
0258 EOF
0259
0260
0261
0262 cat > scaledhistosForConvertedPhotons <<EOF
0263
0264 convEta2
0265 convPhi
0266 convEResAll
0267 convEResBarrel
0268 convEResEndcap
0269 EoverPtracksAll
0270 EoverPtracksBarrel
0271 EoverPtracksEndcap
0272 PoverEtracksAll
0273 PoverEtracksBarrel
0274 PoverEtracksEndcap
0275 mvaOutAll
0276 mvaOutBarrel
0277 mvaOutEndcap
0278
0279 EOF
0280
0281
0282
0283
0284
0285
0286 cat > unscaledhistosForConvertedPhotons <<EOF
0287 pEoverEtrueVsEtaAll
0288 pEoverPVsEtaAll
0289 pEoverPVsRAll
0290
0291 EOF
0292
0293
0294 cat > 2dhistosForConvertedPhotons <<EOF
0295 convVtxRvsZAll
0296 EOF
0297
0298 cat > projectionsForConvertedPhotons <<EOF
0299 convVtxRvsZBarrel
0300 convVtxRvsZEndcap
0301 EOF
0302
0303
0304
0305 cat > fakeRateForConvertedPhotons <<EOF
0306
0307 convFakeRateVsEtaTwoTracks
0308 convFakeRateVsPhiTwoTracks
0309 convFakeRateVsRTwoTracks
0310 convFakeRateVsZTwoTracks
0311 convFakeRateVsEtTwoTracks
0312
0313 EOF
0314
0315
0316
0317 cat > scaledhistosForTracks <<EOF
0318
0319 tkChi2AllTracks
0320 hTkPtPullAll
0321 hTkPtPullBarrel
0322 hTkPtPullEndcap
0323 hDPhiTracksAtVtxAll
0324 hDCotTracksAll
0325 hDEtaTracksAtEcalAll
0326 hDPhiTracksAtEcalAll
0327 eBcOverTkPoutAll
0328 eBcOverTkPoutBarrel
0329 eBcOverTkPoutEndcap
0330 zPVFromTracks
0331 dzPVFromTracks
0332 vtxChi2ProbAll
0333 vtxChi2ProbBarrel
0334 vtxChi2ProbEndcap
0335
0336 EOF
0337
0338 cat > unscaledhistosForTracks <<EOF
0339 h_nHitsVsEtaAllTracks
0340 h_nHitsVsRAllTracks
0341 pChi2VsEtaAll
0342 pChi2VsRAll
0343 pDCotTracksVsEtaAll
0344 pDCotTracksVsRAll
0345 pDPhiTracksAtEcalVsEtaAll
0346 pDPhiTracksAtEcalVsRAll
0347 pConvVtxdRVsR
0348 pConvVtxdRVsEta
0349 pdzPVVsR
0350
0351
0352 EOF
0353
0354
0355
0356 endif
0357
0358
0359
0360 if (-e validation.C) rm validation.C
0361 touch validation.C
0362 cat > begin.C <<EOF
0363 {
0364 TFile *file_old = TFile::Open("$OLDFILE");
0365 TFile *file_new = TFile::Open("$NEWFILE");
0366
0367 EOF
0368 cat begin.C >>& validation.C
0369 rm begin.C
0370
0371 setenv N 1
0372
0373
0374
0375 foreach i (`cat efficiencyForPhotons`)
0376 cat > temp$N.C <<EOF
0377
0378 TCanvas *c$i = new TCanvas("c$i");
0379 c$i->SetFillColor(10);
0380 file_old->cd("DQMData/EgammaV/PhotonValidator/Efficiencies");
0381 $i->SetStats(0);
0382 if ( $i==deadChVsEta || $i==deadChVsPhi || $i==deadChVsEt ) {
0383 $i->SetMinimum(0.);
0384 $i->SetMaximum(0.2);
0385 } else {
0386 $i->SetMinimum(0.);
0387 $i->SetMaximum(1.1);
0388 }
0389 $i->SetLineColor(kPink+8);
0390 $i->SetMarkerColor(kPink+8);
0391 $i->SetMarkerStyle(20);
0392 $i->SetMarkerSize(1);
0393 $i->SetLineWidth(1);
0394 $i->Draw();
0395
0396 file_new->cd("DQMData/EgammaV/PhotonValidator/Efficiencies");
0397 $i->SetStats(0);
0398 $i->SetMinimum(0.);
0399 $i->SetMaximum(1.1);
0400 $i->SetLineColor(kBlack);
0401 $i->SetMarkerColor(kBlack);
0402 $i->SetMarkerStyle(20);
0403 $i->SetMarkerSize(1);
0404 $i->SetLineWidth(1);
0405 $i->Draw("same");
0406 c$i->SaveAs("gifs/$i.gif");
0407
0408 EOF
0409 setenv N `expr $N + 1`
0410 end
0411
0412
0413
0414
0415 foreach i (`cat scaledhistosForPhotons`)
0416 cat > temp$N.C <<EOF
0417 TCanvas *c$i = new TCanvas("c$i");
0418 c$i->SetFillColor(10);
0419 file_new->cd("DQMData/EgammaV/PhotonValidator/Photons");
0420 Double_t mnew=$i->GetMaximum();
0421 Double_t nnew=$i->GetEntries();
0422 file_old->cd("DQMData/EgammaV/PhotonValidator/Photons");
0423 Double_t mold=$i->GetMaximum();
0424 Double_t nold=$i->GetEntries();
0425 $i->SetStats(0);
0426 $i->SetMinimum(0.);
0427 if ( mnew > mold)
0428 $i->SetMaximum(mnew+mnew*0.2);
0429 else
0430 $i->SetMaximum(mold+mold*0.2);
0431 //$i->SetMaximum(mold+mold*0.2);
0432 $i->SetLineColor(kPink+8);
0433 $i->SetFillColor(kPink+8);
0434 //$i->SetLineWidth(3);
0435 $i->Draw();
0436 file_new->cd("DQMData/EgammaV/PhotonValidator/Photons");
0437 Double_t nnew=$i->GetEntries();
0438 $i->SetStats(0);
0439 $i->SetLineColor(kBlack);
0440 $i->SetMarkerColor(kBlack);
0441 $i->SetMarkerStyle(20);
0442 $i->SetMarkerSize(1);
0443 //$i->SetLineWidth(1);
0444 //$i->Scale(nold/nnew);
0445 $i->Draw("e1same");
0446 c$i->SaveAs("gifs/$i.gif");
0447
0448 EOF
0449 setenv N `expr $N + 1`
0450 end
0451
0452
0453
0454 foreach i (`cat unscaledhistosForPhotons`)
0455 cat > temp$N.C <<EOF
0456 TCanvas *c$i = new TCanvas("c$i");
0457 c$i->SetFillColor(10);
0458 file_old->cd("DQMData/EgammaV/PhotonValidator/Photons");
0459 $i->SetStats(0);
0460 if ( $i==pEcalRecHitSumEtConeDR04VsEtaAll ) {
0461 $i->GetYaxis()->SetRangeUser(0.,3.);
0462 } else if ( $i==pEcalRecHitSumEtConeDR04VsEtBarrel )
0463 { $i->GetYaxis()->SetRangeUser(0.,20.);
0464 } else if ( $i==pEcalRecHitSumEtConeDR04VsEtEndcap )
0465 {
0466 $i->GetYaxis()->SetRangeUser(0.,20.);
0467 } else {
0468 $i->SetMinimum(0.8);
0469 $i->SetMaximum(1.1);
0470 }
0471 $i->SetLineColor(kPink+8);
0472 $i->SetMarkerColor(kPink+8);
0473 $i->SetMarkerStyle(20);
0474 $i->SetMarkerSize(1);
0475 $i->SetLineWidth(1);
0476 $i->Draw();
0477 file_new->cd("DQMData/EgammaV/PhotonValidator/Photons");
0478 $i->SetStats(0);
0479 $i->SetLineColor(kBlack);
0480 $i->SetMarkerColor(kBlack);
0481 $i->SetMarkerStyle(20);
0482 $i->SetMarkerSize(1);
0483 $i->SetLineWidth(1);
0484 $i->Draw("e1same");
0485 c$i->SaveAs("gifs/$i.gif");
0486
0487 EOF
0488 setenv N `expr $N + 1`
0489 end
0490
0491
0492
0493
0494
0495 foreach i (`cat 2dhistosForPhotons`)
0496 cat > temp$N.C <<EOF
0497 TCanvas *c$i = new TCanvas("c$i");
0498 c$i->SetFillColor(10);
0499 file_old->cd("DQMData/EgammaV/PhotonValidator/Photons");
0500 $i->SetStats(0);
0501 $i->SetMinimum(0.);
0502 $i->SetMarkerColor(kPink+8);
0503 $i->SetMarkerStyle(2);
0504 $i->SetMarkerSize(0.2);
0505 if ( $i==ecalRecHitSumEtConeDR04VsEtaAll || $i==ecalRecHitSumEtConeDR04VsEtBarrel || $i==ecalRecHitSumEtConeDR04VsEtEndcap ) $i->GetYaxis()->SetRangeUser(0.,20.);
0506 if ( $i==hcalTowerSumEtConeDR04VsEtaAll || $i==hcalTowerSumEtConeDR04VsEtBarrel || $i==hcalTowerSumEtConeDR04VsEtEndcap ) $i->GetYaxis()->SetRangeUser(0.,20.);
0507 $i->Draw();
0508 file_new->cd("DQMData/EgammaV/PhotonValidator/Photons");
0509 $i->SetStats(0);
0510 $i->SetMarkerColor(kBlack);
0511 $i->SetMarkerStyle(2);
0512 $i->SetMarkerSize(0.2);
0513 $i->Draw("same");
0514 c$i->SaveAs("gifs/$i.gif");
0515
0516 EOF
0517 setenv N `expr $N + 1`
0518 end
0519
0520
0521
0522 foreach i (`cat efficiencyForConvertedPhotons`)
0523 cat > temp$N.C <<EOF
0524 TCanvas *c$i = new TCanvas("c$i");
0525 c$i->SetFillColor(10);
0526 file_old->cd("DQMData/EgammaV/PhotonValidator/Efficiencies");
0527 $i->SetStats(0);
0528 $i->SetMinimum(0.);
0529 $i->SetMaximum(1.);
0530 $i->SetLineColor(kPink+8);
0531 $i->SetMarkerColor(kPink+8);
0532 $i->SetMarkerStyle(20);
0533 $i->SetMarkerSize(1);
0534 $i->SetLineWidth(1);
0535 $i->Draw();
0536 file_new->cd("DQMData/EgammaV/PhotonValidator/Efficiencies");
0537 $i->SetStats(0);
0538 $i->SetMinimum(0.);
0539 $i->SetMaximum(1.);
0540 $i->SetLineColor(kBlack);
0541 $i->SetMarkerColor(kBlack);
0542 $i->SetMarkerStyle(20);
0543 $i->SetMarkerSize(1);
0544 $i->SetLineWidth(1);
0545 $i->Draw("same");
0546 c$i->SaveAs("gifs/$i.gif");
0547
0548 EOF
0549 setenv N `expr $N + 1`
0550 end
0551
0552
0553
0554
0555 foreach i (`cat scaledhistosForConvertedPhotons`)
0556 cat > temp$N.C <<EOF
0557 TCanvas *c$i = new TCanvas("c$i");
0558 c$i->SetFillColor(10);
0559 file_new->cd("DQMData/EgammaV/PhotonValidator/ConversionInfo");
0560 Double_t mnew=$i->GetMaximum();
0561 file_old->cd("DQMData/EgammaV/PhotonValidator/ConversionInfo");
0562 Double_t mold=$i->GetMaximum();
0563 $i->SetStats(0);
0564 $i->SetMinimum(0.);
0565 if ( mnew > mold)
0566 $i->SetMaximum(mnew+mnew*0.1);
0567 else
0568 $i->SetMaximum(mold+mold*0.1);
0569 $i->SetLineColor(kPink+8);
0570 $i->SetFillColor(kPink+8);
0571 $i->SetLineWidth(3);
0572 $i->Draw();
0573 Double_t nold=$i->GetEntries();
0574 file_new->cd("DQMData/EgammaV/PhotonValidator/ConversionInfo");
0575 Double_t nnew=$i->GetEntries();
0576 $i->SetStats(0);
0577 $i->SetLineColor(kBlack);
0578 $i->SetMarkerColor(kBlack);
0579 $i->SetMarkerStyle(20);
0580 $i->SetMarkerSize(1);
0581 $i->SetLineWidth(1);
0582 $i->Scale(nold/nnew);
0583 $i->Draw("e1same");
0584 c$i->SaveAs("gifs/$i.gif");
0585
0586 EOF
0587 setenv N `expr $N + 1`
0588 end
0589
0590
0591
0592
0593 foreach i (`cat unscaledhistosForConvertedPhotons`)
0594 cat > temp$N.C <<EOF
0595 TCanvas *c$i = new TCanvas("c$i");
0596 c$i->SetFillColor(10);
0597 file_old->cd("DQMData/EgammaV/PhotonValidator/ConversionInfo");
0598 $i->SetStats(0);
0599 $i->SetMinimum(0.6);
0600 $i->SetLineColor(kPink+8);
0601 $i->SetMarkerColor(kPink+8);
0602 $i->SetMarkerStyle(20);
0603 $i->SetMarkerSize(1);
0604 $i->SetLineWidth(1);
0605 $i->Draw();
0606 file_new->cd("DQMData/EgammaV/PhotonValidator/ConversionInfo");
0607 $i->SetStats(0);
0608 $i->SetLineColor(kBlack);
0609 $i->SetMarkerColor(kBlack);
0610 $i->SetMarkerStyle(20);
0611 $i->SetMarkerSize(1);
0612 $i->SetLineWidth(1);
0613 $i->Draw("e1same");
0614 c$i->SaveAs("gifs/$i.gif");
0615
0616 EOF
0617 setenv N `expr $N + 1`
0618 end
0619
0620
0621
0622 foreach i (`cat fakeRateForConvertedPhotons`)
0623 cat > temp$N.C <<EOF
0624 TCanvas *c$i = new TCanvas("c$i");
0625 c$i->SetFillColor(10);
0626 file_old->cd("DQMData/EgammaV/PhotonValidator/Efficiencies");
0627 $i->SetStats(0);
0628 $i->SetMinimum(0.);
0629 $i->SetMaximum(1.);
0630 $i->SetLineColor(kPink+8);
0631 $i->SetMarkerColor(kPink+8);
0632 $i->SetMarkerStyle(20);
0633 $i->SetMarkerSize(1);
0634 $i->SetLineWidth(1);
0635 $i->Draw();
0636 file_new->cd("DQMData/EgammaV/PhotonValidator/Efficiencies");
0637 $i->SetStats(0);
0638 $i->SetMinimum(0.);
0639 $i->SetLineColor(kBlack);
0640 $i->SetMarkerColor(kBlack);
0641 $i->SetMarkerStyle(20);
0642 $i->SetMarkerSize(1);
0643 $i->SetLineWidth(1);
0644 $i->Draw("same");
0645 c$i->SaveAs("gifs/$i.gif");
0646
0647 EOF
0648 setenv N `expr $N + 1`
0649 end
0650
0651
0652 foreach i (`cat 2dhistosForConvertedPhotons`)
0653 cat > temp$N.C <<EOF
0654 TCanvas *c$i = new TCanvas("c$i");
0655 c$i->SetFillColor(10);
0656 file_old->cd("DQMData/EgammaV/PhotonValidator/ConversionInfo");
0657 $i->SetStats(0);
0658 $i->SetMinimum(0.);
0659 $i->SetMarkerColor(kPink+8);
0660 $i->Draw();
0661 file_new->cd("DQMData/EgammaV/PhotonValidator/ConversionInfo");
0662 $i->SetStats(0);
0663 $i->SetMarkerColor(kBlack);
0664 $i->Draw("same");
0665 c$i->SaveAs("gifs/$i.gif");
0666
0667 EOF
0668 setenv N `expr $N + 1`
0669 end
0670
0671 foreach i (`cat projectionsForConvertedPhotons`)
0672 cat > temp$N.C <<EOF
0673 TCanvas *c$i = new TCanvas("c$i");
0674 c$i->SetFillColor(10);
0675 file_old->cd("DQMData/EgammaV/PhotonValidator/ConversionInfo");
0676 if ($i==convVtxRvsZBarrel)
0677 TH1D *tmp1$i= $i->ProjectionY();
0678 else if ($i==convVtxRvsZEndcap)
0679 TH1D *tmp1$i= $i->ProjectionX();
0680 Double_t nold=tmp1$i->GetEntries();
0681 Double_t mold=tmp1$i->GetMaximum();
0682 file_new->cd("DQMData/EgammaV/PhotonValidator/ConversionInfo");
0683 //TH1D *tmp2$i= $i->ProjectionY();
0684 if ($i==convVtxRvsZBarrel)
0685 TH1D *tmp2$i= $i->ProjectionY();
0686 else if ($i==convVtxRvsZEndcap)
0687 TH1D *tmp2$i= $i->ProjectionX();
0688 Double_t nnew=tmp2$i->GetEntries();
0689 Double_t mnew=tmp2$i->GetMaximum();
0690 tmp1$i->SetStats(0);
0691 tmp1$i->SetMinimum(0.);
0692 if ( mnew > mold)
0693 tmp1$i->SetMaximum(mnew+mnew*0.2);
0694 else
0695 tmp1$i->SetMaximum(mold+mold*0.2);
0696 tmp1$i->SetLineColor(kPink+8);
0697 tmp1$i->SetFillColor(kPink+8);
0698 tmp1$i->SetLineWidth(3);
0699 tmp1$i->Draw();
0700 tmp2$i->SetStats(0);
0701 tmp2$i->SetLineColor(kBlack);
0702 tmp2$i->SetLineWidth(3);
0703 tmp2$i->Scale(nold/nnew);
0704 tmp2$i->Draw("same");
0705 c$i->SaveAs("gifs/$i.gif");
0706
0707 EOF
0708 setenv N `expr $N + 1`
0709 end
0710
0711
0712
0713
0714 foreach i (`cat scaledhistosForTracks`)
0715 cat > temp$N.C <<EOF
0716 TCanvas *c$i = new TCanvas("c$i");
0717 c$i->SetFillColor(10);
0718 file_new->cd("DQMData/EgammaV/PhotonValidator/ConversionInfo");
0719 Double_t mnew=$i->GetMaximum();
0720 file_old->cd("DQMData/EgammaV/PhotonValidator/ConversionInfo");
0721 Double_t mold=$i->GetMaximum();
0722 $i->SetStats(0);
0723 $i->SetMinimum(0.);
0724 if ( mnew > mold)
0725 $i->SetMaximum(mnew+mnew*0.1);
0726 else
0727 $i->SetMaximum(mold+mold*0.1);
0728 $i->SetLineColor(kPink+8);
0729 $i->SetFillColor(kPink+8);
0730 $i->SetLineWidth(3);
0731 $i->Draw();
0732 Double_t nold=$i->GetEntries();
0733 file_new->cd("DQMData/EgammaV/PhotonValidator/ConversionInfo");
0734 Double_t nnew=$i->GetEntries();
0735 $i->SetStats(0);
0736 $i->SetLineColor(kBlack);
0737 $i->SetMarkerColor(kBlack);
0738 $i->SetMarkerStyle(20);
0739 $i->SetMarkerSize(1);
0740 $i->SetLineWidth(1);
0741 $i->Scale(nold/nnew);
0742 $i->Draw("e1same");
0743 c$i->SaveAs("gifs/$i.gif");
0744
0745 EOF
0746 setenv N `expr $N + 1`
0747 end
0748
0749 foreach i (`cat unscaledhistosForTracks`)
0750 cat > temp$N.C <<EOF
0751 TCanvas *c$i = new TCanvas("c$i");
0752 c$i->SetFillColor(10);
0753 file_new->cd("DQMData/EgammaV/PhotonValidator/ConversionInfo");
0754 Double_t mnew=$i->GetMaximum();
0755 file_old->cd("DQMData/EgammaV/PhotonValidator/ConversionInfo");
0756 Double_t mold=$i->GetMaximum();
0757 $i->SetStats(0);
0758 if ($i==pDCotTracksVsEtaAll || $i==pDCotTracksVsRAll ) {
0759 $i->SetMinimum(-0.05);
0760 $i->SetMaximum(0.05);
0761 } else {
0762 $i->SetMinimum(0.);
0763 if ( mnew > mold)
0764 $i->SetMaximum(mnew+mnew*0.4);
0765 else
0766 $i->SetMaximum(mold+mold*0.4);
0767 }
0768
0769 $i->SetLineColor(kPink+8);
0770 $i->SetMarkerColor(kPink+8);
0771 $i->SetMarkerStyle(20);
0772 $i->SetMarkerSize(1);
0773 $i->SetLineWidth(1);
0774 $i->Draw();
0775 Double_t nold=$i->GetEntries();
0776 file_new->cd("DQMData/EgammaV/PhotonValidator/ConversionInfo");
0777 Double_t nnew=$i->GetEntries();
0778 $i->SetStats(0);
0779 $i->SetLineColor(kBlack);
0780 $i->SetMarkerColor(kBlack);
0781 $i->SetMarkerStyle(20);
0782 $i->SetMarkerSize(1);
0783 $i->SetLineWidth(1);
0784 //$i->Scale(nold/nnew);
0785 $i->Draw("e1same");
0786 c$i->SaveAs("gifs/$i.gif");
0787
0788 EOF
0789 setenv N `expr $N + 1`
0790 end
0791
0792
0793
0794
0795
0796 setenv NTOT `expr $N - 1`
0797 setenv N 1
0798 while ( $N <= $NTOT )
0799 cat temp$N.C >>& validation.C
0800 rm temp$N.C
0801 setenv N `expr $N + 1`
0802 end
0803
0804 cat > end.C <<EOF
0805 }
0806 EOF
0807 cat end.C >>& validation.C
0808 rm end.C
0809
0810
0811 if ( $TYPE == PixelMatchGsfElectron ) then
0812 setenv ANALYZER PixelMatchGsfElectronAnalyzer
0813 setenv CFG read_gsfElectrons
0814 else if ( $TYPE == Photons ) then
0815 setenv ANALYZER PhotonValidator
0816 setenv CFG PhotonValidator_cfg
0817 endif
0818
0819 if (-e validation.html) rm validation.html
0820 if (-e validationPlotsTemplate.html) rm validationPlotsTemplate.html
0821 cp ${CURRENTDIR}/validationPlotsTemplate.html validationPlotsTemplate.html
0822 touch validation.html
0823 cat > begin.html <<EOF
0824 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
0825 <html>
0826 <head>
0827 <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
0828 <title>$NEWRELEASE vs $OLDRELEASE $TYPE validation</title>
0829 </head>
0830
0831 <h1>$NEWRELEASE vs $OLDRELEASE $TYPE validation
0832 <br>
0833 $SAMPLE
0834 </h1>
0835
0836 <p>The following plots were made using <a href="http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/Validation/RecoEgamma/src/$ANALYZER.cc">Validation/RecoEgamma/src/$ANALYZER</a>,
0837 using <a href="http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/Validation/RecoEgamma/test/$CFG.py">Validation/RecoEgamma/test/$CFG.py</a>
0838 <p>The script used to make the plots is <a href="validation.C">here</a>.
0839 <br>
0840 In all plots below, $OLDRELEASE is in purple , $NEWRELEASE in black.
0841 <br>
0842 Click on the plots to see them enlarged.
0843 <br>
0844 Responsible: N. Marinelli
0845 <br>
0846 <br>
0847
0848
0849
0850 EOF
0851 cat begin.html >>& validation.html
0852 rm begin.html
0853 cat validationPlotsTemplate.html >>& validation.html
0854 rm validationPlotsTemplate.html
0855
0856 rm scaledhistosForPhotons
0857 rm unscaledhistosForPhotons
0858 rm 2dhistosForPhotons
0859 rm scaledhistosForConvertedPhotons
0860 rm unscaledhistosForConvertedPhotons
0861 rm efficiencyForPhotons
0862 rm efficiencyForConvertedPhotons
0863 rm fakeRateForConvertedPhotons
0864 rm 2dhistosForConvertedPhotons
0865 rm projectionsForConvertedPhotons
0866 rm scaledhistosForTracks
0867 rm unscaledhistosForTracks
0868
0869
0870
0871
0872 echo "cd $OUTDIR"
0873
0874
0875
0876
0877
0878
0879
0880 root -b -l -q validation.C
0881 cd $CURRENTDIR
0882 echo "Then you can view your valdation plots here:"
0883 echo "http://cmsdoc.cern.ch/Physics/egamma/www/$OUTPATH/validation.html"