67 std::cout <<
"*TEcnaHistos> WRONG MANAGEMENT OF ALLOCATIONS: fCnew = " 80 std::cout <<
"*TEcnaHistos> WRONG MANAGEMENT OF ROOT ALLOCATIONS: fCnewRoot = " 85 std::cout <<
"*TEcnaHistos> BRAVO! GOOD MANAGEMENT OF ROOT ALLOCATIONS:" 86 <<
" fCnewRoot = " <<
fCnewRoot <<
", fCdeleteRoot = " 116 Long_t i_this = (Long_t)
this;
126 if( iCnaParCout == 0 )
133 Long_t iCnaParPaths = pObjectManager->
GetPointerValue(
"TEcnaParPaths");
134 if( iCnaParPaths == 0 )
152 Long_t iEcalNumbering = pObjectManager->
GetPointerValue(
"TEcnaNumbering");
153 if( iEcalNumbering == 0 )
160 Long_t iCnaParHistos = pObjectManager->
GetPointerValue(
"TEcnaParHistos");
161 if( iCnaParHistos == 0 )
177 if( iMyRootFile == 0 )
622 fFapFileRuns =
"(file with list of runs parameters: no info)";
724 const Int_t& xArgRunNumber,
const Int_t& xArgFirstReqEvtNumber,
725 const Int_t& xArgLastReqEvtNumber,
const Int_t& xArgReqNbOfEvts,
726 const Int_t& xArgStexNumber)
789 if ( !(option_palette ==
"Rainbow" || option_palette ==
"rainbow") ){
fFlagColPal =
"Black/Red/Blue";}
790 if ( option_palette ==
"Rainbow" || option_palette ==
"rainbow" ){
fFlagColPal =
"Rainbow";}
867 const TString& UserCorOrCov,
const TString& UserBetweenWhat)
868 {
PlotMatrix(read_matrix_corcc, UserCorOrCov, UserBetweenWhat,
"");}
871 const TString& UserCorOrCov,
const TString& UserBetweenWhat,
872 const TString& UserPlotOption)
874 TString CallingMethod =
"2D";
881 if( BetweenWhat !=
"?" && CorOrCov !=
"?" )
883 if( BetweenWhat ==
"MttLF" || BetweenWhat ==
"MttHF" )
894 std::cout <<
"!TEcnaHistos::PlotMatrix(...)> Histo cannot be reached." <<
fTTBELL << std::endl;}
898 {
PlotMatrix(UserCorOrCov, UserBetweenWhat,
"");}
901 const TString& UserPlotOption)
903 TString CallingMethod =
"2D";
910 if( BetweenWhat !=
"?" && CorOrCov !=
"?" )
912 if( BetweenWhat ==
"MttLF" || BetweenWhat ==
"MttHF" )
922 std::cout <<
"!TEcnaHistos::PlotMatrix(...)> Histo cannot be reached." <<
fTTBELL << std::endl;}
928 const TString& UserCorOrCov,
const TString& UserBetweenWhat,
929 const Int_t& arg_n1,
const Int_t& arg_n2)
930 {
PlotMatrix(read_matrix, UserCorOrCov, UserBetweenWhat, arg_n1, arg_n2,
"");}
933 const TString& UserCorOrCov,
const TString& UserBetweenWhat,
934 const Int_t& arg_n1,
const Int_t& arg_n2,
935 const TString& UserPlotOption)
937 TString CallingMethod =
"2D";
944 if( BetweenWhat !=
"?" && CorOrCov !=
"?" )
946 if( BetweenWhat ==
"MccLF" || BetweenWhat ==
"MccHF" )
948 Int_t cStexStin_A = arg_n1;
949 Int_t cStexStin_B = arg_n2;
952 cStexStin_A, cStexStin_B,
fZerv, CorOrCov, BetweenWhat, StandardPlotOption);
955 if( BetweenWhat ==
"Mss" )
957 Int_t n1StexStin = arg_n1;
958 Int_t i0StinEcha = arg_n2;
962 n1StexStin,
fZerv, i0StinEcha, CorOrCov, BetweenWhat, StandardPlotOption);
967 std::cout <<
"!TEcnaHistos::PlotMatrix(...)> Histo cannot be reached." <<
fTTBELL << std::endl;}
971 const Int_t& arg_n1,
const Int_t& arg_n2)
972 {
PlotMatrix(UserCorOrCov, UserBetweenWhat, arg_n1, arg_n2,
"");}
975 const Int_t& arg_n1,
const Int_t& arg_n2,
976 const TString& UserPlotOption)
978 TString CallingMethod =
"2D";
985 if( StandardBetweenWhat !=
"?" && StandardCorOrCov !=
"?" )
987 if( StandardBetweenWhat ==
"MccLF" || StandardBetweenWhat ==
"MccHF" )
989 Int_t cStexStin_A = arg_n1;
990 Int_t cStexStin_B = arg_n2;
992 cStexStin_A, cStexStin_B,
fZerv, StandardCorOrCov, StandardBetweenWhat, StandardPlotOption);
995 if( StandardBetweenWhat ==
"Mss" )
997 Int_t n1StexStin = arg_n1;
998 Int_t i0StinEcha = arg_n2;
1002 n1StexStin,
fZerv, i0StinEcha, StandardCorOrCov, StandardBetweenWhat, StandardPlotOption);
1007 std::cout <<
"!TEcnaHistos::PlotMatrix(...)> Histo cannot be reached." <<
fTTBELL << std::endl;}
1018 TString CallingMethod =
"2DS";
1021 if( StandardHistoCode !=
"?" )
1025 if( StandardDetectorCode !=
"?" )
1032 if( StandardDetectorCode ==
"SM" || StandardDetectorCode ==
"Dee" )
1034 if( StandardDetectorCode ==
"EB" || StandardDetectorCode ==
"EE" )
1039 std::cout <<
"!TEcnaHistos::PlotDetector(...)> Histo cannot be reached." <<
fTTBELL << std::endl;}
1043 std::cout <<
"!TEcnaHistos::PlotDetector(...)> Histo cannot be reached." <<
fTTBELL << std::endl;}
1048 TString CallingMethod =
"2DS";
1051 if( StandardHistoCode !=
"?" )
1055 if( StandardDetectorCode !=
"?" )
1064 if( StandardDetectorCode ==
"SM" || StandardDetectorCode ==
"Dee" )
1066 if( StandardDetectorCode ==
"EB" || StandardDetectorCode ==
"EE" )
1071 std::cout <<
"!TEcnaHistos::PlotDetector(...)> Histo cannot be reached." <<
fTTBELL << std::endl;}
1075 std::cout <<
"!TEcnaHistos::PlotDetector(...)> Histo cannot be reached." <<
fTTBELL << std::endl;}
1084 const TString& User_X_Quantity,
const TString& User_Y_Quantity,
1085 const TString& UserDetector)
1086 {
Plot1DHisto(InputHisto, User_X_Quantity, User_Y_Quantity, UserDetector,
"");}
1089 const TString& User_X_Quantity,
const TString& User_Y_Quantity,
1090 const TString& UserDetector,
1091 const TString& UserPlotOption)
1093 TString CallingMethod =
"1D";
1100 if( Standard_X_Quantity !=
"?" && Standard_Y_Quantity !=
"?" )
1105 if( StandardDetectorCode !=
"?" )
1107 if( StandardDetectorCode ==
"EB" || StandardDetectorCode ==
"EE" ){
fFapStexNumber = 0;}
1112 std::cout <<
"!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." <<
fTTBELL << std::endl;}
1116 std::cout <<
"!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." <<
fTTBELL << std::endl;}
1120 const TString& UserDetector)
1121 {
Plot1DHisto(User_X_Quantity, User_Y_Quantity, UserDetector,
"");}
1124 const TString& UserDetector,
const TString& UserPlotOption)
1126 TString CallingMethod =
"1D";
1133 if( Standard_X_Quantity !=
"?" && Standard_Y_Quantity !=
"?" )
1137 if( StandardDetectorCode !=
"?" )
1139 if( StandardDetectorCode ==
"EB" || StandardDetectorCode ==
"EE" ){
fFapStexNumber = 0;}
1144 std::cout <<
"!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." <<
fTTBELL << std::endl;}
1148 std::cout <<
"!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." <<
fTTBELL << std::endl;}
1158 const TString& User_X_Quantity,
const TString& User_Y_Quantity,
1159 const Int_t& n1StexStin)
1160 {
Plot1DHisto(InputHisto, User_X_Quantity, User_Y_Quantity, n1StexStin,
"");}
1163 const TString& User_X_Quantity,
const TString& User_Y_Quantity,
1164 const Int_t& n1StexStin,
1165 const TString& UserPlotOption)
1167 TString CallingMethod =
"1DX";
1169 Int_t i0StinEcha = 0;
1170 Plot1DHisto(InputHisto, User_X_Quantity, User_Y_Quantity, n1StexStin, i0StinEcha, StandardPlotOption);
1175 const TString& User_X_Quantity,
const TString& User_Y_Quantity,
1176 const Int_t& n1StexStin,
const Int_t& i0StinEcha)
1177 {
Plot1DHisto(InputHisto, User_X_Quantity, User_Y_Quantity, n1StexStin, i0StinEcha,
"");}
1180 const TString& User_X_Quantity,
const TString& User_Y_Quantity,
1181 const Int_t& n1StexStin,
const Int_t& i0StinEcha,
1182 const TString& UserPlotOption)
1184 TString CallingMethod =
"1D";
1191 if( Standard_X_Quantity !=
"?" && Standard_Y_Quantity !=
"?" )
1201 if( Standard_X_Quantity ==
"Smp" && Standard_Y_Quantity ==
"MSp" )
1203 if( Standard_X_Quantity ==
"MSp" && Standard_Y_Quantity ==
"NOS" )
1205 if( Standard_X_Quantity ==
"Smp" && Standard_Y_Quantity ==
"SSp" )
1207 if( Standard_X_Quantity ==
"SSp" && Standard_Y_Quantity ==
"NOS" )
1213 std::cout <<
"!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." <<
fTTBELL << std::endl;}
1217 const Int_t& n1StexStin,
const Int_t& i0StinEcha)
1218 {
Plot1DHisto(User_X_Quantity, User_Y_Quantity, n1StexStin, i0StinEcha,
"");}
1221 const Int_t& n1StexStin,
const Int_t& i0StinEcha,
1222 const TString& UserPlotOption)
1224 TString CallingMethod =
"1D";
1231 if( Standard_X_Quantity !=
"?" && Standard_Y_Quantity !=
"?" )
1240 if( Standard_X_Quantity ==
"Smp" && Standard_Y_Quantity ==
"MSp" )
1242 if( Standard_X_Quantity ==
"MSp" && Standard_Y_Quantity ==
"NOS" )
1244 if( Standard_X_Quantity ==
"Smp" && Standard_Y_Quantity ==
"SSp" )
1246 if( Standard_X_Quantity ==
"SSp" && Standard_Y_Quantity ==
"NOS" )
1252 std::cout <<
"!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." <<
fTTBELL << std::endl;}
1256 const TString& User_X_Quantity,
const TString& User_Y_Quantity,
1257 const Int_t& n1StexStin,
const Int_t& i0StinEcha,
const Int_t& n1Sample)
1258 {
Plot1DHisto(InputHisto, User_X_Quantity, User_Y_Quantity, n1StexStin, i0StinEcha, n1Sample,
"");}
1261 const TString& User_X_Quantity,
const TString& User_Y_Quantity,
1262 const Int_t& n1StexStin,
const Int_t& i0StinEcha,
const Int_t& n1Sample,
1263 const TString& UserPlotOption)
1265 TString CallingMethod =
"1D";
1274 if( Standard_X_Quantity !=
"?" && Standard_Y_Quantity !=
"?" )
1276 Int_t i0Sample = n1Sample-1;
1278 ViewHisto(InputHisto,
fAlreadyRead, n1StexStin, i0StinEcha, i0Sample, TechHistoCode, StandardPlotOption);
1282 std::cout <<
"!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." <<
fTTBELL << std::endl;}
1286 const Int_t& n1StexStin,
const Int_t& i0StinEcha,
const Int_t& n1Sample)
1287 {
Plot1DHisto(User_X_Quantity, User_Y_Quantity, n1StexStin, i0StinEcha, n1Sample,
"");}
1290 const Int_t& n1StexStin,
const Int_t& i0StinEcha,
const Int_t& n1Sample,
1291 const TString& UserPlotOption)
1293 TString CallingMethod =
"1D";
1300 Int_t i0Sample = n1Sample-1;
1302 if( Standard_X_Quantity !=
"?" && Standard_Y_Quantity !=
"?" )
1309 std::cout <<
"!TEcnaHistos::Plot1DHisto(...)> Histo cannot be reached." <<
fTTBELL << std::endl;}
1318 const TString& list_of_run_file_name,
1319 const Int_t& StexStin_A,
const Int_t& i0StinEcha)
1320 {
PlotHistory(User_X_Quantity, User_Y_Quantity, list_of_run_file_name, StexStin_A, i0StinEcha,
"");}
1323 const TString& list_of_run_file_name,
1324 const Int_t& StexStin_A,
const Int_t& i0StinEcha,
1325 const TString& UserPlotOption)
1327 TString CallingMethod =
"Time";
1334 if( Standard_X_Quantity !=
"?" && Standard_Y_Quantity !=
"?" )
1337 ViewHistime(list_of_run_file_name, StexStin_A, i0StinEcha, TechHistoCode, StandardPlotOption);
1341 std::cout <<
"!TEcnaHistos::PlotHistory(...)> Histo cannot be reached." <<
fTTBELL << std::endl;}
1389 const Int_t& StexStin_A,
const Int_t& StexStin_B,
1390 const Int_t& MatrixBinIndex,
const TString& CorOrCov,
1391 const TString& BetweenWhat,
const TString& PlotOption)
1395 if( (
fFapStexNumber > 0) && (fFapStexNumber <= fEcal->MaxStexInStas()) )
1397 Bool_t OKArray = kFALSE;
1398 Bool_t OKData = kFALSE;
1409 if( OKArray == kTRUE )
1427 if( arg_AlreadyRead >= 1 )
1442 if ( OKArray == kTRUE )
1446 if( OKData == kTRUE )
1450 Int_t Stin_X_ok = 0;
1451 Int_t Stin_Y_ok = 0;
1454 {Stin_X_ok = 1; Stin_Y_ok = 1;}
1460 if ( vStin(index_Stin) == StexStin_A ){Stin_X_ok = 1;}
1461 if ( vStin(index_Stin) == StexStin_B ){Stin_Y_ok = 1;}
1464 if( Stin_X_ok == 1 && Stin_Y_ok == 1 )
1467 Int_t ReadMatSize = -1;
1468 Int_t i0StinEcha = -1;
1484 ( (BetweenWhat ==
fBetweenSamples) && (i0StinEcha >= 0) && (i0StinEcha < fEcal->MaxCrysInStin()) ) )
1486 TMatrixD read_matrix(ReadMatSize, ReadMatSize);
1487 for(Int_t
i=0;
i-ReadMatSize<0;
i++)
1488 {
for(Int_t j=0; j-ReadMatSize<0; j++){read_matrix(
i,j)=(Double_t)0.;}}
1490 Bool_t OKData = kFALSE;
1530 read_matrix = arg_read_matrix;
1534 if( OKData == kTRUE )
1538 if( PlotOption ==
"ASCII" )
1541 StexStin_A, MatrixBinIndex, ReadMatSize, read_matrix);
1549 {sprintf(f_in_mat_tit,
"Covariance(Sample, Sample')");}
1551 {sprintf(f_in_mat_tit,
"Correlation(Sample, Sample')");}
1556 {sprintf(f_in_mat_tit,
1557 "Mean LF |Cor(Xtal,Xtal')| for each (Tower,Tower')");}
1559 {sprintf(f_in_mat_tit,
1560 "Mean HF |Cor(Xtal,Xtal')| for each (Tower,Tower')");}
1565 {sprintf(f_in_mat_tit,
1566 "Mean LF |Cor(Xtal,Xtal')| for each (SC,SC')");}
1568 {sprintf(f_in_mat_tit,
1569 "Mean HF |Cor(Xtal,Xtal')| for each (SC,SC')");}
1575 {sprintf(f_in_mat_tit,
"LF Cor(Xtal,Xtal') matrix elts for (Tow,Tow')");}
1577 {sprintf(f_in_mat_tit,
"LF Cor(Xtal,Xtal') matrix elts for (SC,SC')");}
1582 {sprintf(f_in_mat_tit,
"HF Cor(Xtal,Xtal') matrix elts for (Tow,Tow')");}
1584 {sprintf(f_in_mat_tit,
"LF Cor(Xtal,Xtal') matrix elts for (SC,SC')");}
1588 TString axis_x_var_name;
1589 TString axis_y_var_name;
1597 {sprintf(f_in_axis_x,
" %s number ",
fFapStinName.Data());}
1599 {sprintf(f_in_axis_x,
" %s number for construction ",
fFapStinName.Data());}
1601 axis_x_var_name = f_in_axis_x; axis_y_var_name = f_in_axis_x;
1605 axis_x_var_name =
" Sample "; axis_y_var_name =
" Sample ";
1608 sprintf(f_in_axis_x,
" Crystal %s %d ",
fFapStinName.Data(), StexStin_A);
1609 sprintf(f_in_axis_y,
" Crystal %s %d ",
fFapStinName.Data(),StexStin_B);
1610 axis_x_var_name = f_in_axis_x; axis_y_var_name = f_in_axis_y;}
1612 Int_t nb_binx = MatSize;
1613 Int_t nb_biny = MatSize;
1614 Axis_t xinf_bid = (Axis_t)0.;
1615 Axis_t xsup_bid = (Axis_t)MatSize;
1616 Axis_t yinf_bid = (Axis_t)0.;
1617 Axis_t ysup_bid = (Axis_t)MatSize;
1631 TH2D* h_fbid0 =
new TH2D(
"bidim", f_in_mat_tit,
1632 nb_binx, xinf_bid, xsup_bid,
1633 nb_biny, yinf_bid, ysup_bid);
fCnewRoot++;
1636 h_fbid0->GetXaxis()->SetTitle(axis_x_var_name);
1637 h_fbid0->GetYaxis()->SetTitle(axis_y_var_name);
1643 for(Int_t
i = 0 ;
i < ReadMatSize ;
i++)
1645 for(Int_t j = 0 ; j < ReadMatSize ; j++)
1653 if( xi_bid > 0 && xj_bid > 0 )
1655 Int_t xi_bid_m = xi_bid-1;
1656 Int_t xj_bid_m = xj_bid-1;
1657 h_fbid0->Fill(xi_bid_m, xj_bid_m, read_matrix(
i,j));
1664 for(Int_t
i = 0 ;
i - ReadMatSize < 0 ;
i++)
1666 Double_t
xi = (Double_t)
i;
1667 for(Int_t j = 0 ; j < ReadMatSize ; j++)
1669 Double_t xj = (Double_t)j;
1670 Double_t mat_val = (Double_t)read_matrix(
i,j);
1671 h_fbid0->Fill(xi, xj, (Double_t)mat_val);
1678 TString quantity_code =
"D_MCs_ChNb";
1686 if( BetweenWhat ==
fLFBetweenStins ){quantity_code =
"H2LFccMosMatrix";}
1687 if( BetweenWhat ==
fHFBetweenStins ){quantity_code =
"H2HFccMosMatrix";}
1743 HistoType =
"(no quantity type info)";
1745 if (PlotOption ==
"COLZ" ){HistoType =
"colz";}
1746 if (PlotOption ==
"BOX" ){HistoType =
"colz";}
1747 if (PlotOption ==
"TEXT" ){HistoType =
"colz";}
1748 if (PlotOption ==
"CONTZ" ){HistoType =
"colz";}
1749 if (PlotOption ==
"LEGO2Z"){HistoType =
"lego";}
1750 if (PlotOption ==
"SURF1Z"){HistoType =
"surf";}
1751 if (PlotOption ==
"SURF2Z"){HistoType =
"surf";}
1752 if (PlotOption ==
"SURF3Z"){HistoType =
"surf";}
1753 if (PlotOption ==
"SURF4" ){HistoType =
"surf";}
1768 TString name_cov_cor;
1774 TString name_chan_samp;
1776 name_chan_samp =
"?";
1786 name_chan_samp =
"Between_Samples";
1793 name_visu = PlotOption;
1796 sprintf(f_in,
"%s_%s_%s_S1_%d_R%d_%d_%d_%s%d_%s",
1797 name_cov_cor.Data(), name_chan_samp.Data(),
1804 sprintf(f_in,
"%s_%s_%s_S1_%d_R%d_%d_%d_%s%d_%sX%d_%sY%d_%s",
1805 name_cov_cor.Data(), name_chan_samp.Data(),
1813 sprintf(f_in,
"%s_%s_%s_S1_%d_R%d_%d_%d_%s%d_%sX%d_%sY%d_ElecChannel_%d_%s",
1814 name_cov_cor.Data(), name_chan_samp.Data(),
1825 TCanvas *MainCanvas =
new TCanvas(f_in, f_in, canv_w , canv_h);
fCnewRoot++;
1845 MainCanvas->Divide(1, 1, x_margin, y_margin);
1850 gPad->SetLogy(logy);
1853 h_fbid0->DrawCopy(PlotOption);
1854 h_fbid0->SetStats(
true);
1873 std::cout <<
"*TEcnaHistos::ViewMatrix(...)> *ERROR* ==> Wrong channel number in " 1875 << i0StinEcha <<
" (required range: [0, " 1892 if ( Stin_X_ok != 1 )
1896 std::cout <<
"*TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " 1898 << StexStin_A <<
", " 1899 <<
fFapStinName.Data() <<
" not found. Available numbers = ";
1911 std::cout <<
"*TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " 1914 <<
fFapStinName.Data() <<
" not found. Available numbers = ";
1925 if ( Stin_Y_ok != 1 )
1930 std::cout <<
"*TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " 1932 << StexStin_B <<
", " 1933 <<
fFapStinName.Data() <<
" not found. Available numbers = ";
1945 std::cout <<
"*TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " 1948 <<
fFapStinName.Data() <<
" not found. Available numbers = ";
1964 std::cout <<
"!TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " 1965 <<
" Histo not available." <<
fTTBELL << std::endl;
1973 std::cout <<
"!TEcnaHistos::ViewMatrix(...)> *ERROR* =====> " 1974 <<
" ROOT file not found" <<
fTTBELL << std::endl;
2019 if( (
fFapStexNumber > 0) && fFapStexNumber <= fEcal->MaxStexInStas() )
2021 Int_t StexStin = cStexStin;
2051 if ( vStin(index_Stin) == StexStin ){Stin_ok++;}
2064 {sprintf(f_in_mat_tit,
"Xtal's Cov(s,s') matrices in %s.",
2067 {sprintf(f_in_mat_tit,
"Xtal's Cor(s,s') matrices in %s.",
2072 Int_t nb_binx = GeoBidSize;
2073 Int_t nb_biny = GeoBidSize;
2074 Axis_t xinf_bid = (Axis_t)0.;
2075 Axis_t xsup_bid = (Axis_t)GeoBidSize;
2076 Axis_t yinf_bid = (Axis_t)0.;
2077 Axis_t ysup_bid = (Axis_t)GeoBidSize;
2082 TH2D* h_geo_bid =
new TH2D(
"geobidim_ViewStin", f_in_mat_tit,
2083 nb_binx, xinf_bid, xsup_bid,
2084 nb_biny, yinf_bid, ysup_bid);
fCnewRoot++;
2093 TMatrixD read_matrix(ReadMatSize, ReadMatSize);
2094 for(Int_t
i=0;
i-ReadMatSize < 0;
i++){
for(Int_t j=0; j-ReadMatSize < 0; j++)
2095 {read_matrix(
i,j)=(Double_t)0.;}}
2097 Int_t i_data_exist = 0;
2116 for(Int_t i_samp = 0 ; i_samp < ReadMatSize ; i_samp++)
2119 for(Int_t j_samp = 0; j_samp < ReadMatSize ; j_samp++)
2122 StexStin, n_crys, j_samp);
2123 h_geo_bid->Fill((Double_t)i_xgeo, (Double_t)j_ygeo,
2124 (Double_t)read_matrix(i_samp, j_samp));
2132 TString quantity_code =
"D_MCs_ChNb";
2168 if( i_data_exist > 0 )
2180 TString name_cov_cor;
2190 sprintf(f_in,
"%s_%s_%s_S1_%d_R%d_%d_%d_%s%d_%s%d_%s",
2199 TCanvas *MainCanvas =
new TCanvas(f_in, f_in, canv_w, canv_h);
fCnewRoot++;
2213 MainCanvas->Divide(1, 1, x_margin, y_margin);
2217 gPad->SetLogy(logy);
2219 h_geo_bid->DrawCopy(
"COLZ");
2229 h_geo_bid->SetStats(
true);
2234 h_geo_bid->Delete(); h_geo_bid =
nullptr;
fCdeleteRoot++;
2238 std::cout <<
"!TEcnaHistos::ViewStin(...)> *ERROR* =====> " 2240 << cStexStin <<
" not found." 2241 <<
" Available numbers = ";
2263 std::cout <<
"!TEcnaHistos::ViewStin(...)> *ERROR* =====> " 2264 <<
" ROOT file not found" <<
fTTBELL << std::endl;
2301 if( (SMNumber > 0) && (SMNumber <= fEcal->MaxSMInEB()) )
2312 Int_t nx_gbins = nb_bins*size_eta;
2313 Int_t ny_gbins = nb_bins*size_phi;
2315 Axis_t xinf_gbid = (Axis_t)0.;
2317 Axis_t yinf_gbid = (Axis_t)0.;
2320 TString fg_name =
"M0' crystals";
2321 TString fg_tit =
"Xtal numbering (chan. in tow, chan. in SM, Xtal in SM, hashed)";
2325 h_gbid =
new TH2D(fg_name.Data(), fg_tit.Data(),
2326 nx_gbins, xinf_gbid, xsup_gbid,
2327 ny_gbins, yinf_gbid, ysup_gbid);
fCnewRoot++;
2344 gStyle->SetPalette(1,
nullptr);
2356 sprintf(f_in,
"Crystal_Numbering_for_%s_X_%d_%s%d",
2361 TCanvas *MainCanvas =
new TCanvas(f_in, f_in, canv_w , canv_h); fCnewRoot++;
2369 MainCanvas->Divide(1, 1, x_margin, y_margin);
2375 Bool_t b_true =
true;
2376 Bool_t b_false =
false;
2379 gStyle->SetMarkerColor(couleur_rouge);
2382 gPad->SetLogy(logy);
2386 h_gbid->SetStats(b_false);
2387 h_gbid->DrawCopy(
"COLZ");
2395 TText *text_elec_num =
new TText(); fCnewRoot++;
2396 if ( TowerLvrbType ==
"top" ){text_elec_num->SetTextColor(couleur_rouge);}
2397 if ( TowerLvrbType ==
"bottom" ){text_elec_num->SetTextColor(couleur_bleu_fonce);}
2398 text_elec_num->SetTextSize(0.04);
2401 TText *text_sme_num =
new TText(); fCnewRoot++;
2402 if ( TowerLvrbType ==
"top" ){text_sme_num->SetTextColor(couleur_rouge);}
2403 if ( TowerLvrbType ==
"bottom" ){text_sme_num->SetTextColor(couleur_bleu_fonce);}
2404 text_sme_num->SetTextSize(0.03);
2407 TText *text_sm_num =
new TText(); fCnewRoot++;
2408 text_sm_num->SetTextColor(couleur_noir);
2409 text_sm_num->SetTextSize(0.03);
2412 TText *text_hsd_num =
new TText(); fCnewRoot++;
2413 text_hsd_num->SetTextColor(couleur_noir);
2414 text_hsd_num->SetTextSize(0.03);
2419 Double_t off_set = (Double_t)1.;
2425 Int_t i_xgeo =
GetXSampInStin(SMNumber, n1SMTow, i_chan, i_samp);
2426 Int_t i_ygeo =
GetYSampInStin(SMNumber, n1SMTow, i_chan, i_samp);
2428 Double_t xgi = i_xgeo + 3.*off_set;
2429 Double_t ygj = i_ygeo + 7.*off_set;
2431 Double_t xgi_sme = i_xgeo + 3.*off_set;
2432 Double_t ygj_sme = i_ygeo + 5.*off_set;
2434 Double_t xgi_sm = i_xgeo + 3.*off_set;
2435 Double_t ygj_sm = i_ygeo + 3.*off_set;
2437 Double_t xgi_hsd = i_xgeo + 3.*off_set;
2438 Double_t ygj_hsd = i_ygeo + 1.*off_set;
2450 sprintf(f_in_elec,
"%d", i_chan);
2451 text_elec_num->DrawText(xgi, ygj, f_in_elec);
2453 sprintf(f_in_sme,
"%d", i_crys_sme);
2454 text_sme_num->DrawText(xgi_sme, ygj_sme, f_in_sme);
2456 sprintf(f_in_sm,
"%d", i_crys_sm);
2457 text_sm_num->DrawText(xgi_sm, ygj_sm, f_in_sm);
2459 sprintf(f_in_hsd,
"%d", i_crys_hsd);
2460 text_sm_num->DrawText(xgi_hsd, ygj_hsd, f_in_hsd);
2462 text_sm_num->Delete(); text_sm_num =
nullptr;
fCdeleteRoot++;
2463 text_sme_num->Delete(); text_sme_num =
nullptr;
fCdeleteRoot++;
2464 text_elec_num->Delete(); text_elec_num =
nullptr;
fCdeleteRoot++;
2465 text_hsd_num->Delete(); text_hsd_num =
nullptr;
fCdeleteRoot++;
2467 ViewStinGrid(SMNumber, n1SMTow, MatSize, size_eta, size_phi,
"CrystalNumbering");
2470 h_gbid->SetStats(b_true);
2477 std::cout <<
"!TEcnaHistos::TowerCrystalNumbering(...)> SM = " << SMNumber
2493 if( (DeeNumber > 0) && (DeeNumber <= fEcal->MaxDeeInEE()) )
2506 Int_t nx_gbins = nb_bins*size_IX;
2507 Int_t ny_gbins = nb_bins*size_IY;
2509 Axis_t xinf_gbid = (Axis_t)0.;
2511 Axis_t yinf_gbid = (Axis_t)0.;
2514 TString fg_name =
"crystalnbring";
2515 TString fg_tit =
"Xtal numbering for construction";
2518 h_gbid =
new TH2D(fg_name.Data(), fg_tit.Data(),
2519 nx_gbins, xinf_gbid, xsup_gbid,
2520 ny_gbins, yinf_gbid, ysup_gbid);
fCnewRoot++;
2536 gStyle->SetPalette(1,
nullptr);
2545 sprintf(f_in,
"Crystal_Numbering_for_%s_X_%d_%s%d",
2550 TCanvas *MainCanvas =
new TCanvas(f_in, f_in, canv_w , canv_h); fCnewRoot++;
2559 MainCanvas->Divide(1, 1, x_margin, y_margin);
2565 Bool_t b_true =
true;
2566 Bool_t b_false =
false;
2569 gStyle->SetMarkerColor(couleur_rouge);
2572 gPad->SetLogy(logy);
2575 h_gbid->SetStats(b_false);
2577 h_gbid->DrawCopy(
"COLZ");
2584 Color_t couleur_SC =
GetSCColor(DeeEndcap, DeeDir, SCQuadType);
2587 TText *text_elec_num =
new TText(); fCnewRoot++;
2588 text_elec_num->SetTextColor(couleur_SC);
2589 text_elec_num->SetTextSize(0.06);
2599 Int_t i_xgeo =
GetXSampInStin(DeeNumber, n1DeeSCEcna, i_chan, i_samp);
2600 Int_t i_ygeo =
GetYSampInStin(DeeNumber, n1DeeSCEcna, i_chan, i_samp);
2602 Double_t xgi = i_xgeo + off_set;
2603 Double_t ygj = i_ygeo + 2*off_set;
2606 Int_t i_chan_p = i_chan+1;
2607 sprintf(f_in_elec,
"%d", i_chan_p);
2608 text_elec_num->DrawText(xgi, ygj, f_in_elec);
2610 text_elec_num->Delete(); text_elec_num =
nullptr;
fCdeleteRoot++;
2615 h_gbid->SetStats(b_true);
2622 std::cout <<
"!TEcnaHistos::SCCrystalNumbering(...)> Dee = " << DeeNumber
2634 const Int_t& i0StinEcha,
const Int_t& i_samp)
2643 if( (btype ==
"EB+" && ctype ==
"bottom") || (btype ==
"EB-" && ctype ==
"top") )
2646 if( (btype ==
"EB+" && ctype ==
"top") || (btype ==
"EB-" && ctype ==
"bottom") )
2651 if( DeeDir ==
"right" )
2653 if( DeeDir ==
"left" )
2661 const Int_t& i0StinEcha,
const Int_t& j_samp)
2674 if( (btype ==
"EB+" && ctype ==
"top") || (btype ==
"EB-" && ctype ==
"bottom") )
2676 if( i0StinEcha >= 0 && i0StinEcha <= 4 ) {jy_geo = (i0StinEcha - 0)*
fEcal->
MaxSampADC() + j_samp;}
2677 if( i0StinEcha >= 5 && i0StinEcha <= 9 ) {jy_geo = -(i0StinEcha - 9)*
fEcal->
MaxSampADC() + j_samp;}
2678 if( i0StinEcha >= 10 && i0StinEcha <= 14 ) {jy_geo = (i0StinEcha - 10)*
fEcal->
MaxSampADC() + j_samp;}
2679 if( i0StinEcha >= 15 && i0StinEcha <= 19 ) {jy_geo = -(i0StinEcha - 19)*
fEcal->
MaxSampADC() + j_samp;}
2680 if( i0StinEcha >= 20 && i0StinEcha <= 24 ) {jy_geo = (i0StinEcha - 20)*
fEcal->
MaxSampADC() + j_samp;}
2683 if( (btype ==
"EB+" && ctype ==
"bottom") || (btype ==
"EB-" && ctype ==
"top") )
2685 if( i0StinEcha >= 0 && i0StinEcha <= 4 )
2687 if( i0StinEcha >= 5 && i0StinEcha <= 9 )
2689 if( i0StinEcha >= 10 && i0StinEcha <= 14 )
2691 if( i0StinEcha >= 15 && i0StinEcha <= 19 )
2693 if( i0StinEcha >= 20 && i0StinEcha <= 24 )
2712 const Int_t& StexStin,
const Int_t& MatSize,
2713 const Int_t& size_Hoco,
const Int_t& size_Veco,
2714 const TString& chopt)
2719 size_Hoco, size_Veco, chopt);}
2721 size_Hoco, size_Veco, chopt);}
2732 const Int_t& n1SMTow,
const Int_t& MatSize,
2733 const Int_t& size_eta,
const Int_t& size_phi,
2734 const TString& chopt)
2738 Double_t xline = 0.;
2740 Double_t yline_bot = 0.;
2741 Double_t yline_top = (Double_t)(MatSize*size_eta);
2743 for( Int_t
i = 0 ;
i < size_eta ;
i++)
2745 xline = xline + (Double_t)MatSize;
2747 lin =
new TLine(xline, yline_bot, xline, yline_top);
fCnewRoot++;
2752 Double_t xline_left = 0;
2753 Double_t xline_right = (Double_t)(MatSize*size_eta);
2755 Double_t yline = -(Double_t)MatSize;
2757 for( Int_t j = 0 ; j < size_eta+1 ; j++)
2759 yline = yline + (Double_t)MatSize;
2761 lin =
new TLine(xline_left, yline, xline_right, yline);
fCnewRoot++;
2784 TGaxis* sup_axis_x =
nullptr;
2786 if ( x_direction ==
"-x" )
2787 {sup_axis_x =
new TGaxis( -(Float_t)MatSize, (Float_t)0, (Float_t)(size_eta*MatSize), (Float_t)0.,
2788 "f1", size_eta,
"BCS" , 0.); fCnewRoot++;
2789 std::cout <<
"TEcnaHistosEB::ViewTowerGrid()> non foreseen case. eta with -x direction." <<
fTTBELL << std::endl;}
2791 if ( x_direction ==
"x" )
2792 {sup_axis_x =
new TGaxis( (Float_t)0. , (Float_t)0., (Float_t)(size_eta*MatSize), (Float_t)0.,
2793 "f1", size_eta,
"CS" , 0.); fCnewRoot++;}
2795 sup_axis_x->SetTitle(x_var_name);
2796 sup_axis_x->SetTitleSize(tit_siz_x);
2797 sup_axis_x->SetTitleOffset(tit_off_x);
2798 sup_axis_x->SetLabelSize(lab_siz_x);
2799 sup_axis_x->SetLabelOffset(lab_off_x);
2800 sup_axis_x->SetTickSize(tic_siz_x);
2801 sup_axis_x->Draw(
"SAME");
2810 if( chopt ==
"CrystalNumbering" )
2818 new TF1(
"f2", y_direction.Data(), phi_min, phi_max); fCnewRoot++;
2819 TGaxis* sup_axis_y =
nullptr;
2821 if ( y_direction ==
"-x" )
2822 {sup_axis_y =
new TGaxis( (Float_t)(size_eta*MatSize), (Float_t)0.,
2823 (Float_t)(size_eta*MatSize), (Float_t)(size_phi*MatSize),
2824 "f2", size_phi,
"+CS", 0.); fCnewRoot++;}
2826 if ( y_direction ==
"x" )
2827 {sup_axis_y =
new TGaxis( (Float_t)0., (Float_t)0., (Float_t) 0., (Float_t)(size_phi*MatSize),
2828 "f2", size_phi,
"BCS", 0.); fCnewRoot++;}
2830 sup_axis_y->SetTitle(y_var_name);
2831 sup_axis_y->SetTitleSize(tit_siz_y);
2832 sup_axis_y->SetTitleOffset(tit_off_y);
2833 sup_axis_y->SetLabelSize(lab_siz_y);
2834 sup_axis_y->SetLabelOffset(lab_off_y);
2835 sup_axis_y->SetTickSize(tic_siz_y);
2836 sup_axis_y->Draw(
"SAME");
2846 new TF1(
"f3", jy_direction.Data(), j_phi_min, j_phi_max); fCnewRoot++;
2847 TGaxis* sup_axis_jy =
nullptr;
2849 sup_axis_jy =
new TGaxis( (Float_t)0., (Float_t)0.,
2850 (Float_t)0., (Float_t)(size_phi*MatSize),
2851 "f3", size_phi,
"SC", 0.); fCnewRoot++;
2853 sup_axis_jy->SetTitle(jy_var_name);
2854 sup_axis_jy->SetTitleSize(tit_siz_y);
2855 sup_axis_jy->SetTitleOffset(tit_off_y);
2856 sup_axis_jy->SetLabelSize(lab_siz_y);
2857 sup_axis_jy->SetLabelOffset(lab_off_y);
2858 sup_axis_jy->SetTickSize(tic_siz_y);
2859 sup_axis_jy->Draw(
"SAME");
2869 const Int_t& MatSize,
const Int_t& size_IX,
2870 const Int_t& size_IY,
const TString& chopt)
2874 Double_t xline = 0.;
2876 Double_t yline_bot = 0.;
2877 Double_t yline_top = (Double_t)(MatSize*size_IX);
2879 for( Int_t
i = 0 ;
i < size_IX ;
i++)
2881 xline = xline + (Double_t)MatSize;
2883 lin =
new TLine(xline, yline_bot, xline, yline_top);
fCnewRoot++;
2888 Double_t xline_left = 0;
2889 Double_t xline_right = (Double_t)(MatSize*size_IX);
2891 Double_t yline = -(Double_t)MatSize;
2893 for( Int_t j = 0 ; j < size_IX+1 ; j++)
2895 yline = yline + (Double_t)MatSize;
2897 lin =
new TLine(xline_left, yline, xline_right, yline);
fCnewRoot++;
2909 Float_t axis_x_inf = 0;
2910 Float_t axis_x_sup = 0;
2911 Float_t axis_y_inf = 0;
2912 Float_t axis_y_sup = 0;
2913 Int_t axis_nb_div = 1;
2914 Double_t IX_values_min = 0;
2915 Double_t IX_values_max = 0;
2916 Option_t* axis_chopt =
"CS";
2924 TString StrDee =
"iIXSC";
2925 if( DeeNumber == 1 ){StrDee =
"iIXDee1";}
2926 if( DeeNumber == 2 ){StrDee =
"iIXDee2";}
2927 if( DeeNumber == 3 ){StrDee =
"iIXDee3";}
2928 if( DeeNumber == 4 ){StrDee =
"iIXDee4";}
2933 TGaxis* sup_axis_x =
nullptr;
2935 if( DeeNumber == 1 )
2937 axis_x_inf = 0; axis_y_inf = 0; axis_x_sup = size_IX*MatSize; axis_y_sup = 0;
2938 axis_nb_div = size_IX;
2939 IX_values_min = -IX_min ; IX_values_max = -IX_max; axis_chopt =
"CS";
2941 if( DeeNumber == 2 )
2943 axis_x_inf = 0; axis_y_inf = 0; axis_x_sup = size_IX*MatSize; axis_y_sup = 0;
2944 axis_nb_div = size_IX;
2945 IX_values_min = IX_min ; IX_values_max = IX_max; axis_chopt =
"CS";
2947 if( DeeNumber == 3 )
2949 axis_x_inf = 0; axis_y_inf = 0; axis_x_sup = size_IX*MatSize; axis_y_sup = 0;
2950 axis_nb_div = size_IX;
2951 IX_values_min = IX_min ; IX_values_max = IX_max; axis_chopt =
"CS";
2953 if( DeeNumber == 4 )
2955 axis_x_inf = 0; axis_y_inf = 0; axis_x_sup = size_IX*MatSize; axis_y_sup = 0;
2956 axis_nb_div = size_IX;
2957 IX_values_min = -IX_min ; IX_values_max = -IX_max; axis_chopt =
"CS";
2960 new TF1(
"f1", x_direction.Data(), IX_values_min, IX_values_max);
fCnewRoot++;
2961 sup_axis_x =
new TGaxis( axis_x_inf, axis_y_inf, axis_x_sup, axis_y_sup,
2962 "f1", axis_nb_div, axis_chopt , 0.); fCnewRoot++;
2964 sup_axis_x->SetTitle(x_var_name);
2965 sup_axis_x->SetTitleSize(tit_siz_x);
2966 sup_axis_x->SetTitleOffset(tit_off_x);
2967 sup_axis_x->SetLabelSize(lab_siz_x);
2968 sup_axis_x->SetLabelOffset(lab_off_x);
2969 sup_axis_x->SetTickSize(tic_siz_x);
2970 sup_axis_x->Draw(
"SAME");
2986 new TF1(
"f2", jy_direction.Data(), j_IY_min, j_IY_max); fCnewRoot++;
2988 TGaxis* sup_axis_jy =
new TGaxis( (Float_t)0., (Float_t)0.,
2989 (Float_t)0., (Float_t)(size_IY*MatSize),
2990 "f2", size_IY,
"CS", 0.); fCnewRoot++;
2992 sup_axis_jy->SetTitle(jy_var_name);
2993 sup_axis_jy->SetTitleSize(tit_siz_y);
2994 sup_axis_jy->SetTitleOffset(tit_off_y);
2995 sup_axis_jy->SetLabelSize(lab_siz_y);
2996 sup_axis_jy->SetLabelOffset(lab_off_y);
2997 sup_axis_jy->SetTickSize(tic_siz_y);
2998 sup_axis_jy->Draw();
3017 const TString& HistoCode)
3021 Bool_t OKFileExists = kFALSE;
3022 Bool_t OKData = kFALSE;
3024 Int_t n1StexStin = -1;
3036 if( OKFileExists == kTRUE )
3048 if( arg_AlreadyRead >= 1 )
3050 OKFileExists = kTRUE;
3053 if( OKFileExists == kTRUE )
3059 sprintf(f_in_mat_tit,
"?");
3061 if (HistoCode ==
"D_NOE_ChNb") {sprintf(f_in_mat_tit,
"Number of events");}
3062 if (HistoCode ==
"D_Ped_ChNb") {sprintf(f_in_mat_tit,
"Pedestals");}
3063 if (HistoCode ==
"D_TNo_ChNb") {sprintf(f_in_mat_tit,
"Total noise");}
3064 if (HistoCode ==
"D_MCs_ChNb") {sprintf(f_in_mat_tit,
"Mean cor(s,s')");}
3065 if (HistoCode ==
"D_LFN_ChNb") {sprintf(f_in_mat_tit,
"Low frequency noise");}
3066 if (HistoCode ==
"D_HFN_ChNb") {sprintf(f_in_mat_tit,
"High frequency noise");}
3067 if (HistoCode ==
"D_SCs_ChNb") {sprintf(f_in_mat_tit,
"Sigma of cor(s,s')");}
3073 Int_t nb_binx = GeoBidSizeHoco;
3074 Int_t nb_biny = GeoBidSizeVeco;
3075 Axis_t xinf_bid = (Axis_t)0.;
3076 Axis_t xsup_bid = (Axis_t)GeoBidSizeHoco;
3077 Axis_t yinf_bid = (Axis_t)0.;
3078 Axis_t ysup_bid = (Axis_t)GeoBidSizeVeco;
3080 TString axis_x_var_name =
" #Hoco ";
3081 TString axis_y_var_name =
" #Veco ";
3085 TH2D* h_geo_bid =
new TH2D(
"geobidim_ViewStex", f_in_mat_tit,
3086 nb_binx, xinf_bid, xsup_bid,
3087 nb_biny, yinf_bid, ysup_bid);
fCnewRoot++;
3098 if (HistoCode ==
"D_Ped_ChNb" ){
3100 if (HistoCode ==
"D_TNo_ChNb" ){
3102 if (HistoCode ==
"D_MCs_ChNb" ){
3104 if (HistoCode ==
"D_LFN_ChNb" ){
3106 if (HistoCode ==
"D_HFN_ChNb" ){
3108 if (HistoCode ==
"D_SCs_ChNb" ){
3114 if( arg_AlreadyRead >= 1 )
3116 partial_histp = arg_read_histo;
3121 TMatrixD read_matrix(nb_binx, nb_biny);
3122 for(Int_t
i=0;
i<nb_binx;
i++)
3123 {
for(Int_t j=0; j<nb_biny; j++){read_matrix(
i,j)=(Double_t)0.;}}
3125 if ( OKData == kTRUE )
3133 if( arg_AlreadyRead >= 1 )
3134 {n1StexStin = i0StexStinEcna+1;}
3136 if (n1StexStin != -1)
3145 if(i_xgeo >=0 && i_xgeo < nb_binx && i_ygeo >=0 && i_ygeo < nb_biny)
3147 read_matrix(i_xgeo, i_ygeo) = partial_histp(iStexEcha);
3148 h_geo_bid->Fill((Double_t)i_xgeo, (Double_t)i_ygeo,
3149 (Double_t)read_matrix(i_xgeo, i_ygeo));
3207 TString name_cov_cor;
3211 if( HistoCode ==
"D_NOE_ChNb"){name_cov_cor =
"Nb_Of_D_Adc_EvDs";}
3212 if( HistoCode ==
"D_Ped_ChNb"){name_cov_cor =
"Pedestals";}
3213 if( HistoCode ==
"D_TNo_ChNb"){name_cov_cor =
"Total_noise";}
3214 if( HistoCode ==
"D_MCs_ChNb"){name_cov_cor =
"Mean_Corss";}
3215 if( HistoCode ==
"D_LFN_ChNb"){name_cov_cor =
"Low_Fq_Noise";}
3216 if( HistoCode ==
"D_HFN_ChNb"){name_cov_cor =
"High_Fq_Noise";}
3217 if( HistoCode ==
"D_SCs_ChNb"){name_cov_cor =
"Sigma_Corss";}
3223 TString flag_already_read;
3225 flag_already_read =
"?";
3226 sprintf(f_in,
"M%d", arg_AlreadyRead); flag_already_read = f_in;
3228 sprintf(f_in,
"%s_%s_S1_%d_R%d_%d_%d_%s%d_%s_HocoVeco_R%s",
3231 name_visu.Data(), flag_already_read.Data());
3236 TCanvas *MainCanvas =
new TCanvas(f_in, f_in, canv_w, canv_h);
fCnewRoot++;
3250 Double_t x_margin = x_low;
3251 Double_t y_margin = y_low;
3252 MainCanvas->Divide( 1, 1, x_margin, y_margin);
3259 TVirtualPad* main_subpad = gPad;
3260 main_subpad->SetPad(x_low, y_low, x_up, y_up);}
3263 h_geo_bid->GetXaxis()->SetTitle(axis_x_var_name);
3264 h_geo_bid->GetYaxis()->SetTitle(axis_y_var_name);
3266 h_geo_bid->DrawCopy(
"COLZ");
3274 Bool_t b_true =
true;
3275 h_geo_bid->SetStats(b_true);
3276 h_geo_bid->Delete(); h_geo_bid =
nullptr;
fCdeleteRoot++;
3285 std::cout <<
"!TEcnaHistos::ViewStex(...)> *ERROR* =====> " 3286 <<
" ROOT file not found" <<
fTTBELL << std::endl;
3325 {sprintf(f_in_mat_tit,
"LF Cor(Xtal,Xtal') for each tower in SM");}
3327 {sprintf(f_in_mat_tit,
"HF Cor(Xtal,Xtal') for each tower in SM");}
3329 {sprintf(f_in_mat_tit,
"LF Cor(Xtal,Xtal') for each SC in Dee");}
3331 {sprintf(f_in_mat_tit,
"HF Cor(Xtal,Xtal') for each SC in Dee");}
3337 Int_t nb_binx = GeoBidSizeHoco;
3338 Int_t nb_biny = GeoBidSizeVeco;
3339 Axis_t xinf_bid = (Axis_t)0.;
3340 Axis_t xsup_bid = (Axis_t)GeoBidSizeHoco;
3341 Axis_t yinf_bid = (Axis_t)0.;
3342 Axis_t ysup_bid = (Axis_t)GeoBidSizeVeco;
3344 TString axis_x_var_name =
" #Hoco ";
3345 TString axis_y_var_name =
" #varVeco ";
3375 TH2D* h_geo_bid =
new TH2D(
"geobidim_HocoVecoLHFCorcc", f_in_mat_tit,
3376 nb_binx, xinf_bid, xsup_bid,
3377 nb_biny, yinf_bid, ysup_bid);
fCnewRoot++;
3384 Int_t n1StexStin = (Int_t)Stin_numbers(i0StexStinEcna);
3388 if (n1StexStin != -1)
3396 Int_t i_xgeo = offset_x + i0StinEcha;
3397 Int_t i_ygeo = offset_y + j0StinEcha;
3399 if(i_xgeo >=0 && i_xgeo < nb_binx && i_ygeo >=0 && i_ygeo < nb_biny)
3404 h_geo_bid->Fill((Double_t)i_xgeo, (Double_t)i_ygeo,
3405 (Double_t)partial_matrix(iEcha, jEcha));
3414 TString HistoCode =
"H2CorccInStins";
3455 TString name_cov_cor;
3457 if( Freq ==
"LF" ){name_cov_cor =
"StexLFCorcc";}
3458 if( Freq ==
"HF" ){name_cov_cor =
"StexHFCorcc";}
3464 sprintf(f_in,
"%s_%s_S1_%d_R%d_%d_%d_Stex%s%d_%s_HocoVeco",
3472 TCanvas *MainCanvas =
new TCanvas(f_in, f_in, canv_w, canv_h);
fCnewRoot++;
3487 Double_t x_margin = x_low;
3488 Double_t y_margin = y_low;
3489 MainCanvas->Divide( 1, 1, x_margin, y_margin);
3497 TVirtualPad* main_subpad = gPad;
3498 main_subpad->SetPad(x_low, y_low, x_up, y_up);
3501 h_geo_bid->GetXaxis()->SetTitle(axis_x_var_name);
3502 h_geo_bid->GetYaxis()->SetTitle(axis_y_var_name);
3504 h_geo_bid->DrawCopy(
"COLZ");
3512 Bool_t b_true =
true;
3513 h_geo_bid->SetStats(b_true);
3514 h_geo_bid->Delete(); h_geo_bid =
nullptr;
fCdeleteRoot++;
3524 std::cout <<
"!TEcnaHistos::StexHocoVecoLHFCorcc(...)> *ERROR* =====> " 3525 <<
" ROOT file not found" <<
fTTBELL << std::endl;
3535 const Int_t& i0StinEcha)
3551 if( DeeDir ==
"right" )
3553 if( DeeDir ==
"left" )
3560 const Int_t& j0StinEcha)
3633 if( (SMNumber > 0) && (SMNumber <= fEcal->MaxSMInEB()) )
3638 Int_t nb_binx = GeoBidSizeEta;
3639 Int_t nb_biny = GeoBidSizePhi;
3640 Axis_t xinf_bid = (Axis_t)0.;
3641 Axis_t xsup_bid = (Axis_t)GeoBidSizeEta;
3642 Axis_t yinf_bid = (Axis_t)0.;
3643 Axis_t ysup_bid = (Axis_t)GeoBidSizePhi;
3645 TString axis_x_var_name =
" #eta ";
3646 TString axis_y_var_name =
" #varphi ";
3653 if( SMNumber <= fEcal->MaxSMPhiInEB() )
3654 {sprintf(f_in_mat_tit,
" SM tower numbering");}
3656 {sprintf(f_in_mat_tit,
" SM tower numbering ");}
3660 TH2D* h_empty_bid =
new TH2D(
"grid_bidim_eta_phi", f_in_mat_tit,
3661 nb_binx, xinf_bid, xsup_bid,
3662 nb_biny, yinf_bid, ysup_bid);
fCnewRoot++;
3663 h_empty_bid->Reset();
3665 h_empty_bid->GetXaxis()->SetTitle(axis_x_var_name);
3666 h_empty_bid->GetYaxis()->SetTitle(axis_y_var_name);
3686 sprintf(f_in,
"tower_numbering_for_SuperModule_SM%d", SMNumber);
3690 TCanvas *MainCanvas =
new TCanvas(f_in, f_in, canv_w, canv_h);
fCnewRoot++;
3700 MainCanvas->Divide(1, 1, x_margin, y_margin);
3703 h_empty_bid->DrawCopy(
"COL");
3709 Bool_t b_true =
true;
3710 h_empty_bid->SetStats(b_true);
3712 h_empty_bid->Delete(); h_empty_bid =
nullptr;
fCdeleteRoot++;
3719 std::cout <<
"!TEcnaHistos::SMTowerNumbering(...)> SM = " << SMNumber
3729 gStyle->SetTitleW(0.2);
3730 gStyle->SetTitleH(0.07);
3740 gStyle->SetTextSize(0.075);
3743 Int_t y_channel = 12;
3744 Int_t x_channel = 12;
3750 TText *text_SMtow_num =
new TText();
fCnewRoot++;
3755 {text_SMtow_num->SetTextColor(couleur_rouge);}
3757 {text_SMtow_num->SetTextColor(couleur_bleu_fonce);}
3765 Double_t y_from_phi = max_tow_phi - 1
3770 sprintf(f_in,
"%d", i_SMtow);
3771 text_SMtow_num->DrawText(x_from_eta, y_from_phi, f_in);
3774 text_SMtow_num->Delete(); text_SMtow_num =
nullptr;
fCdeleteRoot++;
3777 Double_t offset_tow_tex_eta = (Double_t)8.;
3778 Double_t offset_tow_tex_phi = (Double_t)15.;
3781 Double_t x_legend = (Double_t)0.;
3782 Double_t y_legend = (Double_t)0.;
3787 gStyle->SetTextSize(0.075);
3788 gStyle->SetTextColor(couleur_rouge);
3794 x_legend = x_legend + offset_tow_tex_eta;
3795 y_legend = y_legend + offset_tow_tex_phi;
3799 x_legend = -x_legend + offset_tow_tex_eta;
3800 y_legend = y_legend + offset_tow_tex_phi;
3803 sprintf( f_in,
"xx");
3804 TText *text_legend_rouge =
new TText(x_legend, y_legend, f_in);
fCnewRoot++;
3805 text_legend_rouge->Draw();
3806 gStyle->SetTextSize(0.05);
3807 x_legend = x_legend - (Double_t)3.5;
3808 y_legend = y_legend - (Double_t)2.;
3809 sprintf(f_in,
" LVRB ");
3810 TText *text_legend_rouge_expl =
new TText(x_legend, y_legend, f_in);
fCnewRoot++;
3811 text_legend_rouge_expl->Draw();
3812 y_legend = y_legend - (Double_t)1.75;
3815 TText *text_legend_rouge_expm =
new TText(x_legend, y_legend, f_in);
fCnewRoot++;
3816 text_legend_rouge_expm->Draw();
3820 gStyle->SetTextSize(0.075);
3821 gStyle->SetTextColor(couleur_bleu_fonce);
3827 x_legend = x_legend + offset_tow_tex_eta;
3828 y_legend = y_legend + offset_tow_tex_phi/3;
3832 x_legend = -x_legend + offset_tow_tex_eta;
3833 y_legend = y_legend + offset_tow_tex_phi/3;
3836 sprintf(f_in,
"xx");
3837 TText *text_legend_bleu =
new TText(x_legend, y_legend, f_in);
fCnewRoot++;
3838 text_legend_bleu->Draw();
3840 gStyle->SetTextSize(0.05);
3841 x_legend = x_legend - (Double_t)3.5;
3842 y_legend = y_legend - (Double_t)2.;
3843 sprintf( f_in,
" LVRB ");
3844 TText *text_legend_bleu_expl =
new TText(x_legend, y_legend, f_in);
fCnewRoot++;
3845 text_legend_bleu_expl->Draw();
3846 y_legend = y_legend - (Double_t)1.75;
3849 TText *text_legend_bleu_expm =
new TText(x_legend, y_legend, f_in);
fCnewRoot++;
3850 text_legend_bleu_expm->Draw();
3853 gStyle->SetTextColor(couleur_noir);
3864 if ( c_option ==
"corcc")
3870 Int_t nb_binx = GeoBidSizeEta;
3871 Int_t nb_biny = GeoBidSizePhi;
3872 Axis_t xinf_bid = (Axis_t)0.;
3873 Axis_t xsup_bid = (Axis_t)GeoBidSizeEta;
3874 Axis_t yinf_bid = (Axis_t)0.;
3875 Axis_t ysup_bid = (Axis_t)GeoBidSizePhi;
3881 if ( c_option ==
"corcc")
3886 Int_t max_x = nb_binx/size_eta;
3887 Int_t max_y = nb_biny/size_phi;
3890 Double_t yline = (Double_t)yinf_bid;
3892 Double_t xline_left = (Double_t)xinf_bid;
3893 Double_t xline_right = (Double_t)xsup_bid;
3895 for( Int_t j = 0 ; j < max_y ; j++)
3897 yline = yline + (Double_t)size_phi;
3899 lin =
new TLine(xline_left, yline, xline_right, yline);
fCnewRoot++;
3905 Double_t xline = (Double_t)xinf_bid - (Double_t)size_eta;
3907 Double_t yline_bot = (Double_t)yinf_bid;
3908 Double_t yline_top = (Double_t)ysup_bid;
3914 gStyle->SetTextColor(coul_textmodu);
3915 gStyle->SetTextSize(0.075);
3919 for( Int_t
i = 0 ;
i < max_x ;
i++)
3921 xline = xline + (Double_t)size_eta;
3923 lin =
new TLine(xline, yline_bot, xline, yline_top);
fCnewRoot++;
3927 {lin->SetLineWidth(2); lin->SetLineColor(coul_surligne);}
3929 {lin->SetLineWidth(2); lin->SetLineColor(coul_surligne);}
3937 if(
i == 2 ){sprintf( f_in,
"M4");}
3938 if(
i == 6 ){sprintf( f_in,
"M3");}
3939 if(
i == 10 ){sprintf( f_in,
"M2");}
3940 if(
i == 14 ){sprintf( f_in,
"M1");}
3942 TText *text_num_module =
new TText(xline + 1, yline_top + 1, f_in);
fCnewRoot++;
3943 text_num_module->Draw();
3948 if(
i == 3 ){sprintf( f_in,
"M1");}
3949 if(
i == 7 ){sprintf( f_in,
"M2");}
3950 if(
i == 11 ){sprintf( f_in,
"M3");}
3951 if(
i == 15 ){sprintf( f_in,
"M4");}
3953 TText *text_num_module =
new TText(xline, yline_top + 1, f_in);
fCnewRoot++;
3954 text_num_module->Draw();
3981 TGaxis* sup_axis_x =
nullptr;
3983 if( x_direction ==
"-x" )
3984 {sup_axis_x =
new TGaxis( (Float_t)0., (Float_t)0., (Float_t)(size_eta_sm*MatSize), (Float_t)0.,
3985 "f1", size_eta_sm,
"SC" , 0.); fCnewRoot++;}
3987 if( x_direction ==
"x" )
3988 {sup_axis_x =
new TGaxis( (Float_t)0., (Float_t)0., (Float_t)(size_eta_sm*MatSize), (Float_t)0.,
3989 "f1", size_eta_sm,
"SC" , 0.); fCnewRoot++;}
3991 sup_axis_x->SetTitle(x_var_name);
3992 sup_axis_x->SetTitleSize(tit_siz_x);
3993 sup_axis_x->SetTitleOffset(tit_off_x);
3994 sup_axis_x->SetLabelSize(lab_siz_x);
3995 sup_axis_x->SetLabelOffset(lab_off_x);
3996 sup_axis_x->SetTickSize(tic_siz_x);
3997 sup_axis_x->Draw(
"SAME");
4012 new TF1(
"f2", y_direction.Data(), phi_min, phi_max); fCnewRoot++;
4013 TGaxis* sup_axis_y =
nullptr;
4015 if ( y_direction ==
"-x" )
4016 {sup_axis_y =
new TGaxis(-(Float_t)1.5*(Float_t)size_eta, (Float_t)0.,
4017 -(Float_t)1.5*(Float_t)size_eta, (Float_t)(size_phi_sm*MatSize),
4018 "f2", (Int_t)size_phi_sm,
"SC", 0.); fCnewRoot++;}
4020 if ( y_direction ==
"x" )
4021 {sup_axis_y =
new TGaxis(-(Float_t)1.5*(Float_t)size_eta, (Float_t)0.,
4022 -(Float_t)1.5*(Float_t)size_eta, (Float_t)(size_phi_sm*MatSize),
4023 "f2", (Int_t)size_phi_sm,
"SC", 0.); fCnewRoot++;}
4025 sup_axis_y->SetTitle(y_var_name);
4026 sup_axis_y->SetTitleSize(tit_siz_y);
4027 sup_axis_y->SetTitleOffset(tit_off_y);
4028 sup_axis_y->SetLabelSize(lab_siz_y);
4029 sup_axis_y->SetLabelOffset(lab_off_y);
4030 sup_axis_y->SetTickSize(tic_siz_y);
4031 sup_axis_y->Draw(
"SAME");
4037 TString jy_var_name =
" ";
4040 new TF1(
"f3", jy_direction.Data(), jphi_min, jphi_max); fCnewRoot++;
4041 TGaxis* sup_axis_jy =
nullptr;
4044 sup_axis_jy =
new TGaxis((Float_t)0., (Float_t)0.,
4045 (Float_t)0., (Float_t)(size_phi_sm*MatSize),
4046 "f3", (Int_t)size_phi_sm,
"SC", 0.); fCnewRoot++;
4048 if ( jy_direction ==
"-x" )
4051 if ( jy_direction ==
"x" )
4056 sup_axis_jy->SetTitle(jy_var_name);
4057 sup_axis_jy->SetTitleSize(tit_siz_y);
4058 sup_axis_jy->SetTitleOffset(tit_off_y);
4059 sup_axis_jy->SetLabelSize(lab_siz_y);
4060 sup_axis_jy->SetLabelOffset(lab_off_y);
4061 sup_axis_jy->SetTickSize(tic_siz_y);
4062 sup_axis_jy->Draw(
"SAME");
4075 if( (DeeNumber > 0) && (DeeNumber <= fEcal->MaxDeeInEE()) )
4080 Int_t nb_binx = GeoBidSizeIX;
4081 Int_t nb_biny = GeoBidSizeIY;
4082 Axis_t xinf_bid = (Axis_t)0.;
4083 Axis_t xsup_bid = (Axis_t)GeoBidSizeIX;
4084 Axis_t yinf_bid = (Axis_t)0.;
4085 Axis_t ysup_bid = (Axis_t)GeoBidSizeIY;
4087 TString axis_x_var_name =
" IX ";
4088 TString axis_y_var_name =
" IY ";
4095 sprintf(f_in_mat_tit,
" Dee SC numbering ");
4099 TH2D* h_empty_bid =
new TH2D(
"grid_bidim_IX_IY", f_in_mat_tit,
4100 nb_binx, xinf_bid, xsup_bid,
4101 nb_biny, yinf_bid, ysup_bid);
fCnewRoot++;
4103 h_empty_bid->Reset();
4105 h_empty_bid->GetXaxis()->SetTitle(axis_x_var_name);
4106 h_empty_bid->GetYaxis()->SetTitle(axis_y_var_name);
4125 sprintf(f_in,
"SC_numbering_for_Dee_Dee%d", DeeNumber);
4127 TCanvas *MainCanvas =
new TCanvas(f_in, f_in, canv_w, canv_h);
fCnewRoot++;
4141 Double_t x_margin = x_low;
4142 Double_t y_margin = y_low;
4144 MainCanvas->Divide( 1, 1, x_margin, y_margin);
4148 TVirtualPad* main_subpad = gPad;
4149 main_subpad->SetPad(x_low, y_low, x_up, y_up);
4151 h_empty_bid->DrawCopy(
"COL");
4158 Bool_t b_true =
true;
4159 h_empty_bid->SetStats(b_true);
4161 h_empty_bid->Delete(); h_empty_bid =
nullptr;
fCdeleteRoot++;
4167 std::cout <<
"!TEcnaHistos::DeeSCNumbering(...)> Dee = " << DeeNumber
4177 gStyle->SetTitleW(0.4);
4178 gStyle->SetTitleH(0.08);
4185 gStyle->SetTextSize(0.0325);
4188 Int_t x_channel = 0;
4189 TText *text_DSSC_num =
new TText();
fCnewRoot++;
4190 TText *text_DeeSCCons_num =
new TText();
fCnewRoot++;
4196 if( SCQuadType ==
"top" && DeeDir ==
"right"){x_channel = 13;}
4197 if( SCQuadType ==
"top" && DeeDir ==
"left" ){x_channel = 7;}
4198 if( SCQuadType ==
"bottom" && DeeDir ==
"left" ){x_channel = 11;}
4199 if( SCQuadType ==
"bottom" && DeeDir ==
"right"){x_channel = 17;}
4200 Int_t i_SCEcha = (Int_t)x_channel;
4202 Double_t x_from_IX = (Double_t)
GetXCrysInStex(DeeNumber, n1DeeSCEcna, i_SCEcha);
4203 Double_t y_from_IY = (Double_t)
GetYCrysInStex(DeeNumber, n1DeeSCEcna, i_SCEcha);
4204 Double_t y_from_IYp = y_from_IY + (Double_t)1.;
4205 Double_t y_from_IYm = y_from_IY - (Double_t)1.;
4208 Color_t couleur_SC =
GetSCColor(DeeEndcap, DeeDir, SCQuadType);
4209 text_DSSC_num->SetTextColor(couleur_SC);
4210 text_DeeSCCons_num->SetTextColor((Color_t)1);
4218 !(i_DeeSCCons == 33 && n1DeeSCEcna == 60) &&
4219 !(i_DeeSCCons == 33 && n1DeeSCEcna == 119) &&
4221 !(i_DeeSCCons == 29 && n1DeeSCEcna == 32) &&
4222 !(i_DeeSCCons == 29 && n1DeeSCEcna == 138) &&
4223 !(i_DeeSCCons == 29 && n1DeeSCEcna == 157) &&
4224 !(i_DeeSCCons == 58 && n1DeeSCEcna == 176) &&
4225 !(i_DeeSCCons == 58 && n1DeeSCEcna == 193) &&
4227 !(i_DeeSCCons == 149 && n1DeeSCEcna == 188) &&
4229 !(i_DeeSCCons == 112 && n1DeeSCEcna == 29) &&
4230 !(i_DeeSCCons == 112 && n1DeeSCEcna == 144) &&
4231 !(i_DeeSCCons == 112 && n1DeeSCEcna == 165) &&
4232 !(i_DeeSCCons == 119 && n1DeeSCEcna == 102) &&
4233 !(i_DeeSCCons == 119 && n1DeeSCEcna == 123) &&
4235 !(i_DeeSCCons == 132 && n1DeeSCEcna == 41) &&
4238 !(i_DeeSCCons == 182 && n1DeeSCEcna == 60) &&
4239 !(i_DeeSCCons == 182 && n1DeeSCEcna == 119) &&
4241 !(i_DeeSCCons == 178 && n1DeeSCEcna == 32) &&
4242 !(i_DeeSCCons == 178 && n1DeeSCEcna == 138) &&
4243 !(i_DeeSCCons == 178 && n1DeeSCEcna == 157) &&
4244 !(i_DeeSCCons == 207 && n1DeeSCEcna == 176) &&
4245 !(i_DeeSCCons == 207 && n1DeeSCEcna == 193) &&
4247 !(i_DeeSCCons == 298 && n1DeeSCEcna == 188) &&
4249 !(i_DeeSCCons == 261 && n1DeeSCEcna == 29) &&
4250 !(i_DeeSCCons == 261 && n1DeeSCEcna == 144) &&
4251 !(i_DeeSCCons == 261 && n1DeeSCEcna == 165) &&
4252 !(i_DeeSCCons == 268 && n1DeeSCEcna == 102) &&
4253 !(i_DeeSCCons == 268 && n1DeeSCEcna == 123) &&
4255 !(i_DeeSCCons == 281 && n1DeeSCEcna == 41)
4258 sprintf(f_in,
"%d", i_DSSC);
4259 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4260 sprintf(f_in,
"%d", i_DeeSCCons);
4261 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4266 if( i_DeeSCCons == 33 && n1DeeSCEcna == 60 )
4268 sprintf(f_in,
"30a");
4269 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4270 sprintf(f_in,
"33a");
4271 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4273 if( i_DeeSCCons == 33 && n1DeeSCEcna == 119 )
4275 sprintf(f_in,
"30b");
4276 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4277 sprintf(f_in,
"33b");
4278 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4281 if( i_DeeSCCons == 29 && n1DeeSCEcna == 32 )
4283 sprintf(f_in,
" 3c-25c");
4284 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4285 sprintf(f_in,
"29c-58c");
4286 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4288 if( i_DeeSCCons == 29 && n1DeeSCEcna == 138 )
4290 sprintf(f_in,
"3a");
4291 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4292 sprintf(f_in,
"29a");
4293 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4295 if( i_DeeSCCons == 29 && n1DeeSCEcna == 157 )
4297 sprintf(f_in,
"3b");
4298 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4299 sprintf(f_in,
"29b");
4300 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4303 if( i_DeeSCCons == 58 && n1DeeSCEcna == 176 )
4305 sprintf(f_in,
"25a");
4306 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4307 sprintf(f_in,
"58a");
4308 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4310 if( i_DeeSCCons == 58 && n1DeeSCEcna == 193 )
4312 sprintf(f_in,
"25b");
4313 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4314 sprintf(f_in,
"58b");
4315 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4318 if( i_DeeSCCons == 149 && n1DeeSCEcna == 188 )
4320 sprintf(f_in,
"34a");
4321 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4322 sprintf(f_in,
"149a");
4323 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4326 if( i_DeeSCCons == 112 && n1DeeSCEcna == 29 )
4328 sprintf(f_in,
" 14a-21a");
4329 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4330 sprintf(f_in,
"112a-119a");
4331 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4333 if( i_DeeSCCons == 112 && n1DeeSCEcna == 144 )
4335 sprintf(f_in,
"14c");
4336 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4337 sprintf(f_in,
"112c");
4338 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4340 if( i_DeeSCCons == 112 && n1DeeSCEcna == 165 )
4342 sprintf(f_in,
"14b");
4343 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4344 sprintf(f_in,
"112b");
4345 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4348 if( i_DeeSCCons == 119 && n1DeeSCEcna == 102 )
4350 sprintf(f_in,
"21c");
4351 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4352 sprintf(f_in,
"119c");
4353 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4355 if( i_DeeSCCons == 119 && n1DeeSCEcna == 123 )
4357 sprintf(f_in,
"21b");
4358 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4359 sprintf(f_in,
"119b");
4360 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4363 if( i_DeeSCCons == 132 && n1DeeSCEcna == 41 )
4365 sprintf(f_in,
"3a");
4366 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4367 sprintf(f_in,
"132a");
4368 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4372 if( i_DeeSCCons == 182 && n1DeeSCEcna == 60 )
4374 sprintf(f_in,
"30a");
4375 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4376 sprintf(f_in,
"182a");
4377 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4379 if( i_DeeSCCons == 182 && n1DeeSCEcna == 119 )
4381 sprintf(f_in,
"30b");
4382 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4383 sprintf(f_in,
"182b");
4384 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4387 if( i_DeeSCCons == 178 && n1DeeSCEcna == 32 )
4389 sprintf(f_in,
" 3c-25c");
4390 text_DSSC_num->DrawText(x_from_IX-6, y_from_IYp, f_in);
4391 sprintf(f_in,
"178c-207c");
4392 text_DeeSCCons_num->DrawText(x_from_IX-6, y_from_IYm, f_in);
4394 if( i_DeeSCCons == 178 && n1DeeSCEcna == 138 )
4396 sprintf(f_in,
"3a");
4397 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4398 sprintf(f_in,
"178a");
4399 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4401 if( i_DeeSCCons == 178 && n1DeeSCEcna == 157 )
4403 sprintf(f_in,
"3b");
4404 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4405 sprintf(f_in,
"178b");
4406 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4409 if( i_DeeSCCons == 207 && n1DeeSCEcna == 176 )
4411 sprintf(f_in,
"25a");
4412 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4413 sprintf(f_in,
"207a");
4414 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4416 if( i_DeeSCCons == 207 && n1DeeSCEcna == 193 )
4418 sprintf(f_in,
"25b");
4419 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4420 sprintf(f_in,
"207b");
4421 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4424 if( i_DeeSCCons == 298 && n1DeeSCEcna == 188 )
4426 sprintf(f_in,
"34a");
4427 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4428 sprintf(f_in,
"298a");
4429 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4432 if( i_DeeSCCons == 261 && n1DeeSCEcna == 29 )
4434 sprintf(f_in,
" 14a-21a");
4435 text_DSSC_num->DrawText(x_from_IX-6, y_from_IYp, f_in);
4436 sprintf(f_in,
"261a-268a");
4437 text_DeeSCCons_num->DrawText(x_from_IX-6, y_from_IYm, f_in);
4439 if( i_DeeSCCons == 261 && n1DeeSCEcna == 144 )
4441 sprintf(f_in,
"14c");
4442 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4443 sprintf(f_in,
"261c");
4444 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4446 if( i_DeeSCCons == 261 && n1DeeSCEcna == 165 )
4448 sprintf(f_in,
"14b");
4449 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4450 sprintf(f_in,
"261b");
4451 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4454 if( i_DeeSCCons == 268 && n1DeeSCEcna == 102 )
4456 sprintf(f_in,
"21c");
4457 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4458 sprintf(f_in,
"268c");
4459 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4461 if( i_DeeSCCons == 268 && n1DeeSCEcna == 123 )
4463 sprintf(f_in,
"21b");
4464 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4465 sprintf(f_in,
"268b");
4466 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4469 if( i_DeeSCCons == 281 && n1DeeSCEcna == 41 )
4471 sprintf(f_in,
"20a");
4472 text_DSSC_num->DrawText(x_from_IX, y_from_IYp, f_in);
4473 sprintf(f_in,
"281a");
4474 text_DeeSCCons_num->DrawText(x_from_IX, y_from_IYm, f_in);
4483 sprintf( f_in,
"color: nb in Data Sector, black: nb for construction");
4485 Int_t y_colors = -14;
4487 TText *text_colors =
new TText(x_colors, y_colors, f_in);
fCnewRoot++;
4488 text_colors->SetTextSize(0.03);
4489 text_colors->SetTextColor(coul_textcolors);
4490 text_colors->Draw();
4493 gStyle->SetTextColor(couleur_noir);
4504 if ( c_option ==
"corcc")
4510 Int_t nb_binx = GeoBidSizeIX;
4511 Int_t nb_biny = GeoBidSizeIY;
4512 Axis_t xinf_bid = (Axis_t)0.;
4513 Axis_t xsup_bid = (Axis_t)GeoBidSizeIX;
4515 Axis_t yinf_bid = (Axis_t)0.;
4516 Axis_t ysup_bid = (Axis_t)GeoBidSizeIY;
4517 Double_t ymid_bid = (Double_t)(ysup_bid-yinf_bid)/2.;
4526 Int_t max_x = nb_binx/size_IX;
4527 Int_t max_y = nb_biny/size_IY;
4528 Int_t max_yd = max_y/2;
4532 Int_t coefcc_x = (Int_t)1;
4533 Int_t coefcc_y = (Int_t)1;
4537 Double_t yline = (Double_t)yinf_bid - (Double_t)size_IY;
4539 Double_t xline_beg = (Double_t)xinf_bid;
4540 Double_t xline_end = (Double_t)xsup_bid;
4543 Int_t x_min[11] = {11,11, 7, 0, 0, 0, 0, 0, 0, 0, 0};
4544 Int_t x_max[11] = {50,50,47,45,45,42,37,35,30,15,50};
4545 for(Int_t
i=0;
i<11;
i++){x_min[
i] = coefcc_x*x_min[
i]; x_max[
i] = coefcc_x*x_max[
i];}
4547 for( Int_t j = 0 ; j < max_y ; j++)
4551 if( DeeNumber == 1 || DeeNumber == 3 )
4553 xline_beg = xinf_bid + (Double_t)x_min[10-j];
4554 xline_end = xinf_bid + (Double_t)x_max[10-j];
4556 if( DeeNumber == 2 || DeeNumber == 4 )
4558 xline_beg = xsup_bid - (Double_t)x_max[10-j];
4559 xline_end = xsup_bid - (Double_t)x_min[10-j];
4565 if( DeeNumber == 1 || DeeNumber == 3 )
4567 xline_beg = xinf_bid + (Double_t)x_min[0];
4568 xline_end = xinf_bid + (Double_t)x_max[0];
4570 if( DeeNumber == 2 || DeeNumber == 4 )
4572 xline_beg = xsup_bid - (Double_t)x_max[0];
4573 xline_end = xsup_bid - (Double_t)x_min[0];
4579 if( DeeNumber == 1 || DeeNumber == 3 )
4581 xline_beg = xinf_bid + (Double_t)x_min[j-10];
4582 xline_end = xinf_bid + (Double_t)x_max[j-10];
4584 if( DeeNumber == 2 || DeeNumber == 4 )
4586 xline_beg = xsup_bid - (Double_t)x_max[j-10];
4587 xline_end = xsup_bid - (Double_t)x_min[j-10];
4591 yline = yline + (Double_t)size_IY;
4593 lin =
new TLine(xline_beg, yline, xline_end, yline);
fCnewRoot++;
4600 Double_t xline = (Double_t)xinf_bid - (Double_t)size_IX;
4602 Double_t yline_haut_bot = (Double_t)ymid_bid;
4603 Double_t yline_haut_top = (Double_t)ysup_bid;
4605 Double_t yline_bas_bot = (Double_t)yinf_bid;
4606 Double_t yline_bas_top = (Double_t)ymid_bid;
4610 Int_t y_min[11] = { 0,11, 7, 0, 0, 0, 0, 0, 0, 0, 0};
4611 Int_t y_max[11] = {50,50,47,45,45,42,38,35,30,15,10};
4612 for(Int_t
i=0;
i<11;
i++){y_min[
i] = coefcc_y*y_min[
i]; y_max[
i] = coefcc_y*y_max[
i];}
4614 gStyle->SetTextSize(0.075);
4616 for( Int_t
i = 0 ;
i <= max_x ;
i++)
4618 if( DeeNumber == 1 || DeeNumber == 3 )
4620 yline_haut_bot = ymid_bid + (Double_t)y_min[
i];
4621 yline_haut_top = ymid_bid + (Double_t)y_max[
i];
4623 if( DeeNumber == 2 || DeeNumber == 4 )
4625 yline_haut_bot = ymid_bid + (Double_t)y_min[10-
i];
4626 yline_haut_top = ymid_bid + (Double_t)y_max[10-
i];
4628 yline_bas_bot = ysup_bid - yline_haut_top;
4629 yline_bas_top = ysup_bid - yline_haut_bot;
4631 xline = xline + (Double_t)size_IX;
4633 lin_haut =
new TLine(xline, yline_haut_bot, xline, yline_haut_top);
fCnewRoot++;
4637 lin_bas =
new TLine(xline, yline_bas_bot, xline, yline_bas_top);
fCnewRoot++;
4643 Float_t fcoefcc_x = (Float_t)coefcc_x;
4644 Float_t fcoefcc_y = (Float_t)coefcc_y;
4660 Int_t nb_niv2 = (nb_niv+1)/2;
4662 for (Int_t num_niv = 0; num_niv < nb_niv2; num_niv++)
4664 Int_t ind_niv = num_niv + nb_niv2 - 1;
4665 if ( ind_niv < 0 || ind_niv > nb_niv )
4667 std::cout <<
"!TEcnaHistos::ContourLevels(...)> *** ERROR *** " 4668 <<
"wrong contour levels for correlation matrix" 4674 (Double_t)(num_niv*num_niv)/
4675 ((Double_t)((nb_niv2-1)*(nb_niv2-1)));
4678 for (Int_t num_niv = -1; num_niv > -nb_niv2; num_niv--)
4680 Int_t ind_niv = num_niv + nb_niv2 - 1;
4681 if ( ind_niv < 0 || ind_niv > nb_niv )
4683 std::cout <<
"!TEcnaHistos::ContourLevels(...)> *** ERROR *** " 4684 <<
"wrong contour levels for correlation matrix" 4690 -(Double_t)(num_niv*num_niv)/
4691 ((Double_t)((nb_niv2-1)*(nb_niv2-1)));
4703 TString xname =
" ";
4713 TString xname =
" ";
4715 if ( chcode ==
"ietaEB" ){xname =
"i#eta Xtal ";}
4716 if ( chcode ==
"ietaSM" ){xname =
"i#eta Xtal ";}
4717 if ( chcode ==
"ietaTow"){xname =
"i#eta Xtal ";}
4719 if ( chcode ==
"iphiEB" ){xname =
" i#varphi Xtal";}
4720 if ( chcode ==
"jphiEB+" ){xname =
" i#varphi Xtal";}
4721 if ( chcode ==
"jphiEB-" ){xname =
" i#varphi Xtal";}
4722 if ( chcode ==
"jphiSMB+" ){xname =
" i#varphi Xtal";}
4723 if ( chcode ==
"jphiSMB-" ){xname =
"i#varphi Xtal ";}
4724 if ( chcode ==
"jphiTow" ){xname =
"i#varphi Xtal in SM ";}
4725 if ( chcode ==
"phi" ){xname =
"i#varphi Xtal in EB ";}
4732 TString xname =
" ";
4734 if ( chcode ==
"iIXDee" ){xname =
"IX(SC)";}
4736 if ( chcode ==
"iIXDee1" ){xname =
" -IX Xtal";}
4737 if ( chcode ==
"iIXDee2" ){xname =
" IX Xtal ";}
4738 if ( chcode ==
"iIXDee3" ){xname =
" IX Xtal";}
4739 if ( chcode ==
"iIXDee4" ){xname =
"-IX Xtal ";}
4741 if ( chcode ==
"iIXEE" ){xname =
" IX Xtal";}
4743 if ( chcode ==
"iIXSC" ){xname =
"IX Xtal";}
4745 if ( chcode ==
"jIYDee" ){xname =
"IY Xtal";}
4746 if ( chcode ==
"jIYSC" ){xname =
"IY Xtal";}
4747 if ( chcode ==
"IY" ){xname =
"IY";}
4761 const TString& HistoCode)
4768 if (HistoCode ==
"D_NOE_ChNb"){sprintf(f_in_mat_tit,
"Number of Events");}
4769 if (HistoCode ==
"D_Ped_ChNb"){sprintf(f_in_mat_tit,
"Pedestals");}
4770 if (HistoCode ==
"D_TNo_ChNb"){sprintf(f_in_mat_tit,
"Total noise");}
4771 if (HistoCode ==
"D_MCs_ChNb"){sprintf(f_in_mat_tit,
"Mean cor(s,s')");}
4772 if (HistoCode ==
"D_LFN_ChNb"){sprintf(f_in_mat_tit,
"Low frequency noise");}
4773 if (HistoCode ==
"D_HFN_ChNb"){sprintf(f_in_mat_tit,
"High frequency noise");}
4774 if (HistoCode ==
"D_SCs_ChNb"){sprintf(f_in_mat_tit,
"Sigma of cor(s,s')");}
4780 Int_t vertic_empty_strips = 3;
4781 Int_t vertic_empty_strip_1 = 1;
4790 Int_t nb_binx = GeoBidSizeHoco;
4791 Int_t nb_biny = GeoBidSizeVeco;
4792 Axis_t xinf_bid = (Axis_t)0.;
4793 Axis_t xsup_bid = (Axis_t)GeoBidSizeHoco;
4794 Axis_t yinf_bid = (Axis_t)0.;
4795 Axis_t ysup_bid = (Axis_t)GeoBidSizeVeco;
4797 TString axis_x_var_name =
" #Hoco ";
4798 TString axis_y_var_name =
" #varVeco ";
4802 TH2D* h_geo_bid =
new TH2D(
"geobidim_ViewStas", f_in_mat_tit,
4803 nb_binx, xinf_bid, xsup_bid,
4804 nb_biny, yinf_bid, ysup_bid);
fCnewRoot++;
4807 Int_t CounterExistingFile = 0;
4808 Int_t CounterDataExist = 0;
4821 Bool_t OKFileExists = kFALSE;
4822 Bool_t OKDataExist = kFALSE;
4827 Int_t n1StasStex = iStasStex+1;
4835 if( OKFileExists == kTRUE )
4843 if( iStasStex == 0 )
4862 if( HistoCode ==
"D_NOE_ChNb" ){
4864 if( HistoCode ==
"D_Ped_ChNb" ){
4866 if (HistoCode ==
"D_TNo_ChNb" ){
4868 if( HistoCode ==
"D_MCs_ChNb" ){
4870 if( HistoCode ==
"D_LFN_ChNb" ){
4872 if( HistoCode ==
"D_HFN_ChNb" ){
4874 if( HistoCode ==
"D_SCs_ChNb" ){
4882 std::cout <<
"!TEcnaHistos::ViewStas(...)> *ERROR* =====> " 4883 <<
" ROOT file not found" <<
fTTBELL << std::endl;
4887 if( arg_AlreadyRead == 1 )
4889 OKDataExist = kTRUE;
4896 if( OKDataExist == kTRUE)
4899 CounterExistingFile++;
4902 TMatrixD read_matrix(nb_binx, nb_biny);
4903 for(Int_t
i=0;
i<nb_binx;
i++)
4904 {
for(Int_t j=0; j<nb_biny; j++){read_matrix(
i,j)=(Double_t)0.;}}
4906 if ( OKDataExist == kTRUE )
4914 Int_t i_xgeo =
GetXStinInStas(iStasStex, i0StexStinEcna, vertic_empty_strip_1);
4917 if(i_xgeo >=0 && i_xgeo < nb_binx && i_ygeo >=0 && i_ygeo < nb_biny)
4919 Int_t n1StexStinEcna = i0StexStinEcna+1;
4923 read_matrix(i_xgeo, i_ygeo) = partial_histp(i0StexStinEcna);
4924 h_geo_bid->Fill((Double_t)i_xgeo, (Double_t)i_ygeo,
4925 (Double_t)read_matrix(i_xgeo, i_ygeo));
4931 if( !( (n1StexStinEcna == 10 || n1StexStinEcna == 11 ||
4932 n1StexStinEcna == 29 || n1StexStinEcna == 32) ) )
4934 read_matrix(i_xgeo, i_ygeo) = partial_histp(i0StexStinEcna);
4935 h_geo_bid->Fill((Double_t)i_xgeo, (Double_t)i_ygeo,
4936 (Double_t)read_matrix(i_xgeo, i_ygeo));
4938 if( n1StexStinEcna == 29 )
4951 read_matrix(i_xgeo, i_ygeo) =
4952 partial_histp(i0StexStinEcna)*(Double_t)(5./6.) + partial_histp(9)/(Double_t)6.;
4953 h_geo_bid->Fill((Double_t)i_xgeo, (Double_t)i_ygeo,
4954 (Double_t)read_matrix(i_xgeo, i_ygeo));
4957 if( n1StexStinEcna == 32 )
4961 read_matrix(i_xgeo, i_ygeo) =
4962 partial_histp(i0StexStinEcna)*(Double_t)(5./6.) + partial_histp(10)/(Double_t)6.;
4963 h_geo_bid->Fill((Double_t)i_xgeo, (Double_t)i_ygeo,
4964 (Double_t)read_matrix(i_xgeo, i_ygeo));
4974 std::cout <<
"!TEcnaHistos::ViewStas(...)> " 4975 <<
" Data not available for " <<
fFapStexName <<
" " << iStasStex+1
4976 <<
" (Quantity not present in the ROOT file)" <<
fTTBELL << std::endl;
4983 std::cout <<
"!TEcnaHistos::ViewStas(...)> " 4984 <<
" Data not available for " <<
fFapStexName <<
" " << iStasStex+1
4985 <<
" (ROOT file not found)" <<
fTTBELL << std::endl;
4993 delete [] xFapNbOfEvts; xFapNbOfEvts =
nullptr;
fCdelete++;
4995 if( CounterExistingFile > 0 && CounterDataExist > 0 )
5048 TString name_cov_cor;
5052 if( HistoCode ==
"D_NOE_ChNb"){name_cov_cor =
"Number_of_Events";}
5053 if( HistoCode ==
"D_Ped_ChNb"){name_cov_cor =
"Pedestals";}
5054 if( HistoCode ==
"D_TNo_ChNb"){name_cov_cor =
"Total_noise";}
5055 if( HistoCode ==
"D_MCs_ChNb"){name_cov_cor =
"Mean_Corss";}
5056 if( HistoCode ==
"D_LFN_ChNb"){name_cov_cor =
"Low_Fq_Noise";}
5057 if( HistoCode ==
"D_HFN_ChNb"){name_cov_cor =
"High_Fq_Noise";}
5058 if( HistoCode ==
"D_SCs_ChNb"){name_cov_cor =
"Sigma_Corss";}
5064 sprintf(f_in,
"%s_%s_S1_%d_R%d_%d_%d_%s_%s_HocoVeco_R%d",
5067 name_visu.Data(), arg_AlreadyRead);
5072 TCanvas *MainCanvas =
new TCanvas(f_in, f_in, canv_w, canv_h);
fCnewRoot++;
5087 Double_t x_margin = x_low;
5088 Double_t y_margin = y_low;
5089 MainCanvas->Divide( 1, 1, x_margin, y_margin);