00001
00002
00003
00004
00006
00007
00008
00009
00010
00011
00012
00014
00015 #include <TF1.h>
00016 #include <TSystem.h>
00017
00018 #include "TFndRun.h"
00019 #include "TFndRunConfiguration.h"
00020 #include "TFndGenInfo.h"
00021 #include "TFndHLmd.h"
00022 #include "TFndHdt.h"
00023 #include "TFndLmdMon.h"
00024
00025 ClassImp(TFndLmdMon)
00026
00027
00028 TFndLmdMon::TFndLmdMon(const TString &fmode,Int_t lmd_adc_bins,Double_t lmd_adc_min,Double_t lmd_adc_max,Int_t lmd_tdc_bins,Double_t lmd_tdc_min,Double_t lmd_tdc_max):
00029 fout(),flmd(),
00030 mlmd(),mlmd_adc(),mlmd_tdc(),
00031 fMustRecoverHistos(kFALSE),
00032 fSharedMemName_Main(),fSharedMemName_Adc(),fSharedMemName_Tdc(),
00033 fSharedFileName_Main(),fSharedFileName_Adc(),fSharedFileName_Tdc(),
00034 lmdmult(),lmdmult_good(),lmd_i_o_mult(),lmdmap(),lmdmap_good(),lmdmapadc0(),lmdmapadc(),lmdmapadce(),lmdmapadcp(),
00035 lmdmaptdc0(),lmdmaptdc(),lmdmaptdce(),lmdmaptdcp(),
00036 lmd_all_mapadctdc(),lmd_all_adc_tdc(),lmd_all_adce(),lmd_all_adcp(),lmd_all_mul(),
00037 lmd_all_aepat(),lmd_all_appat(),lmd_all_tepat(),lmd_all_tppat(),
00038 lmd_all_vp(),lmd_all_crg(),lmd_all_zet(),lmd_all_adc(),lmd_all_tdce(),lmd_all_tdcp(),lmd_all_tdf(),lmd_all_tmean(),lmd_all_tdc(),
00039 lmd_all_dhits(),lmd_all_dhits_tdc_dopp(),lmd_all_dhits_adc_dopp(),lmd_all_dhits_tdc_cell(),lmd_all_dhits_adc_cell(),
00040 lmdadce(),lmdadcp(),lmdcrg(),lmdzet(),lmdtdce(),lmdtdcp(),lmdtdf(),lmdtmean(),
00041 lmd1d(),lmd2d(),fLine()
00042 {
00043
00044 Init();
00045 OpenSharedFiles(fmode);
00046 InitHistos(lmd_adc_bins,lmd_adc_min,lmd_adc_max,lmd_tdc_bins,lmd_tdc_min,lmd_tdc_max);
00047
00048 }
00049
00050
00051 TFndLmdMon::TFndLmdMon():
00052 fout(),flmd(),
00053 mlmd(),mlmd_adc(),mlmd_tdc(),
00054 fMustRecoverHistos(kFALSE),
00055 fSharedMemName_Main(),fSharedMemName_Adc(),fSharedMemName_Tdc(),
00056 fSharedFileName_Main(),fSharedFileName_Adc(),fSharedFileName_Tdc(),
00057 lmdmult(),lmdmult_good(),lmd_i_o_mult(),lmdmap(),lmdmap_good(),lmdmapadc0(),lmdmapadc(),lmdmapadce(),lmdmapadcp(),
00058 lmdmaptdc0(),lmdmaptdc(),lmdmaptdce(),lmdmaptdcp(),
00059 lmd_all_mapadctdc(),lmd_all_adc_tdc(),lmd_all_adce(),lmd_all_adcp(),lmd_all_mul(),
00060 lmd_all_aepat(),lmd_all_appat(),lmd_all_tepat(),lmd_all_tppat(),
00061 lmd_all_vp(),lmd_all_crg(),lmd_all_zet(),lmd_all_adc(),lmd_all_tdce(),lmd_all_tdcp(),lmd_all_tdf(),lmd_all_tmean(),lmd_all_tdc(),
00062 lmd_all_dhits(),lmd_all_dhits_tdc_dopp(),lmd_all_dhits_adc_dopp(),lmd_all_dhits_tdc_cell(),lmd_all_dhits_adc_cell(),
00063 lmdadce(),lmdadcp(),lmdcrg(),lmdzet(),lmdtdce(),lmdtdcp(),lmdtdf(),lmdtmean(),
00064 lmd1d(),lmd2d(),fLine()
00065 {
00066
00067
00068
00069 Init();
00070
00071 }
00072
00073
00074 TFndLmdMon::TFndLmdMon(const TFndLmdMon &lmdmon):
00075 fout(),flmd(),
00076 mlmd(),mlmd_adc(),mlmd_tdc(),
00077 fMustRecoverHistos(kFALSE),
00078 fSharedMemName_Main(),fSharedMemName_Adc(),fSharedMemName_Tdc(),
00079 fSharedFileName_Main(),fSharedFileName_Adc(),fSharedFileName_Tdc(),
00080 lmdmult(),lmdmult_good(),lmd_i_o_mult(),lmdmap(),lmdmap_good(),lmdmapadc0(),lmdmapadc(),lmdmapadce(),lmdmapadcp(),
00081 lmdmaptdc0(),lmdmaptdc(),lmdmaptdce(),lmdmaptdcp(),
00082 lmd_all_mapadctdc(),lmd_all_adc_tdc(),lmd_all_adce(),lmd_all_adcp(),lmd_all_mul(),
00083 lmd_all_aepat(),lmd_all_appat(),lmd_all_tepat(),lmd_all_tppat(),
00084 lmd_all_vp(),lmd_all_crg(),lmd_all_zet(),lmd_all_adc(),lmd_all_tdce(),lmd_all_tdcp(),lmd_all_tdf(),lmd_all_tmean(),lmd_all_tdc(),
00085 lmd_all_dhits(),lmd_all_dhits_tdc_dopp(),lmd_all_dhits_adc_dopp(),lmd_all_dhits_tdc_cell(),lmd_all_dhits_adc_cell(),
00086 lmdadce(),lmdadcp(),lmdcrg(),lmdzet(),lmdtdce(),lmdtdcp(),lmdtdf(),lmdtmean(),
00087 lmd1d(),lmd2d(),fLine()
00088 {
00089
00090 Init();
00091 }
00092
00093
00094 TFndLmdMon::TFndLmdMon(TString *filename):
00095 fout(),flmd(),
00096 mlmd(),mlmd_adc(),mlmd_tdc(),
00097 fMustRecoverHistos(kFALSE),
00098 fSharedMemName_Main(),fSharedMemName_Adc(),fSharedMemName_Tdc(),
00099 fSharedFileName_Main(),fSharedFileName_Adc(),fSharedFileName_Tdc(),
00100 lmdmult(),lmdmult_good(),lmd_i_o_mult(),lmdmap(),lmdmap_good(),lmdmapadc0(),lmdmapadc(),lmdmapadce(),lmdmapadcp(),
00101 lmdmaptdc0(),lmdmaptdc(),lmdmaptdce(),lmdmaptdcp(),
00102 lmd_all_mapadctdc(),lmd_all_adc_tdc(),lmd_all_adce(),lmd_all_adcp(),lmd_all_mul(),
00103 lmd_all_aepat(),lmd_all_appat(),lmd_all_tepat(),lmd_all_tppat(),
00104 lmd_all_vp(),lmd_all_crg(),lmd_all_zet(),lmd_all_adc(),lmd_all_tdce(),lmd_all_tdcp(),lmd_all_tdf(),lmd_all_tmean(),lmd_all_tdc(),
00105 lmd_all_dhits(),lmd_all_dhits_tdc_dopp(),lmd_all_dhits_adc_dopp(),lmd_all_dhits_tdc_cell(),lmd_all_dhits_adc_cell(),
00106 lmdadce(),lmdadcp(),lmdcrg(),lmdzet(),lmdtdce(),lmdtdcp(),lmdtdf(),lmdtmean(),
00107 lmd1d(),lmd2d(),fLine()
00108 {
00109
00110 Init();
00111
00112 flmd = new TFile(filename->Data());
00113 TString hname = TString("lmdmult");
00114 lmdmult = (TH1F *) flmd->Get(hname.Data());
00115 hname = TString("lmdmult_good");
00116 lmdmult_good = (TH1F *) flmd->Get(hname.Data());
00117 hname = TString("lmd_i_o_mult");
00118 lmd_i_o_mult = (TH2F *) flmd->Get(hname.Data());
00119 hname = TString("lmdmap");
00120 lmdmap = (TH2F *) flmd->Get(hname.Data());
00121 hname = TString("lmdmap_good");
00122 lmdmap_good = (TH2F *) flmd->Get(hname.Data());
00123 hname = TString("lmdmapadc0");
00124 lmdmapadc0 = (TH2F *) flmd->Get(hname.Data());
00125 hname = TString("lmdmapadc");
00126 lmdmapadc = (TH2F *) flmd->Get(hname.Data());
00127 hname = TString("lmdmapadce");
00128 lmdmapadce = (TH2F *) flmd->Get(hname.Data());
00129 hname = TString("lmdmapadcp");
00130 lmdmapadcp = (TH2F *) flmd->Get(hname.Data());
00131 hname = TString("lmdmaptdc0");
00132 lmdmaptdc0 = (TH2F *) flmd->Get(hname.Data());
00133 hname = TString("lmdmaptdc");
00134 lmdmaptdc = (TH2F *) flmd->Get(hname.Data());
00135 hname = TString("lmdmaptdce");
00136 lmdmaptdce = (TH2F *) flmd->Get(hname.Data());
00137 hname = TString("lmdmaptdcp");
00138 lmdmaptdcp = (TH2F *) flmd->Get(hname.Data());
00139
00140 for (Int_t i=0;i<K_N_LMD_LAYERS;i++) {
00141
00142 for (Int_t j=0;j<K_N_LMD_CHAMS_PER_LAYER;j++) {
00143
00144 Int_t nwire = K_N_LMD_INNER_WIRES;
00145 if(i == 1) nwire = K_N_LMD_OUTER_WIRES;
00146
00147 Int_t idx1 = j+i*K_N_LMD_CHAMS_PER_LAYER;
00148
00149 Char_t chname[20];
00150 sprintf(chname,"_%d_%d",i+1,j+1);
00151
00152 hname = TString("lmd_all_mapadctdc");
00153 hname.Append(chname);
00154 lmd_all_mapadctdc[idx1] = (TH2F *) flmd->Get(hname.Data());
00155 hname = TString("lmd_all_zet");
00156 hname.Append(chname);
00157 lmd_all_zet[idx1] = (TH2F *) flmd->Get(hname.Data());
00158 hname = TString("lmd_all_crg");
00159 hname.Append(chname);
00160 lmd_all_crg[idx1] = (TH1F *) flmd->Get(hname.Data());
00161
00162
00163 hname = TString("lmd_all_vp");
00164 hname.Append(chname);
00165 lmd_all_vp[idx1] = (TH1F *) flmd->Get(hname.Data());
00166
00167 hname = TString("lmd_all_adce");
00168 hname.Append(chname);
00169 lmd_all_adce[idx1] = (TH1F *) flmd->Get(hname.Data());
00170 hname = TString("lmd_all_adcp");
00171 hname.Append(chname);
00172 lmd_all_adcp[idx1] = (TH1F *) flmd->Get(hname.Data());
00173
00174 hname = TString("lmd_all_mul");
00175 hname.Append(chname);
00176 lmd_all_mul[idx1] = (TH1F *) flmd->Get(hname.Data());
00177
00178 hname = TString("lmd_all_aepat");
00179 hname+=chname;
00180 lmd_all_aepat[idx1] = (TH1F *) flmd->Get(hname.Data());
00181
00182 hname = TString("lmd_all_appat");
00183 hname+=chname;
00184 lmd_all_appat[idx1] = (TH1F *) flmd->Get(hname.Data());
00185
00186 hname = TString("lmd_all_tepat");
00187 hname+=chname;
00188 lmd_all_tepat[idx1] = (TH1F *) flmd->Get(hname.Data());
00189
00190 hname = TString("lmd_all_tppat");
00191 hname+=chname;
00192 lmd_all_tppat[idx1] = (TH1F *) flmd->Get(hname.Data());
00193
00194
00195 hname = TString("lmd_all_adc");
00196 hname.Append(chname);
00197 lmd_all_adc[idx1] = (TH2F *) flmd->Get(hname.Data());
00198 hname = TString("lmd_all_adc_tdc");
00199 hname.Append(chname);
00200 lmd_all_adc_tdc[idx1] = (TH2F *) flmd->Get(hname.Data());
00201
00202 hname = TString("lmd_all_tdce");
00203 hname.Append(chname);
00204 lmd_all_tdce[idx1] = (TH1F *) flmd->Get(hname.Data());
00205 hname = TString("lmd_all_tdcp");
00206 hname.Append(chname);
00207 lmd_all_tdcp[idx1] = (TH1F *) flmd->Get(hname.Data());
00208 hname = TString("lmd_all_tdf");
00209 hname.Append(chname);
00210 lmd_all_tdf[idx1] = (TH1F *) flmd->Get(hname.Data());
00211 hname = TString("lmd_all_tmean");
00212 hname.Append(chname);
00213 lmd_all_tmean[idx1] = (TH1F *) flmd->Get(hname.Data());
00214 hname = TString("lmd_all_tdc");
00215 hname.Append(chname);
00216 lmd_all_tdc[idx1] = (TH2F *) flmd->Get(hname.Data());
00217
00218
00219 for (Int_t l=0;l<nwire;l++) {
00220
00221 Int_t idx = l+j*nwire+i*K_N_LMD_INNER_WIRES*K_N_LMD_CHAMS_PER_LAYER;
00222 Char_t chname[20];
00223 sprintf(chname,"_%d_%d_%d",i+1,j+1,l+1);
00224
00225 hname = TString("lmdtdce");
00226 hname.Append(chname);
00227 lmdtdce[idx] = (TH1F *) flmd->Get(hname.Data());
00228 hname = TString("lmdtdcp");
00229 hname.Append(chname);
00230 lmdtdcp[idx] = (TH1F *) flmd->Get(hname.Data());
00231 hname = TString("lmdtmean");
00232 hname.Append(chname);
00233 lmdtmean[idx] = (TH1F *) flmd->Get(hname.Data());
00234 hname = TString("lmdtdf");
00235 hname.Append(chname);
00236 lmdtdf[idx] = (TH1F *) flmd->Get(hname.Data());
00237
00238 hname = TString("lmdadce");
00239 hname.Append(chname);
00240 lmdadce[idx] = (TH1F *) flmd->Get(hname.Data());
00241 hname = TString("lmdadcp");
00242 hname.Append(chname);
00243 lmdadcp[idx] = (TH1F *) flmd->Get(hname.Data());
00244 hname = TString("lmdcrg");
00245 hname.Append(chname);
00246 lmdcrg[idx] = (TH1F *) flmd->Get(hname.Data());
00247 hname = TString("lmdzet");
00248 hname.Append(chname);
00249 lmdzet[idx] = (TH1F *) flmd->Get(hname.Data());
00250 }
00251 }
00252 }
00253
00254
00255 lmd1d = 0;
00256 lmd2d = 0;
00257 fLine = 0;
00258 }
00259
00260
00261 TFndLmdMon::~TFndLmdMon() {
00262
00263 delete fLine;
00264
00265 delete lmdmult;
00266 delete lmdmult_good;
00267 delete lmd_i_o_mult;
00268 delete lmdmap;
00269 delete lmdmap_good;
00270
00271 delete lmdmapadc0;
00272 delete lmdmapadc;
00273 delete lmdmapadce;
00274 delete lmdmapadcp;
00275
00276 delete lmdmaptdc0;
00277 delete lmdmaptdc;
00278 delete lmdmaptdce;
00279 delete lmdmaptdcp;
00280
00281 for(Int_t i=0; i<K_N_LMD_TOT_CHAMS; i++) {
00282 delete lmd_all_mapadctdc[i];
00283 delete lmd_all_adc_tdc[i];
00284 delete lmd_all_adce[i];
00285 delete lmd_all_adcp[i];
00286 delete lmd_all_mul[i];
00287 delete lmd_all_aepat[i];
00288 delete lmd_all_appat[i];
00289 delete lmd_all_tepat[i];
00290 delete lmd_all_tppat[i];
00291 delete lmd_all_crg[i];
00292 delete lmd_all_vp[i];
00293 delete lmd_all_zet[i];
00294 delete lmd_all_adc[i];
00295 delete lmd_all_tdce[i];
00296 delete lmd_all_tdcp[i];
00297 delete lmd_all_tdf[i];
00298 delete lmd_all_tmean[i];
00299 delete lmd_all_tdc[i];
00300
00301 delete lmd_all_dhits[i];
00302 delete lmd_all_dhits_tdc_dopp[i];
00303 delete lmd_all_dhits_adc_dopp[i];
00304 delete lmd_all_dhits_tdc_cell[i];
00305 delete lmd_all_dhits_adc_cell[i];
00306 }
00307 for(Int_t i=0; i<n_lmd_hist; i++) {
00308 delete lmdadce[i];
00309 delete lmdadcp[i];
00310 delete lmdcrg[i];
00311 delete lmdzet[i];
00312 delete lmdtdce[i];
00313 delete lmdtdcp[i];
00314 delete lmdtdf[i];
00315 delete lmdtmean[i];
00316 }
00317
00318 if(! shmflg){
00319 if(flmd) flmd->Close();
00320 delete flmd;
00321 }
00322
00323 if(fout) fout->Close();
00324 delete fout;
00325
00326 if(mlmd){ mlmd->Close(); mlmd = 0; }
00327 else delete mlmd;
00328
00329 for(Int_t kk=0;kk<2;kk++){
00330 if(mlmd_adc[kk]){ mlmd_adc[kk]->Close(); mlmd_adc[kk] = 0; }
00331 else delete mlmd_adc[kk];
00332 }
00333
00334
00335
00336
00337 for(Int_t kk=0;kk<2;kk++){
00338 if(mlmd_tdc[kk]){ mlmd_tdc[kk]->Close(); mlmd_tdc[kk] = 0; }
00339 else delete mlmd_tdc[kk];
00340 }
00341
00342 }
00343
00344
00345 void TFndLmdMon::Init(){
00346
00347 fZetaAdjust[0] = LmdZetaGeoAdjust(E_FIN_INNER_LAYER);
00348 fZetaAdjust[1] = LmdZetaGeoAdjust(E_FIN_OUTER_LAYER);
00349
00350 fSharedMemName_Main = FROOT::ExpandPathName("$FND_SHR/lmd.map");
00351 fSharedMemName_Adc[0] = FROOT::ExpandPathName("$FND_SHR/lmd_i_adc.map");
00352 fSharedMemName_Adc[1] = FROOT::ExpandPathName("$FND_SHR/lmd_o_adc.map");
00353 fSharedMemName_Tdc[0] = FROOT::ExpandPathName("$FND_SHR/lmd_i_tdc.map");
00354 fSharedMemName_Tdc[1] = FROOT::ExpandPathName("$FND_SHR/lmd_o_tdc.map");
00355
00356 fSharedFileName_Main = FROOT::ExpandPathName("lmd.file.map");
00357 fSharedFileName_Adc[0] = FROOT::ExpandPathName("lmd_i_adc.file.map");
00358 fSharedFileName_Adc[1] = FROOT::ExpandPathName("lmd_o_adc.file.map");
00359 fSharedFileName_Tdc[0] = FROOT::ExpandPathName("lmd_i_tdc.file.map");
00360 fSharedFileName_Tdc[1] = FROOT::ExpandPathName("lmd_o_tdc.file.map");
00361
00362 }
00363
00364
00365 void TFndLmdMon::InitHistos(const Int_t &lmd_adc_bins,const Double_t &lmd_adc_min,const Double_t &lmd_adc_max,const Int_t &lmd_tdc_bins,const Double_t &lmd_tdc_min,const Double_t &lmd_tdc_max){
00366
00367
00368 if(shmflg && ( !mlmd || !mlmd_adc[0] || !mlmd_adc[1] || !mlmd_tdc[0] || !mlmd_tdc[1]) ){
00369 Warning("InitHistos","Map-files not available: exiting method");
00370 return;
00371 }
00372
00373 TString hname;
00374 TString htitle;
00375
00377 if(shmflg) mlmd->cd();
00378
00379 hname = "lmdmult";
00380 htitle = "Lmd multiplicity";
00381 lmdmult = (fMustRecoverHistos) ?
00382 ((TH1F*) (mlmd->Get(hname))) :
00383 new TH1F(hname,htitle,200,-0.5,199.5);
00384
00385 hname = "lmdmult_good";
00386 htitle = "Lmd selected mult.";
00387 lmdmult_good = (fMustRecoverHistos) ?
00388 ((TH1F*) (mlmd->Get(hname))) :
00389 new TH1F(hname,htitle,20,-0.5,19.5);
00390
00391 hname = "lmd_i_o_mult";
00392 htitle = "Lmd inner vs outer mult.";
00393 lmd_i_o_mult = (fMustRecoverHistos) ?
00394 ((TH2F*) (mlmd->Get(hname))) :
00395 new TH2F(hname,htitle,10,-0.5,9.5,10,-0.5,9.5);
00396
00397 hname = "lmdmap";
00398 htitle = "Lmd Hit Map (Wire vs Drift Number)";
00399 lmdmap = (fMustRecoverHistos) ?
00400 ((TH2F*) (mlmd->Get(hname))) :
00401 new TH2F(hname,htitle,20,10.5,30.5,24,0.5,24.5);
00402
00403 hname = "lmdmap_good";
00404 htitle = "Lmd Selected Hit Map (Wire vs Drift Number)";
00405 lmdmap_good = (fMustRecoverHistos) ?
00406 ((TH2F*) (mlmd->Get(hname))) :
00407 new TH2F(hname,htitle,20,10.5,30.5,24,0.5,24.5);
00408
00409 hname = "lmdmapadc0";
00410 htitle = "Lmd ADC map (e||p!=0)";
00411 lmdmapadc0 = (fMustRecoverHistos) ?
00412 ((TH2F*) (mlmd->Get(hname))) :
00413 new TH2F(hname,htitle,20,10.5,30.5,24,0.5,24.5);
00414
00415 hname = "lmdmapadc";
00416 htitle = "Lmd ADC map (e&&p!=0)";
00417 lmdmapadc = (fMustRecoverHistos) ?
00418 ((TH2F*) (mlmd->Get(hname))) :
00419 new TH2F(hname,htitle,20,10.5,30.5,24,0.5,24.5);
00420
00421 hname = "lmdmapadce";
00422 htitle = "Lmd ADC map (e-side)";
00423 lmdmapadce = (fMustRecoverHistos) ?
00424 ((TH2F*) (mlmd->Get(hname))) :
00425 new TH2F(hname,htitle,20,10.5,30.5,24,0.5,24.5);
00426
00427 hname = "lmdmapadcp";
00428 htitle = "Lmd ADC map (p-side)";
00429 lmdmapadcp = (fMustRecoverHistos) ?
00430 ((TH2F*) (mlmd->Get(hname))) :
00431 new TH2F(hname,htitle,20,10.5,30.5,24,0.5,24.5);
00432
00433
00434
00435 hname = "lmdmaptdc0";
00436 htitle = "Lmd TDC map (e||p!=0)";
00437 lmdmaptdc0 = (fMustRecoverHistos) ?
00438 ((TH2F*) (mlmd->Get(hname))) :
00439 new TH2F(hname,htitle,20,10.5,30.5,24,0.5,24.5);
00440
00441 hname = "lmdmaptdc";
00442 htitle = "Lmd TDC map (e&&p!=0)";
00443 lmdmaptdc = (fMustRecoverHistos) ?
00444 ((TH2F*) (mlmd->Get(hname))) :
00445 new TH2F(hname,htitle,20,10.5,30.5,24,0.5,24.5);
00446
00447 hname = "lmdmaptdce";
00448 htitle = "Lmd TDC map (e-side)";
00449 lmdmaptdce = (fMustRecoverHistos) ?
00450 ((TH2F*) (mlmd->Get(hname))) :
00451 new TH2F(hname,htitle,20,10.5,30.5,24,0.5,24.5);
00452
00453 hname = "lmdmaptdcp";
00454 htitle = "Lmd TDC map (p-side)";
00455 lmdmaptdcp = (fMustRecoverHistos) ?
00456 ((TH2F*) (mlmd->Get(hname))) :
00457 new TH2F(hname,htitle,20,10.5,30.5,24,0.5,24.5);
00458
00459
00460
00461 for (Int_t ji=0;ji<K_N_LMD_LAYERS;ji++) {
00462 for (Int_t j=0;j<K_N_LMD_CHAMS_PER_LAYER;j++) {
00463 Int_t id = K_N_LMD_CHAMS_PER_LAYER*ji + j;
00464 hname.Form("lmd_all_mapadctdc_%d_%d",ji+1,j+1);
00465 htitle.Form("ADC E/P vs TDC E/P, dch %d, layer %d",j+1,ji+1);
00466 lmd_all_mapadctdc[id] = (fMustRecoverHistos) ?
00467 ((TH2F*) (mlmd->Get(hname))) :
00468 new TH2F(hname,htitle,4,-0.5,3.5,4,-0.5,3.5);
00469
00470 hname.Form("lmd_all_adc_tdc_%d_%d",ji+1,j+1);
00471 htitle.Form("ADC vs TDC, dch %d, layer %d",j+1,ji+1);
00472 lmd_all_adc_tdc[id] = (fMustRecoverHistos) ?
00473 ((TH2F*) (mlmd->Get(hname))) :
00474 new TH2F(hname,htitle,50,lmd_tdc_min,lmd_tdc_max,50,lmd_adc_min,lmd_adc_max);
00475
00476 hname.Form("lmd_all_dhits_%d_%d",ji+1,j+1);
00477 htitle.Form("Wire with Dij = -1, dch %d, layer %d",j+1,ji+1);
00478 lmd_all_dhits[id] = (fMustRecoverHistos) ?
00479 ((TH1F*) (mlmd->Get(hname))) :
00480 new TH1F(hname,htitle,22,0.5,22.5);
00481
00482 hname.Form("lmd_all_dhits_tdc_dopp_%d_%d",ji+1,j+1);
00483 htitle.Form("T(i) vs T(i+1), dch %d, layer %d",j+1,ji+1);
00484 lmd_all_dhits_tdc_dopp[id] = (fMustRecoverHistos) ?
00485 ((TH2F*) (mlmd->Get(hname))) :
00486 new TH2F(hname,htitle,lmd_tdc_bins/4,lmd_tdc_min,lmd_tdc_max,lmd_tdc_bins/4,lmd_tdc_min,lmd_tdc_max);
00487
00488 hname.Form("lmd_all_dhits_tdc_cell_%d_%d",ji+1,j+1);
00489 htitle.Form("T(i) vs T(i+1), dch %d, layer %d",j+1,ji+1);
00490 lmd_all_dhits_tdc_cell[id] = (fMustRecoverHistos) ?
00491 ((TH2F*) (mlmd->Get(hname))) :
00492 new TH2F(hname,htitle,lmd_tdc_bins/4,lmd_tdc_min,lmd_tdc_max,lmd_tdc_bins/4,lmd_tdc_min,lmd_tdc_max);
00493
00494 hname.Form("lmd_all_dhits_adc_dopp_%d_%d",ji+1,j+1);
00495 htitle.Form("Q(i) vs Q(i+1) for dch: %d in layer: %d",j+1,ji+1);
00496 lmd_all_dhits_adc_dopp[id] = (fMustRecoverHistos) ?
00497 ((TH2F*) (mlmd->Get(hname))) :
00498 new TH2F(hname,htitle,lmd_adc_bins/4,lmd_adc_min,2.*lmd_adc_max,lmd_adc_bins/4,lmd_adc_min,2.*lmd_adc_max);
00499
00500 hname.Form("lmd_all_dhits_adc_cell_%d_%d",ji+1,j+1);
00501 htitle.Form("Q(i) vs Q(i+1) (cell), dch %d, layer %d",j+1,ji+1);
00502 lmd_all_dhits_adc_cell[id] = (fMustRecoverHistos) ?
00503 ((TH2F*) (mlmd->Get(hname))) :
00504 new TH2F(hname,htitle,lmd_adc_bins/4,lmd_adc_min,2.*lmd_adc_max,lmd_adc_bins/4,lmd_adc_min,2.*lmd_adc_max);
00505
00506
00507 Int_t nwir = K_N_LMD_INNER_WIRES;
00508 if(ji==1) nwir = K_N_LMD_OUTER_WIRES;
00509 hname.Form("lmd_all_mul_%d_%d",ji+1,j+1);
00510 htitle.Form("Multiplicity, dch %d, layer %d",j+1,ji+1);
00511 lmd_all_mul[id] = (fMustRecoverHistos) ?
00512 ((TH1F*) (mlmd->Get(hname))) :
00513 new TH1F(hname,htitle,nwir+1,-0.5,nwir+0.5);
00514 lmd_all_mul[id]->SetLineColor(4);
00515 lmd_all_mul[id]->SetLineWidth(2);
00516 }
00517 }
00518
00520
00521
00522 for(Int_t kk=0;kk<K_N_LMD_LAYERS;kk++) {
00523
00524 Int_t nwires = 12 + kk*10;
00525 if(shmflg) mlmd_adc[kk]->cd();
00526
00527 for (Int_t jj=0;jj<K_N_LMD_CHAMS_PER_LAYER;jj++) {
00528 Int_t j = K_N_LMD_CHAMS_PER_LAYER*kk+jj;
00529 hname.Form("lmd_all_adce_%d_%d",kk+1,jj+1);
00530 htitle.Form("ADC e-side, dch %d, layer %d",jj+1,kk+1);
00531 lmd_all_adce[j] = (fMustRecoverHistos) ?
00532 ((TH1F*) (mlmd_adc[kk]->Get(hname))) :
00533 new TH1F(hname,htitle,lmd_adc_bins,lmd_adc_min,lmd_adc_max);
00534 lmd_all_adce[j]->SetLineColor(4);
00535
00536 hname.Form("lmd_all_adcp_%d_%d",kk+1,jj+1);
00537 htitle.Form("ADC p-side, dch %d, layer %d",jj+1,kk+1);
00538 lmd_all_adcp[j] = (fMustRecoverHistos) ?
00539 ((TH1F*) (mlmd_adc[kk]->Get(hname))) :
00540 new TH1F(hname,htitle,lmd_adc_bins,lmd_adc_min,lmd_adc_max);
00541 lmd_all_adcp[j]->SetLineColor(2);
00542
00543 Int_t nwir = K_N_LMD_INNER_WIRES;
00544 if(kk==1) nwir = K_N_LMD_OUTER_WIRES;
00545
00546
00547 hname.Form("lmd_all_aepat_%d_%d",kk+1,jj+1);
00548 htitle.Form("Wire-Patt (ADC-e), dch %d, layer %d",jj+1,kk+1);
00549 lmd_all_aepat[j] = (fMustRecoverHistos) ?
00550 ((TH1F*) (mlmd_adc[kk]->Get(hname))) :
00551 new TH1F(hname,htitle,nwir+1,-0.5,nwir+0.5);
00552 lmd_all_aepat[j]->SetLineColor(4);
00553 lmd_all_aepat[j]->SetLineWidth(2);
00554
00555 hname.Form("lmd_all_appat_%d_%d",kk+1,jj+1);
00556 htitle.Form("Wire-Patt (ADC-p), dch %d, layer %d",jj+1,kk+1);
00557 lmd_all_appat[j] = (fMustRecoverHistos) ?
00558 ((TH1F*) (mlmd_adc[kk]->Get(hname))) :
00559 new TH1F(hname,htitle,nwir+1,-0.5,nwir+0.5);
00560 lmd_all_appat[j]->SetLineColor(4);
00561 lmd_all_appat[j]->SetLineWidth(2);
00562
00563
00564 hname.Form("lmd_all_crg_%d_%d",kk+1,jj+1);
00565 htitle.Form("ADC (e+p)-side, dch %d, layer %d",jj+1,kk+1);
00566 lmd_all_crg[j] = (fMustRecoverHistos) ?
00567 ((TH1F*) (mlmd_adc[kk]->Get(hname))) :
00568 new TH1F(hname,htitle,lmd_adc_bins,2*lmd_adc_min,2*lmd_adc_max);
00569 lmd_all_crg[j]->SetFillColor(9);
00570
00571
00572 hname.Form("lmd_all_vp_%d_%d",kk+1,jj+1);
00573 htitle.Form("Drift velocity, dch %d, layer %d",jj+1,kk+1);
00574 lmd_all_vp[j] = (fMustRecoverHistos) ?
00575 ((TH1F*) (mlmd_adc[kk]->Get(hname))) :
00576 new TH1F(hname,htitle,60,0.,30.);
00577 lmd_all_vp[j]->SetFillColor(4);
00578
00579 hname.Form("lmd_all_zet_%d_%d",kk+1,jj+1);
00580 htitle.Form("Time vs Z, dch %d, layer %d",jj+1,kk+1);
00581 lmd_all_zet[j] = (fMustRecoverHistos) ?
00582 ((TH2F*) (mlmd_adc[kk]->Get(hname))) :
00583 new TH2F(hname,htitle,101,-fZetaAdjust[kk],fZetaAdjust[kk],lmd_tdc_bins,lmd_tdc_min,lmd_tdc_max/2);
00584
00585 hname.Form("lmd_all_adc_%d_%d",kk+1,jj+1);
00586 htitle.Form("ADC e vs p-side, dch %d, layer %d",jj+1,kk+1);
00587 lmd_all_adc[j] = (fMustRecoverHistos) ?
00588 ((TH2F*) (mlmd_adc[kk]->Get(hname))) :
00589 new TH2F(hname,htitle,lmd_adc_bins,lmd_adc_min,lmd_adc_max,lmd_adc_bins,lmd_adc_min,lmd_adc_max);
00590
00591 for (Int_t l=0;l<nwires;l++) {
00592
00593 Int_t k = K_N_LMD_INNER_WIRES*K_N_LMD_CHAMS_PER_LAYER*kk+l+jj*nwires;
00594
00595 hname.Form("lmdadce_%d_%d_%d",kk+1,jj+1,l+1);
00596 htitle.Form("ADC e-side, wire %d, dch %d, layer %d",l+1,jj+1,kk+1);
00597 lmdadce[k] = (fMustRecoverHistos) ?
00598 ((TH1F*) (mlmd_adc[kk]->Get(hname))) :
00599 new TH1F(hname,htitle,lmd_adc_bins,lmd_adc_min,lmd_adc_max);
00600 lmdadce[k]->SetLineColor(4);
00601
00602 hname.Form("lmdadcp_%d_%d_%d",kk+1,jj+1,l+1);
00603 htitle.Form("ADC p-side, wire %d, dch %d, layer %d",l+1,jj+1,kk+1);
00604 lmdadcp[k] = (fMustRecoverHistos) ?
00605 ((TH1F*) (mlmd_adc[kk]->Get(hname))) :
00606 new TH1F(hname,htitle,lmd_adc_bins,lmd_adc_min,lmd_adc_max);
00607 lmdadcp[k]->SetLineColor(2);
00608
00609 hname.Form("lmdcrg_%d_%d_%d",kk+1,jj+1,l+1);
00610 htitle.Form("ADC (e+p)-side, wire %d, dch %d, layer %d",l+1,jj+1,kk+1);
00611 lmdcrg[k] = (fMustRecoverHistos) ?
00612 ((TH1F*) (mlmd_adc[kk]->Get(hname))) :
00613 new TH1F(hname,htitle,lmd_adc_bins,2*lmd_adc_min,2*lmd_adc_max);
00614 lmdcrg[k]->SetFillColor(9);
00615
00616 hname.Form("lmdzet_%d_%d_%d",kk+1,jj+1,l+1);
00617 htitle.Form("zeta (cm), wire %d, dch %d, layer %d",l+1,jj+1,kk+1);
00618 lmdzet[k] = (fMustRecoverHistos) ?
00619 ((TH1F*) (mlmd_adc[kk]->Get(hname))) :
00620 new TH1F(hname,htitle,101,-fZetaAdjust[kk],fZetaAdjust[kk]);
00621 }
00622 }
00623
00625
00626 if(shmflg) mlmd_tdc[kk]->cd();
00627
00628 for (Int_t jk=0;jk<K_N_LMD_CHAMS_PER_LAYER;jk++) {
00629 Int_t ij = K_N_LMD_CHAMS_PER_LAYER*kk+jk;
00630 hname.Form("lmd_all_tdce_%d_%d",kk+1,jk+1);
00631 htitle.Form("TDC e-side, dch %d, layer %d",jk+1,kk+1);
00632 lmd_all_tdce[ij] = (fMustRecoverHistos) ?
00633 ((TH1F*) (mlmd_tdc[kk]->Get(hname))) :
00634 new TH1F(hname,htitle,lmd_tdc_bins,lmd_tdc_min,lmd_tdc_max);
00635 lmd_all_tdce[ij]->SetLineColor(4);
00636
00637 hname.Form("lmd_all_tdcp_%d_%d",kk+1,jk+1);
00638 htitle.Form("TDC p-side, dch %d, layer %d",jk+1,kk+1);
00639 lmd_all_tdcp[ij] = (fMustRecoverHistos) ?
00640 ((TH1F*) (mlmd_tdc[kk]->Get(hname))) :
00641 new TH1F(hname,htitle,lmd_tdc_bins,lmd_tdc_min,lmd_tdc_max);
00642 lmd_all_tdcp[ij]->SetLineColor(2);
00643
00644 hname.Form("lmd_all_tdf_%d_%d",kk+1,jk+1);
00645 htitle.Form("TDC (e-p)-side, dch %d, layer %d",jk+1,kk+1);
00646 lmd_all_tdf[ij] = (fMustRecoverHistos) ?
00647 ((TH1F*) (mlmd_tdc[kk]->Get(hname))) :
00648 new TH1F(hname,htitle,25,-50.,50.);
00649 lmd_all_tdf[ij]->SetFillColor(9);
00650
00651 hname.Form("lmd_all_tmean_%d_%d",kk+1,jk+1);
00652 htitle.Form("TDC (e+p-side)/2, dch %d, layer %d",jk+1,kk+1);
00653 lmd_all_tmean[ij] = (fMustRecoverHistos) ?
00654 ((TH1F*) (mlmd_tdc[kk]->Get(hname))) :
00655 new TH1F(hname,htitle,lmd_tdc_bins,lmd_tdc_min,lmd_tdc_max);
00656 lmd_all_tmean[ij]->SetFillColor(7);
00657
00658 hname.Form("lmd_all_tdc_%d_%d",kk+1,jk+1);
00659 htitle.Form("TDC e vs p side, dch %d, layer %d",jk+1,kk+1);
00660 lmd_all_tdc[ij] = (fMustRecoverHistos) ?
00661 ((TH2F*) (mlmd_tdc[kk]->Get(hname))) :
00662 new TH2F(hname,htitle,lmd_tdc_bins,lmd_tdc_min,lmd_tdc_max,lmd_tdc_bins,lmd_tdc_min,lmd_tdc_max);
00663
00665 Int_t nwir = K_N_LMD_INNER_WIRES;
00666 if(kk==1) nwir = K_N_LMD_OUTER_WIRES;
00667
00668 hname.Form("lmd_all_tepat_%d_%d",kk+1,jk+1);
00669 htitle.Form("Wire-Patt (TDC-e), dch %d, layer %d",jk+1,kk+1);
00670 lmd_all_tepat[ij] = (fMustRecoverHistos) ?
00671 ((TH1F*) (mlmd_tdc[kk]->Get(hname))) :
00672 new TH1F(hname,htitle,nwir+1,-0.5,nwir+0.5);
00673 lmd_all_tepat[ij]->SetLineColor(4);
00674 lmd_all_tepat[ij]->SetLineWidth(2);
00675
00676 hname.Form("lmd_all_tppat_%d_%d",kk+1,jk+1);
00677 htitle.Form("Wire-Patt (TDC-p), dch %d, layer %d",jk+1,kk+1);
00678 lmd_all_tppat[ij] = (fMustRecoverHistos) ?
00679 ((TH1F*) (mlmd_tdc[kk]->Get(hname))) :
00680 new TH1F(hname,htitle,nwir+1,-0.5,nwir+0.5);
00681 lmd_all_tppat[ij]->SetLineColor(4);
00682 lmd_all_tppat[ij]->SetLineWidth(2);
00684
00685 for (Int_t l=0;l<nwires;l++) {
00686 Int_t k = K_N_LMD_INNER_WIRES*K_N_LMD_CHAMS_PER_LAYER*kk+l+jk*nwires;
00687
00688 hname.Form("lmdtdce_%d_%d_%d",kk+1,jk+1,l+1);
00689 htitle.Form("TDC e-side, wire %d, dch %d, layer %d",l+1,jk+1,kk+1);
00690 lmdtdce[k] = (fMustRecoverHistos) ?
00691 ((TH1F*) (mlmd_tdc[kk]->Get(hname))) :
00692 new TH1F(hname,htitle,lmd_tdc_bins,lmd_tdc_min,lmd_tdc_max);
00693 lmdtdce[k]->SetLineColor(4);
00694
00695 hname.Form("lmdtdcp_%d_%d_%d",kk+1,jk+1,l+1);
00696 htitle.Form("TDC p-side, wire %d, dch %d, layer %d",l+1,jk+1,kk+1);
00697 lmdtdcp[k] = (fMustRecoverHistos) ?
00698 ((TH1F*) (mlmd_tdc[kk]->Get(hname))) :
00699 new TH1F(hname,htitle,lmd_tdc_bins,lmd_tdc_min,lmd_tdc_max);
00700 lmdtdcp[k]->SetLineColor(2);
00701
00702 hname.Form("lmdtdf_%d_%d_%d",kk+1,jk+1,l+1);
00703 htitle.Form("TDC (e-p)-side, wire %d, dch %d, layer %d",l+1,jk+1,kk+1);
00704
00705 lmdtdf[k] = (fMustRecoverHistos) ?
00706 ((TH1F*) (mlmd_tdc[kk]->Get(hname))) :
00707 new TH1F(hname,htitle,20,-40.,40.);
00708 lmdtdf[k]->SetFillColor(9);
00709
00710 hname.Form("lmdtmean_%d_%d_%d",kk+1,jk+1,l+1);
00711 htitle.Form("TDC (e+p -side)/2, wire %d, dch %d, layer %d",l+1,jk+1,kk+1);
00712 lmdtmean[k] = (fMustRecoverHistos) ?
00713 ((TH1F*) (mlmd_tdc[kk]->Get(hname))) :
00714 new TH1F(hname,htitle,lmd_tdc_bins,lmd_tdc_min,lmd_tdc_max);
00715 lmdtmean[k]->SetFillColor(9);
00716 }
00717 }
00718 }
00719
00720 }
00721
00722
00723
00724 void TFndLmdMon::OpenSharedFiles(const TString &fmode){
00725
00726
00727 shmflg = fndrun->Onlflg();
00728 cout << "Lmd Shm flag is " << shmflg << endl;
00729
00730 TString fhist = "_lmd.root";
00731
00732 TString lmdnam_str = (fmode.IsNull())? "ONLM" : fmode;
00733 lmdnam_str+=fhist;
00734
00735 flmd = 0;
00736 flmd = new TFile(lmdnam_str.Data(),"RECREATE","Lmd Histogram File");
00737
00738 mlmd = 0;
00739 if(shmflg) {
00740 #if defined _FND_ONL_USE_MAP_FILES_
00741 mlmd = TMapFile::Create(fSharedMemName_Main,"RECREATE",(Int_t)(1048576*FROOT::K_LmdMapSize),"Lmd memory mapped file with histograms");
00742 mlmd->Print();
00743 #elif defined _FND_ONL_USE_SHARED_FILES_
00744 if(gSystem->AccessPathName(fSharedFileName_Main)){
00745 cout << "Shared file missing: creating it now..." << endl;
00746 mlmd = new TFile(fSharedFileName_Main,"RECREATE");
00747 }
00748 else{
00749 cout << "Shared file found: histograms will be recovered..." << endl;
00750 mlmd = TFile::Open(fSharedFileName_Main,"UPDATE");
00751 fMustRecoverHistos = kTRUE;
00752
00753 }
00754 #endif
00755 }
00756
00757 for(Int_t kk=0;kk<K_N_LMD_LAYERS;kk++) {
00758
00759
00760 if(shmflg) {
00761 #if defined _FND_ONL_USE_MAP_FILES_
00762 mlmd_adc[kk] = TMapFile::Create(fSharedMemName_Adc[kk],"RECREATE",(Int_t)(1048576*FROOT::K_LmdIadcMapSize),"Lmd memory mapped file with INNER ADC histograms");
00763 mlmd_adc[kk]->Print();
00764 #elif defined _FND_ONL_USE_SHARED_FILES_
00765 if( gSystem->AccessPathName(fSharedFileName_Adc[kk]) && fMustRecoverHistos == kTRUE){
00766 cout << "Shared file missing: creating it now..." << endl;
00767 mlmd_adc[kk] = new TFile(fSharedFileName_Adc[kk],"RECREATE");
00768 fMustRecoverHistos = kFALSE;
00769 }
00770 else{
00771 cout << "Shared file found: histograms will be recovered..." << endl;
00772 mlmd_adc[kk] = TFile::Open(fSharedFileName_Adc[kk],"UPDATE");
00773
00774 }
00775 #endif
00776 }
00777
00778
00779 if(shmflg) {
00780 #if defined _FND_ONL_USE_MAP_FILES_
00781 mlmd_tdc[kk] = TMapFile::Create(fSharedMemName_Tdc[kk],"RECREATE",(Int_t)(1048576*FROOT::K_LmdItdcMapSize),"Lmd memory mapped file with INNER TDC histograms");
00782 mlmd_tdc[kk]->Print();
00783 #elif defined _FND_ONL_USE_SHARED_FILES_
00784 if( gSystem->AccessPathName(fSharedFileName_Tdc[kk]) && fMustRecoverHistos == kTRUE){
00785 cout << "Shared file missing: creating it now..." << endl;
00786 mlmd_tdc[kk] = new TFile(fSharedFileName_Tdc[kk],"RECREATE");
00787 fMustRecoverHistos = kFALSE;
00788 }
00789 else{
00790 cout << "Shared file found: histograms will be recovered..." << endl;
00791 mlmd_tdc[kk] = TFile::Open(fSharedFileName_Tdc[kk],"UPDATE");
00792
00793 }
00794 #endif
00795 }
00796
00797 }
00798
00799 }
00800
00801
00802 void TFndLmdMon::Fill() {
00803
00804 TClonesArray *cl = fndrun->GetCurrentHdt()->GetLmdHits();
00805 Fill(*cl);
00806
00807 }
00808
00809
00810 void TFndLmdMon::Fill(const TClonesArray &LmdHits) {
00811
00812 Int_t nhlmd = LmdHits.GetEntries();
00813 lmdmult->Fill((Float_t) nhlmd);
00814
00815 Int_t jgood = 0;
00816 Int_t n_inn = 0;
00817 Int_t n_out = 0;
00818 Int_t DchMul[K_N_LMD_TOT_CHAMS] = {0};
00819
00820 for (Int_t j=0; j<nhlmd; j++) {
00821 TFndHLmd *hlmd = (TFndHLmd*) LmdHits[j];
00822
00823 Int_t lay = hlmd->GetLayer();
00824 Int_t dch = hlmd->GetChamber();
00825 Int_t wire = hlmd->GetWire();
00826
00827 Int_t dch_index = (10 *lay) + dch;
00828
00829 Float_t ae = (Float_t ) hlmd->GetAdcE();
00830 Float_t ap = (Float_t ) hlmd->GetAdcP();
00831 Float_t te = (Float_t ) hlmd->GetTdcE();
00832 Float_t tp = (Float_t ) hlmd->GetTdcP();
00833 Float_t loc_z = hlmd->GetLocal_Z();
00834
00835
00836 if(ap <=0 && ae <=0 && tp <=0 && te <=0) continue;
00837
00838
00839 Float_t tmean = (te+tp) /2;
00840
00841
00842
00843
00844
00845
00846 Float_t pede = 0.;
00847 Float_t pedp = 0.;
00848 Float_t t0e = 0.;
00849 Float_t t0p = 0.;
00850
00851 Bool_t i_ae_ok = kFALSE;
00852 Bool_t i_ap_ok = kFALSE;
00853 Bool_t i_te_ok = kFALSE;
00854 Bool_t i_tp_ok = kFALSE;
00855 if(ae > 0)i_ae_ok = kTRUE;
00856 if(ap > 0)i_ap_ok = kTRUE;
00857 if(te > 0)i_te_ok = kTRUE;
00858 if(tp > 0)i_tp_ok = kTRUE;
00859
00860
00861
00862
00863
00864
00865
00866
00867
00868
00869
00870
00871
00872
00873
00874
00875
00876
00877
00878
00879
00880
00881
00882
00883
00884
00885
00886
00887
00888
00889
00890
00891
00892
00893
00894
00895
00896
00897 Int_t il = 0;
00898 Int_t sf = 0;
00899 Int_t idx = 0;
00900 Int_t nwire = 0;
00901 if(dch_index >= 11 && dch_index <= 18) {
00902 sf = dch_index-11;
00903 il = 0;
00904 nwire = 12;
00905 }
00906 if(dch_index >=21 && dch_index <= 28) {
00907 sf = dch_index-21;
00908 il = 1;
00909 nwire = 22;
00910 }
00911 idx = sf+K_N_LMD_CHAMS_PER_LAYER*il;
00912
00913 Int_t itdc = TFndHit::E_HIT_NO_CH;
00914 if(i_te_ok && i_tp_ok) itdc = TFndHit::E_HIT_BOTH_CH;
00915 if(i_te_ok && !i_tp_ok) itdc = TFndHit::E_HIT_E_CH;
00916 if(!i_te_ok && i_tp_ok) itdc = TFndHit::E_HIT_P_CH;
00917
00918 Int_t iadc = TFndHit::E_HIT_NO_CH;
00919 if(i_ae_ok && i_ap_ok) iadc = TFndHit::E_HIT_BOTH_CH;
00920 if(i_ae_ok && !i_ap_ok) iadc = TFndHit::E_HIT_E_CH;
00921 if(!i_ae_ok && i_ap_ok) iadc = TFndHit::E_HIT_P_CH;
00922
00923
00924 if( iadc != TFndHit::E_HIT_NO_CH || itdc != TFndHit::E_HIT_NO_CH ) DchMul[idx]++;
00925 if( iadc == TFndHit::E_HIT_BOTH_CH || iadc == TFndHit::E_HIT_E_CH ) lmd_all_aepat[idx]->Fill(wire);
00926 if( iadc == TFndHit::E_HIT_BOTH_CH || iadc == TFndHit::E_HIT_P_CH ) lmd_all_appat[idx]->Fill(wire);
00927 if( itdc == TFndHit::E_HIT_BOTH_CH || itdc == TFndHit::E_HIT_E_CH ) lmd_all_tepat[idx]->Fill(wire);
00928 if( itdc == TFndHit::E_HIT_BOTH_CH || itdc == TFndHit::E_HIT_P_CH ) lmd_all_tppat[idx]->Fill(wire);
00929
00930
00931
00932 if( iadc != TFndHit::E_HIT_NO_CH || itdc != TFndHit::E_HIT_NO_CH ) lmd_all_mapadctdc[idx]->Fill(itdc,iadc);
00933
00934 if(ae>=0 && te >=0) lmd_all_adc_tdc[idx]->Fill(te,ae);
00935
00936 jgood++;
00937 if(iadc == TFndHit::E_HIT_BOTH_CH && itdc == TFndHit::E_HIT_BOTH_CH ) lmdmap_good->Fill((Float_t) dch_index,(Float_t) wire);
00938 if(iadc!=TFndHit::E_HIT_NO_CH && itdc!=TFndHit::E_HIT_NO_CH && iadc==itdc){
00939 lmdmap->Fill((Float_t) dch_index,(Float_t) wire);
00940 }
00941
00942 if(iadc!=TFndHit::E_HIT_NO_CH || itdc!=TFndHit::E_HIT_NO_CH){
00943 if(dch_index >= 11 && dch_index <= 18) n_inn++;
00944 if(dch_index >= 21 && dch_index <= 28) n_out++;
00945 }
00946
00947
00948
00949 if(iadc != TFndHit::E_HIT_NO_CH) lmdmapadc0->Fill((Float_t) dch_index,(Float_t) wire);
00950 if(iadc == TFndHit::E_HIT_BOTH_CH) lmdmapadc ->Fill((Float_t) dch_index,(Float_t) wire);
00951 if(i_ae_ok) lmdmapadce->Fill((Float_t) dch_index,(Float_t) wire);
00952 if(i_ap_ok) lmdmapadcp->Fill((Float_t) dch_index,(Float_t) wire);
00953
00954 if(itdc != TFndHit::E_HIT_NO_CH) lmdmaptdc0->Fill((Float_t) dch_index,(Float_t) wire);
00955 if(itdc == TFndHit::E_HIT_BOTH_CH) lmdmaptdc ->Fill((Float_t) dch_index,(Float_t) wire);
00956 if(i_te_ok) lmdmaptdce->Fill((Float_t) dch_index,(Float_t) wire);
00957 if(i_tp_ok) lmdmaptdcp->Fill((Float_t) dch_index,(Float_t) wire);
00958
00959 if(ae >=0) lmd_all_adce[idx]->Fill(ae);
00960 if(ap >=0) lmd_all_adcp[idx]->Fill(ap);
00961 if(ae >=0 && ap >=0){
00962 lmd_all_adc[idx]->Fill(ap,ae);
00963 lmd_all_crg[idx]->Fill(ae+ap);
00964 }
00965
00966 if(ae >0 && ap >0) {
00967
00968 lmd_all_zet[idx]->Fill(loc_z,tmean);
00969 }
00970
00971 if(te >=0) lmd_all_tdce[idx]->Fill(te);
00972 if(tp >=0) lmd_all_tdcp[idx]->Fill(tp);
00973 if (te >0 && tp >0){
00974 lmd_all_tdc[idx]->Fill(tp,te);
00975 lmd_all_tdf[idx]->Fill(te-tp);
00976 lmd_all_tmean[idx]->Fill(tmean);
00977 }
00978
00979
00980
00981
00982
00983
00984
00985
00986
00987
00988
00989
00990
00991 sf = wire-1+nwire*sf+K_N_LMD_INNER_WIRES*K_N_LMD_CHAMS_PER_LAYER*il;
00992
00993 if(ae >=0) lmdadce[sf]->Fill(ae);
00994 if(ap >=0) lmdadcp[sf]->Fill(ap);
00995 if(ae >=0 && ap >=0){
00996 lmdcrg[sf]->Fill(ae+ap);
00997 lmdzet[sf]->Fill(loc_z);
00998 }
00999
01000 if(te >=0) lmdtdce[sf]->Fill(te);
01001 if(tp >=0) lmdtdcp[sf]->Fill(tp);
01002 if (te >0 && tp >0){
01003 lmdtdf[sf]->Fill(te-tp);
01004 lmdtmean[sf]->Fill(tmean);
01005 }
01006 }
01007 lmdmult_good->Fill((Float_t) jgood);
01008 lmd_i_o_mult->Fill((Float_t) n_out,(Float_t) n_inn);
01009
01010 for(Int_t id=0;id<K_N_LMD_TOT_CHAMS;id++) lmd_all_mul[id]->Fill(DchMul[id]);
01011 }
01012
01013
01014 void TFndLmdMon::Update(Bool_t purge) {
01015
01016 #if defined _FND_ONL_USE_MAP_FILES_
01017 mlmd->Update();
01018 if(mlmd_adc[0] && mlmd_adc[0]->IsWritable() ) mlmd_adc[0]->Update();
01019 if(mlmd_tdc[0] && mlmd_tdc[0]->IsWritable() ) mlmd_tdc[0]->Update();
01020 if(mlmd_adc[1] && mlmd_adc[1]->IsWritable() ) mlmd_adc[1]->Update();
01021 if(mlmd_tdc[1] && mlmd_tdc[1]->IsWritable() ) mlmd_tdc[1]->Update();
01022 #elif defined _FND_ONL_USE_SHARED_FILES_
01023 WriteToFile(0,kTRUE);
01024
01025 mlmd->cd();
01026 if(purge) mlmd->Purge();
01027 mlmd->Flush();
01028
01029 mlmd_adc[0]->cd();
01030 if(purge) mlmd_adc[0]->Purge();
01031 mlmd_adc[0]->Flush();
01032
01033 mlmd_adc[1]->cd();
01034 if(purge) mlmd_adc[1]->Purge();
01035 mlmd_adc[1]->Flush();
01036
01037 mlmd_tdc[0]->cd();
01038 if(purge) mlmd_tdc[0]->Purge();
01039 mlmd_tdc[0]->Flush();
01040
01041 mlmd_tdc[1]->cd();
01042 if(purge) mlmd_tdc[1]->Purge();
01043 mlmd_tdc[1]->Flush();
01044
01045
01046
01047
01048 TString comm_cp = "";
01049 comm_cp.Form("cp ./lmd.file.map %s",FROOT::ExpandPathName("$FND_SHR/lmd.file.map").Data());
01050 gSystem->Exec(comm_cp);
01051 comm_cp.Form("cp ./lmd_i_adc.file.map %s",FROOT::ExpandPathName("$FND_SHR/lmd_i_adc.file.map").Data());
01052 gSystem->Exec(comm_cp);
01053 comm_cp.Form("cp ./lmd_o_adc.file.map %s",FROOT::ExpandPathName("$FND_SHR/lmd_o_adc.file.map").Data());
01054 gSystem->Exec(comm_cp);
01055 comm_cp.Form("cp ./lmd_i_tdc.file.map %s",FROOT::ExpandPathName("$FND_SHR/lmd_i_tdc.file.map").Data());
01056 gSystem->Exec(comm_cp);
01057 comm_cp.Form("cp ./lmd_o_tdc.file.map %s",FROOT::ExpandPathName("$FND_SHR/lmd_o_tdc.file.map").Data());
01058 gSystem->Exec(comm_cp);
01059
01060
01061
01062 #endif
01063
01064 Info("Update","LMD histograms updated (producer)");
01065
01066 }
01067
01068
01069 void TFndLmdMon::ResetHistos(){
01070
01071 if(lmdmult) lmdmult->Reset();
01072 if(lmdmult_good) lmdmult_good->Reset();
01073 if(lmd_i_o_mult) lmd_i_o_mult->Reset();
01074 if(lmdmap) lmdmap->Reset();
01075 if(lmdmap_good) lmdmap_good->Reset();
01076 if(lmdmapadc0) lmdmapadc0->Reset();
01077 if(lmdmapadc) lmdmapadc->Reset();
01078 if(lmdmapadce) lmdmapadce->Reset();
01079 if(lmdmapadcp) lmdmapadcp->Reset();
01080 if(lmdmaptdc0) lmdmaptdc0->Reset();
01081 if(lmdmaptdc) lmdmaptdc->Reset();
01082 if(lmdmaptdce) lmdmaptdce->Reset();
01083 if(lmdmaptdcp) lmdmaptdcp->Reset();
01084
01085 for (Int_t j=0;j<K_N_LMD_CHAMS_PER_LAYER;j++) {
01086 for(Int_t ik=0;ik<2;ik++) {
01087 Int_t jk = ik*K_N_LMD_CHAMS_PER_LAYER + j;
01088 if(lmd_all_mapadctdc[jk]) lmd_all_mapadctdc[jk]->Reset();
01089 if(lmd_all_adc_tdc[jk]) lmd_all_adc_tdc[jk]->Reset();
01090 if(lmd_all_dhits[jk]) lmd_all_dhits[jk]->Reset();
01091 if(lmd_all_dhits_tdc_dopp[jk]) lmd_all_dhits_tdc_dopp[jk]->Reset();
01092 if(lmd_all_dhits_tdc_cell[jk]) lmd_all_dhits_tdc_cell[jk]->Reset();
01093 if(lmd_all_dhits_adc_dopp[jk]) lmd_all_dhits_adc_dopp[jk]->Reset();
01094 if(lmd_all_dhits_adc_cell[jk]) lmd_all_dhits_adc_cell[jk]->Reset();
01095 if(lmd_all_adce[jk]) lmd_all_adce[jk]->Reset();
01096 if(lmd_all_adcp[jk]) lmd_all_adcp[jk]->Reset();
01097 if(lmd_all_mul[jk]) lmd_all_mul[jk]->Reset();
01098 if(lmd_all_aepat[jk]) lmd_all_aepat[jk]->Reset();
01099 if(lmd_all_appat[jk]) lmd_all_appat[jk]->Reset();
01100 if(lmd_all_tepat[jk]) lmd_all_tepat[jk]->Reset();
01101 if(lmd_all_tppat[jk]) lmd_all_tppat[jk]->Reset();
01102 if(lmd_all_crg[jk]) lmd_all_crg[jk]->Reset();
01103 if(lmd_all_vp[jk]) lmd_all_vp[jk]->Reset();
01104 if(lmd_all_zet[jk]) lmd_all_zet[jk]->Reset();
01105 if(lmd_all_adc[jk]) lmd_all_adc[jk]->Reset();
01106 if(lmd_all_tdce[jk]) lmd_all_tdce[jk]->Reset();
01107 if(lmd_all_tdcp[jk]) lmd_all_tdcp[jk]->Reset();
01108 if(lmd_all_tdf[jk]) lmd_all_tdf[jk]->Reset();
01109 if(lmd_all_tmean[jk]) lmd_all_tmean[jk]->Reset();
01110 if(lmd_all_tdc[jk]) lmd_all_tdc[jk]->Reset();
01111 }
01112
01113 for (Int_t l=0;l<(K_N_LMD_INNER_WIRES+K_N_LMD_OUTER_WIRES);l++) {
01114 Int_t k = l+j*(K_N_LMD_INNER_WIRES+K_N_LMD_OUTER_WIRES);
01115 if(lmdadce[k]) lmdadce[k]->Reset();
01116 if(lmdadcp[k]) lmdadcp[k]->Reset();
01117 if(lmdcrg[k]) lmdcrg[k]->Reset();
01118 if(lmdzet[k]) lmdzet[k]->Reset();
01119
01120 if(lmdtdce[k]) lmdtdce[k]->Reset();
01121 if(lmdtdcp[k]) lmdtdcp[k]->Reset();
01122 if(lmdtdf[k]) lmdtdf[k]->Reset();
01123 if(lmdtmean[k]) lmdtmean[k]->Reset();
01124
01125 }
01126 }
01127
01128 }
01129
01130
01131 void TFndLmdMon::WriteToFile(TString file,Bool_t IsShared) {
01132
01133
01134 if(IsShared){
01135
01136 mlmd->cd();
01137 }
01138 else{
01139 if(file.IsNull())
01140 flmd->cd();
01141 else {
01142 fout = new TFile(file.Data(),"RECREATE","Lmd Histogram File");
01143 fout->cd();
01144 }
01145 }
01146
01147 if(lmdmult) lmdmult->Write();
01148 if(lmdmult_good) lmdmult_good->Write();
01149 if(lmd_i_o_mult) lmd_i_o_mult->Write();
01150 if(lmdmap) lmdmap->Write();
01151 if(lmdmap_good) lmdmap_good->Write();
01152 if(lmdmapadc0) lmdmapadc0->Write();
01153 if(lmdmapadc) lmdmapadc->Write();
01154 if(lmdmapadce) lmdmapadce->Write();
01155 if(lmdmapadcp) lmdmapadcp->Write();
01156 if(lmdmaptdc0) lmdmaptdc0->Write();
01157 if(lmdmaptdc) lmdmaptdc->Write();
01158 if(lmdmaptdce) lmdmaptdce->Write();
01159 if(lmdmaptdcp) lmdmaptdcp->Write();
01160
01161 for (Int_t ji=0;ji<K_N_LMD_LAYERS;ji++) {
01162 for (Int_t j=0;j<K_N_LMD_CHAMS_PER_LAYER;j++) {
01163 Int_t id = K_N_LMD_CHAMS_PER_LAYER*ji + j;
01164 lmd_all_mapadctdc[id]->Write();
01165 lmd_all_adc_tdc[id]->Write();
01166 lmd_all_dhits[id]->Write();
01167 lmd_all_dhits_tdc_dopp[id]->Write();
01168 lmd_all_dhits_tdc_cell[id]->Write();
01169 lmd_all_dhits_adc_dopp[id]->Write();
01170 lmd_all_dhits_adc_cell[id]->Write();
01171 lmd_all_mul[id]->Write();
01172 }
01173 }
01174
01175 for(Int_t kk=0;kk<K_N_LMD_LAYERS;kk++) {
01176 Int_t nwires = 12 + kk*10;
01177
01178
01179 if(IsShared){
01180
01181 mlmd_adc[kk]->cd();
01182
01183
01184 }
01185 for (Int_t jj=0;jj<K_N_LMD_CHAMS_PER_LAYER;jj++) {
01186 Int_t j = K_N_LMD_CHAMS_PER_LAYER*kk+jj;
01187 lmd_all_adce[j]->Write();
01188 lmd_all_adcp[j]->Write();
01189
01190 Int_t nwir = K_N_LMD_INNER_WIRES;
01191 if(kk==1) nwir = K_N_LMD_OUTER_WIRES;
01192 lmd_all_crg[j]->Write();
01193 lmd_all_vp[j]->Write();
01194 lmd_all_zet[j]->Write();
01195 lmd_all_adc[j]->Write();
01196 lmd_all_aepat[j]->Write();
01197 lmd_all_appat[j]->Write();
01198
01199 for (Int_t l=0;l<nwires;l++) {
01200 Int_t k = K_N_LMD_INNER_WIRES*K_N_LMD_CHAMS_PER_LAYER*kk+l+jj*nwires;
01201 lmdadce[k]->Write();
01202 lmdadcp[k]->Write();
01203 lmdcrg[k]->Write();
01204 lmdzet[k]->Write();
01205 }
01206 }
01207
01208
01209 if(IsShared) mlmd_tdc[kk]->cd();
01210
01211 for (Int_t jk=0;jk<K_N_LMD_CHAMS_PER_LAYER;jk++) {
01212 Int_t ij = K_N_LMD_CHAMS_PER_LAYER*kk+jk;
01213 lmd_all_tdce[ij]->Write();
01214 lmd_all_tdcp[ij]->Write();
01215 lmd_all_tdf[ij]->Write();
01216 lmd_all_tmean[ij]->Write();
01217 lmd_all_tdc[ij]->Write();
01218 lmd_all_tepat[ij]->Write();
01219 lmd_all_tppat[ij]->Write();
01220
01221 for (Int_t l=0;l<nwires;l++) {
01222 Int_t k = K_N_LMD_INNER_WIRES*K_N_LMD_CHAMS_PER_LAYER*kk+l+jk*nwires;
01223
01224 lmdtdce[k]->Write();
01225 lmdtdcp[k]->Write();
01226 lmdtdf[k]->Write();
01227 lmdtmean[k]->Write();
01228 }
01229 }
01230 }
01231
01232
01233
01234
01235
01236
01237
01238
01239
01240
01241
01242
01243
01244
01245
01246
01247
01248
01249
01250
01251
01252
01253
01254
01255
01256
01257
01258
01259
01260
01261
01262
01263
01264
01265
01266
01267
01268
01269
01270
01271
01272
01273
01274
01275
01276
01277
01278 }
01279
01280
01281 void TFndLmdMon::TimeCalibration(Int_t layer, Int_t dch, Int_t wire, Float_t scal_fac){
01282
01283
01284
01285
01286
01287
01288
01289
01290
01291
01292
01293
01294
01295
01296
01297
01298
01299
01300
01301
01302
01303
01304
01305
01306
01307
01308
01309
01310
01311
01312
01313
01314
01315
01316
01317
01318
01319
01320
01321
01322
01323
01324
01325
01326
01327
01328
01329
01330
01331
01332
01333
01334
01335
01336
01337
01338
01339
01340
01341
01342
01343
01344
01345
01346
01347
01348
01349
01350
01351
01352
01353
01354
01355
01356
01357
01358
01359
01360
01361
01362
01363
01364
01365
01366
01367
01368
01369 }
01370
01371
01372 void TFndLmdMon::TimeCalibration(Int_t layer, Int_t dch, Float_t scal_fac){
01373
01374
01375
01376
01377
01378
01379
01380
01381
01382
01383
01384
01385
01386
01387 }
01388
01389
01390 void TFndLmdMon::TimeCalibration(Float_t scal_fac){
01391
01392 for(Int_t i=1; i<=K_N_LMD_LAYERS; i++)
01393 for(Int_t j=1; j<=K_N_LMD_CHAMS_PER_LAYER; j++)
01394 TimeCalibration(i,j,scal_fac);
01395 }
01396
01397
01398 void TFndLmdMon::ChargeCalibration(Int_t layer, Int_t dch, Int_t wire){
01399
01400
01401
01402
01403
01404
01405
01406
01407
01408
01409
01410
01411
01412
01413
01414
01415
01416
01417
01418
01419
01420
01421
01422
01423
01424
01425
01426
01427
01428
01429
01430
01431
01432
01433
01434
01435
01436
01437
01438
01439
01440
01441
01442
01443
01444
01445
01446
01447
01448
01449
01450
01451
01452 }
01453
01454
01455 void TFndLmdMon::ChargeCalibration(Int_t layer, Int_t dch){
01456
01457
01458
01459
01460
01461
01462
01463
01464
01465
01466
01467
01468
01469
01470 }
01471
01472
01473 void TFndLmdMon::ChargeCalibration(){
01474 for(Int_t i=1; i<=K_N_LMD_LAYERS; i++)
01475 for(Int_t j=1; j<=K_N_LMD_CHAMS_PER_LAYER; j++)
01476 ChargeCalibration(i,j);
01477 }
01478
01479
01480 void TFndLmdMon::PedestalsEvaluation(){
01481
01482
01483
01484
01485
01486
01487
01488
01489
01490
01491
01492
01493
01494
01495
01496
01497
01498
01499
01500
01501
01502 }
01503
01504
01505 void TFndLmdMon::WritePedestalsToMsql(){
01506
01507
01508
01509
01510
01511
01512
01513
01514
01515
01516
01517
01518
01519
01520
01521
01522
01523
01524
01525
01526
01527
01528
01529
01530
01531
01532
01533
01534
01535
01536
01537
01538
01539
01540
01541
01542
01543
01544
01545
01546
01547
01548
01549
01550
01551
01552
01553
01554
01555
01556
01557
01558
01559
01560
01561
01562
01563
01564
01565
01566
01567
01568
01569
01570 }
01571
01572
01573 void TFndLmdMon::WritePedestalsToMsql(Int_t runtime){
01574
01575
01576
01577
01578
01579
01580
01581
01582
01583
01584
01585
01586
01587
01588
01589
01590
01591
01592
01593
01594
01595
01596
01597
01598
01599
01600
01601
01602
01603
01604
01605
01606
01607
01608
01609
01610
01611 }
01612
01613
01614 void TFndLmdMon::WriteTimeToMsql(Int_t runtime,Char_t *ev_type){
01615
01616
01617
01618
01619
01620
01621
01622
01623
01624
01625
01626
01627
01628
01629
01630
01631
01632
01633
01634
01635
01636
01637
01638
01639
01640
01641
01642
01643
01644
01645
01646
01647
01648
01649
01650
01651
01652
01653
01654
01655 }
01656
01657
01658 void TFndLmdMon::WriteChargeToMsql(){
01659
01660
01661
01662
01663
01664
01665
01666
01667
01668
01669
01670
01671
01672
01673
01674
01675
01676
01677
01678
01679
01680
01681
01682
01683
01684
01685
01686
01687
01688
01689
01690
01691
01692
01693
01694
01695
01696
01697
01698
01699
01700
01701
01702
01703
01704
01705
01706
01707
01708
01709
01710
01711
01712
01713
01714
01715 }
01716
01717
01718 void TFndLmdMon::WriteChargeToMsql(Int_t runtime){
01719
01720
01721
01722
01723
01724
01725
01726
01727
01728
01729
01730
01731
01732
01733
01734
01735
01736
01737
01738
01739
01740
01741
01742
01743
01744
01745
01746
01747
01748
01749
01750
01751
01752 }
01753
01754
01755 void TFndLmdMon::Add(TFndLmdMon *lmdmon) {
01756
01757 for (Int_t i=0;i<K_N_LMD_LAYERS;i++) {
01758 for (Int_t j=0;j<K_N_LMD_CHAMS_PER_LAYER;j++) {
01759 Int_t nwire = K_N_LMD_INNER_WIRES;
01760 if(i == 1) nwire = K_N_LMD_OUTER_WIRES;
01761 Int_t idx1 = j+i*K_N_LMD_CHAMS_PER_LAYER;
01762 lmd_all_mapadctdc[idx1]->Add((const TH2 *) lmdmon->LmdAllMapAdcTdc(idx1));
01763 lmd_all_adc[idx1]->Add((const TH2 *) lmdmon->LmdAllAdc(idx1));
01764 lmd_all_adce[idx1]->Add((const TH1 *) lmdmon->LmdAllAdcE(idx1));
01765 lmd_all_adcp[idx1]->Add((const TH1 *) lmdmon->LmdAllAdcP(idx1));
01766 lmd_all_adc_tdc[idx1]->Add((const TH2 *) lmdmon->LmdAllAdcTdc(idx1));
01767 lmd_all_mul[idx1]->Add((const TH1 *) lmdmon->LmdAllMul(idx1));
01768 lmd_all_aepat[idx1]->Add((const TH1 *) lmdmon->LmdAllAdcEPat(idx1));
01769 lmd_all_appat[idx1]->Add((const TH1 *) lmdmon->LmdAllAdcPPat(idx1));
01770 lmd_all_tepat[idx1]->Add((const TH1 *) lmdmon->LmdAllTdcEPat(idx1));
01771 lmd_all_tppat[idx1]->Add((const TH1 *) lmdmon->LmdAllTdcPPat(idx1));
01772 lmd_all_crg[idx1]->Add((const TH1 *) lmdmon->LmdAllCrg(idx1));
01773 lmd_all_zet[idx1]->Add((const TH2 *) lmdmon->LmdAllZet(idx1));
01774
01775 lmd_all_tdc[idx1]->Add((const TH2 *) lmdmon->LmdAllTdc(idx1));
01776 lmd_all_tdce[idx1]->Add((const TH1 *) lmdmon->LmdAllTdcE(idx1));
01777 lmd_all_tdcp[idx1]->Add((const TH1 *) lmdmon->LmdAllTdcP(idx1));
01778 lmd_all_tdf[idx1]->Add((const TH1 *) lmdmon->LmdAllTdf(idx1));
01779 lmd_all_tmean[idx1]->Add((const TH1 *) lmdmon->LmdAllTmean(idx1));
01780
01781 for (Int_t l=0;l<nwire;l++) {
01782 Int_t idx = l + j * nwire + i *K_N_LMD_INNER_WIRES * K_N_LMD_CHAMS_PER_LAYER;
01783 lmdadce[idx]->Add((const TH1 *) lmdmon->LmdAdcE(idx));
01784 lmdadcp[idx]->Add((const TH1 *) lmdmon->LmdAdcP(idx));
01785 lmdcrg[idx]->Add((const TH1 *) lmdmon->LmdCrg(idx));
01786 lmdzet[idx]->Add((const TH1 *) lmdmon->LmdZet(idx));
01787
01788 lmdtdce[idx]->Add((const TH1 *) lmdmon->LmdTdcE(idx));
01789 lmdtdcp[idx]->Add((const TH1 *) lmdmon->LmdTdcP(idx));
01790 lmdtmean[idx]->Add((const TH1 *) lmdmon->LmdTmean(idx));
01791 lmdtdf[idx]->Add((const TH1 *) lmdmon->LmdTdf(idx));
01792 }
01793 }
01794 }
01795 }
01796
01797
01798
01799
01801
01802
01803
01804
01805
01806
01809
01810
01811
01812
01813
01814
01815
01816
01817
01818
01819
01820
01821
01822
01823
01824
01825
01826
01827
01828
01829
01830
01831
01832
01833
01834
01835
01836
01837
01838
01839
01840
01841
01842
01843
01844
01845
01846
01847
01848
01849
01850
01851
01852
01853
01854
01855
01856
01857
01858
01859
01860
01861
01862
01863
01864
01865
01866
01867
01868
01869
01870
01871
01872
01873
01874
01875
01876
01877
01878
01879
01880
01881
01882
01883
01884
01885
01886
01887
01888
01889
01890
01891
01892
01893
01894
01897
01898
01899
01900