diff --git a/.gitignore b/.gitignore
index d175ee75b4a..30937e3b9bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,3 +44,6 @@ prod_alcarereco
*.png
*.eps
*.pdf
+
+LSF*
+ZFitter/output*
\ No newline at end of file
diff --git a/EOverPCalibration/bin/BuildFile.xml b/EOverPCalibration/bin/BuildFile.xml
index 2893a8a0e07..f664bc3cae6 100644
--- a/EOverPCalibration/bin/BuildFile.xml
+++ b/EOverPCalibration/bin/BuildFile.xml
@@ -14,6 +14,7 @@
+
diff --git a/EOverPCalibration/bin/CalibrationMomentum.cpp b/EOverPCalibration/bin/CalibrationMomentum.cpp
index 934ea6e4165..0a57d966007 100644
--- a/EOverPCalibration/bin/CalibrationMomentum.cpp
+++ b/EOverPCalibration/bin/CalibrationMomentum.cpp
@@ -64,11 +64,7 @@ int main(int argc, char** argv)
std::string configFileName = argv[1];
-#ifdef CMSSW_7_2_X
std::shared_ptr parameterSet = edm::readConfig(configFileName);
-#else
- boost::shared_ptr parameterSet = edm::readConfig(configFileName);
-#endif
edm::ParameterSet Options = parameterSet -> getParameter("Options");
// parameterSet.reset();
@@ -161,7 +157,7 @@ int main(int argc, char** argv)
//--- weights for MC
TFile weightsFile (WeightforMC.c_str(),"READ");
- TH1F* hweights = (TH1F*)weightsFile.Get("hweights");
+ TH1F* hweights = (TH1F*)weightsFile.Get("pileup");
float w[100];
for (int ibin = 1; ibin < hweights->GetNbinsX()+1; ibin++){
@@ -184,93 +180,54 @@ int main(int argc, char** argv)
std::cout << " MC : " << ntu_MC->GetEntries() << " entries in MC sample" << std::endl;
// observables
- int isW;
- float mZ;
- float scEta, scPhi;
- float scEta2, scPhi2;
- float eleEta, elePhi;
- float eleEta2, elePhi2;
- float scEne, scEneReg, scEt, scERaw, e3x3, R9;
- float scEne2, scEneReg2, scEt2, scERaw2, e3x32, R92;
- float charge, charge2;
- float pTK,pTK2;
- int iphiSeed, ele1_ix, ele1_iy, ele1_iz;
- int iphiSeed2, ele2_ix, ele2_iy, ele2_iz;
- int npu;
+ // int isW;
+ float invMass_SC;
+ float etaSCEle[3], phiSCEle[3];
+ float etaEle[3], phiEle[3];
+ float energySCEle[3], rawEnergySCEle[3], R9Ele[3];
+ int chargeEle[3];
+ float pAtVtxGsfEle[3];
+ float seedXSCEle[3], seedYSCEle[3];
+ int NPU[1];
+ float PtEle[3];
+ int ele1_iz, ele2_iz;
// Set branch addresses for Data
ntu_DA->SetBranchStatus("*",0);
- ntu_DA->SetBranchStatus("isW", 1); ntu_DA->SetBranchAddress("isW", &isW);
- ntu_DA->SetBranchStatus("ele1_eta", 1); ntu_DA->SetBranchAddress("ele1_eta", &eleEta);
- ntu_DA->SetBranchStatus("ele2_eta", 1); ntu_DA->SetBranchAddress("ele2_eta", &eleEta2);
- ntu_DA->SetBranchStatus("ele1_phi", 1); ntu_DA->SetBranchAddress("ele1_phi", &elePhi);
- ntu_DA->SetBranchStatus("ele2_phi", 1); ntu_DA->SetBranchAddress("ele2_phi", &elePhi2);
- ntu_DA->SetBranchStatus("ele1_scEta", 1); ntu_DA->SetBranchAddress("ele1_scEta", &scEta);
- ntu_DA->SetBranchStatus("ele2_scEta", 1); ntu_DA->SetBranchAddress("ele2_scEta", &scEta2);
- ntu_DA->SetBranchStatus("ele1_scPhi", 1); ntu_DA->SetBranchAddress("ele1_scPhi", &scPhi);
- ntu_DA->SetBranchStatus("ele2_scPhi", 1); ntu_DA->SetBranchAddress("ele2_scPhi", &scPhi2);
- ntu_DA->SetBranchStatus("ele1_scE", 1); ntu_DA->SetBranchAddress("ele1_scE", &scEne);
- ntu_DA->SetBranchStatus("ele2_scE", 1); ntu_DA->SetBranchAddress("ele2_scE", &scEne2);
- ntu_DA->SetBranchStatus("ele1_scE_regression", 1); ntu_DA->SetBranchAddress("ele1_scE_regression", &scEneReg);
- ntu_DA->SetBranchStatus("ele2_scE_regression", 1); ntu_DA->SetBranchAddress("ele2_scE_regression", &scEneReg2);
- ntu_DA->SetBranchStatus("ele1_scEt", 1); ntu_DA->SetBranchAddress("ele1_scEt",&scEt);
- ntu_DA->SetBranchStatus("ele2_scEt", 1); ntu_DA->SetBranchAddress("ele2_scEt",&scEt2);
- ntu_DA->SetBranchStatus("ele1_scERaw", 1); ntu_DA->SetBranchAddress("ele1_scERaw", &scERaw);
- ntu_DA->SetBranchStatus("ele2_scERaw", 1); ntu_DA->SetBranchAddress("ele2_scERaw", &scERaw2);
- ntu_DA->SetBranchStatus("ele1_e3x3", 1); ntu_DA->SetBranchAddress("ele1_e3x3", &e3x3);
- ntu_DA->SetBranchStatus("ele2_e3x3", 1); ntu_DA->SetBranchAddress("ele2_e3x3", &e3x32);
- ntu_DA->SetBranchStatus("ele1ele2_scM", 1); ntu_DA->SetBranchAddress("ele1ele2_scM", &mZ);
- ntu_DA->SetBranchStatus("ele1_charge", 1); ntu_DA->SetBranchAddress("ele1_charge", &charge);
- ntu_DA->SetBranchStatus("ele2_charge", 1); ntu_DA->SetBranchAddress("ele2_charge", &charge2);
- ntu_DA->SetBranchStatus("ele1_tkP", 1); ntu_DA->SetBranchAddress("ele1_tkP", &pTK);
- ntu_DA->SetBranchStatus("ele2_tkP", 1); ntu_DA->SetBranchAddress("ele2_tkP", &pTK2);
- ntu_DA->SetBranchStatus("ele1_seedIphi", 1); ntu_DA->SetBranchAddress("ele1_seedIphi", &iphiSeed);
- ntu_DA->SetBranchStatus("ele2_seedIphi", 1); ntu_DA->SetBranchAddress("ele2_seedIphi", &iphiSeed2);
- ntu_DA->SetBranchStatus("ele1_seedIx", 1); ntu_DA->SetBranchAddress("ele1_seedIx", &ele1_ix);
- ntu_DA->SetBranchStatus("ele2_seedIx", 1); ntu_DA->SetBranchAddress("ele2_seedIx", &ele2_ix);
- ntu_DA->SetBranchStatus("ele1_seedIy", 1); ntu_DA->SetBranchAddress("ele1_seedIy", &ele1_iy);
- ntu_DA->SetBranchStatus("ele2_seedIy", 1); ntu_DA->SetBranchAddress("ele2_seedIy", &ele2_iy);
- ntu_DA->SetBranchStatus("ele1_seedZside", 1); ntu_DA->SetBranchAddress("ele1_seedZside", &ele1_iz);
- ntu_DA->SetBranchStatus("ele2_seedZside", 1); ntu_DA->SetBranchAddress("ele2_seedZside", &ele2_iz);
-
+ // ntu_DA->SetBranchStatus("isW", 1); ntu_DA->SetBranchAddress("isW", &isW);
+ ntu_DA->SetBranchStatus("etaEle", 1); ntu_DA->SetBranchAddress("etaEle", &etaEle);
+ ntu_DA->SetBranchStatus("phiEle", 1); ntu_DA->SetBranchAddress("phiEle", &phiEle);
+ ntu_DA->SetBranchStatus("etaSCEle", 1); ntu_DA->SetBranchAddress("etaSCEle", &etaSCEle);
+ ntu_DA->SetBranchStatus("phiSCEle", 1); ntu_DA->SetBranchAddress("phiSCEle", &phiSCEle);
+ ntu_DA->SetBranchStatus("energySCEle", 1); ntu_DA->SetBranchAddress("energySCEle", &energySCEle);
+ ntu_DA->SetBranchStatus("rawEnergySCEle", 1); ntu_DA->SetBranchAddress("rawEnergySCEle", &rawEnergySCEle);
+ ntu_DA->SetBranchStatus("PtEle", 1); ntu_DA->SetBranchAddress("PtEle", &PtEle);
+ ntu_DA->SetBranchStatus("invMass_SC", 1); ntu_DA->SetBranchAddress("invMass_SC", &invMass_SC);
+ ntu_DA->SetBranchStatus("chargeEle", 1); ntu_DA->SetBranchAddress("chargeEle", &chargeEle);
+ ntu_DA->SetBranchStatus("pAtVtxGsfEle", 1); ntu_DA->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle);
+ ntu_DA->SetBranchStatus("seedXSCEle", 1); ntu_DA->SetBranchAddress("seedXSCEle", &seedXSCEle);
+ ntu_DA->SetBranchStatus("seedYSCEle", 1); ntu_DA->SetBranchAddress("seedYSCEle", &seedYSCEle);
+
// Set branch addresses for MC
ntu_MC->SetBranchStatus("*",0);
- ntu_MC->SetBranchStatus("isW", 1); ntu_MC->SetBranchAddress("isW", &isW);
- ntu_MC->SetBranchStatus("ele1_eta", 1); ntu_MC->SetBranchAddress("ele1_eta", &eleEta);
- ntu_MC->SetBranchStatus("ele2_eta", 1); ntu_MC->SetBranchAddress("ele2_eta", &eleEta2);
- ntu_MC->SetBranchStatus("ele1_phi", 1); ntu_MC->SetBranchAddress("ele1_phi", &elePhi);
- ntu_MC->SetBranchStatus("ele2_phi", 1); ntu_MC->SetBranchAddress("ele2_phi", &elePhi2);
- ntu_MC->SetBranchStatus("ele1_scEta", 1); ntu_MC->SetBranchAddress("ele1_scEta", &scEta);
- ntu_MC->SetBranchStatus("ele2_scEta", 1); ntu_MC->SetBranchAddress("ele2_scEta", &scEta2);
- ntu_MC->SetBranchStatus("ele1_scPhi", 1); ntu_MC->SetBranchAddress("ele1_scPhi", &scPhi);
- ntu_MC->SetBranchStatus("ele2_scPhi", 1); ntu_MC->SetBranchAddress("ele2_scPhi", &scPhi2);
- ntu_MC->SetBranchStatus("ele1_scE", 1); ntu_MC->SetBranchAddress("ele1_scE", &scEne);
- ntu_MC->SetBranchStatus("ele2_scE", 1); ntu_MC->SetBranchAddress("ele2_scE", &scEne2);
- ntu_MC->SetBranchStatus("ele1_scE_regression", 1); ntu_MC->SetBranchAddress("ele1_scE_regression", &scEneReg);
- ntu_MC->SetBranchStatus("ele2_scE_regression", 1); ntu_MC->SetBranchAddress("ele2_scE_regression", &scEneReg2);
- ntu_MC->SetBranchStatus("ele1_scEt", 1); ntu_MC->SetBranchAddress("ele1_scEt",&scEt);
- ntu_MC->SetBranchStatus("ele2_scEt", 1); ntu_MC->SetBranchAddress("ele2_scEt",&scEt2);
- ntu_MC->SetBranchStatus("ele1_scERaw", 1); ntu_MC->SetBranchAddress("ele1_scERaw", &scERaw);
- ntu_MC->SetBranchStatus("ele2_scERaw", 1); ntu_MC->SetBranchAddress("ele2_scERaw", &scERaw2);
- ntu_MC->SetBranchStatus("ele1_e3x3", 1); ntu_MC->SetBranchAddress("ele1_e3x3", &e3x3);
- ntu_MC->SetBranchStatus("ele2_e3x3", 1); ntu_MC->SetBranchAddress("ele2_e3x3", &e3x32);
- ntu_MC->SetBranchStatus("ele1ele2_scM", 1); ntu_MC->SetBranchAddress("ele1ele2_scM", &mZ);
- ntu_MC->SetBranchStatus("ele1_charge", 1); ntu_MC->SetBranchAddress("ele1_charge", &charge);
- ntu_MC->SetBranchStatus("ele2_charge", 1); ntu_MC->SetBranchAddress("ele2_charge", &charge2);
- ntu_MC->SetBranchStatus("ele1_tkP", 1); ntu_MC->SetBranchAddress("ele1_tkP", &pTK);
- ntu_MC->SetBranchStatus("ele2_tkP", 1); ntu_MC->SetBranchAddress("ele2_tkP", &pTK2);
- ntu_MC->SetBranchStatus("ele1_seedIphi", 1); ntu_MC->SetBranchAddress("ele1_seedIphi", &iphiSeed);
- ntu_MC->SetBranchStatus("ele2_seedIphi", 1); ntu_MC->SetBranchAddress("ele2_seedIphi", &iphiSeed2);
- ntu_MC->SetBranchStatus("ele1_seedIx", 1); ntu_MC->SetBranchAddress("ele1_seedIx", &ele1_ix);
- ntu_MC->SetBranchStatus("ele2_seedIx", 1); ntu_MC->SetBranchAddress("ele2_seedIx", &ele2_ix);
- ntu_MC->SetBranchStatus("ele1_seedIy", 1); ntu_MC->SetBranchAddress("ele1_seedIy", &ele1_iy);
- ntu_MC->SetBranchStatus("ele2_seedIy", 1); ntu_MC->SetBranchAddress("ele2_seedIy", &ele2_iy);
- ntu_MC->SetBranchStatus("ele1_seedZside", 1); ntu_MC->SetBranchAddress("ele1_seedZside", &ele1_iz);
- ntu_MC->SetBranchStatus("ele2_seedZside", 1); ntu_MC->SetBranchAddress("ele2_seedZside", &ele2_iz);
+ // ntu_MC->SetBranchStatus("isW", 1); ntu_MC->SetBranchAddress("isW", &isW);
+ ntu_MC->SetBranchStatus("etaEle", 1); ntu_MC->SetBranchAddress("etaEle", &etaEle);
+ ntu_MC->SetBranchStatus("phiEle", 1); ntu_MC->SetBranchAddress("phiEle", &phiEle);
+ ntu_MC->SetBranchStatus("etaSCEle", 1); ntu_MC->SetBranchAddress("etaSCEle", &etaSCEle);
+ ntu_MC->SetBranchStatus("phiSCEle", 1); ntu_MC->SetBranchAddress("phiSCEle", &phiSCEle);
+ ntu_MC->SetBranchStatus("energySCEle", 1); ntu_MC->SetBranchAddress("energySCEle", &energySCEle);
+ ntu_MC->SetBranchStatus("rawEnergySCEle", 1); ntu_MC->SetBranchAddress("rawEnergySCEle", &rawEnergySCEle);
+ ntu_MC->SetBranchStatus("PtEle", 1); ntu_MC->SetBranchAddress("PtEle", &PtEle);
+ ntu_MC->SetBranchStatus("invMass_SC", 1); ntu_MC->SetBranchAddress("invMass_SC", &invMass_SC);
+ ntu_MC->SetBranchStatus("chargeEle", 1); ntu_MC->SetBranchAddress("chargeEle", &chargeEle);
+ ntu_MC->SetBranchStatus("pAtVtxGsfEle", 1); ntu_MC->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle);
+ ntu_MC->SetBranchStatus("seedXSCEle", 1); ntu_MC->SetBranchAddress("seedXSCEle", &seedXSCEle);
+ ntu_MC->SetBranchStatus("seedYSCEle", 1); ntu_MC->SetBranchAddress("seedYSCEle", &seedYSCEle);
+
if(usePUweights)
{
- ntu_MC->SetBranchStatus("PUit_NumInteractions", 1); ntu_MC->SetBranchAddress("PUit_NumInteractions", &npu);
+ ntu_MC->SetBranchStatus("NPU", 1); ntu_MC->SetBranchAddress("NPU", &NPU);
}
@@ -471,134 +428,138 @@ int main(int argc, char** argv)
ntu_MC->GetEntry(entry);
- if( isW == 1 ) continue;
- if( fabs(scEta) > etaMax ) continue;
- if( fabs(scEta2) > eta2Max ) continue;
- if( scEt < 20. ) continue;
- if( scEt2 < 20. ) continue;
-
- R9 = e3x3 / scERaw;
- R92 = e3x32 / scERaw2;
-
+ // if( isW == 1 ) continue;
+ if( fabs(etaSCEle[0]) > etaMax ) continue;
+ if( fabs(etaSCEle[1]) > eta2Max ) continue;
+ if( PtEle[0] < 20. ) continue;
+ if( PtEle[1] < 20. ) continue;
+
+ if ( fabs(etaEle[0]) < 1.479) ele1_iz = 0;
+ else if (etaEle[0]>0) ele1_iz = 1;
+ else ele1_iz = -1;
+
+ if ( fabs(etaEle[1]) < 1.479) ele2_iz = 0;
+ else if (etaEle[1]>0) ele2_iz = 1;
+ else ele2_iz = -1;
//--- PU weights
float ww = 1.;
- if( usePUweights ) ww *= w[npu];
-
-
+ if( usePUweights ) ww *= w[NPU[0]];
//--- set the mass for ele1
- var = ( mZ * sqrt(pTK/scEne) * sqrt(scEneReg2/scEne2) ) / 91.19;
+ // var = ( invMass_SC * sqrt(pAtVtxGsfEle[0]/energySCEle[0]) * sqrt(scEneReg2/energySCEle[1]) ) / 91.19;
+ var = ( invMass_SC * sqrt(pAtVtxGsfEle[0]/energySCEle[0]) ) / 91.19;
// simulate e+/e- asymmetry
- //if( charge > 0 ) ww *= 1.*(6/5);
+ //if( chargeEle[0] > 0 ) ww *= 1.*(6/5);
//else ww *= 1.*(4/5);
-
+
// MC - BARREL - ele1
- if( ele1_iz == 0 )
+ if( ele1_iz == 0 )
{
// fill MC templates
- int modPhi = int(iphiSeed/(360./nPhiBinsTempEB));
+ int modPhi = int(seedYSCEle[0]/(360./nPhiBinsTempEB));
if( modPhi == nPhiBinsTempEB ) modPhi = 0;
- int regionId = templIndexEB(typeEB,eleEta,charge,R9);
+ int regionId = templIndexEB(typeEB,etaEle[0],chargeEle[0],R9Ele[0]);
if( regionId == -1 ) continue;
(h_template_EB.at(modPhi)).at(regionId) -> Fill(var*var,ww);
// fill MC histos in eta bins
- int PhibinEB = hPhiBinEB->FindBin(elePhi) - 1;
+ int PhibinEB = hPhiBinEB->FindBin(phiEle[0]) - 1;
if( PhibinEB == nPhiBinsEB ) PhibinEB = 0;
-
+
(h_EoP_EB.at(PhibinEB)).at(regionId) -> Fill(var*var,ww); // This is MC
- h_phi_mc_EB[regionId] -> Fill(scPhi,ww);
+ h_phi_mc_EB[regionId] -> Fill(phiSCEle[0],ww);
}
// MC - ENDCAP - ele1
else
{
- int iphi = eRings->GetEndcapIphi(ele1_ix,ele1_iy,ele1_iz);
+ int iphi = eRings->GetEndcapIphi(seedXSCEle[0],seedYSCEle[0],ele1_iz);
- if( ele1_iz == 1 )mapConversionEEp -> SetBinContent(ele1_ix,ele1_iy,scEta);
- if( ele1_iz == -1 )mapConversionEEm -> SetBinContent(ele1_ix,ele1_iy,scEta);
+ if( ele1_iz == 1 )mapConversionEEp -> SetBinContent(seedXSCEle[0],seedYSCEle[0],etaSCEle[0]);
+ if( ele1_iz == -1 )mapConversionEEm -> SetBinContent(seedXSCEle[0],seedYSCEle[0],etaSCEle[0]);
// fill MC templates
int modPhi = int (iphi/(360./nPhiBinsTempEE));
if( modPhi == nPhiBinsTempEE ) modPhi = 0;
- int regionId = templIndexEE(typeEE,eleEta,charge,R9);
+ int regionId = templIndexEE(typeEE,etaEle[0],chargeEle[0],R9Ele[0]);
if( regionId == -1 ) continue;
(h_template_EE.at(modPhi)).at(regionId) -> Fill(var*var,ww);
// fill MC histos in eta bins
- int PhibinEE = hPhiBinEE->FindBin(elePhi) - 1;
+ int PhibinEE = hPhiBinEE->FindBin(phiEle[0]) - 1;
if( PhibinEE == nPhiBinsEE ) PhibinEE = 0;
(h_EoP_EE.at(PhibinEE)).at(regionId) -> Fill(var*var,ww); // This is MC
- h_phi_mc_EE[regionId] -> Fill(scPhi,ww);
+ h_phi_mc_EE[regionId] -> Fill(phiSCEle[0],ww);
}
//--- set the mass for ele2
- var = ( mZ * sqrt(pTK2/scEne2) * sqrt(scEneReg/scEne) ) / 91.19;
+ // var = ( invMass_SC * sqrt(pAtVtxGsfEle[1]/energySCEle[1]) * sqrt(scEneReg/energySCEle[0]) ) / 91.19;
+ var = ( invMass_SC * sqrt(pAtVtxGsfEle[1]/energySCEle[1]) ) / 91.19;
// simulate e+/e- asymmetry
- //if( charge > 0 ) ww *= 1.*(6/5);
+ //if( chargeEle[0] > 0 ) ww *= 1.*(6/5);
//else ww *= 1.*(4/5);
// MC - BARREL - ele2
if( ele2_iz == 0)
{
// fill MC templates
- int modPhi = int (iphiSeed2/(360./nPhiBinsTempEB));
+ int modPhi = int (seedYSCEle[1]/(360./nPhiBinsTempEB));
if( modPhi == nPhiBinsTempEB ) modPhi = 0;
- int regionId = templIndexEB(typeEB,eleEta2,charge2,R92);
+ int regionId = templIndexEB(typeEB,etaEle[1],chargeEle[1],R9Ele[1]);
if(regionId == -1) continue;
(h_template_EB.at(modPhi)).at(regionId)->Fill(var*var,ww);
// fill MC histos in eta bins
- int PhibinEB = hPhiBinEB->FindBin(elePhi2) - 1;
+ int PhibinEB = hPhiBinEB->FindBin(phiEle[1]) - 1;
if( PhibinEB==nPhiBinsEB ) PhibinEB = 0;
(h_EoP_EB.at(PhibinEB)).at(regionId) -> Fill(var*var,ww); // This is MC
- h_phi_mc_EB[regionId]->Fill(scPhi2,ww);
+ h_phi_mc_EB[regionId]->Fill(phiSCEle[1],ww);
}
// MC - ENDCAP - ele2
else
{
- if( ele2_iz == 1 ) mapConversionEEp -> SetBinContent(ele2_ix,ele2_iy,scEta2);
- if( ele2_iz == -1 ) mapConversionEEm -> SetBinContent(ele2_ix,ele2_iy,scEta2);
+ if( ele2_iz == 1 ) mapConversionEEp -> SetBinContent(seedXSCEle[1],seedYSCEle[1],etaSCEle[1]);
+ if( ele2_iz == -1 ) mapConversionEEm -> SetBinContent(seedXSCEle[1],seedYSCEle[1],etaSCEle[1]);
- int iphi = eRings->GetEndcapIphi(ele2_ix,ele2_iy,ele2_iz);
+ int iphi = eRings->GetEndcapIphi(seedXSCEle[1],seedYSCEle[1],ele2_iz);
// fill MC templates
int modPhi = int (iphi/(360./nPhiBinsTempEE));
if( modPhi == nPhiBinsTempEE ) modPhi = 0;
- int regionId = templIndexEE(typeEE,eleEta2,charge2,R92);
+ int regionId = templIndexEE(typeEE,etaEle[1],chargeEle[1],R9Ele[1]);
if(regionId == -1) continue;
(h_template_EE.at(modPhi)).at(regionId) -> Fill(var*var,ww);
// fill MC histos in eta bins
- int PhibinEE = hPhiBinEE->FindBin(elePhi2) - 1;
+ int PhibinEE = hPhiBinEE->FindBin(phiEle[1]) - 1;
if(PhibinEE==nPhiBinsEE) PhibinEE = 0;
(h_EoP_EE.at(PhibinEE)).at(regionId) -> Fill(var*var,ww); // This is MC
- h_phi_mc_EE[regionId]->Fill(scPhi2,ww);
+ h_phi_mc_EE[regionId]->Fill(phiSCEle[1],ww);
}
- h_et_mc ->Fill(scEt, ww);
- h_et_mc ->Fill(scEt2,ww);
+ h_et_mc ->Fill(PtEle[0], ww);
+ h_et_mc ->Fill(PtEle[1],ww);
}
@@ -616,97 +577,105 @@ int main(int argc, char** argv)
ntu_DA->GetEntry(entry);
- if( isW == 1 ) continue;
- if( fabs(scEta) > etaMax ) continue;
- if( fabs(scEta2) > eta2Max ) continue;
- if( scEt < 20. ) continue;
- if( scEt2 < 20. ) continue;
-
- R9 = e3x3 / scERaw;
- R92 = e3x32 / scERaw2;
+ // if( isW == 1 ) continue;
+ if( fabs(etaSCEle[0]) > etaMax ) continue;
+ if( fabs(etaSCEle[1]) > eta2Max ) continue;
+ if( PtEle[0] < 20. ) continue;
+ if( PtEle[1] < 20. ) continue;
float ww = 1.;
+ if ( fabs(etaEle[0]) < 1.479) ele1_iz = 0;
+ else if (etaEle[0]>0) ele1_iz = 1;
+ else ele1_iz = -1;
+
+ if ( fabs(etaEle[1]) < 1.479) ele2_iz = 0;
+ else if (etaEle[1]>0) ele2_iz = 1;
+ else ele2_iz = -1;
//--- set the mass for ele1
- if( ele1_iz == 0 ) var = ( mZ * sqrt(pTK/scEne) * sqrt(scEneReg2/scEne2) ) / 91.19;
- else var = ( mZ * sqrt(pTK/scEne) * sqrt(scEneReg2/scEne2) ) / 91.19;
+ // if( ele1_iz == 0 ) var = ( invMass_SC * sqrt(pAtVtxGsfEle[0]/energySCEle[0]) * sqrt(scEneReg2/energySCEle[1]) ) / 91.19;
+ // else var = ( invMass_SC * sqrt(pAtVtxGsfEle[0]/energySCEle[0]) * sqrt(scEneReg2/energySCEle[1]) ) / 91.19;
+ if( ele1_iz == 0 ) var = ( invMass_SC * sqrt(pAtVtxGsfEle[0]/energySCEle[0]) ) / 91.19;
+ else var = ( invMass_SC * sqrt(pAtVtxGsfEle[0]/energySCEle[0]) ) / 91.19;
// simulate e+/e- asymmetry
- //if( charge > 0 ) ww *= 1.*(6/5);
+ //if( chargeEle[0] > 0 ) ww *= 1.*(6/5);
//else ww *= 1.*(4/5);
// DATA - BARREL - ele1
if( ele1_iz == 0 )
{
- int PhibinEB = hPhiBinEB->FindBin(elePhi) - 1;
+ int PhibinEB = hPhiBinEB->FindBin(phiEle[0]) - 1;
if( PhibinEB == nPhiBinsEB ) PhibinEB = 0;
- int regionId = templIndexEB(typeEB,eleEta,charge,R9);
+ int regionId = templIndexEB(typeEB,etaEle[0],chargeEle[0],R9Ele[0]);
if(regionId == -1) continue;
(h_EoC_EB.at(PhibinEB)).at(regionId) -> Fill(var*var,ww); // This is DATA
- (h_Phi_EB.at(PhibinEB)).at(regionId) -> Fill(elePhi);
- h_phi_data_EB[regionId]->Fill(elePhi);
+ (h_Phi_EB.at(PhibinEB)).at(regionId) -> Fill(phiEle[0]);
+ h_phi_data_EB[regionId]->Fill(phiEle[0]);
}
// DATA - ENDCAP - ele1
else
{
- if( ele1_iz == 1 ) mapConversionEEp -> SetBinContent(ele1_ix,ele1_iy,scEta);
- if( ele1_iz == -1 ) mapConversionEEm -> SetBinContent(ele1_ix,ele1_iy,scEta);
+ if( ele1_iz == 1 ) mapConversionEEp -> SetBinContent(seedXSCEle[0],seedYSCEle[0],etaSCEle[0]);
+ if( ele1_iz == -1 ) mapConversionEEm -> SetBinContent(seedXSCEle[0],seedYSCEle[0],etaSCEle[0]);
- int PhibinEE = hPhiBinEE->FindBin(elePhi) - 1;
+ int PhibinEE = hPhiBinEE->FindBin(phiEle[0]) - 1;
if( PhibinEE == nPhiBinsEE ) PhibinEE = 0;
- int regionId = templIndexEE(typeEE,eleEta,charge,R9);
+ int regionId = templIndexEE(typeEE,etaEle[0],chargeEle[0],R9Ele[0]);
if( regionId == -1 ) continue;
(h_EoC_EE.at(PhibinEE)).at(regionId) -> Fill(var*var,ww); // This is DATA
- (h_Phi_EE.at(PhibinEE)).at(regionId) -> Fill(elePhi);
- h_phi_data_EE[regionId] -> Fill(elePhi);
+ (h_Phi_EE.at(PhibinEE)).at(regionId) -> Fill(phiEle[0]);
+ h_phi_data_EE[regionId] -> Fill(phiEle[0]);
}
//--- set the mass for ele2
- if( ele2_iz == 0 ) var = ( mZ * sqrt(pTK2/scEne2) * sqrt(scEneReg/scEne) ) / 91.19;
- else var = ( mZ * sqrt(pTK2/scEne2) * sqrt(scEneReg/scEne) ) / 91.19;
+ // if( ele2_iz == 0 ) var = ( invMass_SC * sqrt(pAtVtxGsfEle[1]/energySCEle[1]) * sqrt(scEneReg/energySCEle[0]) ) / 91.19;
+ // else var = ( invMass_SC * sqrt(pAtVtxGsfEle[1]/energySCEle[1]) * sqrt(scEneReg/energySCEle[0]) ) / 91.19;
+ if( ele2_iz == 0 ) var = ( invMass_SC * sqrt(pAtVtxGsfEle[1]/energySCEle[1]) ) / 91.19;
+ else var = ( invMass_SC * sqrt(pAtVtxGsfEle[1]/energySCEle[1]) ) / 91.19;
// simulate e+/e- asymmetry
- //if( charge2 > 0 ) ww *= 1.*(6/5);
+ //if( chargeEle[0]Ele[1] > 0 ) ww *= 1.*(6/5);
//else ww *= 1.*(4/5);
// DATA - BARREL - ele2
if( ele2_iz == 0 )
{
- int PhibinEB = hPhiBinEB->FindBin(elePhi2) - 1;
+ int PhibinEB = hPhiBinEB->FindBin(phiEle[1]) - 1;
if( PhibinEB == nPhiBinsEB ) PhibinEB = 0;
- int regionId = templIndexEB(typeEB,eleEta2,charge2,R92);
+ int regionId = templIndexEB(typeEB,etaEle[1],chargeEle[1],R9Ele[1]);
if( regionId == -1 ) continue;
(h_EoC_EB.at(PhibinEB)).at(regionId) -> Fill(var*var,ww); // This is DATA
- (h_Phi_EB.at(PhibinEB)).at(regionId) -> Fill(elePhi2);
- h_phi_data_EB[regionId] -> Fill(elePhi2);
+ (h_Phi_EB.at(PhibinEB)).at(regionId) -> Fill(phiEle[1]);
+ h_phi_data_EB[regionId] -> Fill(phiEle[1]);
}
else
{
- if( ele2_iz == 1 ) mapConversionEEp -> SetBinContent(ele2_ix,ele2_iy,scEta2);
- if( ele2_iz == -1 ) mapConversionEEm -> SetBinContent(ele2_ix,ele2_iy,scEta2);
+ if( ele2_iz == 1 ) mapConversionEEp -> SetBinContent(seedXSCEle[1],seedYSCEle[1],etaSCEle[1]);
+ if( ele2_iz == -1 ) mapConversionEEm -> SetBinContent(seedXSCEle[1],seedYSCEle[1],etaSCEle[1]);
- int PhibinEE = hPhiBinEE->FindBin(elePhi2) - 1;
+ int PhibinEE = hPhiBinEE->FindBin(phiEle[1]) - 1;
if( PhibinEE == nPhiBinsEE ) PhibinEE = 0;
- int regionId = templIndexEE(typeEE,eleEta2,charge2,R92);
+ int regionId = templIndexEE(typeEE,etaEle[1],chargeEle[1],R9Ele[1]);
if( regionId == -1 ) continue;
(h_EoC_EE.at(PhibinEE)).at(regionId) -> Fill(var*var,ww); // This is DATA
- (h_Phi_EE.at(PhibinEE)).at(regionId) -> Fill(elePhi2);
- h_phi_data_EE[regionId] ->Fill(elePhi2);
+ (h_Phi_EE.at(PhibinEE)).at(regionId) -> Fill(phiEle[1]);
+ h_phi_data_EE[regionId] ->Fill(phiEle[1]);
}
- h_et_data ->Fill(scEt);
- h_et_data ->Fill(scEt2);
+ h_et_data ->Fill(PtEle[0]);
+ h_et_data ->Fill(PtEle[1]);
}
std::cout << "End loop: Analyze events " << endl;
@@ -813,6 +782,7 @@ int main(int argc, char** argv)
std::cout << "***** Fitting MC EB " << flPhi << " (" << i << "," << j << "): ";
TFitResultPtr rp;
int fStatus;
+ std::cout<<"entries: "<<(h_EoP_EB.at(i)).at(j)->GetEntries()< SetParameter(1, 0.99);
diff --git a/EOverPCalibration/bin/CalibrationPlots.cpp b/EOverPCalibration/bin/CalibrationPlots.cpp
index 26bb1ac17bf..2ded28dfefd 100644
--- a/EOverPCalibration/bin/CalibrationPlots.cpp
+++ b/EOverPCalibration/bin/CalibrationPlots.cpp
@@ -60,11 +60,7 @@ int main(int argc, char **argv)
}
std::string configFileName = argv[1];
-#ifdef CMSSW_7_2_X
std::shared_ptr parameterSet = edm::readConfig(configFileName);
-#else
- boost::shared_ptr parameterSet = edm::readConfig(configFileName);
-#endif
edm::ParameterSet Options = parameterSet -> getParameter("Options");
@@ -113,6 +109,17 @@ int main(int argc, char **argv)
else{ std::cout<<" Exit from code, no odd input file"< > corrMomentum(1);
+
+ for (int k=0; k<1; k++) {
+ for(int i = 0; i <2; ++i){
+ std::cout<Get(Name)) );
+ }
+ }
//------------
@@ -154,6 +161,8 @@ int main(int argc, char **argv)
//-----------------------
// map for dead TT centre
+
+ std::cout<<"debug"< > > TT_centre;
if( isEB == true )
@@ -181,6 +190,7 @@ int main(int argc, char **argv)
}
+ std::cout<<"debug"< h2_corrP;
+ std::map h2_IC_corr;
// get the IC maps as they come from the algorithm
std::map h2_IC_raw;
@@ -267,8 +281,10 @@ int main(int argc, char **argv)
}
else
{
+ std::cout<<"debug"<Get("h_scale_EEM") );
h2_IC_raw[1] = (TH2F*)( inFile->Get("h_scale_EEP") );
+ std::cout<<"debug"<Clone("h2_IC_raw_phiNorm_EEM") );
h2_IC_raw_phiNorm[1] = (TH2F*)( h2_IC_raw[1] ->Clone("h2_IC_raw_phiNorm_EEP") );
@@ -276,13 +292,31 @@ int main(int argc, char **argv)
h2_IC_raw_phiNorm[1] -> Reset("ICEMS");
h2_IC_raw_phiNorm[-1] -> ResetStats();
h2_IC_raw_phiNorm[1] -> ResetStats();
+
+ h2_corrP[-1] = (TH2F*)( h2_IC_raw[-1]->Clone("h2_corrP_EEM") );
+ h2_corrP[1] = (TH2F*)( h2_IC_raw[1] ->Clone("h2_corrP_EEP") );
+ h2_corrP[-1] -> Reset("ICEMS");
+ h2_corrP[1] -> Reset("ICEMS");
+ h2_corrP[-1] -> ResetStats();
+ h2_corrP[1] -> ResetStats();
+
+ h2_IC_corr[-1] = (TH2F*)( h2_IC_raw[-1]->Clone("h2_IC_corr_EEM") );
+ h2_IC_corr[1] = (TH2F*)( h2_IC_raw[1] ->Clone("h2_IC_corr_EEP") );
+ h2_IC_corr[-1] -> Reset("ICEMS");
+ h2_IC_corr[1] -> Reset("ICEMS");
+ h2_IC_corr[-1] -> ResetStats();
+ h2_IC_corr[1] -> ResetStats();
+
+ std::cout<<"debug"<Get("h_scale_EEM") );
h2_ICEven_raw[1] = (TH2F*)( inFileEven->Get("h_scale_EEP") );
h2_ICOdd_raw[-1 ] = (TH2F*)( inFileOdd ->Get("h_scale_EEM") );
h2_ICOdd_raw[1] = (TH2F*)( inFileOdd ->Get("h_scale_EEP") );
+ std::cout<<"debug"<Clone("h2_IC_raw_phiNorm_even_EEM") );
h2_IC_raw_phiNorm_even[1] = (TH2F*)( h2_ICEven_raw[1] ->Clone("h2_IC_raw_phiNorm_even_EEP") );
@@ -290,6 +324,7 @@ int main(int argc, char **argv)
h2_IC_raw_phiNorm_even[1] -> Reset("ICEMS");
h2_IC_raw_phiNorm_even[-1] -> ResetStats();
h2_IC_raw_phiNorm_even[1] -> ResetStats();
+ std::cout<<"debug"<Clone("h2_IC_raw_phiNorm_odd_EEM") );
h2_IC_raw_phiNorm_odd[1] = (TH2F*)( h2_ICOdd_raw[1] ->Clone("h2_IC_raw_phiNorm_odd_EEP") );
@@ -301,6 +336,7 @@ int main(int argc, char **argv)
}
+ std::cout<<"debug"< mkdir("crackCorr");
outFile -> cd("crackCorr");
@@ -688,47 +726,82 @@ int main(int argc, char **argv)
{
DrawICMap(h2_IC_raw_phiNorm[0], outputFolder+"/EB_h2_IC_raw_phiNorm", "png",isEB);
DrawICMap(h2_IC_crackCorr_phiNorm[0],outputFolder+"/EB_h2_IC_crackCorr_phiNorm","png",isEB);
+ DrawICMap(h2_IC_raw_phiNorm[0], outputFolder+"/EB_h2_IC_raw_phiNorm", "pdf",isEB);
+ DrawICMap(h2_IC_crackCorr_phiNorm[0],outputFolder+"/EB_h2_IC_crackCorr_phiNorm","pdf",isEB);
DrawSpreadHisto(h_spread[0], outputFolder+"/EB_h_spread", "f_EB_spread_vsEta", "png",isEB);
DrawSpreadHisto(h_spread_crackCorr,outputFolder+"/EB_h_spread_crackCorr","f_EB_spread_vsEta_crackCorr","png",isEB);
+ DrawSpreadHisto(h_spread[0], outputFolder+"/EB_h_spread", "f_EB_spread_vsEta", "pdf",isEB);
+ DrawSpreadHisto(h_spread_crackCorr,outputFolder+"/EB_h_spread_crackCorr","f_EB_spread_vsEta_crackCorr","pdf",isEB);
DrawSpreadGraph(g_spread_vsEta[0], outputFolder+"/EB_g_spread_vsEta", "png",isEB,g_stat_vsEta[0]);
DrawSpreadGraph(g_spread_vsEta_crackCorr,outputFolder+"/EB_g_spread_vsEta_crackCorr","png",isEB,g_stat_vsEta_crackCorr);
+ DrawSpreadGraph(g_spread_vsEta[0], outputFolder+"/EB_g_spread_vsEta", "pdf",isEB,g_stat_vsEta[0]);
+ DrawSpreadGraph(g_spread_vsEta_crackCorr,outputFolder+"/EB_g_spread_vsEta_crackCorr","pdf",isEB,g_stat_vsEta_crackCorr);
DrawResidualGraph(g_residual_vsEta[0], outputFolder+"/EB_g_residual_vsEta", "png",isEB);
DrawResidualGraph(g_residual_vsEta_crackCorr,outputFolder+"/EB_g_residual_vsEta_crackCorr","png",isEB);
+ DrawResidualGraph(g_residual_vsEta[0], outputFolder+"/EB_g_residual_vsEta", "pdf",isEB);
+ DrawResidualGraph(g_residual_vsEta_crackCorr,outputFolder+"/EB_g_residual_vsEta_crackCorr","pdf",isEB);
DrawPhiAvgICSpread(h_phiAvgICSpread[0], outputFolder+"/EB_h_phiAvgICSpread", "png",isEB);
DrawPhiAvgICSpread(h_phiAvgICSpread_crackCorr,outputFolder+"/EB_h_phiAvgICSpread_crackCorr","png",isEB);
+ DrawPhiAvgICSpread(h_phiAvgICSpread[0], outputFolder+"/EB_h_phiAvgICSpread", "pdf",isEB);
+ DrawPhiAvgICSpread(h_phiAvgICSpread_crackCorr,outputFolder+"/EB_h_phiAvgICSpread_crackCorr","pdf",isEB);
DrawAvgICVsPhiGraph(g_avgIC_vsPhi[0], outputFolder+"/EB_g_avgIC_vsPhi", "png",kRed+2, isEB);
DrawAvgICVsPhiGraph(g_avgIC_vsPhi_crackCorr,outputFolder+"/EB_g_avgIC_vsPhi_crackCorr","png",kGreen+2,isEB);
+ DrawAvgICVsPhiGraph(g_avgIC_vsPhi[0], outputFolder+"/EB_g_avgIC_vsPhi", "pdf",kRed+2, isEB);
+ DrawAvgICVsPhiGraph(g_avgIC_vsPhi_crackCorr,outputFolder+"/EB_g_avgIC_vsPhi_crackCorr","pdf",kGreen+2,isEB);
DrawAvgICVsPhiFoldGraph(g_avgIC_vsPhiFold_EBM,g_avgIC_vsPhiFold_crackCorr_EBM,outputFolder+"/EBM_g_avgIC_vsPhiFold","png",isEB);
DrawAvgICVsPhiFoldGraph(g_avgIC_vsPhiFold_EBP,g_avgIC_vsPhiFold_crackCorr_EBP,outputFolder+"/EBP_g_avgIC_vsPhiFold","png",isEB);
+ DrawAvgICVsPhiFoldGraph(g_avgIC_vsPhiFold_EBM,g_avgIC_vsPhiFold_crackCorr_EBM,outputFolder+"/EBM_g_avgIC_vsPhiFold","pdf",isEB);
+ DrawAvgICVsPhiFoldGraph(g_avgIC_vsPhiFold_EBP,g_avgIC_vsPhiFold_crackCorr_EBP,outputFolder+"/EBP_g_avgIC_vsPhiFold","pdf",isEB);
}
else
{
DrawICMap(h2_IC_raw_phiNorm[-1],outputFolder+"/EEM_h2_IC_raw_phiNorm","png",isEB);
DrawICMap(h2_IC_raw_phiNorm[+1],outputFolder+"/EEP_h2_IC_raw_phiNorm","png",isEB);
+ DrawICMap(h2_IC_raw_phiNorm[-1],outputFolder+"/EEM_h2_IC_raw_phiNorm","pdf",isEB);
+ DrawICMap(h2_IC_raw_phiNorm[+1],outputFolder+"/EEP_h2_IC_raw_phiNorm","pdf",isEB);
+
+ // DrawICMap(h2_corrP[-1],outputFolder+"/EEM_h2_corrP","png",isEB);
+ // DrawICMap(h2_corrP[+1],outputFolder+"/EEP_h2_corrP","png",isEB);
+
+ // DrawICMap(h2_IC_corr[-1],outputFolder+"/EEM_h2_IC_corr","png",isEB);
+ //DrawICMap(h2_IC_corr[+1],outputFolder+"/EEP_h2_IC_corr","png",isEB);
DrawSpreadHisto(h_spread[-1],outputFolder+"/EEM_h_spread","f_EE_spread_vsEta_EEM","png",isEB);
DrawSpreadHisto(h_spread[0], outputFolder+"/EE_h_spread","f_EE_spread_vsEta_EE", "png",isEB);
DrawSpreadHisto(h_spread[+1],outputFolder+"/EEP_h_spread","f_EE_spread_vsEta_EEP","png",isEB);
+ DrawSpreadHisto(h_spread[-1],outputFolder+"/EEM_h_spread","f_EE_spread_vsEta_EEM","pdf",isEB);
+ DrawSpreadHisto(h_spread[0], outputFolder+"/EE_h_spread","f_EE_spread_vsEta_EE", "pdf",isEB);
+ DrawSpreadHisto(h_spread[+1],outputFolder+"/EEP_h_spread","f_EE_spread_vsEta_EEP","pdf",isEB);
DrawSpreadGraph(g_spread_vsEta[-1],outputFolder+"/EEM_g_spread_vsEta","png",isEB,g_stat_vsEta[-1]);
DrawSpreadGraph(g_spread_vsEta[0], outputFolder+"/EE_g_spread_vsEta","png",isEB,g_stat_vsEta[0]);
DrawSpreadGraph(g_spread_vsEta[+1],outputFolder+"/EEP_g_spread_vsEta","png",isEB,g_stat_vsEta[+1]);
+ DrawSpreadGraph(g_spread_vsEta[-1],outputFolder+"/EEM_g_spread_vsEta","pdf",isEB,g_stat_vsEta[-1]);
+ DrawSpreadGraph(g_spread_vsEta[0], outputFolder+"/EE_g_spread_vsEta","pdf",isEB,g_stat_vsEta[0]);
+ DrawSpreadGraph(g_spread_vsEta[+1],outputFolder+"/EEP_g_spread_vsEta","pdf",isEB,g_stat_vsEta[+1]);
DrawResidualGraph(g_residual_vsEta[-1],outputFolder+"/EEM_g_residual_vsEta","png",isEB);
DrawResidualGraph(g_residual_vsEta[0], outputFolder+"/EE_g_residual_vsEta","png",isEB);
DrawResidualGraph(g_residual_vsEta[+1],outputFolder+"/EEP_g_residual_vsEta","png",isEB);
+ DrawResidualGraph(g_residual_vsEta[-1],outputFolder+"/EEM_g_residual_vsEta","pdf",isEB);
+ DrawResidualGraph(g_residual_vsEta[0], outputFolder+"/EE_g_residual_vsEta","pdf",isEB);
+ DrawResidualGraph(g_residual_vsEta[+1],outputFolder+"/EEP_g_residual_vsEta","pdf",isEB);
DrawPhiAvgICSpread(h_phiAvgICSpread[-1],outputFolder+"/EEM_h_phiAvgICSpread","png",isEB);
DrawPhiAvgICSpread(h_phiAvgICSpread[+1],outputFolder+"/EEP_h_phiAvgICSpread","png",isEB);
+ DrawPhiAvgICSpread(h_phiAvgICSpread[-1],outputFolder+"/EEM_h_phiAvgICSpread","pdf",isEB);
+ DrawPhiAvgICSpread(h_phiAvgICSpread[+1],outputFolder+"/EEP_h_phiAvgICSpread","pdf",isEB);
DrawAvgICVsPhiGraph(g_avgIC_vsPhi[-1],outputFolder+"/EEM_g_avgIC_vsPhi","png",kRed+2,isEB);
DrawAvgICVsPhiGraph(g_avgIC_vsPhi[+1],outputFolder+"/EEP_g_avgIC_vsPhi","png",kRed+2,isEB);
+ DrawAvgICVsPhiGraph(g_avgIC_vsPhi[-1],outputFolder+"/EEM_g_avgIC_vsPhi","pdf",kRed+2,isEB);
+ DrawAvgICVsPhiGraph(g_avgIC_vsPhi[+1],outputFolder+"/EEP_g_avgIC_vsPhi","pdf",kRed+2,isEB);
}
outFile -> Close();
@@ -835,7 +908,7 @@ int main(int argc, char **argv)
<< std::fixed << std::setprecision(0) << std::setw(10) << h2_final[iz]->GetYaxis()->GetBinLowEdge(iy)
<< std::fixed << std::setprecision(0) << std::setw(10) << iz
<< std::fixed << std::setprecision(6) << std::setw(15) << IC
- << std::fixed << std::setprecision(6) << std::setw(15) << sqrt( statPrec*statPrec + sysPrec*sysPrec )
+ << std::fixed << std::setprecision(6) << std::setw(15) << sqrt( statPrec*statPrec )//+ sysPrec*sysPrec )
<< std::endl;
}
else
diff --git a/EOverPCalibration/bin/CompareICSet.cpp b/EOverPCalibration/bin/CompareICSet.cpp
index bdffc82cc49..855d4772d04 100644
--- a/EOverPCalibration/bin/CompareICSet.cpp
+++ b/EOverPCalibration/bin/CompareICSet.cpp
@@ -48,7 +48,9 @@ if(!File2.is_open()){
return -1;
}
-
+ std::ofstream FileRatio("ratio.txt");
+ std::ofstream FileAbsolute("absolute.txt");
+ std::ofstream FileMiscalib("miscalib.txt");
// Set style options
/*gROOT->Reset();
@@ -58,8 +60,10 @@ gROOT->SetStyle("Plain");
gStyle->SetPadTickX(1);
gStyle->SetPadTickY(1);
gStyle->SetOptTitle(1);
-gStyle->SetOptStat(1111111);
-gStyle->SetFitFormat("6.3g");
+gStyle->SetOptStat(00000000);
+gStyle->SetOptFit(1111);
+//gStyle->SetOptStat(0000000);
+//gStyle->SetFitFormat("6.3g");
gStyle->SetPalette(1);
gStyle->SetOptTitle(0);
@@ -123,14 +127,14 @@ std::cout<<" End second file "<> iEta1 >> iPhi1 >> iz1 >> ic1 >> eic1 ;
File4 >> iEta2 >> iPhi2 >> iz2 >> ic2 >> eic2;
- if (ic1!=ic2)
- std::cout<<"iEta: "<Clone("ratiomapEEm");
ratiomap_EEm->Reset();
+Name = Form("absolutemapEB");
+TH2F * absolutemap_EB = (TH2F*) map1_EB->Clone("absolutemapEB");
+absolutemap_EB->Reset();
+
+Name = Form("absolutemapEEp");
+TH2F * absolutemap_EEp = (TH2F*) map1_EEp->Clone("absolutemapEEp");
+absolutemap_EEp->Reset();
+
+Name = Form("absolutemapEEm");
+TH2F * absolutemap_EEm = (TH2F*) map1_EEm->Clone("absolutemapEEm");
+absolutemap_EEm->Reset();
+
Name = Form("diffHistEB");
-TH1F * diffHistEB = new TH1F(Name,Name,100,-0.6,0.6);
+TH1F * diffHistEB = new TH1F(Name,Name,500,-0.3,0.3);
diffHistEB->SetLineWidth(2);
+Name = Form("diffHistEB_0_20");
+TH1F * diffHistEB_0_20 = new TH1F(Name,Name,200,-1,1);
+diffHistEB_0_20->SetLineWidth(2);
+
+Name = Form("diffHistEB_20_40");
+TH1F * diffHistEB_20_40 = new TH1F(Name,Name,200,-1,1);
+diffHistEB_20_40->SetLineWidth(2);
+
+Name = Form("diffHistEB_40_60");
+TH1F * diffHistEB_40_60 = new TH1F(Name,Name,200,-1,1);
+diffHistEB_40_60->SetLineWidth(2);
+
+Name = Form("diffHistEB_60_85");
+TH1F * diffHistEB_60_85 = new TH1F(Name,Name,200,-1,1);
+diffHistEB_60_85->SetLineWidth(2);
+
Name = Form("diffHistEEp");
-TH1F * diffHistEEp = new TH1F(Name,Name,100,-0.6,0.6);
+TH1F * diffHistEEp = new TH1F(Name,Name,100,-0.4,0.4);
diffHistEEp->SetLineWidth(2);
+Name = Form("diffHistEEp_0_5");
+TH1F * diffHistEEp_0_5 = new TH1F(Name,Name,50,-1,1);
+diffHistEEp_0_5->SetLineWidth(2);
+
+Name = Form("diffHistEEp_5_15");
+TH1F * diffHistEEp_5_15 = new TH1F(Name,Name,50,-1,1);
+diffHistEEp_5_15->SetLineWidth(2);
+
+Name = Form("diffHistEEp_15_25");
+TH1F * diffHistEEp_15_25 = new TH1F(Name,Name,50,-1,1);
+diffHistEEp_15_25->SetLineWidth(2);
+
+Name = Form("diffHistEEp_25_35");
+TH1F * diffHistEEp_25_35 = new TH1F(Name,Name,50,-1,1);
+diffHistEEp_25_35->SetLineWidth(2);
+
Name = Form("diffHistEEm");
-TH1F * diffHistEEm = new TH1F(Name,Name,100,-0.6,0.6);
+TH1F * diffHistEEm = new TH1F(Name,Name,100,-0.4,0.4);
diffHistEEm->SetLineWidth(2);
+Name = Form("diffHistEEm_0_5");
+TH1F * diffHistEEm_0_5 = new TH1F(Name,Name,50,-1,1);
+diffHistEEm_0_5->SetLineWidth(2);
+
+Name = Form("diffHistEEm_5_15");
+TH1F * diffHistEEm_5_15 = new TH1F(Name,Name,50,-1,1);
+diffHistEEm_5_15->SetLineWidth(2);
+
+Name = Form("diffHistEEm_15_25");
+TH1F * diffHistEEm_15_25 = new TH1F(Name,Name,50,-1,1);
+diffHistEEm_15_25->SetLineWidth(2);
+
+Name = Form("diffHistEEm_25_35");
+TH1F * diffHistEEm_25_35 = new TH1F(Name,Name,50,-1,1);
+diffHistEEm_25_35->SetLineWidth(2);
+
+
Name = Form("correlationEB");
-TH2F * correlationEB = new TH2F(Name,Name,100,0.2,2.,100,0.2,2.);
+TH2F * correlationEB = new TH2F(Name,Name,100,0.9,1.1,100,0.9,1.1);
Name = Form("correlationEEp");
-TH2F * correlationEEp= new TH2F(Name,Name,100,0.2,2.,100,0.2,2.);
+TH2F * correlationEEp= new TH2F(Name,Name,100,0.8,1.2,100,0.8,1.2);
Name = Form("correlationEEm");
-TH2F * correlationEEm= new TH2F(Name,Name,100,0.2,2.,100,0.2,2.);
+TH2F * correlationEEm= new TH2F(Name,Name,100,0.8,1.2,100,0.8,1.2);
+
+TEndcapRings *eRings = new TEndcapRings();
+ float sumEB=0, sum2EB=0;
+ float sumEEp=0, sum2EEp=0;
+ float sumEEm=0, sum2EEm=0;
+ float sumEB_0_20=0, sum2EB_0_20=0;
+ float sumEB_20_40=0, sum2EB_20_40=0;
+ float sumEB_40_60=0, sum2EB_40_60=0;
+ float sumEB_60_85=0, sum2EB_60_85=0;
+ float sumEEp_0_5=0, sum2EEp_0_5=0;
+ float sumEEp_5_15=0, sum2EEp_5_15=0;
+ float sumEEp_15_25=0, sum2EEp_15_25=0;
+ float sumEEp_25_35=0, sum2EEp_25_35=0;
+ float sumEEm_0_5=0, sum2EEm_0_5=0;
+ float sumEEm_5_15=0, sum2EEm_5_15=0;
+ float sumEEm_15_25=0, sum2EEm_15_25=0;
+ float sumEEm_25_35=0, sum2EEm_25_35=0;
-for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){
for(int iEta=1; iEtaGetNbinsY()+1; iEta++){
+ if (iEta==86) continue;
+ for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){
+ int eta = iEta-86;
if(map1_EB->GetBinContent(iPhi,iEta)==-1. || map2_EB->GetBinContent(iPhi,iEta)==-1.){
diffmap_EB->SetBinContent(iPhi,iEta,-1.);
ratiomap_EB->SetBinContent(iPhi,iEta,-1.);
+ absolutemap_EB->SetBinContent(iPhi,iEta,map1_EB->GetBinContent(iPhi,iEta));
+ FileRatio << eta << "\t" << iPhi << "\t" << 0 << "\t" << -1. << "\t" << -999. << std::endl;
+ FileAbsolute << eta << "\t" << iPhi << "\t" << 0 << "\t" << map1_EB->GetBinContent(iPhi,iEta) << "\t" << -999. << std::endl;
+ FileMiscalib << eta << "\t" << iPhi << "\t" << 0 << "\t" << map1_EB->GetBinContent(iPhi,iEta) << "\t" << -999. << std::endl;
+
continue;}
+ sumEB+=map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta);
+ sum2EB+=(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta))*(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ if (abs(eta)<20) {
+ sumEB_0_20+=map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta);
+ sum2EB_0_20+=(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta))*(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ diffHistEB_0_20->Fill(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ }
+ else if (abs(eta)<40) {
+ sumEB_20_40+=map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta);
+ sum2EB_20_40+=(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta))*(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ diffHistEB_20_40->Fill(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ }
+ else if (abs(eta)<60) {
+ sumEB_40_60+=map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta);
+ sum2EB_40_60+=(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta))*(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ diffHistEB_40_60->Fill(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ }
+ else {
+ sumEB_60_85+=map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta);
+ sum2EB_60_85+=(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta))*(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ diffHistEB_60_85->Fill(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ }
+
diffmap_EB->SetBinContent(iPhi,iEta,map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
diffHistEB->Fill(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
ratiomap_EB->SetBinContent(iPhi,iEta,map1_EB->GetBinContent(iPhi,iEta)/map2_EB->GetBinContent(iPhi,iEta));
+ absolutemap_EB->SetBinContent(iPhi,iEta,map1_EB->GetBinContent(iPhi,iEta)*map2_EB->GetBinContent(iPhi,iEta));
+ FileRatio << eta << "\t" << iPhi << "\t" << 0 << "\t" << map1_EB->GetBinContent(iPhi,iEta)/map2_EB->GetBinContent(iPhi,iEta) << "\t" << -999. << std::endl;
+ FileAbsolute << eta << "\t" << iPhi << "\t" << 0 << "\t" << map1_EB->GetBinContent(iPhi,iEta)*map2_EB->GetBinContent(iPhi,iEta) << "\t" << -999. << std::endl;
correlationEB->Fill(map1_EB->GetBinContent(iPhi,iEta),map2_EB->GetBinContent(iPhi,iEta));
+ if ( (iPhi>20 && iPhi<40) || (iPhi>60 && iPhi<80) || (iPhi>100 && iPhi<120) || (iPhi>140 && iPhi<160))
+ FileMiscalib << eta << "\t" << iPhi << "\t" << 0 << "\t" << map1_EB->GetBinContent(iPhi,iEta)*1.3 << "\t" << -999. << std::endl;
+ else if ((iPhi>200 && iPhi<240) || (iPhi>280 && iPhi<300) || (iPhi>340 && iPhi<360))
+ FileMiscalib << eta << "\t" << iPhi << "\t" << 0 << "\t" << map1_EB->GetBinContent(iPhi,iEta)*0.7 << "\t" << -999. << std::endl;
+ else
+ FileMiscalib << eta << "\t" << iPhi << "\t" << 0 << "\t" << map1_EB->GetBinContent(iPhi,iEta) << "\t" << -999. << std::endl;
+
}
}
@@ -206,38 +328,219 @@ for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){
for(int ix =1; ixGetNbinsX()+1; ix++){
for(int iy=1; iyGetNbinsY()+1; iy++){
+ if(map1_EEp->GetBinContent(ix,iy)==0 || map2_EEp->GetBinContent(ix,iy)==0) continue;
+
if(map1_EEp->GetBinContent(ix,iy)==-1. || map2_EEp->GetBinContent(ix,iy)==-1.){
diffmap_EEp->SetBinContent(ix,iy,-1.);
ratiomap_EEp->SetBinContent(ix,iy,-1.);
+ absolutemap_EEp->SetBinContent(ix,iy,map1_EEp->GetBinContent(ix,iy));
+ FileRatio << ix << "\t" << iy << "\t" << 1 << "\t" << -1. << "\t" << -999. << std::endl;
+ FileAbsolute << ix << "\t" << iy << "\t" << 1 << "\t" << map1_EEp->GetBinContent(ix,iy) << "\t" << -999. << std::endl;
+ FileMiscalib << ix << "\t" << iy << "\t" << 1 << "\t" << map1_EEp->GetBinContent(ix,iy) << "\t" << -999. << std::endl;
+
continue;}
+ sumEEp+=map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy);
+ sum2EEp+=(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy))*(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+
+ int iEta = int(eRings->GetEndcapIeta(ix,iy,1))-86;
+
+ if (abs(iEta)<5) {
+ sumEEp_0_5+=map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy);
+ sum2EEp_0_5+=(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy))*(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+ diffHistEEp_0_5->Fill(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+ }
+ else if (abs(iEta)<15) {
+ sumEEp_5_15+=map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy);
+ sum2EEp_5_15+=(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy))*(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+ diffHistEEp_5_15->Fill(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+ }
+ else if (abs(iEta)<25) {
+ sumEEp_15_25+=map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy);
+ sum2EEp_15_25+=(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy))*(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+ diffHistEEp_15_25->Fill(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+ }
+ else {
+ sumEEp_25_35+=map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy);
+ sum2EEp_25_35+=(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy))*(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+ diffHistEEp_25_35->Fill(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+ }
+
diffmap_EEp->SetBinContent(ix,iy,map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
diffHistEEp->Fill(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
ratiomap_EEp->SetBinContent(ix,iy,map1_EEp->GetBinContent(ix,iy)/map2_EEp->GetBinContent(ix,iy));
+ absolutemap_EEp->SetBinContent(ix,iy,map1_EEp->GetBinContent(ix,iy)*map2_EEp->GetBinContent(ix,iy));
+ FileRatio << ix << "\t" << iy << "\t" << 1 << "\t" << map1_EEp->GetBinContent(ix,iy)/map2_EEp->GetBinContent(ix,iy) << "\t" << -999. << std::endl;
+ FileAbsolute << ix << "\t" << iy << "\t" << 1 << "\t" << map1_EEp->GetBinContent(ix,iy)*map2_EEp->GetBinContent(ix,iy) << "\t" << -999. << std::endl;
correlationEEp->Fill(map1_EEp->GetBinContent(ix,iy),map2_EEp->GetBinContent(ix,iy));
+ if ( (ix>20 && ix<30) || (ix>50 && ix<55) || (ix>80 && ix<90))
+ FileMiscalib << ix << "\t" << iy << "\t" << 1 << "\t" << map1_EEp->GetBinContent(ix,iy)*1.3 << "\t" << -999. << std::endl;
+ else if ((ix>5 && ix<15) || (ix>40 && ix<45) || (ix>60 && ix<70))
+ FileMiscalib << ix << "\t" << iy << "\t" << 1 << "\t" << map1_EEp->GetBinContent(ix,iy)*0.7 << "\t" << -999. << std::endl;
+ else
+ FileMiscalib << ix << "\t" << iy << "\t" << 1 << "\t" << map1_EEp->GetBinContent(ix,iy) << "\t" << -999. << std::endl;
+
}
}
+
for(int ix =1; ixGetNbinsX()+1; ix++){
for(int iy=1; iyGetNbinsY()+1; iy++){
+ if(map1_EEm->GetBinContent(ix,iy)==0 || map2_EEm->GetBinContent(ix,iy)==0) continue;
+
if(map1_EEm->GetBinContent(ix,iy)==-1. || map2_EEm->GetBinContent(ix,iy)==-1.){
diffmap_EEm->SetBinContent(ix,iy,-1.);
ratiomap_EEm->SetBinContent(ix,iy,-1.);
+ absolutemap_EEm->SetBinContent(ix,iy,map1_EEm->GetBinContent(ix,iy));
+ FileRatio << ix << "\t" << iy << "\t" << -1 << "\t" << map1_EEm->GetBinContent(ix,iy) << "\t" << -999. << std::endl;
+ FileAbsolute << ix << "\t" << iy << "\t" << -1 << "\t" << -1. << "\t" << -999. << std::endl;
continue;}
+ sumEEm+=map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy);
+ sum2EEm+=(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy))*(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+
+ int iEta = int(eRings->GetEndcapIeta(ix,iy,1))-86;
+
+ if (abs(iEta)<5) {
+ sumEEm_0_5+=map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy);
+ sum2EEm_0_5+=(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy))*(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+ diffHistEEm_0_5->Fill(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+ }
+ else if (abs(iEta)<15) {
+ sumEEm_5_15+=map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy);
+ sum2EEm_5_15+=(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy))*(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+ diffHistEEm_5_15->Fill(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+ }
+ else if (abs(iEta)<25) {
+ sumEEm_15_25+=map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy);
+ sum2EEm_15_25+=(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy))*(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+ diffHistEEm_15_25->Fill(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+ }
+ else {
+ sumEEm_25_35+=map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy);
+ sum2EEm_25_35+=(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy))*(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+ diffHistEEm_25_35->Fill(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+ }
+
diffmap_EEm->SetBinContent(ix,iy,map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
diffHistEEm->Fill(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
ratiomap_EEm->SetBinContent(ix,iy,map1_EEm->GetBinContent(ix,iy)/map2_EEm->GetBinContent(ix,iy));
+ absolutemap_EEm->SetBinContent(ix,iy,map1_EEm->GetBinContent(ix,iy)*map2_EEm->GetBinContent(ix,iy));
+ FileRatio << ix << "\t" << iy << "\t" << -1 << "\t" << map1_EEm->GetBinContent(ix,iy)/map2_EEm->GetBinContent(ix,iy) << "\t" << -999. << std::endl;
+ FileAbsolute << ix << "\t" << iy << "\t" << -1 << "\t" << map1_EEm->GetBinContent(ix,iy)*map2_EEm->GetBinContent(ix,iy) << "\t" << -999. << std::endl;
correlationEEm->Fill(map1_EEm->GetBinContent(ix,iy),map2_EEm->GetBinContent(ix,iy));
+ if ( (ix>20 && ix<30) || (ix>50 && ix<55) || (ix>80 && ix<90))
+ FileMiscalib << ix << "\t" << iy << "\t" << -1 << "\t" << map1_EEm->GetBinContent(ix,iy)*1.3 << "\t" << -999. << std::endl;
+ else if ((ix>5 && ix<15) || (ix>40 && ix<45) || (ix>60 && ix<70))
+ FileMiscalib << ix << "\t" << iy << "\t" << -1 << "\t" << map1_EEm->GetBinContent(ix,iy)*0.7 << "\t" << -999. << std::endl;
+ else
+ FileMiscalib << ix << "\t" << iy << "\t" << -1 << "\t" << map1_EEm->GetBinContent(ix,iy) << "\t" << -999. << std::endl;
+
}
}
+TF1 *fgaus2 = new TF1("fgaus2","gaus",-0.02,0.02);
+
+ std::cout<<"FIT: "<SetParameter(1,0);
+fgaus2->SetParameter(2,diffHistEB->GetRMS());
+//fgaus2->SetRange(0-0.5*diffHistEB->GetRMS(),0+0.5*diffHistEB->GetRMS());
+fgaus2->SetRange(-0.03,0.03);
+fgaus2->SetLineColor(kRed);
+//diffHistEB->Fit("fgaus2","QRME");
+cout<<" EB-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EB_0_20-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EB_20_40-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EB_40_60-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EB_60_85-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<SetParameter(1,0);
+fgaus2->SetParameter(2,diffHistEEp->GetRMS());
+fgaus2->SetRange(-0.1,0.08);
+//fgaus2->SetRange(0-0.5*diffHistEEp->GetRMS(),0+0.5*diffHistEEp->GetRMS());
+fgaus2->SetLineColor(kRed);
+//diffHistEEp->Fit("fgaus2","QRME");
+cout<<" EEp-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EEp_0_5-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EEp_5_15-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EEp_15_25-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EEp_25_35-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<SetParameter(1,0);
+fgaus2->SetParameter(2,diffHistEEm->GetRMS());
+fgaus2->SetRange(-0.1,0.08);
+//fgaus2->SetRange(0-0.5*diffHistEEm->GetRMS(),0+0.5*diffHistEEm->GetRMS());
+fgaus2->SetLineColor(kRed);
+fgaus2->SetLineColor(kRed);
+//diffHistEEm->Fit("fgaus2","QRME");
+cout<<" EEm-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EEm_0_5-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EEm_5_15-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EEm_15_25-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EEm_25_35-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetNbinsX()+1; iPhi++){
/// Profile along phi for EE+:
-TEndcapRings *eRings = new TEndcapRings();
std::vector vectSum;
std::vector vectCounter;
@@ -781,7 +1083,7 @@ cout<<" Second Set : Mean dist = "<GetMean()<<" RMS dist "<SetLeftMargin(0.1);
@@ -800,7 +1102,7 @@ cout<<" Second Set : Mean dist = "<GetMean()<<" RMS dist "<SetRightMargin(0.13);
c[1]->SetLogy();
- diffHistEB->GetXaxis()->SetTitle("c_{#pi}-c_{ele}");
+ diffHistEB->GetXaxis()->SetTitle("c_{1}-c_{2}");
diffHistEB->Draw();
@@ -824,10 +1126,11 @@ cout<<" Second Set : Mean dist = "<GetMean()<<" RMS dist "<GetXaxis()->SetNdivisions(1020);
correlationEB->GetXaxis() -> SetLabelSize(0.03);
- correlationEB->GetXaxis() ->SetTitle("c_{#pi}");
- correlationEB->GetYaxis() ->SetTitle("c_{ele}");
+ correlationEB->GetXaxis() ->SetTitle("c_{1}");
+ correlationEB->GetYaxis() ->SetTitle("c_{2}");
correlationEB->Draw("COLZ");
+ std::cout<<"correlation EB: "<GetCorrelationFactor()<SetLeftMargin(0.1);
@@ -846,7 +1149,7 @@ cout<<" Second Set : Mean dist = "<GetMean()<<" RMS dist "<SetRightMargin(0.13);
c[5]->SetLogy();
- diffHistEEp->GetXaxis()->SetTitle("c_{#pi}-c_{ele}");
+ diffHistEEp->GetXaxis()->SetTitle("c_{1}-c_{2}");
diffHistEEp->Draw();
c[6] = new TCanvas("hratioEEp","hratioEEp");
@@ -869,10 +1172,12 @@ cout<<" Second Set : Mean dist = "<GetMean()<<" RMS dist "<GetXaxis()->SetNdivisions(1020);
correlationEEp->GetXaxis() -> SetLabelSize(0.03);
- correlationEEp->GetXaxis() ->SetTitle("c_{#pi}");
- correlationEEp->GetYaxis() ->SetTitle("c_{ele}");
+ correlationEEp->GetXaxis() ->SetTitle("c_{1}");
+ correlationEEp->GetYaxis() ->SetTitle("c_{2}");
correlationEEp->Draw("COLZ");
+ std::cout<<"correlation EE+: "<GetCorrelationFactor()<SetLeftMargin(0.1);
c[8]->SetRightMargin(0.13);
@@ -890,7 +1195,7 @@ cout<<" Second Set : Mean dist = "<GetMean()<<" RMS dist "<SetRightMargin(0.13);
c[9]->SetLogy();
- diffHistEEm->GetXaxis()->SetTitle("c_{#pi}-c_{ele}");
+ diffHistEEm->GetXaxis()->SetTitle("c_{1}-c_{2}");
diffHistEEm->Draw();
@@ -915,10 +1220,12 @@ cout<<" Second Set : Mean dist = "<GetMean()<<" RMS dist "<GetXaxis()->SetNdivisions(1020);
correlationEEm->GetXaxis() -> SetLabelSize(0.03);
- correlationEEm->GetXaxis() ->SetTitle("c_{#pi}");
- correlationEEm->GetYaxis() ->SetTitle("c_{ele}");
+ correlationEEm->GetXaxis() ->SetTitle("c_{1}");
+ correlationEEm->GetYaxis() ->SetTitle("c_{2}");
correlationEEm->Draw("COLZ");
+ std::cout<<"correlation EE-: "<GetCorrelationFactor()<SetGridx();
@@ -1132,7 +1439,133 @@ cout<<" Second Set : Mean dist = "<GetMean()<<" RMS dist "<AddEntry(phiProfileEEm2,"EE- Projection II set ", "LP");
leg12->Draw("same");
- theApp->Run();
+ c[24] = new TCanvas("habsoluteEB","habsoluteEB");
+ c[24]->SetLeftMargin(0.1);
+ c[24]->SetRightMargin(0.13);
+ c[24]->SetGridx();
+
+ absolutemap_EB->GetXaxis()->SetNdivisions(1020);
+ absolutemap_EB->GetXaxis() -> SetLabelSize(0.03);
+ absolutemap_EB->GetXaxis() ->SetTitle("i#phi");
+ absolutemap_EB->GetYaxis() ->SetTitle("i#eta");
+ absolutemap_EB->GetZaxis() ->SetRangeUser(0.85,1.15);
+ absolutemap_EB->Draw("COLZ");
+
+ c[25] = new TCanvas("habsoluteEEp","habsoluteEEp");
+ c[25]->SetLeftMargin(0.1);
+ c[25]->SetRightMargin(0.13);
+ c[25]->SetGridx();
+
+ absolutemap_EEp->GetXaxis()->SetNdivisions(1020);
+ absolutemap_EEp->GetXaxis() -> SetLabelSize(0.03);
+ absolutemap_EEp->GetXaxis() ->SetTitle("ix");
+ absolutemap_EEp->GetYaxis() ->SetTitle("iy");
+ absolutemap_EEp->GetZaxis() ->SetRangeUser(0.7,1.3);
+ absolutemap_EEp->Draw("COLZ");
+
+
+ c[26] = new TCanvas("habsoluteEEm","habsoluteEEm");
+ c[26]->SetLeftMargin(0.1);
+ c[26]->SetRightMargin(0.13);
+ c[26]->SetGridx();
+
+ absolutemap_EEm->GetXaxis()->SetNdivisions(1020);
+ absolutemap_EEm->GetXaxis() -> SetLabelSize(0.03);
+ absolutemap_EEm->GetXaxis() ->SetTitle("ix");
+ absolutemap_EEm->GetYaxis() ->SetTitle("iy");
+ absolutemap_EEm->GetZaxis() ->SetRangeUser(0.7,1.3);
+ absolutemap_EEm->Draw("COLZ");
+
+
+ c[27] = new TCanvas("map1_EB","map1_EB");
+ c[27]->SetLeftMargin(0.1);
+ c[27]->SetRightMargin(0.13);
+ c[27]->SetGridx();
+
+ map1_EB->GetXaxis()->SetNdivisions(1020);
+ map1_EB->GetXaxis() -> SetLabelSize(0.03);
+ map1_EB->GetXaxis() ->SetTitle("i#phi");
+ map1_EB->GetYaxis() ->SetTitle("i#eta");
+ map1_EB->GetZaxis() ->SetRangeUser(0.6,1.4);
+ map1_EB->Draw("COLZ");
+
+
+ c[28] = new TCanvas("map1_EEp","map1_EEp");
+ c[28]->SetLeftMargin(0.1);
+ c[28]->SetRightMargin(0.13);
+ c[28]->SetGridx();
+
+ map1_EEp->GetXaxis()->SetNdivisions(1020);
+ map1_EEp->GetXaxis() -> SetLabelSize(0.03);
+ map1_EEp->GetXaxis() ->SetTitle("i#phi");
+ map1_EEp->GetYaxis() ->SetTitle("i#eta");
+ map1_EEp->GetZaxis() ->SetRangeUser(0.6,1.4);
+ map1_EEp->Draw("COLZ");
+
+
+ c[29] = new TCanvas("map1_EEm","map1_EEm");
+ c[29]->SetLeftMargin(0.1);
+ c[29]->SetRightMargin(0.13);
+ c[29]->SetGridx();
+
+ map1_EEm->GetXaxis()->SetNdivisions(1020);
+ map1_EEm->GetXaxis() -> SetLabelSize(0.03);
+ map1_EEm->GetXaxis() ->SetTitle("i#phi");
+ map1_EEm->GetYaxis() ->SetTitle("i#eta");
+ map1_EEm->GetZaxis() ->SetRangeUser(0.6,1.4);
+ map1_EEm->Draw("COLZ");
+
+
+ c[30] = new TCanvas("map2_EB","map2_EB");
+ c[30]->SetLeftMargin(0.1);
+ c[30]->SetRightMargin(0.13);
+ c[30]->SetGridx();
+
+ map2_EB->GetXaxis()->SetNdivisions(1020);
+ map2_EB->GetXaxis() -> SetLabelSize(0.03);
+ map2_EB->GetXaxis() ->SetTitle("i#phi");
+ map2_EB->GetYaxis() ->SetTitle("i#eta");
+ map2_EB->GetZaxis() ->SetRangeUser(0.6,1.4);
+ map2_EB->Draw("COLZ");
+
+
+ c[31] = new TCanvas("map2_EEp","map2_EEp");
+ c[31]->SetLeftMargin(0.1);
+ c[31]->SetRightMargin(0.13);
+ c[31]->SetGridx();
+
+ map2_EEp->GetXaxis()->SetNdivisions(1020);
+ map2_EEp->GetXaxis() -> SetLabelSize(0.03);
+ map2_EEp->GetXaxis() ->SetTitle("i#phi");
+ map2_EEp->GetYaxis() ->SetTitle("i#eta");
+ map2_EEp->GetZaxis() ->SetRangeUser(0.6,1.4);
+ map2_EEp->Draw("COLZ");
+
+
+ c[32] = new TCanvas("map2_EEm","map2_EEm");
+ c[32]->SetLeftMargin(0.1);
+ c[32]->SetRightMargin(0.13);
+ c[32]->SetGridx();
+
+ map2_EEm->GetXaxis()->SetNdivisions(1020);
+ map2_EEm->GetXaxis() -> SetLabelSize(0.03);
+ map2_EEm->GetXaxis() ->SetTitle("i#phi");
+ map2_EEm->GetYaxis() ->SetTitle("i#eta");
+ map2_EEm->GetZaxis() ->SetRangeUser(0.6,1.4);
+ map2_EEm->Draw("COLZ");
+
+
+ TFile f("compareIC.root","recreate");
+ f.cd();
+
+ for (int i=0; i<33; i++) {
+ c[i]->Write();
+ }
+
+ f.Write();
+ // f.close();
+
+ // theApp->Run();
return 0;
diff --git a/EOverPCalibration/bin/CompareICSet_ratio.cpp b/EOverPCalibration/bin/CompareICSet_ratio.cpp
new file mode 100644
index 00000000000..a70f6aafb7e
--- /dev/null
+++ b/EOverPCalibration/bin/CompareICSet_ratio.cpp
@@ -0,0 +1,1674 @@
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "TStyle.h"
+#include "TROOT.h"
+#include "TH1F.h"
+#include "TH2F.h"
+#include "TFile.h"
+#include "TCanvas.h"
+#include "TString.h"
+#include "TGraphErrors.h"
+#include "../interface/TEndcapRings.h"
+#include "TLegend.h"
+#include "TApplication.h"
+
+using namespace std;
+
+int main (int argc, char**argv){
+
+if(argc<3){
+ std::cerr<<" Wrongs input "<Reset();
+gROOT->SetStyle("Plain");
+*/
+
+gStyle->SetPadTickX(1);
+gStyle->SetPadTickY(1);
+gStyle->SetOptTitle(1);
+gStyle->SetOptStat(00000000);
+gStyle->SetOptFit(1111);
+//gStyle->SetOptStat(0000000);
+//gStyle->SetFitFormat("6.3g");
+gStyle->SetPalette(1);
+gStyle->SetOptTitle(0);
+
+
+gStyle->SetTextFont(42);
+gStyle->SetTextSize(0.05);
+gStyle->SetTitleFont(42,"xyz");
+gStyle->SetTitleSize(0.05);
+gStyle->SetLabelFont(42,"xyz");
+gStyle->SetLabelSize(0.05);
+gStyle->SetTitleXOffset(0.8);
+gStyle->SetTitleYOffset(1.1);
+gROOT->ForceStyle();
+
+
+
+
+int iPhi, iEta, iz;
+double ic, eic;
+
+/*int iPhi1, iEta1, iz1;
+double ic1, eic1;
+int iPhi2, iEta2, iz2;
+double ic2, eic2;
+int iPhi3, iEta3, iz3;
+double ic3, eic3;
+int iPhi4, iEta4, iz4;
+double ic4, eic4;
+*/
+/// Histo for first ic set
+TString Name = Form("mapEB_%s",inputFile1.c_str());
+TH2F * map1_EB = new TH2F(Name,Name,360,1, 361, 171, -85, 86);
+Name = Form("mapEEp_%s",inputFile1.c_str());
+TH2F * map1_EEp = new TH2F(Name,Name,100,1, 101, 100, 1, 101);
+Name = Form("mapEEm_%s",inputFile1.c_str());
+TH2F * map1_EEm = new TH2F(Name,Name,100,1, 101, 100, 1, 101);
+
+std::cout<<" Opening first file ..... reading "<> iEta >> iPhi >> iz >> ic >> eic ;
+if(iz==0) map1_EB->Fill(iPhi,iEta,ic);
+if(iz==1) map1_EEp->Fill(iEta,iPhi,ic);
+if(iz==-1)map1_EEm->Fill(iEta,iPhi,ic);
+}
+std::cout<<" End first file "<> iEta >> iPhi >> iz >> ic >> eic ;
+if(iz==0) map2_EB->Fill(iPhi,iEta,ic);
+if(iz==1) map2_EEp->Fill(iEta,iPhi,ic);
+if(iz==-1) map2_EEm->Fill(iEta,iPhi,ic);
+}
+std::cout<<" End second file "<> iEta1 >> iPhi1 >> iz1 >> ic1 >> eic1 ;
+ File1d >> iEta2 >> iPhi2 >> iz2 >> ic2 >> eic2;
+
+File2p >> iEta3 >> iPhi3 >> iz3 >> ic3 >> eic3 ;
+ File2d >> iEta4 >> iPhi4 >> iz4 >> ic4 >> eic4;
+ // if (ic1!=ic2)
+ // std::cout<<"iEta: "<> iEta >> iPhi >> iz >> ic >> eic ;
+if(iz==0) map1p_EB->Fill(iPhi,iEta,ic);
+if(iz==1) map1p_EEp->Fill(iEta,iPhi,ic);
+if(iz==-1)map1p_EEm->Fill(iEta,iPhi,ic);
+// std::cout<> iEta >> iPhi >> iz >> ic >> eic ;
+if(iz==0) map1d_EB->Fill(iPhi,iEta,ic);
+if(iz==1) map1d_EEp->Fill(iEta,iPhi,ic);
+if(iz==-1)map1d_EEm->Fill(iEta,iPhi,ic);
+}
+
+
+Name = Form("mapEB_%s",inputFile2p.c_str());
+TH2F * map2p_EB = new TH2F(Name,Name,360,1, 361, 171, -85, 86);
+Name = Form("mapEEp_%s",inputFile2p.c_str());
+TH2F * map2p_EEp = new TH2F(Name,Name,100,1, 101, 100, 1, 101);
+Name = Form("mapEEm_%s",inputFile2p.c_str());
+TH2F * map2p_EEm = new TH2F(Name,Name,100,1, 101, 100, 1, 101);
+
+std::cout<<" Opening first file ..... reading "<> iEta >> iPhi >> iz >> ic >> eic ;
+if(iz==0) map2p_EB->Fill(iPhi,iEta,ic);
+if(iz==1) map2p_EEp->Fill(iEta,iPhi,ic);
+if(iz==-1)map2p_EEm->Fill(iEta,iPhi,ic);
+}
+std::cout<<" End first file "<> iEta >> iPhi >> iz >> ic >> eic ;
+if(iz==0) map2d_EB->Fill(iPhi,iEta,ic);
+if(iz==1) map2d_EEp->Fill(iEta,iPhi,ic);
+if(iz==-1)map2d_EEm->Fill(iEta,iPhi,ic);
+}
+
+
+ // TApplication* theApp = new TApplication("Application",&argc, argv);
+
+
+
+/// Set of two ic sets
+
+Name = Form("diffmapEB");
+TH2F * diffmap_EB = (TH2F*) map1_EB->Clone("diffmapEB");
+diffmap_EB->Reset();
+
+Name = Form("diffmapEEp");
+TH2F * diffmap_EEp = (TH2F*) map1_EEp->Clone("diffmapEEp");
+diffmap_EEp->Reset();
+
+Name = Form("diffmapEEm");
+TH2F * diffmap_EEm = (TH2F*) map1_EEm->Clone("diffmapEEm");
+diffmap_EEm->Reset();
+
+Name = Form("ratiomapEB");
+TH2F * ratiomap_EB = (TH2F*) map1_EB->Clone("ratiomapEB");
+ratiomap_EB->Reset();
+
+Name = Form("ratiomapEEp");
+TH2F * ratiomap_EEp = (TH2F*) map1_EEp->Clone("ratiomapEEp");
+ratiomap_EEp->Reset();
+
+Name = Form("ratiomapEEm");
+TH2F * ratiomap_EEm = (TH2F*) map1_EEm->Clone("ratiomapEEm");
+ratiomap_EEm->Reset();
+
+Name = Form("absolutemapEB");
+TH2F * absolutemap_EB = (TH2F*) map1_EB->Clone("absolutemapEB");
+absolutemap_EB->Reset();
+
+Name = Form("absolutemapEEp");
+TH2F * absolutemap_EEp = (TH2F*) map1_EEp->Clone("absolutemapEEp");
+absolutemap_EEp->Reset();
+
+Name = Form("absolutemapEEm");
+TH2F * absolutemap_EEm = (TH2F*) map1_EEm->Clone("absolutemapEEm");
+absolutemap_EEm->Reset();
+
+Name = Form("diffHistEB");
+TH1F * diffHistEB = new TH1F(Name,Name,500,0.9,1.1);
+diffHistEB->SetLineWidth(2);
+
+Name = Form("diffHistEB_0_20");
+TH1F * diffHistEB_0_20 = new TH1F(Name,Name,200,-1,1);
+diffHistEB_0_20->SetLineWidth(2);
+
+Name = Form("diffHistEB_20_40");
+TH1F * diffHistEB_20_40 = new TH1F(Name,Name,200,-1,1);
+diffHistEB_20_40->SetLineWidth(2);
+
+Name = Form("diffHistEB_40_60");
+TH1F * diffHistEB_40_60 = new TH1F(Name,Name,200,-1,1);
+diffHistEB_40_60->SetLineWidth(2);
+
+Name = Form("diffHistEB_60_85");
+TH1F * diffHistEB_60_85 = new TH1F(Name,Name,200,-1,1);
+diffHistEB_60_85->SetLineWidth(2);
+
+Name = Form("diffHistEEp");
+TH1F * diffHistEEp = new TH1F(Name,Name,200,0.8,1.2);
+diffHistEEp->SetLineWidth(2);
+
+Name = Form("diffHistEEp_0_5");
+TH1F * diffHistEEp_0_5 = new TH1F(Name,Name,50,-1,1);
+diffHistEEp_0_5->SetLineWidth(2);
+
+Name = Form("diffHistEEp_5_15");
+TH1F * diffHistEEp_5_15 = new TH1F(Name,Name,50,-1,1);
+diffHistEEp_5_15->SetLineWidth(2);
+
+Name = Form("diffHistEEp_15_25");
+TH1F * diffHistEEp_15_25 = new TH1F(Name,Name,50,-1,1);
+diffHistEEp_15_25->SetLineWidth(2);
+
+Name = Form("diffHistEEp_25_35");
+TH1F * diffHistEEp_25_35 = new TH1F(Name,Name,50,-1,1);
+diffHistEEp_25_35->SetLineWidth(2);
+
+Name = Form("diffHistEEm");
+TH1F * diffHistEEm = new TH1F(Name,Name,200,0.8,1.2);
+diffHistEEm->SetLineWidth(2);
+
+Name = Form("diffHistEEm_0_5");
+TH1F * diffHistEEm_0_5 = new TH1F(Name,Name,50,-1,1);
+diffHistEEm_0_5->SetLineWidth(2);
+
+Name = Form("diffHistEEm_5_15");
+TH1F * diffHistEEm_5_15 = new TH1F(Name,Name,50,-1,1);
+diffHistEEm_5_15->SetLineWidth(2);
+
+Name = Form("diffHistEEm_15_25");
+TH1F * diffHistEEm_15_25 = new TH1F(Name,Name,50,-1,1);
+diffHistEEm_15_25->SetLineWidth(2);
+
+Name = Form("diffHistEEm_25_35");
+TH1F * diffHistEEm_25_35 = new TH1F(Name,Name,50,-1,1);
+diffHistEEm_25_35->SetLineWidth(2);
+
+
+Name = Form("correlationEB");
+TH2F * correlationEB = new TH2F(Name,Name,100,0.9,1.1,100,0.9,1.1);
+
+Name = Form("correlationEEp");
+TH2F * correlationEEp= new TH2F(Name,Name,100,0.8,1.2,100,0.8,1.2);
+
+Name = Form("correlationEEm");
+TH2F * correlationEEm= new TH2F(Name,Name,100,0.8,1.2,100,0.8,1.2);
+
+TEndcapRings *eRings = new TEndcapRings();
+
+
+ float sumEB=0, sum2EB=0;
+ float sumEEp=0, sum2EEp=0;
+ float sumEEm=0, sum2EEm=0;
+
+ float sumEB_0_20=0, sum2EB_0_20=0;
+ float sumEB_20_40=0, sum2EB_20_40=0;
+ float sumEB_40_60=0, sum2EB_40_60=0;
+ float sumEB_60_85=0, sum2EB_60_85=0;
+
+ float sumEEp_0_5=0, sum2EEp_0_5=0;
+ float sumEEp_5_15=0, sum2EEp_5_15=0;
+ float sumEEp_15_25=0, sum2EEp_15_25=0;
+ float sumEEp_25_35=0, sum2EEp_25_35=0;
+
+ float sumEEm_0_5=0, sum2EEm_0_5=0;
+ float sumEEm_5_15=0, sum2EEm_5_15=0;
+ float sumEEm_15_25=0, sum2EEm_15_25=0;
+ float sumEEm_25_35=0, sum2EEm_25_35=0;
+
+ for(int iEta=1; iEtaGetNbinsY()+1; iEta++){
+ if (iEta==86) continue;
+ for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){
+
+ int eta = iEta-86;
+ if(map1_EB->GetBinContent(iPhi,iEta)==-1. || map2_EB->GetBinContent(iPhi,iEta)==-1.){
+ diffmap_EB->SetBinContent(iPhi,iEta,-1.);
+ ratiomap_EB->SetBinContent(iPhi,iEta,-1.);
+ absolutemap_EB->SetBinContent(iPhi,iEta,map1_EB->GetBinContent(iPhi,iEta));
+ FileRatio << eta << "\t" << iPhi << "\t" << 0 << "\t" << -1. << "\t" << -999. << std::endl;
+ FileAbsolute << eta << "\t" << iPhi << "\t" << 0 << "\t" << map1_EB->GetBinContent(iPhi,iEta) << "\t" << -999. << std::endl;
+ FileMiscalib << eta << "\t" << iPhi << "\t" << 0 << "\t" << map1_EB->GetBinContent(iPhi,iEta) << "\t" << -999. << std::endl;
+
+ continue;}
+
+ sumEB+=map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta);
+ sum2EB+=(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta))*(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ if (abs(eta)<20) {
+ sumEB_0_20+=map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta);
+ sum2EB_0_20+=(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta))*(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ diffHistEB_0_20->Fill(map1_EB->GetBinContent(iPhi,iEta)/map2_EB->GetBinContent(iPhi,iEta));
+ }
+ else if (abs(eta)<40) {
+ sumEB_20_40+=map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta);
+ sum2EB_20_40+=(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta))*(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ diffHistEB_20_40->Fill(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ }
+ else if (abs(eta)<60) {
+ sumEB_40_60+=map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta);
+ sum2EB_40_60+=(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta))*(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ diffHistEB_40_60->Fill(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ }
+ else {
+ sumEB_60_85+=map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta);
+ sum2EB_60_85+=(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta))*(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ diffHistEB_60_85->Fill(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ }
+
+ diffmap_EB->SetBinContent(iPhi,iEta,map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta));
+ diffHistEB->Fill(map1_EB->GetBinContent(iPhi,iEta)/map2_EB->GetBinContent(iPhi,iEta));
+ ratiomap_EB->SetBinContent(iPhi,iEta,map1_EB->GetBinContent(iPhi,iEta)/map2_EB->GetBinContent(iPhi,iEta));
+ absolutemap_EB->SetBinContent(iPhi,iEta,map1_EB->GetBinContent(iPhi,iEta)*map2_EB->GetBinContent(iPhi,iEta));
+ FileRatio << eta << "\t" << iPhi << "\t" << 0 << "\t" << map1_EB->GetBinContent(iPhi,iEta)/map2_EB->GetBinContent(iPhi,iEta) << "\t" <<
+ abs(map1p_EB->GetBinContent(iPhi,iEta)/map2p_EB->GetBinContent(iPhi,iEta) - map1d_EB->GetBinContent(iPhi,iEta)/map2d_EB->GetBinContent(iPhi,iEta))/
+ (map1p_EB->GetBinContent(iPhi,iEta)/map2p_EB->GetBinContent(iPhi,iEta) + map1d_EB->GetBinContent(iPhi,iEta)/map2d_EB->GetBinContent(iPhi,iEta))<< std::endl;
+ FileAbsolute << eta << "\t" << iPhi << "\t" << 0 << "\t" << map1_EB->GetBinContent(iPhi,iEta)*map2_EB->GetBinContent(iPhi,iEta) << "\t" << -999. << std::endl;
+ correlationEB->Fill(map1_EB->GetBinContent(iPhi,iEta),map2_EB->GetBinContent(iPhi,iEta));
+
+ if ( (iPhi>20 && iPhi<40) || (iPhi>60 && iPhi<80) || (iPhi>100 && iPhi<120) || (iPhi>140 && iPhi<160))
+ FileMiscalib << eta << "\t" << iPhi << "\t" << 0 << "\t" << map1_EB->GetBinContent(iPhi,iEta)*1.3 << "\t" << -999. << std::endl;
+ else if ((iPhi>200 && iPhi<240) || (iPhi>280 && iPhi<300) || (iPhi>340 && iPhi<360))
+ FileMiscalib << eta << "\t" << iPhi << "\t" << 0 << "\t" << map1_EB->GetBinContent(iPhi,iEta)*0.7 << "\t" << -999. << std::endl;
+ else
+ FileMiscalib << eta << "\t" << iPhi << "\t" << 0 << "\t" << map1_EB->GetBinContent(iPhi,iEta) << "\t" << -999. << std::endl;
+
+ }
+}
+
+
+for(int ix =1; ixGetNbinsX()+1; ix++){
+ for(int iy=1; iyGetNbinsY()+1; iy++){
+
+ if(map1_EEp->GetBinContent(ix,iy)==0 || map2_EEp->GetBinContent(ix,iy)==0) continue;
+
+ if(map1_EEp->GetBinContent(ix,iy)==-1. || map2_EEp->GetBinContent(ix,iy)==-1.){
+ diffmap_EEp->SetBinContent(ix,iy,-1.);
+ ratiomap_EEp->SetBinContent(ix,iy,-1.);
+ absolutemap_EEp->SetBinContent(ix,iy,map1_EEp->GetBinContent(ix,iy));
+ FileRatio << ix << "\t" << iy << "\t" << 1 << "\t" << -1. << "\t" << -999. << std::endl;
+ FileAbsolute << ix << "\t" << iy << "\t" << 1 << "\t" << map1_EEp->GetBinContent(ix,iy) << "\t" << -999. << std::endl;
+ FileMiscalib << ix << "\t" << iy << "\t" << 1 << "\t" << map1_EEp->GetBinContent(ix,iy) << "\t" << -999. << std::endl;
+
+ continue;}
+
+ sumEEp+=map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy);
+ sum2EEp+=(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy))*(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+
+ int iEta = int(eRings->GetEndcapIeta(ix,iy,1))-86;
+
+ if (abs(iEta)<5) {
+ sumEEp_0_5+=map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy);
+ sum2EEp_0_5+=(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy))*(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+ diffHistEEp_0_5->Fill(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+ }
+ else if (abs(iEta)<15) {
+ sumEEp_5_15+=map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy);
+ sum2EEp_5_15+=(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy))*(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+ diffHistEEp_5_15->Fill(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+ }
+ else if (abs(iEta)<25) {
+ sumEEp_15_25+=map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy);
+ sum2EEp_15_25+=(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy))*(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+ diffHistEEp_15_25->Fill(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+ }
+ else {
+ sumEEp_25_35+=map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy);
+ sum2EEp_25_35+=(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy))*(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+ diffHistEEp_25_35->Fill(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+ }
+
+ diffmap_EEp->SetBinContent(ix,iy,map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy));
+ diffHistEEp->Fill(map1_EEp->GetBinContent(ix,iy)/map2_EEp->GetBinContent(ix,iy));
+ ratiomap_EEp->SetBinContent(ix,iy,map1_EEp->GetBinContent(ix,iy)/map2_EEp->GetBinContent(ix,iy));
+ absolutemap_EEp->SetBinContent(ix,iy,map1_EEp->GetBinContent(ix,iy)*map2_EEp->GetBinContent(ix,iy));
+ FileRatio << ix << "\t" << iy << "\t" << 1 << "\t" << map1_EEp->GetBinContent(ix,iy)/map2_EEp->GetBinContent(ix,iy) << "\t" <<
+ abs(map1p_EEp->GetBinContent(iPhi,iEta)/map2p_EEp->GetBinContent(iPhi,iEta) - map1d_EEp->GetBinContent(iPhi,iEta)/map2d_EEp->GetBinContent(iPhi,iEta))/
+ (map1p_EEp->GetBinContent(iPhi,iEta)/map2p_EEp->GetBinContent(iPhi,iEta) + map1d_EEp->GetBinContent(iPhi,iEta)/map2d_EEp->GetBinContent(iPhi,iEta))<< std::endl;
+ FileAbsolute << ix << "\t" << iy << "\t" << 1 << "\t" << map1_EEp->GetBinContent(ix,iy)*map2_EEp->GetBinContent(ix,iy) << "\t" << -999. << std::endl;
+ correlationEEp->Fill(map1_EEp->GetBinContent(ix,iy),map2_EEp->GetBinContent(ix,iy));
+
+ if ( (ix>20 && ix<30) || (ix>50 && ix<55) || (ix>80 && ix<90))
+ FileMiscalib << ix << "\t" << iy << "\t" << 1 << "\t" << map1_EEp->GetBinContent(ix,iy)*1.3 << "\t" << -999. << std::endl;
+ else if ((ix>5 && ix<15) || (ix>40 && ix<45) || (ix>60 && ix<70))
+ FileMiscalib << ix << "\t" << iy << "\t" << 1 << "\t" << map1_EEp->GetBinContent(ix,iy)*0.7 << "\t" << -999. << std::endl;
+ else
+ FileMiscalib << ix << "\t" << iy << "\t" << 1 << "\t" << map1_EEp->GetBinContent(ix,iy) << "\t" << -999. << std::endl;
+
+ }
+}
+
+
+
+for(int ix =1; ixGetNbinsX()+1; ix++){
+ for(int iy=1; iyGetNbinsY()+1; iy++){
+
+ if(map1_EEm->GetBinContent(ix,iy)==0 || map2_EEm->GetBinContent(ix,iy)==0) continue;
+
+ if(map1_EEm->GetBinContent(ix,iy)==-1. || map2_EEm->GetBinContent(ix,iy)==-1.){
+ diffmap_EEm->SetBinContent(ix,iy,-1.);
+ ratiomap_EEm->SetBinContent(ix,iy,-1.);
+ absolutemap_EEm->SetBinContent(ix,iy,map1_EEm->GetBinContent(ix,iy));
+ FileRatio << ix << "\t" << iy << "\t" << -1 << "\t" << map1_EEm->GetBinContent(ix,iy) << "\t" << -999. << std::endl;
+ FileAbsolute << ix << "\t" << iy << "\t" << -1 << "\t" << -1. << "\t" << -999. << std::endl;
+ continue;}
+
+ sumEEm+=map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy);
+ sum2EEm+=(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy))*(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+
+ int iEta = int(eRings->GetEndcapIeta(ix,iy,1))-86;
+
+ if (abs(iEta)<5) {
+ sumEEm_0_5+=map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy);
+ sum2EEm_0_5+=(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy))*(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+ diffHistEEm_0_5->Fill(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+ }
+ else if (abs(iEta)<15) {
+ sumEEm_5_15+=map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy);
+ sum2EEm_5_15+=(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy))*(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+ diffHistEEm_5_15->Fill(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+ }
+ else if (abs(iEta)<25) {
+ sumEEm_15_25+=map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy);
+ sum2EEm_15_25+=(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy))*(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+ diffHistEEm_15_25->Fill(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+ }
+ else {
+ sumEEm_25_35+=map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy);
+ sum2EEm_25_35+=(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy))*(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+ diffHistEEm_25_35->Fill(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+ }
+
+ diffmap_EEm->SetBinContent(ix,iy,map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy));
+ diffHistEEm->Fill(map1_EEm->GetBinContent(ix,iy)/map2_EEm->GetBinContent(ix,iy));
+ ratiomap_EEm->SetBinContent(ix,iy,map1_EEm->GetBinContent(ix,iy)/map2_EEm->GetBinContent(ix,iy));
+ absolutemap_EEm->SetBinContent(ix,iy,map1_EEm->GetBinContent(ix,iy)*map2_EEm->GetBinContent(ix,iy));
+ FileRatio << ix << "\t" << iy << "\t" << -1 << "\t" << map1_EEm->GetBinContent(ix,iy)/map2_EEm->GetBinContent(ix,iy) << "\t" <<
+ abs(map1p_EEm->GetBinContent(iPhi,iEta)/map2p_EEm->GetBinContent(iPhi,iEta) - map1d_EEm->GetBinContent(iPhi,iEta)/map2d_EEm->GetBinContent(iPhi,iEta))/
+ (map1p_EEm->GetBinContent(iPhi,iEta)/map2p_EEm->GetBinContent(iPhi,iEta) + map1d_EEm->GetBinContent(iPhi,iEta)/map2d_EEm->GetBinContent(iPhi,iEta))<< std::endl;
+ FileAbsolute << ix << "\t" << iy << "\t" << -1 << "\t" << map1_EEm->GetBinContent(ix,iy)*map2_EEm->GetBinContent(ix,iy) << "\t" << -999. << std::endl;
+ correlationEEm->Fill(map1_EEm->GetBinContent(ix,iy),map2_EEm->GetBinContent(ix,iy));
+
+ if ( (ix>20 && ix<30) || (ix>50 && ix<55) || (ix>80 && ix<90))
+ FileMiscalib << ix << "\t" << iy << "\t" << -1 << "\t" << map1_EEm->GetBinContent(ix,iy)*1.3 << "\t" << -999. << std::endl;
+ else if ((ix>5 && ix<15) || (ix>40 && ix<45) || (ix>60 && ix<70))
+ FileMiscalib << ix << "\t" << iy << "\t" << -1 << "\t" << map1_EEm->GetBinContent(ix,iy)*0.7 << "\t" << -999. << std::endl;
+ else
+ FileMiscalib << ix << "\t" << iy << "\t" << -1 << "\t" << map1_EEm->GetBinContent(ix,iy) << "\t" << -999. << std::endl;
+
+ }
+}
+
+
+
+TF1 *fgaus2 = new TF1("fgaus2","gaus",-0.02,0.02);
+
+ std::cout<<"FIT: "<SetParameter(1,0);
+fgaus2->SetParameter(2,diffHistEB->GetRMS());
+//fgaus2->SetRange(0-0.5*diffHistEB->GetRMS(),0+0.5*diffHistEB->GetRMS());
+fgaus2->SetRange(-0.03,0.03);
+fgaus2->SetLineColor(kRed);
+//diffHistEB->Fit("fgaus2","QRME");
+cout<<" EB-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EB_0_20-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EB_20_40-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EB_40_60-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EB_60_85-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<SetParameter(1,0);
+fgaus2->SetParameter(2,diffHistEEp->GetRMS());
+fgaus2->SetRange(-0.1,0.08);
+//fgaus2->SetRange(0-0.5*diffHistEEp->GetRMS(),0+0.5*diffHistEEp->GetRMS());
+fgaus2->SetLineColor(kRed);
+//diffHistEEp->Fit("fgaus2","QRME");
+cout<<" EEp-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EEp_0_5-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EEp_5_15-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EEp_15_25-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EEp_25_35-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<SetParameter(1,0);
+fgaus2->SetParameter(2,diffHistEEm->GetRMS());
+fgaus2->SetRange(-0.1,0.08);
+//fgaus2->SetRange(0-0.5*diffHistEEm->GetRMS(),0+0.5*diffHistEEm->GetRMS());
+fgaus2->SetLineColor(kRed);
+fgaus2->SetLineColor(kRed);
+//diffHistEEm->Fit("fgaus2","QRME");
+cout<<" EEm-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EEm_0_5-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EEm_5_15-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EEm_15_25-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<Fit("fgaus2","QRME");
+cout<<" EEm_25_35-Mean: "<GetParameter(1)<<" RMSFit: "<GetParameter(2)<GetChisquare()/fgaus2->GetNDF()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<GetMean()<<" RMSdist "<GetRMS()<