#include <CalibBase.h>
Inheritance diagram for CalibBase:
Public Member Functions | |
CalibBase () | |
virtual | ~CalibBase () |
virtual void | init (TObjArray *hlist, MdcCosGeom *pGeom)=0 |
virtual void | mergeHist (TFile *fhist)=0 |
virtual void | calib (MdcCalibConst *calconst, TObjArray *newXtList, TObjArray *r2tList)=0 |
Private Member Functions | |
void | renameHist () |
Private Attributes | |
TFolder * | m_fdcom |
TH1F * | m_effNtrk |
TH1F * | m_effNtrkRecHit |
TH1F * | m_hresAllInc |
TH1F * | m_hresAllExc |
TH1F * | m_hresAllAve |
TH1F * | m_hresInnInc |
TH1F * | m_hresInnExc |
TH1F * | m_hresStpInc |
TH1F * | m_hresStpExc |
TH1F * | m_hresOutInc |
TH1F * | m_hresOutExc |
TFolder * | m_fdResQ |
TH1F * | m_hresAveAllQ [14] |
TH1F * | m_hresAveOutQ [14] |
TH1F * | m_hresAveLayQ [43][14] |
TH1F * | m_hratio |
TH1F * | m_hbbTrkFlg |
TH1F * | m_hTesAll |
TH1F * | m_hTesGood |
TH1F * | m_hTesAllFlag |
TH1F * | m_hTesRec |
TH1F * | m_hTesCalFlag |
TH1F * | m_hTesCalUse |
TH1F * | m_hnRawHit |
TH1F * | m_hpt |
TH1F * | m_hpMax |
TH1F * | m_hpMaxCms |
TH1F * | m_hptPos |
TH1F * | m_hptNeg |
TH1F * | m_hp |
TH1F * | m_hp_cms |
TH1F * | m_hpPos |
TH1F * | m_hpNeg |
TH1F * | m_hpPoscms |
TH1F * | m_hpNegcms |
TH1F * | m_hp_cut |
TH1F * | m_hnTrk |
TH1F * | m_hnTrkCal |
TH1F * | m_hnhitsRec |
TH1F * | m_hnhitsRecInn |
TH1F * | m_hnhitsRecStp |
TH1F * | m_hnhitsRecOut |
TH1F * | m_hnhitsCal |
TH1F * | m_hnhitsCalInn |
TH1F * | m_hnhitsCalStp |
TH1F * | m_hnhitsCalOut |
TH1F * | m_wirehitmap |
TH1F * | m_layerhitmap |
TH1F * | m_hchisq |
TH1F * | m_hnoisephi |
TH1F * | m_hnoiselay |
TH1F * | m_hnoisenhits |
TH1F * | m_hdr |
TH1F * | m_hphi0 |
TH1F * | m_hkap |
TH1F * | m_hdz |
TH1F * | m_htanl |
TH1F * | m_hcosthe |
TH1F * | m_hcostheNeg |
TH1F * | m_hcosthePos |
TH1F * | m_hx0 |
TH1F * | m_hy0 |
TH1F * | m_hdelZ0 |
TGraph * | m_grX0Y0 |
int | m_nGrPoint |
TH1F * | m_hitEffAll |
TH1F * | m_hitEffRaw |
TH1F * | m_hitEffRec |
TFolder * | m_fdTime |
TH1F * | m_htraw [NLAYER] |
TH1F * | m_htdr [NLAYER] |
TH1F * | m_htdrlr [NLAYER][2] |
TFolder * | m_fdres |
TH1F * | m_hresInc [NLAYER] |
TH1F * | m_hreslrInc [NLAYER][2] |
TH1F * | m_hresExc [NLAYER] |
TH1F * | m_hreslrExc [NLAYER][2] |
TFolder * | m_fdmomPhi |
TH1F * | m_ppPhi [NPhiBin] |
TH1F * | m_pnPhi [NPhiBin] |
TH1F * | m_ppThe [NThetaBin] |
TH1F * | m_pnThe [NThetaBin] |
TH1F * | m_ppThePhi [NThetaBin][NPhiBin] |
TH1F * | m_pnThePhi [NThetaBin][NPhiBin] |
TH1F * | m_ppPhiCms [NPhiBin] |
TH1F * | m_pnPhiCms [NPhiBin] |
TH1F * | m_ppTheCms [NThetaBin] |
TH1F * | m_pnTheCms [NThetaBin] |
TH1F * | m_ppThePhiCms [NThetaBin][NPhiBin] |
TH1F * | m_pnThePhiCms [NThetaBin][NPhiBin] |
TFolder * | m_fdr2d |
TH1F * | m_hr2dInc [43][2][2][NSDBIN] |
TH1F * | m_hr2dExc [43][2][2][NSDBIN] |
TFolder * | m_fdr2t |
TH1F * | m_hr2t [43][18][2][45] |
Static Private Attributes | |
static const int | NPhiBin = 20 |
static const int | NThetaBin = 9 |
Permits implementation of deep copy by means of virtual update method. [Used in CalibMySQLCnvSvc::updateCalib]
Definition at line 21 of file CalibBase.h.
CalibBase::CalibBase | ( | ) |
CalibBase::~CalibBase | ( | ) | [virtual] |
void CalibBase::calib | ( | MdcCalibConst * | calconst, | |
TObjArray * | newXtList, | |||
TObjArray * | r2tList | |||
) | [pure virtual] |
Implemented in GrXtCalib, IniCalib, PreT0Calib, PreXtCalib, QtCalib, T0Calib, XtCalib, and XtInteCalib.
Definition at line 711 of file CalibBase.cpp.
References bin, gCalSigma, MdcCalibConst::getSdpar(), gFgCalib, gNEntr, gResiType, genRecEmupikp::i, m_effNtrk, m_effNtrkRecHit, m_hr2dExc, m_hr2dInc, NENTRXT, NLAYER, NSDBIN, renameHist(), and MdcCalibConst::resetSdpar().
Referenced by XtInteCalib::calib(), XtCalib::calib(), T0Calib::calib(), QtCalib::calib(), GrXtCalib::calib(), and main().
00711 { 00712 int nGoodAll = 0; 00713 int nGoodInn = 0; 00714 int nGoodStp = 0; 00715 int nGoodOut = 0; 00716 int nTotAll = 0; 00717 int nTotInn = 0; 00718 int nTotStp = 0; 00719 int nTotOut = 0; 00720 ofstream feffi("MdcLayerEffi.dat"); 00721 for(int lay=0; lay<NLAYER; lay++){ 00722 double effNtrk = m_effNtrk->GetBinContent(lay+1); 00723 double effGoodHit = m_effNtrkRecHit->GetBinContent(lay+1); 00724 nGoodAll += effGoodHit; 00725 if(lay < 8) nGoodInn += effGoodHit; 00726 else if (lay < 20) nGoodStp += effGoodHit; 00727 else nGoodOut += effGoodHit; 00728 00729 nTotAll += effNtrk; 00730 if(lay < 8) nTotInn += effNtrk; 00731 else if (lay < 20) nTotStp += effNtrk; 00732 else nTotOut += effNtrk; 00733 00734 double effi = (double)effGoodHit / (double)effNtrk; 00735 double effErr = sqrt(effi * (1-effi) / (double)effNtrk); 00736 feffi << setw(5) << lay << setw(15) << effi << setw(15) << effErr 00737 << setw(15) << effGoodHit << setw(15) << effNtrk << endl; 00738 } 00739 double effiAll = (double)nGoodAll / (double)(nTotAll); 00740 double errAll = sqrt(effiAll * (1-effiAll) / (double)(nTotAll)); 00741 double effiInn = (double)nGoodInn / (double)(nTotInn); 00742 double errInn = sqrt(effiInn * (1-effiInn) / (double)(nTotInn)); 00743 double effiStp = (double)nGoodStp / (double)(nTotStp); 00744 double errStp = sqrt(effiStp * (1-effiStp) / (double)(nTotStp)); 00745 double effiOut = (double)nGoodOut / (double)(nTotOut); 00746 double errOut = sqrt(effiOut * (1-effiOut) / (double)(nTotOut)); 00747 feffi << endl << "EffiAll: " << setw(15) << effiAll << setw(15) << errAll 00748 << setw(15) << nGoodAll << setw(15) << nTotAll << endl; 00749 feffi << endl << "EffiInn: " << setw(15) << effiInn << setw(15) << errInn 00750 << setw(15) << nGoodInn << setw(15) << nTotInn << endl; 00751 feffi << endl << "EffiStp: " << setw(15) << effiStp << setw(15) << errStp 00752 << setw(15) << nGoodStp << setw(15) << nTotStp << endl; 00753 feffi << endl << "EffiOut: " << setw(15) << effiOut << setw(15) << errOut 00754 << setw(15) << nGoodOut << setw(15) << nTotOut << endl; 00755 feffi.close(); 00756 00757 // update resolution function 00758 Stat_t histEntry; 00759 int nSdBin[43]; 00760 for(int lay=0; lay<8; lay++) nSdBin[lay] = 12; // 14 00761 for(int lay=8; lay<43; lay++) nSdBin[lay] = 16; // 18 00762 double sigm[NSDBIN]; 00763 if(1 == gCalSigma){ 00764 ofstream fr2d("logr2d.dat"); 00765 for(int lay=0; lay<43; lay++){ 00766 int nbinLim = 13; 00767 if(lay<8) nbinLim = 9; 00768 if(0 == gFgCalib[lay]) continue; 00769 for(int iEntr=0; iEntr<gNEntr[lay]; iEntr++){ 00770 for(int lr=0; lr<2; lr++){ 00771 fr2d << setw(3) << lay << setw(3) << iEntr << setw(3) << lr << endl; 00772 for(int bin=0; bin<nSdBin[lay]; bin++){ 00773 if(1 == gResiType){ 00774 histEntry = m_hr2dExc[lay][iEntr][lr][bin]->GetEntries(); 00775 double rms = m_hr2dExc[lay][iEntr][lr][bin]->GetRMS(); 00776 m_hr2dExc[lay][iEntr][lr][bin]->Fit("gaus", "Q"); 00777 double gausSigm = m_hr2dExc[lay][iEntr][lr][bin]->GetFunction("gaus")->GetParameter(2); 00778 // if(histEntry<50){ 00779 // sigm[bin] = calconst->getSdpar(lay, iEntr, lr, bin); 00780 // } else if((lay>2) && (histEntry>500) && (fabs(rms-gausSigm)<0.02)){ 00781 // sigm[bin] = gausSigm; 00782 // } else{ 00783 // sigm[bin] = rms; 00784 // } 00785 00786 if(histEntry > 500){ 00787 sigm[bin] = gausSigm; 00788 } else if(histEntry>100){ 00789 sigm[bin] = rms; 00790 } else{ 00791 sigm[bin] = calconst->getSdpar(lay, iEntr, lr, bin); 00792 } 00793 if(bin>=nbinLim){ 00794 if(sigm[bin] < sigm[bin-1]) sigm[bin] = sigm[bin-1]; 00795 } 00796 } else{ 00797 histEntry = m_hr2dInc[lay][iEntr][lr][bin]->GetEntries(); 00798 double rms = m_hr2dInc[lay][iEntr][lr][bin]->GetRMS(); 00799 m_hr2dInc[lay][iEntr][lr][bin]->Fit("gaus", "Q"); 00800 double gausSigm = m_hr2dInc[lay][iEntr][lr][bin]->GetFunction("gaus")->GetParameter(2); 00801 if(histEntry<50){ 00802 sigm[bin] = calconst->getSdpar(lay, iEntr, lr, bin); 00803 } else if((lay>2) && (histEntry>500) && (fabs(rms-gausSigm)<0.02)){ 00804 sigm[bin] = gausSigm; 00805 } else{ 00806 sigm[bin] = rms; 00807 } 00808 if(bin>=nbinLim){ 00809 if(sigm[bin] < sigm[bin-1]) sigm[bin] = sigm[bin-1]; 00810 } 00811 // if(histEntry > 500){ 00812 // m_hr2dInc[lay][iEntr][lr][bin]->Fit("gaus", "Q"); 00813 // sigm[bin] = m_hr2dInc[lay][iEntr][lr][bin]->GetFunction("gaus")->GetParameter(2); 00814 // } else if(histEntry>100){ 00815 // sigm[bin] = m_hr2dInc[lay][iEntr][lr][bin]->GetRMS(); 00816 // } else{ 00817 // sigm[bin] = 0.2; 00818 // } 00819 } 00820 if(sigm[bin] < 0.05) sigm[bin] = 0.05; // for boundary layers 00821 } // end of bin loop 00822 for(int bin=nSdBin[lay]; bin<NSDBIN; bin++){ 00823 sigm[bin] = sigm[bin-1]; 00824 } 00825 00826 for(int bin=0; bin<NSDBIN; bin++){ 00827 if(1 == gNEntr[lay]){ 00828 for(int i=0; i<6; i++) calconst->resetSdpar(lay, i, lr, bin, sigm[bin]); 00829 } else if(2 == gNEntr[lay]){ 00830 if(0 == iEntr){ 00831 for(int i=0; i<3; i++){ // entr<0 00832 calconst->resetSdpar(lay, i, lr, bin, sigm[bin]); 00833 } 00834 } else{ 00835 for(int i=3; i<6; i++){ // entr>0 00836 calconst->resetSdpar(lay, i, lr, bin, sigm[bin]); 00837 } 00838 } 00839 } 00840 fr2d << setw(5) << bin << setw(15) << sigm[bin] << endl; 00841 } 00842 } // lr loop 00843 } // entr loop 00844 } // layer loop 00845 fr2d.close(); 00846 } 00847 00848 int entrId, lrId; 00849 double tdr, sigma; 00850 char hname[200]; 00851 r2tList->Clear(); 00852 TTree* r2ttr[NLAYER]; 00853 for(int lay=0; lay<NLAYER; lay++){ 00854 sprintf(hname, "r2t%02d", lay); 00855 r2ttr[lay] = new TTree(hname, hname); 00856 r2ttr[lay]->Branch("iEntr", &entrId, "iEntr/I"); 00857 r2ttr[lay]->Branch("lr", &lrId, "lr/I"); 00858 r2ttr[lay]->Branch("t", &tdr, "t/D"); 00859 r2ttr[lay]->Branch("s", &sigma, "s/D"); 00860 for(int iEntr=0; iEntr<NENTRXT; iEntr++){ 00861 for(int lr=0; lr<2; lr++){ 00862 for(int bin=0; bin<45; bin++){ 00863 entrId = iEntr; 00864 lrId = lr; 00865 tdr = (double)bin * 10.0 + 5.0; 00866 sigma = 0.13; 00867 r2ttr[lay]->Fill(); 00868 } 00869 } 00870 } 00871 r2tList->Add(r2ttr[lay]); 00872 } 00873 00874 renameHist(); 00875 }
void CalibBase::init | ( | TObjArray * | hlist, | |
MdcCosGeom * | pGeom | |||
) | [pure virtual] |
Implemented in GrXtCalib, IniCalib, PreT0Calib, PreXtCalib, QtCalib, T0Calib, XtCalib, and XtInteCalib.
Definition at line 14 of file CalibBase.cpp.
References bin, gNEntr, genRecEmupikp::i, m_effNtrk, m_effNtrkRecHit, m_fdcom, m_fdmomPhi, m_fdr2d, m_fdres, m_fdResQ, m_fdTime, m_grX0Y0, m_hbbTrkFlg, m_hchisq, m_hcosthe, m_hcostheNeg, m_hcosthePos, m_hdelZ0, m_hdr, m_hdz, m_hitEffAll, m_hitEffRaw, m_hitEffRec, m_hkap, m_hnhitsCal, m_hnhitsCalInn, m_hnhitsCalOut, m_hnhitsCalStp, m_hnhitsRec, m_hnhitsRecInn, m_hnhitsRecOut, m_hnhitsRecStp, m_hnoiselay, m_hnoisenhits, m_hnoisephi, m_hnRawHit, m_hnTrk, m_hnTrkCal, m_hp, m_hp_cms, m_hp_cut, m_hphi0, m_hpMax, m_hpMaxCms, m_hpNeg, m_hpNegcms, m_hpPos, m_hpPoscms, m_hpt, m_hptNeg, m_hptPos, m_hr2dExc, m_hr2dInc, m_hratio, m_hresAllAve, m_hresAllExc, m_hresAllInc, m_hresAveAllQ, m_hresAveLayQ, m_hresAveOutQ, m_hresExc, m_hresInc, m_hresInnExc, m_hresInnInc, m_hreslrExc, m_hreslrInc, m_hresOutExc, m_hresOutInc, m_hresStpExc, m_hresStpInc, m_htanl, m_htdr, m_htdrlr, m_hTesAll, m_hTesAllFlag, m_hTesCalFlag, m_hTesCalUse, m_hTesGood, m_hTesRec, m_htraw, m_hx0, m_hy0, m_layerhitmap, m_nGrPoint, m_pnPhi, m_pnPhiCms, m_pnThe, m_pnTheCms, m_pnThePhi, m_pnThePhiCms, m_ppPhi, m_ppPhiCms, m_ppThe, m_ppTheCms, m_ppThePhi, m_ppThePhiCms, m_wirehitmap, NLAYER, NPhiBin, NSDBIN, and NThetaBin.
Referenced by XtInteCalib::init(), XtCalib::init(), T0Calib::init(), QtCalib::init(), GrXtCalib::init(), and main().
00014 { 00015 char hname[200]; 00016 00017 m_fdcom = new TFolder("mcommon", "common"); 00018 hlist -> Add(m_fdcom); 00019 00020 m_effNtrk = new TH1F("meffNtrk", "", 43, -0.5, 42.5); 00021 m_fdcom->Add(m_effNtrk); 00022 00023 m_effNtrkRecHit = new TH1F("meffNtrkRecHit", "", 43, -0.5, 42.5); 00024 m_fdcom->Add(m_effNtrkRecHit); 00025 00026 m_hresAllInc = new TH1F("mHResAllInc", "", 200, -1.0, 1.0); 00027 m_fdcom -> Add(m_hresAllInc); 00028 00029 m_hresAllExc = new TH1F("mHResAllExc", "", 200, -1.0, 1.0); 00030 m_fdcom -> Add(m_hresAllExc); 00031 00032 m_hresAllAve = new TH1F("mHResAllAve", "", 200, -1.0, 1.0); 00033 m_fdcom -> Add(m_hresAllAve); 00034 00035 m_hresInnInc = new TH1F("mHResInnInc", "", 200, -1.0, 1.0); 00036 m_fdcom -> Add(m_hresInnInc); 00037 00038 m_hresInnExc = new TH1F("mHResInnExc", "", 200, -1.0, 1.0); 00039 m_fdcom -> Add(m_hresInnExc); 00040 00041 m_hresStpInc = new TH1F("mHResStpInc", "", 200, -1.0, 1.0); 00042 m_fdcom -> Add(m_hresStpInc); 00043 00044 m_hresStpExc = new TH1F("mHResStpExc", "", 200, -1.0, 1.0); 00045 m_fdcom -> Add(m_hresStpExc); 00046 00047 m_hresOutInc = new TH1F("mHResOutInc", "", 200, -1.0, 1.0); 00048 m_fdcom -> Add(m_hresOutInc); 00049 00050 m_hresOutExc = new TH1F("mHResOutExc", "", 200, -1.0, 1.0); 00051 m_fdcom -> Add(m_hresOutExc); 00052 00053 m_fdResQ = new TFolder("mResQ", "ResQ"); 00054 hlist->Add(m_fdResQ); 00055 for(int i=0; i<14; i++){ 00056 sprintf(hname, "mresoAll_qbin%02d", i); 00057 m_hresAveAllQ[i] = new TH1F(hname, "", 200, -1, 1); 00058 m_fdResQ->Add(m_hresAveAllQ[i]); 00059 00060 sprintf(hname, "mresoOut_qbin%02d", i); 00061 m_hresAveOutQ[i] = new TH1F(hname, "", 200, -1, 1); 00062 m_fdResQ->Add(m_hresAveOutQ[i]); 00063 } 00064 for(int lay=0; lay<43; lay++){ 00065 for(int i=0; i<14; i++){ 00066 sprintf(hname, "mresoLay%02d_qbin%02d", lay, i); 00067 m_hresAveLayQ[lay][i] = new TH1F(hname, "", 200, -1, 1); 00068 m_fdResQ->Add(m_hresAveLayQ[lay][i]); 00069 } 00070 } 00071 00072 m_hbbTrkFlg = new TH1F("mBbTrkFlg", "", 100, 0, 6); 00073 m_fdcom -> Add(m_hbbTrkFlg); 00074 00075 m_hTesAll = new TH1F("mTesAll", "", 1000, 0, 2000); 00076 m_fdcom -> Add(m_hTesAll); 00077 00078 m_hTesGood = new TH1F("mTesGood", "", 1000, 0, 2000); 00079 m_fdcom -> Add(m_hTesGood); 00080 00081 m_hTesAllFlag = new TH1F("mTesAllFlag", "", 300, -0.5, 299.5); 00082 m_fdcom -> Add(m_hTesAllFlag); 00083 00084 m_hTesRec = new TH1F("mTesRec", "", 1000, 0, 2000); 00085 m_fdcom -> Add(m_hTesRec); 00086 00087 m_hTesCalFlag = new TH1F("mTesCalFlag", "", 1000, 0, 2000); 00088 m_fdcom -> Add(m_hTesCalFlag); 00089 00090 m_hTesCalUse = new TH1F("mTesCalUse", "", 1000, 0, 2000); 00091 m_fdcom -> Add(m_hTesCalUse); 00092 00093 m_hnRawHit = new TH1F("mNRawHit", "", 6797, -0.5, 6796.5); 00094 m_fdcom -> Add(m_hnRawHit); 00095 00096 m_hpt = new TH1F("mHPt", "", 800, 0, 3); 00097 m_fdcom -> Add(m_hpt); 00098 00099 m_hptPos = new TH1F("mHPtPos", "", 800, 0, 3); 00100 m_fdcom -> Add(m_hptPos); 00101 00102 m_hptNeg = new TH1F("mHPtNeg", "", 800, 0, 3); 00103 m_fdcom -> Add(m_hptNeg); 00104 00105 m_hp = new TH1F("mHP", "", 800, 0, 3); 00106 m_fdcom -> Add(m_hp); 00107 00108 m_hp_cms = new TH1F("mHPCMS", "", 800, 0, 3); 00109 m_fdcom -> Add(m_hp_cms); 00110 00111 m_hpMax = new TH1F("mHPMax", "", 800, 0, 3); 00112 m_fdcom -> Add(m_hpMax); 00113 00114 m_hpMaxCms = new TH1F("mHPMax_Cms", "", 800, 0, 3); 00115 m_fdcom -> Add(m_hpMaxCms); 00116 00117 m_hpPos = new TH1F("mHP_Pos", "", 800, 0, 3); 00118 m_fdcom -> Add(m_hpPos); 00119 00120 m_hpNeg = new TH1F("mHP_Neg", "", 800, 0, 3); 00121 m_fdcom -> Add(m_hpNeg); 00122 00123 m_hpPoscms = new TH1F("mHP_Pos_cms", "", 800, 0, 3); 00124 m_fdcom -> Add(m_hpPoscms); 00125 00126 m_hpNegcms = new TH1F("mHP_Neg_cms", "", 800, 0, 3); 00127 m_fdcom -> Add(m_hpNegcms); 00128 00129 m_hp_cut = new TH1F("mHPCut", "", 800, 0, 3); 00130 m_fdcom -> Add(m_hp_cut); 00131 00132 m_hchisq = new TH1F("mChisq", "", 10, 0, 100); 00133 m_fdcom -> Add(m_hchisq); 00134 00135 m_hnTrk = new TH1F("mHNtrack", "HNtrack", 10, -0.5, 9.5); 00136 m_fdcom -> Add(m_hnTrk); 00137 00138 m_hnTrkCal = new TH1F("mHNtrackCal", "HNtrackCal", 10, -0.5, 9.5); 00139 m_fdcom -> Add(m_hnTrkCal); 00140 00141 m_hnhitsRec = new TH1F("mHNhitsRec", "", 100, -0.5, 99.5); 00142 m_fdcom -> Add(m_hnhitsRec); 00143 00144 m_hnhitsRecInn = new TH1F("mHNhitsInnRec", "", 60, 0.5, 60.5); 00145 m_fdcom -> Add(m_hnhitsRecInn); 00146 00147 m_hnhitsRecStp = new TH1F("mHNhitsStpRec", "", 60, 0.5, 60.5); 00148 m_fdcom -> Add(m_hnhitsRecStp); 00149 00150 m_hnhitsRecOut = new TH1F("mHNhitsOutRec", "", 60, 0.5, 60.5); 00151 m_fdcom -> Add(m_hnhitsRecOut); 00152 00153 m_hnhitsCal = new TH1F("mHNhitsCal", "", 100, -0.5, 99.5); 00154 m_fdcom -> Add(m_hnhitsCal); 00155 00156 m_hnhitsCalInn = new TH1F("mHNhitsCalInn", "", 60, 0.5, 60.5); 00157 m_fdcom -> Add(m_hnhitsCalInn); 00158 00159 m_hnhitsCalStp = new TH1F("mHNhitsCalStp", "", 60, 0.5, 60.5); 00160 m_fdcom -> Add(m_hnhitsCalStp); 00161 00162 m_hnhitsCalOut = new TH1F("mHNhitsCalOut", "", 60, 0.5, 60.5); 00163 m_fdcom -> Add(m_hnhitsCalOut); 00164 00165 m_wirehitmap = new TH1F("mWire_HitMap", "Wire_HitMap", 6796, -0.5, 6795.5); 00166 m_fdcom -> Add(m_wirehitmap); 00167 00168 m_layerhitmap = new TH1F("mLayer_HitMap", "Layer_HitMap", 43, -0.5, 42.5); 00169 m_fdcom -> Add(m_layerhitmap); 00170 00171 m_hnoisephi = new TH1F("mphi_noise", "", 100, 0, 6.284); 00172 m_fdcom -> Add(m_hnoisephi); 00173 00174 m_hnoiselay = new TH1F("mLayer_noise", "Layer_noise", 43, -0.5, 42.5); 00175 m_fdcom -> Add(m_hnoiselay); 00176 00177 m_hnoisenhits = new TH1F("mnhits_noise", "nhits_noise", 6796, -0.5, 6795.5); 00178 m_fdcom -> Add(m_hnoisenhits); 00179 00180 m_hratio = new TH1F("mratio", "", 100, 0, 1); 00181 m_fdcom -> Add(m_hratio); 00182 00183 m_hdr = new TH1F("mdr", "", 500, -500, 500); 00184 m_fdcom -> Add(m_hdr); 00185 00186 m_hphi0 = new TH1F("mphi0", "", 100, 0, 6.284); 00187 m_fdcom -> Add(m_hphi0); 00188 00189 m_hkap = new TH1F("mkappa", "", 400, -50, 50); 00190 m_fdcom -> Add(m_hkap); 00191 00192 m_hdz = new TH1F("mdz", "", 500, -1000, 1000); 00193 m_fdcom -> Add(m_hdz); 00194 00195 m_htanl = new TH1F("mtanl", "", 200, -5, 5); 00196 m_fdcom -> Add(m_htanl); 00197 00198 m_hcosthe = new TH1F("mcostheta", "", 200, -1, 1); 00199 m_fdcom -> Add(m_hcosthe); 00200 00201 m_hcostheNeg = new TH1F("mcosthetaNeg", "", 200, -1, 1); 00202 m_fdcom -> Add(m_hcostheNeg); 00203 00204 m_hcosthePos = new TH1F("mcosthetaPos", "", 200, -1, 1); 00205 m_fdcom -> Add(m_hcosthePos); 00206 00207 m_hx0 = new TH1F("mx0", "", 100, -10, 10); 00208 m_fdcom -> Add(m_hx0); 00209 00210 m_hy0 = new TH1F("my0", "", 100, -10, 10); 00211 m_fdcom -> Add(m_hy0); 00212 00213 m_hdelZ0 = new TH1F("mdelta_z0", "", 100, -50, 50); 00214 m_fdcom -> Add(m_hdelZ0); 00215 00216 m_nGrPoint = 0; 00217 m_grX0Y0 = new TGraph(); 00218 m_grX0Y0->SetName("mx0y0"); 00219 m_fdcom -> Add(m_grX0Y0); 00220 00221 m_hitEffAll = new TH1F("mhitEffAll", "", 6800, -0.5, 6799.5); 00222 m_fdcom -> Add(m_hitEffAll); 00223 00224 m_hitEffRaw = new TH1F("mhitEffRaw", "", 6800, -0.5, 6799.5); 00225 m_fdcom -> Add(m_hitEffRaw); 00226 00227 m_hitEffRec = new TH1F("mhitEffRec", "", 6800, -0.5, 6799.5); 00228 m_fdcom -> Add(m_hitEffRec); 00229 00230 // histograms for drift time 00231 m_fdTime = new TFolder("mtime", "time"); 00232 hlist -> Add(m_fdTime); 00233 00234 for(int lay=0; lay<NLAYER; lay++){ 00235 sprintf(hname, "mTraw%02d", lay); 00236 m_htraw[lay] = new TH1F(hname, "", 1000, 0, 2000); 00237 m_fdTime -> Add(m_htraw[lay]); 00238 00239 sprintf(hname, "mTdr%02d", lay); 00240 m_htdr[lay] = new TH1F(hname, "", 510, -10, 500); 00241 m_fdTime -> Add(m_htdr[lay]); 00242 00243 for(int lr=0; lr<2; lr++){ 00244 sprintf(hname, "mTdr%02d_lr%01d", lay, lr); 00245 m_htdrlr[lay][lr] = new TH1F(hname, "", 510, -10, 500); 00246 m_fdTime -> Add(m_htdrlr[lay][lr]); 00247 } 00248 } 00249 00250 // histograms for resolution 00251 m_fdres = new TFolder("mresolution", "resolution"); 00252 hlist -> Add(m_fdres); 00253 00254 for(int lay=0; lay<NLAYER; lay++){ 00255 sprintf(hname, "mReso%02dInc", lay); 00256 m_hresInc[lay] = new TH1F(hname, "", 1000, -5, 5); 00257 m_fdres -> Add(m_hresInc[lay]); 00258 00259 sprintf(hname, "mReso%02dExc", lay); 00260 m_hresExc[lay] = new TH1F(hname, "", 1000, -5, 5); 00261 m_fdres -> Add(m_hresExc[lay]); 00262 00263 for (int lr=0; lr<2; lr++){ 00264 sprintf(hname, "mReso%02dInc_lr%01d", lay, lr); 00265 m_hreslrInc[lay][lr] = new TH1F(hname, "", 1000, -5, 5); 00266 m_fdres->Add(m_hreslrInc[lay][lr]); 00267 00268 sprintf(hname, "mReso%02dExc_lr%01d", lay, lr); 00269 m_hreslrExc[lay][lr] = new TH1F(hname, "", 1000, -5, 5); 00270 m_fdres->Add(m_hreslrExc[lay][lr]); 00271 } 00272 } 00273 00274 /* histograms for momentum vs phi */ 00275 m_fdmomPhi = new TFolder("mmomPhi", "momPhi"); 00276 hlist -> Add(m_fdmomPhi); 00277 00278 int thbin; 00279 for(int bin=0; bin<NPhiBin; bin++){ 00280 sprintf(hname, "mhPpos_phi%02d", bin); 00281 m_ppPhi[bin] = new TH1F(hname, "", 400, 1.0, 2.5); 00282 m_fdmomPhi->Add(m_ppPhi[bin]); 00283 00284 sprintf(hname, "mhPneg_phi%02d", bin); 00285 m_pnPhi[bin] = new TH1F(hname, "", 400, 1.0, 2.5); 00286 m_fdmomPhi->Add(m_pnPhi[bin]); 00287 00288 sprintf(hname, "mhPpos_phi_cms%02d", bin); 00289 m_ppPhiCms[bin] = new TH1F(hname, "", 400, 1.0, 2.5); 00290 m_fdmomPhi->Add(m_ppPhiCms[bin]); 00291 00292 sprintf(hname, "mhPneg_phi_cms%02d", bin); 00293 m_pnPhiCms[bin] = new TH1F(hname, "", 400, 1.0, 2.5); 00294 m_fdmomPhi->Add(m_pnPhiCms[bin]); 00295 00296 for(thbin=0; thbin<NThetaBin; thbin++){ 00297 sprintf(hname, "mhPpos_theta%02d_phi%02d", thbin, bin); 00298 m_ppThePhi[thbin][bin] = new TH1F(hname, "", 400, 1.0, 2.5); 00299 m_fdmomPhi->Add(m_ppThePhi[thbin][bin]); 00300 00301 sprintf(hname, "mhPneg_theta%02d_phi%02d", thbin, bin); 00302 m_pnThePhi[thbin][bin] = new TH1F(hname, "", 400, 1.0, 2.5); 00303 m_fdmomPhi->Add(m_pnThePhi[thbin][bin]); 00304 00305 sprintf(hname, "mhPposCms_theta%02d_phi%02d", thbin, bin); 00306 m_ppThePhiCms[thbin][bin] = new TH1F(hname, "", 400, 1.0, 2.5); 00307 m_fdmomPhi->Add(m_ppThePhiCms[thbin][bin]); 00308 00309 sprintf(hname, "mhPnegCms_theta%02d_phi%02d", thbin, bin); 00310 m_pnThePhiCms[thbin][bin] = new TH1F(hname, "", 400, 1.0, 2.5); 00311 m_fdmomPhi->Add(m_pnThePhiCms[thbin][bin]); 00312 } 00313 } 00314 for(thbin=0; thbin<NThetaBin; thbin++){ 00315 sprintf(hname, "mhPpos_the%02d", thbin); 00316 m_ppThe[thbin] = new TH1F(hname, "", 400, 1.0, 2.5); 00317 m_fdmomPhi->Add(m_ppThe[thbin]); 00318 00319 sprintf(hname, "mhPneg_the%02d", thbin); 00320 m_pnThe[thbin] = new TH1F(hname, "", 400, 1.0, 2.5); 00321 m_fdmomPhi->Add(m_pnThe[thbin]); 00322 00323 sprintf(hname, "mhPposCms_the%02d", thbin); 00324 m_ppTheCms[thbin] = new TH1F(hname, "", 400, 1.0, 2.5); 00325 m_fdmomPhi->Add(m_ppTheCms[thbin]); 00326 00327 sprintf(hname, "mhPnegCms_the%02d", thbin); 00328 m_pnTheCms[thbin] = new TH1F(hname, "", 400, 1.0, 2.5); 00329 m_fdmomPhi->Add(m_pnTheCms[thbin]); 00330 } 00331 00332 m_fdr2d = new TFolder("mres2d", "res2d"); 00333 hlist -> Add(m_fdr2d); 00334 for(int lay=0; lay<43; lay++){ 00335 for(int iEntr=0; iEntr<gNEntr[lay]; iEntr++){ 00336 for(int lr=0; lr<2; lr++){ 00337 for(int bin=0; bin<NSDBIN; bin++){ 00338 sprintf(hname, "mR2d%02d_%02d_%01d_%02dInc", lay, iEntr, lr, bin); 00339 m_hr2dInc[lay][iEntr][lr][bin] = new TH1F(hname, "", 200, -1, 1); 00340 m_fdr2d -> Add(m_hr2dInc[lay][iEntr][lr][bin]); 00341 00342 sprintf(hname, "mR2d%02d_%02d_%01d_%02dExc", lay, iEntr, lr, bin); 00343 m_hr2dExc[lay][iEntr][lr][bin] = new TH1F(hname, "", 200, -1, 1); 00344 m_fdr2d -> Add(m_hr2dExc[lay][iEntr][lr][bin]); 00345 } 00346 } 00347 } 00348 } 00349 00350 // m_fdr2t = new TFolder("mres2t", "res2t"); 00351 // hlist -> Add(m_fdr2t); 00352 // for(int lay=0; lay<43; lay++){ 00353 // for(int iEntr=0; iEntr<18; iEntr++){ 00354 // for(int lr=0; lr<2; lr++){ 00355 // for(int bin=0; bin<45; bin++){ 00356 // sprintf(hname, "mr2t%02d_%02d_%01d_%02d", lay, iEntr, lr, bin); 00357 // m_hr2t[lay][iEntr][lr][bin] = new TH1F(hname, "", 600, -3, 3); 00358 // m_fdr2t -> Add(m_hr2t[lay][iEntr][lr][bin]); 00359 // } 00360 // } 00361 // } 00362 // } 00363 }
void CalibBase::mergeHist | ( | TFile * | fhist | ) | [pure virtual] |
Implemented in GrXtCalib, IniCalib, PreT0Calib, PreXtCalib, QtCalib, T0Calib, XtCalib, and XtInteCalib.
Definition at line 365 of file CalibBase.cpp.
References bin, gNEntr, genRecEmupikp::i, m_effNtrk, m_effNtrkRecHit, m_grX0Y0, m_hbbTrkFlg, m_hchisq, m_hcosthe, m_hcostheNeg, m_hcosthePos, m_hdelZ0, m_hdr, m_hdz, m_hitEffAll, m_hitEffRaw, m_hitEffRec, m_hkap, m_hnhitsCal, m_hnhitsCalInn, m_hnhitsCalOut, m_hnhitsCalStp, m_hnhitsRec, m_hnhitsRecInn, m_hnhitsRecOut, m_hnhitsRecStp, m_hnoiselay, m_hnoisenhits, m_hnoisephi, m_hnRawHit, m_hnTrk, m_hnTrkCal, m_hp, m_hp_cms, m_hp_cut, m_hphi0, m_hpMax, m_hpMaxCms, m_hpNeg, m_hpNegcms, m_hpPos, m_hpPoscms, m_hpt, m_hptNeg, m_hptPos, m_hr2dExc, m_hr2dInc, m_hratio, m_hresAllAve, m_hresAllExc, m_hresAllInc, m_hresAveAllQ, m_hresAveLayQ, m_hresAveOutQ, m_hresExc, m_hresInc, m_hresInnExc, m_hresInnInc, m_hreslrExc, m_hreslrInc, m_hresOutExc, m_hresOutInc, m_hresStpExc, m_hresStpInc, m_htanl, m_htdr, m_htdrlr, m_hTesAll, m_hTesAllFlag, m_hTesCalFlag, m_hTesCalUse, m_hTesGood, m_hTesRec, m_htraw, m_hx0, m_hy0, m_layerhitmap, m_nGrPoint, m_pnPhi, m_pnPhiCms, m_pnTheCms, m_pnThePhi, m_pnThePhiCms, m_ppPhi, m_ppPhiCms, m_ppThe, m_ppTheCms, m_ppThePhi, m_ppThePhiCms, m_wirehitmap, NLAYER, NPhiBin, NSDBIN, and NThetaBin.
Referenced by main(), XtInteCalib::mergeHist(), XtCalib::mergeHist(), T0Calib::mergeHist(), QtCalib::mergeHist(), and GrXtCalib::mergeHist().
00365 { 00366 char hname[200]; 00367 TH1F* hist; 00368 TFolder* fdcom = (TFolder*)fhist->Get("common"); 00369 TFolder* fdResQ = (TFolder*)fhist->Get("ResQ"); 00370 TFolder* fdTime = (TFolder*)fhist->Get("time"); 00371 TFolder* fdres = (TFolder*)fhist->Get("resolution"); 00372 TFolder* fdmomPhi = (TFolder*)fhist->Get("momPhi"); 00373 TFolder* fdres2d = (TFolder*)fhist->Get("res2d"); 00374 00375 hist = (TH1F*)fdcom->FindObjectAny("effNtrk"); 00376 m_effNtrk->Add(hist); 00377 00378 hist = (TH1F*)fdcom->FindObjectAny("effNtrkRecHit"); 00379 m_effNtrkRecHit->Add(hist); 00380 00381 hist = (TH1F*)fdcom->FindObjectAny("HResAllInc"); 00382 m_hresAllInc->Add(hist); 00383 00384 hist = (TH1F*)fdcom->FindObjectAny("HResAllExc"); 00385 m_hresAllExc->Add(hist); 00386 00387 hist = (TH1F*)fdcom->FindObjectAny("HResAllAve"); 00388 m_hresAllAve->Add(hist); 00389 00390 hist = (TH1F*)fdcom->FindObjectAny("HResInnInc"); 00391 m_hresInnInc->Add(hist); 00392 00393 hist = (TH1F*)fdcom->FindObjectAny("HResInnExc"); 00394 m_hresInnExc->Add(hist); 00395 00396 hist = (TH1F*)fdcom->FindObjectAny("HResStpInc"); 00397 m_hresStpInc->Add(hist); 00398 00399 hist = (TH1F*)fdcom->FindObjectAny("HResStpExc"); 00400 m_hresStpExc->Add(hist); 00401 00402 hist = (TH1F*)fdcom->FindObjectAny("HResOutInc"); 00403 m_hresOutInc->Add(hist); 00404 00405 hist = (TH1F*)fdcom->FindObjectAny("HResOutExc"); 00406 m_hresOutExc->Add(hist); 00407 00408 hist = (TH1F*)fdcom->FindObjectAny("BbTrkFlg"); 00409 m_hbbTrkFlg->Add(hist); 00410 00411 hist = (TH1F*)fdcom->FindObjectAny("TesAll"); 00412 m_hTesAll->Add(hist); 00413 00414 hist = (TH1F*)fdcom->FindObjectAny("TesGood"); 00415 m_hTesGood->Add(hist); 00416 00417 hist = (TH1F*)fdcom->FindObjectAny("TesAllFlag"); 00418 m_hTesAllFlag->Add(hist); 00419 00420 hist = (TH1F*)fdcom->FindObjectAny("TesRec"); 00421 m_hTesRec->Add(hist); 00422 00423 hist = (TH1F*)fdcom->FindObjectAny("TesCalFlag"); 00424 m_hTesCalFlag->Add(hist); 00425 00426 hist = (TH1F*)fdcom->FindObjectAny("TesCalUse"); 00427 m_hTesCalUse->Add(hist); 00428 00429 hist = (TH1F*)fdcom->FindObjectAny("nRawHit"); 00430 m_hnRawHit->Add(hist); 00431 00432 hist = (TH1F*)fdcom->FindObjectAny("HPt"); 00433 m_hpt->Add(hist); 00434 00435 hist = (TH1F*)fdcom->FindObjectAny("HPtPos"); 00436 m_hptPos->Add(hist); 00437 00438 hist = (TH1F*)fdcom->FindObjectAny("HPtNeg"); 00439 m_hptNeg->Add(hist); 00440 00441 hist = (TH1F*)fdcom->FindObjectAny("HP"); 00442 m_hp->Add(hist); 00443 00444 hist = (TH1F*)fdcom->FindObjectAny("HPCMS"); 00445 m_hp_cms->Add(hist); 00446 00447 hist = (TH1F*)fdcom->FindObjectAny("HPMax"); 00448 m_hpMax->Add(hist); 00449 00450 hist = (TH1F*)fdcom->FindObjectAny("HPMax_Cms"); 00451 m_hpMaxCms->Add(hist); 00452 00453 hist = (TH1F*)fdcom->FindObjectAny("HP_Pos"); 00454 m_hpPos->Add(hist); 00455 00456 hist = (TH1F*)fdcom->FindObjectAny("HP_Neg"); 00457 m_hpNeg->Add(hist); 00458 00459 hist = (TH1F*)fdcom->FindObjectAny("HP_Pos_cms"); 00460 m_hpPoscms->Add(hist); 00461 00462 hist = (TH1F*)fdcom->FindObjectAny("HP_Neg_cms"); 00463 m_hpNegcms->Add(hist); 00464 00465 hist = (TH1F*)fdcom->FindObjectAny("HPCut"); 00466 m_hp_cut->Add(hist); 00467 00468 hist = (TH1F*)fdcom->FindObjectAny("Chisq"); 00469 m_hchisq->Add(hist); 00470 00471 hist = (TH1F*)fdcom->FindObjectAny("HNtrack"); 00472 m_hnTrk->Add(hist); 00473 00474 hist = (TH1F*)fdcom->FindObjectAny("HNtrackCal"); 00475 m_hnTrkCal->Add(hist); 00476 00477 hist = (TH1F*)fdcom->FindObjectAny("HNhitsRec"); 00478 m_hnhitsRec->Add(hist); 00479 00480 hist = (TH1F*)fdcom->FindObjectAny("HNhitsInnRec"); 00481 m_hnhitsRecInn->Add(hist); 00482 00483 hist = (TH1F*)fdcom->FindObjectAny("HNhitsStpRec"); 00484 m_hnhitsRecStp->Add(hist); 00485 00486 hist = (TH1F*)fdcom->FindObjectAny("HNhitsOutRec"); 00487 m_hnhitsRecOut->Add(hist); 00488 00489 hist = (TH1F*)fdcom->FindObjectAny("HNhitsCal"); 00490 m_hnhitsCal->Add(hist); 00491 00492 hist = (TH1F*)fdcom->FindObjectAny("HNhitsCalInn"); 00493 m_hnhitsCalInn->Add(hist); 00494 00495 hist = (TH1F*)fdcom->FindObjectAny("HNhitsCalStp"); 00496 m_hnhitsCalStp->Add(hist); 00497 00498 hist = (TH1F*)fdcom->FindObjectAny("HNhitsCalOut"); 00499 m_hnhitsCalOut->Add(hist); 00500 00501 hist = (TH1F*)fdcom->FindObjectAny("Wire_HitMap"); 00502 m_wirehitmap->Add(hist); 00503 00504 hist = (TH1F*)fdcom->FindObjectAny("Layer_HitMap"); 00505 m_layerhitmap->Add(hist); 00506 00507 hist = (TH1F*)fdcom->FindObjectAny("phi_noise"); 00508 m_hnoisephi->Add(hist); 00509 00510 hist = (TH1F*)fdcom->FindObjectAny("Layer_noise"); 00511 m_hnoiselay->Add(hist); 00512 00513 hist = (TH1F*)fdcom->FindObjectAny("nhits_noise"); 00514 m_hnoisenhits->Add(hist); 00515 00516 hist = (TH1F*)fdcom->FindObjectAny("ratio"); 00517 m_hratio->Add(hist); 00518 00519 hist = (TH1F*)fdcom->FindObjectAny("dr"); 00520 m_hdr->Add(hist); 00521 00522 hist = (TH1F*)fdcom->FindObjectAny("phi0"); 00523 m_hphi0->Add(hist); 00524 00525 hist = (TH1F*)fdcom->FindObjectAny("kappa"); 00526 m_hkap->Add(hist); 00527 00528 hist = (TH1F*)fdcom->FindObjectAny("dz"); 00529 m_hdz->Add(hist); 00530 00531 hist = (TH1F*)fdcom->FindObjectAny("tanl"); 00532 m_htanl->Add(hist); 00533 00534 hist = (TH1F*)fdcom->FindObjectAny("costheta"); 00535 m_hcosthe->Add(hist); 00536 00537 hist = (TH1F*)fdcom->FindObjectAny("costhetaNeg"); 00538 m_hcostheNeg->Add(hist); 00539 00540 hist = (TH1F*)fdcom->FindObjectAny("costhetaPos"); 00541 m_hcosthePos->Add(hist); 00542 00543 hist = (TH1F*)fdcom->FindObjectAny("x0"); 00544 m_hx0->Add(hist); 00545 00546 hist = (TH1F*)fdcom->FindObjectAny("y0"); 00547 m_hy0->Add(hist); 00548 00549 hist = (TH1F*)fdcom->FindObjectAny("delta_z0"); 00550 m_hdelZ0->Add(hist); 00551 00552 hist = (TH1F*)fdcom->FindObjectAny("hitEffAll"); 00553 m_hitEffAll->Add(hist); 00554 00555 hist = (TH1F*)fdcom->FindObjectAny("hitEffRaw"); 00556 m_hitEffRaw->Add(hist); 00557 00558 hist = (TH1F*)fdcom->FindObjectAny("hitEffRec"); 00559 m_hitEffRec->Add(hist); 00560 00561 TGraph* gr = (TGraph*)fdcom->FindObjectAny("x0y0"); 00562 int np = gr->GetN(); 00563 double xx; 00564 double yy; 00565 for(int i=0; i<np; i++){ 00566 gr->GetPoint(i, xx, yy); 00567 m_grX0Y0->SetPoint(m_nGrPoint, xx, yy); 00568 m_nGrPoint++; 00569 } 00570 00571 00572 for(int i=0; i<14; i++){ 00573 sprintf(hname, "resoAll_qbin%02d", i); 00574 hist = (TH1F*)fdResQ->FindObjectAny(hname); 00575 m_hresAveAllQ[i]->Add(hist); 00576 00577 sprintf(hname, "resoOut_qbin%02d", i); 00578 hist = (TH1F*)fdResQ->FindObjectAny(hname); 00579 m_hresAveOutQ[i]->Add(hist); 00580 } 00581 00582 for(int lay=0; lay<43; lay++){ 00583 for(int i=0; i<14; i++){ 00584 sprintf(hname, "resoLay%02d_qbin%02d", lay, i); 00585 hist = (TH1F*)fdResQ->FindObjectAny(hname); 00586 m_hresAveLayQ[lay][i]->Add(hist); 00587 } 00588 } 00589 00590 for(int lay=0; lay<NLAYER; lay++){ 00591 sprintf(hname, "Traw%02d", lay); 00592 hist = (TH1F*)fdTime->FindObjectAny(hname); 00593 m_htraw[lay]->Add(hist); 00594 00595 sprintf(hname, "Tdr%02d", lay); 00596 hist = (TH1F*)fdTime->FindObjectAny(hname); 00597 m_htdr[lay]->Add(hist); 00598 00599 for(int lr=0; lr<2; lr++){ 00600 sprintf(hname, "Tdr%02d_lr%01d", lay, lr); 00601 hist = (TH1F*)fdTime->FindObjectAny(hname); 00602 m_htdrlr[lay][lr]->Add(hist); 00603 } 00604 } 00605 00606 for(int lay=0; lay<NLAYER; lay++){ 00607 sprintf(hname, "Reso%02dInc", lay); 00608 hist = (TH1F*)fdres->FindObjectAny(hname); 00609 m_hresInc[lay]->Add(hist); 00610 00611 sprintf(hname, "Reso%02dExc", lay); 00612 hist = (TH1F*)fdres->FindObjectAny(hname); 00613 m_hresExc[lay]->Add(hist); 00614 00615 for (int lr=0; lr<2; lr++){ 00616 sprintf(hname, "Reso%02dInc_lr%01d", lay, lr); 00617 hist = (TH1F*)fdres->FindObjectAny(hname); 00618 m_hreslrInc[lay][lr]->Add(hist); 00619 00620 sprintf(hname, "Reso%02dExc_lr%01d", lay, lr); 00621 hist = (TH1F*)fdres->FindObjectAny(hname); 00622 m_hreslrExc[lay][lr]->Add(hist); 00623 } 00624 } 00625 00626 int thbin; 00627 for(int bin=0; bin<NPhiBin; bin++){ 00628 sprintf(hname, "hPpos_phi%02d", bin); 00629 hist = (TH1F*)fdmomPhi->FindObjectAny(hname); 00630 m_ppPhi[bin]->Add(hist); 00631 00632 sprintf(hname, "hPneg_phi%02d", bin); 00633 hist = (TH1F*)fdmomPhi->FindObjectAny(hname); 00634 m_pnPhi[bin]->Add(hist); 00635 00636 sprintf(hname, "hPpos_phi_cms%02d", bin); 00637 hist = (TH1F*)fdmomPhi->FindObjectAny(hname); 00638 m_ppPhiCms[bin]->Add(hist); 00639 00640 sprintf(hname, "hPneg_phi_cms%02d", bin); 00641 hist = (TH1F*)fdmomPhi->FindObjectAny(hname); 00642 m_pnPhiCms[bin]->Add(hist); 00643 00644 for(thbin=0; thbin<NThetaBin; thbin++){ 00645 sprintf(hname, "hPpos_theta%02d_phi%02d", thbin, bin); 00646 hist = (TH1F*)fdmomPhi->FindObjectAny(hname); 00647 m_ppThePhi[thbin][bin]->Add(hist); 00648 00649 sprintf(hname, "hPneg_theta%02d_phi%02d", thbin, bin); 00650 hist = (TH1F*)fdmomPhi->FindObjectAny(hname); 00651 m_pnThePhi[thbin][bin]->Add(hist); 00652 00653 sprintf(hname, "hPposCms_theta%02d_phi%02d", thbin, bin); 00654 hist = (TH1F*)fdmomPhi->FindObjectAny(hname); 00655 m_ppThePhiCms[thbin][bin]->Add(hist); 00656 00657 sprintf(hname, "hPnegCms_theta%02d_phi%02d", thbin, bin); 00658 hist = (TH1F*)fdmomPhi->FindObjectAny(hname); 00659 m_pnThePhiCms[thbin][bin]->Add(hist); 00660 } 00661 } 00662 00663 for(thbin=0; thbin<NThetaBin; thbin++){ 00664 sprintf(hname, "hPpos_the%02d", thbin); 00665 hist = (TH1F*)fdmomPhi->FindObjectAny(hname); 00666 m_ppThe[thbin]->Add(hist); 00667 00668 sprintf(hname, "hPneg_the%02d", thbin); 00669 hist = (TH1F*)fdmomPhi->FindObjectAny(hname); 00670 m_ppThe[thbin]->Add(hist); 00671 00672 sprintf(hname, "hPposCms_the%02d", thbin); 00673 hist = (TH1F*)fdmomPhi->FindObjectAny(hname); 00674 m_ppTheCms[thbin]->Add(hist); 00675 00676 sprintf(hname, "hPnegCms_the%02d", thbin); 00677 hist = (TH1F*)fdmomPhi->FindObjectAny(hname); 00678 m_pnTheCms[thbin]->Add(hist); 00679 } 00680 00681 for(int lay=0; lay<43; lay++){ 00682 for(int iEntr=0; iEntr<gNEntr[lay]; iEntr++){ 00683 for(int lr=0; lr<2; lr++){ 00684 for(int bin=0; bin<NSDBIN; bin++){ 00685 sprintf(hname, "r2d%02d_%02d_%01d_%02dInc", lay, iEntr, lr, bin); 00686 hist = (TH1F*)fdres2d->FindObjectAny(hname); 00687 m_hr2dInc[lay][iEntr][lr][bin]->Add(hist); 00688 00689 sprintf(hname, "r2d%02d_%02d_%01d_%02dExc", lay, iEntr, lr, bin); 00690 hist = (TH1F*)fdres2d->FindObjectAny(hname); 00691 m_hr2dExc[lay][iEntr][lr][bin]->Add(hist); 00692 } 00693 } 00694 } 00695 } 00696 00697 // TFolder* fdres2t = (TFolder*)fhist->Get("res2t"); 00698 // for(int lay=0; lay<43; lay++){ 00699 // for(int iEntr=0; iEntr<18; iEntr++){ 00700 // for(int lr=0; lr<2; lr++){ 00701 // for(int bin=0; bin<45; bin++){ 00702 // sprintf(hname, "r2t%02d_%02d_%01d_%02d", lay, iEntr, lr, bin); 00703 // hist = (TH1F*)fdres2t->FindObjectAny(hname); 00704 // m_hr2t[lay][iEntr][lr][bin]->Add(hist); 00705 // } 00706 // } 00707 // } 00708 // } 00709 }
void CalibBase::renameHist | ( | ) | [private] |
Reimplemented in GrXtCalib, IniCalib, PreT0Calib, PreXtCalib, QtCalib, T0Calib, XtCalib, and XtInteCalib.
Definition at line 877 of file CalibBase.cpp.
References bin, gNEntr, genRecEmupikp::i, m_effNtrk, m_effNtrkRecHit, m_fdcom, m_fdmomPhi, m_fdr2d, m_fdres, m_fdResQ, m_fdTime, m_grX0Y0, m_hbbTrkFlg, m_hchisq, m_hcosthe, m_hcostheNeg, m_hcosthePos, m_hdelZ0, m_hdr, m_hdz, m_hitEffAll, m_hitEffRaw, m_hitEffRec, m_hkap, m_hnhitsCal, m_hnhitsCalInn, m_hnhitsCalOut, m_hnhitsCalStp, m_hnhitsRec, m_hnhitsRecInn, m_hnhitsRecOut, m_hnhitsRecStp, m_hnoiselay, m_hnoisenhits, m_hnoisephi, m_hnRawHit, m_hnTrk, m_hnTrkCal, m_hp, m_hp_cms, m_hp_cut, m_hphi0, m_hpMax, m_hpMaxCms, m_hpNeg, m_hpNegcms, m_hpPos, m_hpPoscms, m_hpt, m_hptNeg, m_hptPos, m_hr2dExc, m_hr2dInc, m_hratio, m_hresAllAve, m_hresAllExc, m_hresAllInc, m_hresAveAllQ, m_hresAveLayQ, m_hresAveOutQ, m_hresExc, m_hresInc, m_hresInnExc, m_hresInnInc, m_hreslrExc, m_hreslrInc, m_hresOutExc, m_hresOutInc, m_hresStpExc, m_hresStpInc, m_htanl, m_htdr, m_htdrlr, m_hTesAll, m_hTesAllFlag, m_hTesCalFlag, m_hTesCalUse, m_hTesGood, m_hTesRec, m_htraw, m_hx0, m_hy0, m_layerhitmap, m_pnPhi, m_pnPhiCms, m_pnThe, m_pnTheCms, m_pnThePhi, m_pnThePhiCms, m_ppPhi, m_ppPhiCms, m_ppThe, m_ppTheCms, m_ppThePhi, m_ppThePhiCms, m_wirehitmap, NLAYER, NPhiBin, NSDBIN, and NThetaBin.
Referenced by calib().
00877 { 00878 char hname[200]; 00879 m_fdcom->SetName("common"); 00880 m_effNtrk->SetName("effNtrk"); 00881 m_effNtrkRecHit->SetName("effNtrkRecHit"); 00882 m_hresAllInc->SetName("HResAllInc"); 00883 m_hresAllExc->SetName("HResAllExc"); 00884 m_hresAllAve->SetName("HResAllAve"); 00885 m_hresInnInc->SetName("HResInnInc"); 00886 m_hresInnExc->SetName("HResInnExc"); 00887 m_hresStpInc->SetName("HResStpInc"); 00888 m_hresStpExc->SetName("HResStpExc"); 00889 m_hresOutInc->SetName("HResOutInc"); 00890 m_hresOutExc->SetName("HResOutExc"); 00891 m_fdResQ->SetName("ResQ"); 00892 m_hbbTrkFlg->SetName("BbTrkFlg"); 00893 m_hTesAll->SetName("TesAll"); 00894 m_hTesGood->SetName("TesGood"); 00895 m_hTesAllFlag->SetName("TesAllFlag"); 00896 m_hTesRec->SetName("TesRec"); 00897 m_hTesCalFlag->SetName("TesCalFlag"); 00898 m_hTesCalUse->SetName("TesCalUse"); 00899 m_hnRawHit->SetName("nRawHit"); 00900 m_hpt->SetName("HPt"); 00901 m_hptPos->SetName("HPtPos"); 00902 m_hptNeg->SetName("HPtNeg"); 00903 m_hp->SetName("HP"); 00904 m_hp_cms->SetName("HPCMS"); 00905 m_hpMax->SetName("HPMax"); 00906 m_hpMaxCms->SetName("HPMax_Cms"); 00907 m_hpPos->SetName("HP_Pos"); 00908 m_hpNeg->SetName("HP_Neg"); 00909 m_hpPoscms->SetName("HP_Pos_cms"); 00910 m_hpNegcms->SetName("HP_Neg_cms"); 00911 m_hp_cut->SetName("HPCut"); 00912 m_hchisq->SetName("Chisq"); 00913 m_hnTrk->SetName("HNtrack"); 00914 m_hnTrkCal->SetName("HNtrackCal"); 00915 m_hnhitsRec->SetName("HNhitsRec"); 00916 m_hnhitsRecInn->SetName("HNhitsInnRec"); 00917 m_hnhitsRecStp->SetName("HNhitsStpRec"); 00918 m_hnhitsRecOut->SetName("HNhitsOutRec"); 00919 m_hnhitsCal->SetName("HNhitsCal"); 00920 m_hnhitsCalInn->SetName("HNhitsCalInn"); 00921 m_hnhitsCalStp->SetName("HNhitsCalStp"); 00922 m_hnhitsCalOut->SetName("HNhitsCalOut"); 00923 m_wirehitmap->SetName("Wire_HitMap"); 00924 m_layerhitmap->SetName("Layer_HitMap"); 00925 m_hnoisephi->SetName("phi_noise"); 00926 m_hnoiselay->SetName("Layer_noise"); 00927 m_hnoisenhits->SetName("nhits_noise"); 00928 m_hratio->SetName("ratio"); 00929 m_hdr->SetName("dr"); 00930 m_hphi0->SetName("phi0"); 00931 m_hkap->SetName("kappa"); 00932 m_hdz->SetName("dz"); 00933 m_htanl->SetName("tanl"); 00934 m_hcosthe->SetName("costheta"); 00935 m_hcostheNeg->SetName("costhetaNeg"); 00936 m_hcosthePos->SetName("costhetaPos"); 00937 m_hx0->SetName("x0"); 00938 m_hy0->SetName("y0"); 00939 m_hdelZ0->SetName("delta_z0"); 00940 m_hitEffAll->SetName("hitEffAll"); 00941 m_hitEffRaw->SetName("hitEffRaw"); 00942 m_hitEffRec->SetName("hitEffRec"); 00943 m_grX0Y0->SetName("x0y0"); 00944 m_fdTime->SetName("time"); 00945 00946 for(int i=0; i<14; i++){ 00947 sprintf(hname, "resoAll_qbin%02d", i); 00948 m_hresAveAllQ[i]->SetName(hname); 00949 00950 sprintf(hname, "resoOut_qbin%02d", i); 00951 m_hresAveOutQ[i]->SetName(hname); 00952 } 00953 for(int lay=0; lay<43; lay++){ 00954 for(int i=0; i<14; i++){ 00955 sprintf(hname, "resoLay%02d_qbin%02d", lay, i); 00956 m_hresAveLayQ[lay][i]->SetName(hname); 00957 } 00958 } 00959 00960 for(int lay=0; lay<NLAYER; lay++){ 00961 sprintf(hname, "Traw%02d", lay); 00962 m_htraw[lay]->SetName(hname); 00963 00964 sprintf(hname, "Tdr%02d", lay); 00965 m_htdr[lay]->SetName(hname); 00966 00967 for(int lr=0; lr<2; lr++){ 00968 sprintf(hname, "Tdr%02d_lr%01d", lay, lr); 00969 m_htdrlr[lay][lr]->SetName(hname); 00970 } 00971 } 00972 00973 // histograms for resolution 00974 m_fdres->SetName("resolution"); 00975 for(int lay=0; lay<NLAYER; lay++){ 00976 sprintf(hname, "Reso%02dInc", lay); 00977 m_hresInc[lay]->SetName(hname); 00978 00979 sprintf(hname, "Reso%02dExc", lay); 00980 m_hresExc[lay]->SetName(hname); 00981 00982 for (int lr=0; lr<2; lr++){ 00983 sprintf(hname, "Reso%02dInc_lr%01d", lay, lr); 00984 m_hreslrInc[lay][lr]->SetName(hname); 00985 00986 sprintf(hname, "Reso%02dExc_lr%01d", lay, lr); 00987 m_hreslrExc[lay][lr]->SetName(hname); 00988 } 00989 } 00990 00991 /* histograms for momentum vs phi */ 00992 m_fdmomPhi->SetName("momPhi"); 00993 int thbin; 00994 for(int bin=0; bin<NPhiBin; bin++){ 00995 sprintf(hname, "hPpos_phi%02d", bin); 00996 m_ppPhi[bin]->SetName(hname); 00997 00998 sprintf(hname, "hPneg_phi%02d", bin); 00999 m_pnPhi[bin]->SetName(hname); 01000 01001 sprintf(hname, "hPpos_phi_cms%02d", bin); 01002 m_ppPhiCms[bin]->SetName(hname); 01003 01004 sprintf(hname, "hPneg_phi_cms%02d", bin); 01005 m_pnPhiCms[bin]->SetName(hname); 01006 01007 for(thbin=0; thbin<NThetaBin; thbin++){ 01008 sprintf(hname, "hPpos_theta%02d_phi%02d", thbin, bin); 01009 m_ppThePhi[thbin][bin]->SetName(hname); 01010 01011 sprintf(hname, "hPneg_theta%02d_phi%02d", thbin, bin); 01012 m_pnThePhi[thbin][bin]->SetName(hname); 01013 01014 sprintf(hname, "hPposCms_theta%02d_phi%02d", thbin, bin); 01015 m_ppThePhiCms[thbin][bin]->SetName(hname); 01016 01017 sprintf(hname, "hPnegCms_theta%02d_phi%02d", thbin, bin); 01018 m_pnThePhiCms[thbin][bin]->SetName(hname); 01019 } 01020 } 01021 for(thbin=0; thbin<NThetaBin; thbin++){ 01022 sprintf(hname, "hPpos_the%02d", thbin); 01023 m_ppThe[thbin]->SetName(hname); 01024 01025 sprintf(hname, "hPneg_the%02d", thbin); 01026 m_pnThe[thbin]->SetName(hname); 01027 01028 sprintf(hname, "hPposCms_the%02d", thbin); 01029 m_ppTheCms[thbin]->SetName(hname); 01030 01031 sprintf(hname, "hPnegCms_the%02d", thbin); 01032 m_pnTheCms[thbin]->SetName(hname); 01033 } 01034 01035 m_fdr2d->SetName("res2d"); 01036 for(int lay=0; lay<43; lay++){ 01037 for(int iEntr=0; iEntr<gNEntr[lay]; iEntr++){ 01038 for(int lr=0; lr<2; lr++){ 01039 for(int bin=0; bin<NSDBIN; bin++){ 01040 sprintf(hname, "r2d%02d_%02d_%01d_%02dInc", lay, iEntr, lr, bin); 01041 m_hr2dInc[lay][iEntr][lr][bin]->SetName(hname); 01042 sprintf(hname, "r2d%02d_%02d_%01d_%02dExc", lay, iEntr, lr, bin); 01043 m_hr2dExc[lay][iEntr][lr][bin]->SetName(hname); 01044 } 01045 } 01046 } 01047 } 01048 01049 // m_fdr2d->SetName("res2t"); 01050 // for(int lay=0; lay<43; lay++){ 01051 // for(int iEntr=0; iEntr<18; iEntr++){ 01052 // for(int lr=0; lr<2; lr++){ 01053 // for(int bin=0; bin<45; bin++){ 01054 // sprintf(hname, "r2t%02d_%02d_%01d_%02d", lay, iEntr, lr, bin); 01055 // m_hr2t[lay][iEntr][lr][bin]->SetName(hname); 01056 // } 01057 // } 01058 // } 01059 // } 01060 }
TH1F* CalibBase::m_effNtrk [private] |
Definition at line 37 of file CalibBase.h.
Referenced by calib(), init(), mergeHist(), and renameHist().
TH1F* CalibBase::m_effNtrkRecHit [private] |
Definition at line 38 of file CalibBase.h.
Referenced by calib(), init(), mergeHist(), and renameHist().
TFolder* CalibBase::m_fdcom [private] |
Reimplemented in IniCalib.
Definition at line 36 of file CalibBase.h.
Referenced by init(), and renameHist().
TFolder* CalibBase::m_fdmomPhi [private] |
TFolder* CalibBase::m_fdr2d [private] |
TFolder* CalibBase::m_fdr2t [private] |
Definition at line 160 of file CalibBase.h.
TFolder* CalibBase::m_fdres [private] |
TFolder* CalibBase::m_fdResQ [private] |
TFolder* CalibBase::m_fdTime [private] |
TGraph* CalibBase::m_grX0Y0 [private] |
TH1F* CalibBase::m_hbbTrkFlg [private] |
TH1F* CalibBase::m_hchisq [private] |
TH1F* CalibBase::m_hcosthe [private] |
TH1F* CalibBase::m_hcostheNeg [private] |
TH1F* CalibBase::m_hcosthePos [private] |
TH1F* CalibBase::m_hdelZ0 [private] |
TH1F* CalibBase::m_hdr [private] |
TH1F* CalibBase::m_hdz [private] |
TH1F* CalibBase::m_hitEffAll [private] |
TH1F* CalibBase::m_hitEffRaw [private] |
TH1F* CalibBase::m_hitEffRec [private] |
TH1F* CalibBase::m_hkap [private] |
TH1F* CalibBase::m_hnhitsCal [private] |
TH1F* CalibBase::m_hnhitsCalInn [private] |
TH1F* CalibBase::m_hnhitsCalOut [private] |
TH1F* CalibBase::m_hnhitsCalStp [private] |
TH1F* CalibBase::m_hnhitsRec [private] |
TH1F* CalibBase::m_hnhitsRecInn [private] |
TH1F* CalibBase::m_hnhitsRecOut [private] |
TH1F* CalibBase::m_hnhitsRecStp [private] |
TH1F* CalibBase::m_hnoiselay [private] |
TH1F* CalibBase::m_hnoisenhits [private] |
TH1F* CalibBase::m_hnoisephi [private] |
TH1F* CalibBase::m_hnRawHit [private] |
TH1F* CalibBase::m_hnTrk [private] |
TH1F* CalibBase::m_hnTrkCal [private] |
TH1F* CalibBase::m_hp [private] |
TH1F* CalibBase::m_hp_cms [private] |
TH1F* CalibBase::m_hp_cut [private] |
TH1F* CalibBase::m_hphi0 [private] |
TH1F* CalibBase::m_hpMax [private] |
TH1F* CalibBase::m_hpMaxCms [private] |
TH1F* CalibBase::m_hpNeg [private] |
TH1F* CalibBase::m_hpNegcms [private] |
TH1F* CalibBase::m_hpPos [private] |
TH1F* CalibBase::m_hpPoscms [private] |
TH1F* CalibBase::m_hpt [private] |
TH1F* CalibBase::m_hptNeg [private] |
TH1F* CalibBase::m_hptPos [private] |
TH1F* CalibBase::m_hr2dExc[43][2][2][NSDBIN] [private] |
Definition at line 158 of file CalibBase.h.
Referenced by calib(), init(), mergeHist(), and renameHist().
TH1F* CalibBase::m_hr2dInc[43][2][2][NSDBIN] [private] |
Definition at line 157 of file CalibBase.h.
Referenced by calib(), init(), mergeHist(), and renameHist().
TH1F* CalibBase::m_hr2t[43][18][2][45] [private] |
Definition at line 161 of file CalibBase.h.
TH1F* CalibBase::m_hratio [private] |
TH1F* CalibBase::m_hresAllAve [private] |
TH1F* CalibBase::m_hresAllExc [private] |
TH1F* CalibBase::m_hresAllInc [private] |
TH1F* CalibBase::m_hresAveAllQ[14] [private] |
TH1F* CalibBase::m_hresAveLayQ[43][14] [private] |
TH1F* CalibBase::m_hresAveOutQ[14] [private] |
TH1F* CalibBase::m_hresExc[NLAYER] [private] |
TH1F* CalibBase::m_hresInc[NLAYER] [private] |
TH1F* CalibBase::m_hresInnExc [private] |
TH1F* CalibBase::m_hresInnInc [private] |
TH1F* CalibBase::m_hreslrExc[NLAYER][2] [private] |
TH1F* CalibBase::m_hreslrInc[NLAYER][2] [private] |
TH1F* CalibBase::m_hresOutExc [private] |
TH1F* CalibBase::m_hresOutInc [private] |
TH1F* CalibBase::m_hresStpExc [private] |
TH1F* CalibBase::m_hresStpInc [private] |
TH1F* CalibBase::m_htanl [private] |
TH1F* CalibBase::m_htdr[NLAYER] [private] |
TH1F* CalibBase::m_htdrlr[NLAYER][2] [private] |
TH1F* CalibBase::m_hTesAll [private] |
Reimplemented in IniCalib.
Definition at line 62 of file CalibBase.h.
Referenced by init(), mergeHist(), and renameHist().
TH1F* CalibBase::m_hTesAllFlag [private] |
TH1F* CalibBase::m_hTesCalFlag [private] |
TH1F* CalibBase::m_hTesCalUse [private] |
TH1F* CalibBase::m_hTesGood [private] |
TH1F* CalibBase::m_hTesRec [private] |
TH1F* CalibBase::m_htraw[NLAYER] [private] |
Reimplemented in IniCalib.
Definition at line 128 of file CalibBase.h.
Referenced by init(), mergeHist(), and renameHist().
TH1F* CalibBase::m_hx0 [private] |
TH1F* CalibBase::m_hy0 [private] |
TH1F* CalibBase::m_layerhitmap [private] |
int CalibBase::m_nGrPoint [private] |
TH1F* CalibBase::m_pnPhi[NPhiBin] [private] |
TH1F* CalibBase::m_pnPhiCms[NPhiBin] [private] |
TH1F* CalibBase::m_pnThe[NThetaBin] [private] |
TH1F* CalibBase::m_pnTheCms[NThetaBin] [private] |
TH1F* CalibBase::m_pnThePhi[NThetaBin][NPhiBin] [private] |
TH1F* CalibBase::m_pnThePhiCms[NThetaBin][NPhiBin] [private] |
TH1F* CalibBase::m_ppPhi[NPhiBin] [private] |
TH1F* CalibBase::m_ppPhiCms[NPhiBin] [private] |
TH1F* CalibBase::m_ppThe[NThetaBin] [private] |
TH1F* CalibBase::m_ppTheCms[NThetaBin] [private] |
TH1F* CalibBase::m_ppThePhi[NThetaBin][NPhiBin] [private] |
TH1F* CalibBase::m_ppThePhiCms[NThetaBin][NPhiBin] [private] |
TH1F* CalibBase::m_wirehitmap [private] |
const int CalibBase::NPhiBin = 20 [static, private] |
const int CalibBase::NThetaBin = 9 [static, private] |