diff --git a/StRoot/StAnalysisUtilities/StHistUtil.cxx b/StRoot/StAnalysisUtilities/StHistUtil.cxx index 3d12eda3d6c..586a9a6ac15 100644 --- a/StRoot/StAnalysisUtilities/StHistUtil.cxx +++ b/StRoot/StAnalysisUtilities/StHistUtil.cxx @@ -960,11 +960,17 @@ Int_t StHistUtil::DrawHists(const Char_t *dirName) { } else graphPad->cd(m_QAShiftMode ? 0 : curPad); // set x & y grid off by default + TRegexp bsmdPerModule("bsmd.*PerModule"); gPad->SetGridy(0); if (oName.Contains("H_matchCand")) { gPad->SetGridx(1); gStyle->SetGridStyle(6); gStyle->SetGridColor(kOrange); + } else if (oName.Contains(bsmdPerModule)) { + hobj->GetXaxis()->SetNdivisions(15); + hobj->GetXaxis()->SetLabelSize(0.03); + hobj->GetXaxis()->SetTitle("Module Number"); + gPad->SetGridx(); } else { gPad->SetGridx(0); gStyle->SetGridStyle(3); @@ -972,6 +978,7 @@ Int_t StHistUtil::DrawHists(const Char_t *dirName) { } // set stats to draw + TRegexp bsmd2DPerModule("bsmd.*Strip.*PerModule"); if (oName.Contains("TpcSector") || oName.Contains("PointRPTpc") || oName.Contains("PointXYTpc") || @@ -979,6 +986,10 @@ Int_t StHistUtil::DrawHists(const Char_t *dirName) { gStyle->SetOptStat(11); } else if (oName.Contains("NullPrim")) { gStyle->SetOptStat(1111); + } else if (oName.Contains(bsmd2DPerModule)) { + gStyle->SetOptStat(0); + hobj->GetYaxis()->SetTitle("Strip Within Module"); + hobj->GetYaxis()->SetTitleOffset(1.4); } else { gStyle->SetOptStat(111111); } diff --git a/StRoot/St_QA_Maker/QAhlist_logy.h b/StRoot/St_QA_Maker/QAhlist_logy.h index e97516d24f6..eceb4f200cc 100644 --- a/StRoot/St_QA_Maker/QAhlist_logy.h +++ b/StRoot/St_QA_Maker/QAhlist_logy.h @@ -299,6 +299,8 @@ "bemcAdc", "bsmdeAdc", "bsmdpAdc", + "bsmdeEnergy", + "bsmdpEnergy", "bemcClNum", "bemcClEnergy", "EmcCat4_Point_Energy", diff --git a/StRoot/St_QA_Maker/QAhlist_subsystems.h b/StRoot/St_QA_Maker/QAhlist_subsystems.h index 293969651bb..fec9da22bf7 100644 --- a/StRoot/St_QA_Maker/QAhlist_subsystems.h +++ b/StRoot/St_QA_Maker/QAhlist_subsystems.h @@ -75,12 +75,26 @@ ":emc:bprsEnergy2D", ":emc:bprsAdc", ":emc:bprsEnergy", + ":bsmd:bsmdeWest1HitsPerModule", + ":bsmd:bsmdeWest1StripHitsPerModule", + ":bsmd:bsmdeWest2HitsPerModule", + ":bsmd:bsmdeWest2StripHitsPerModule", + ":bsmd:bsmdeEast1HitsPerModule", + ":bsmd:bsmdeEast1StripHitsPerModule", + ":bsmd:bsmdeEast2HitsPerModule", + ":bsmd:bsmdeEast2StripHitsPerModule", + ":bsmd:bsmdpWest1HitsPerModule", + ":bsmd:bsmdpWest1StripHitsPerModule", + ":bsmd:bsmdpWest2HitsPerModule", + ":bsmd:bsmdpWest2StripHitsPerModule", + ":bsmd:bsmdpEast1HitsPerModule", + ":bsmd:bsmdpEast1StripHitsPerModule", + ":bsmd:bsmdpEast2HitsPerModule", + ":bsmd:bsmdpEast2StripHitsPerModule", ":bsmd:bsmdeHits", - ":bsmd:bsmdeEnergy2D", ":bsmd:bsmdeAdc", ":bsmd:bsmdeEnergy", ":bsmd:bsmdpHits", - ":bsmd:bsmdpEnergy2D", ":bsmd:bsmdpAdc", ":bsmd:bsmdpEnergy", ":emc:EmcNcluster", @@ -99,18 +113,6 @@ ":emc:bprsClEnergy", ":emc:bprsEta", ":emc:bprsPhi", - ":bsmd:bsmde_cluster", - ":bsmd:bsmde_cluster_energy", - ":bsmd:bsmdeClNum", - ":bsmd:bsmdeClEnergy", - ":bsmd:bsmdeEta", - ":bsmd:bsmdePhi", - ":bsmd:bsmdp_cluster", - ":bsmd:bsmdp_cluster_energy", - ":bsmd:bsmdpClNum", - ":bsmd:bsmdpClEnergy", - ":bsmd:bsmdpEta", - ":bsmd:bsmdpPhi", ":emc:EmcCat1_Point_Energy", ":emc:EmcCat1_Point_Eta", ":emc:EmcCat1_Point_Phi", diff --git a/StRoot/St_QA_Maker/StEventQAMaker.cxx b/StRoot/St_QA_Maker/StEventQAMaker.cxx index b25f8942723..b053f2346ea 100644 --- a/StRoot/St_QA_Maker/StEventQAMaker.cxx +++ b/StRoot/St_QA_Maker/StEventQAMaker.cxx @@ -2059,13 +2059,17 @@ void StEventQAMaker::MakeHistEMC() { if(module) { StSPtrVecEmcRawHit& rawHit=module->hits(); - Int_t m,e,s,adc; + Int_t m,e,s,adc,sId,stripInMod; Float_t eta(0),phi(0),E(0); nh += rawHit.size(); for(UInt_t k=0;kmodule(); e = rawHit[k]->eta(); s = rawHit[k]->sub(); + emcGeom[i]->getId(m, e, s, sId); + stripInMod = sId % 150; // only used for BSMD + if (stripInMod==0) stripInMod=150; + // cout << "strip Id = " << sId << ", strip in Module = " << stripInMod << endl; if (s == -1) s = 1; // case of smde adc = rawHit[k]->adc(); E = rawHit[k]->energy(); @@ -2075,6 +2079,21 @@ void StEventQAMaker::MakeHistEMC() { hists->m_emc_energy2D[i]->Fill(eta,phi,E); hists->m_emc_adc[i]->Fill(float(adc)); hists->m_emc_energy[i]->Fill(E); + + if (i>1) { // BSMD module hists + + Int_t modIndex = (m-1)/30; + Int_t histIndex = modIndex; + if (i>2) histIndex = modIndex + 4; + + hists->m_emc_hits_per_module[histIndex]->Fill(m); + hists->m_emc_energy_per_module[histIndex]->Fill(m,E); + hists->m_emc_strip_hits_per_module[histIndex]->Fill(m,stripInMod); + hists->m_emc_strip_energy_per_module[histIndex]->Fill(m,stripInMod,E); + + } + + energy += E; } } diff --git a/StRoot/St_QA_Maker/StQABookHist.cxx b/StRoot/St_QA_Maker/StQABookHist.cxx index 042f1ae8cdf..0581c446b85 100644 --- a/StRoot/St_QA_Maker/StQABookHist.cxx +++ b/StRoot/St_QA_Maker/StQABookHist.cxx @@ -771,6 +771,14 @@ StQABookHist::StQABookHist(const char* type) : QAHistType(type) { m_emc_energy[i]=0; //! } +// for EMC-BSMD hits + for (i=0; i<8; i++) { + m_emc_hits_per_module[i]=0; //! + m_emc_energy_per_module[i]=0; //! + m_emc_strip_hits_per_module[i]=0; //! + m_emc_strip_energy_per_module[i]=0; //! + } + // for EMC cluster finder m_emc_ncl=0; //! m_emc_etotCl=0; //! @@ -2014,6 +2022,12 @@ void StQABookHist::BookHistEMC(){ const Char_t* tit={"Barrel"}; const Int_t nx[4] = {40,40,300,20}; const Int_t ny[4] = {120, 120, 60, 900}; + + // for BSMD per-module histos + Axis_t ModNumLo[4] = {1.,31.,61.,91.}; + Axis_t ModNumHi[4] = {31.,61.,91.,121.}; + const TString PerModuleHistName[4] = {"West1","West2","East1","East2"}; + Float_t rpi = M_PI + 0.00001; TString name, title; TArrayD *xb = StEmcMath::binForSmde(); @@ -2025,7 +2039,7 @@ void StQABookHist::BookHistEMC(){ else m_emc_hits[i] = QAH::H2F(name,title, nx[i],-1.,+1., ny[i],-rpi, rpi); name = detname[i] + "Energy2D"; - title = tit + detname[i] + " energy dist. in eta&phi"; + title = tit + detname[i] + " energy dist. in eta-phi"; if(i==2) m_emc_energy2D[i] = QAH::H2F(name,title, xb->GetSize()-1,xb->GetArray(), ny[i],-rpi,rpi); else m_emc_energy2D[i] = QAH::H2F(name,title, nx[i],-1.,+1., ny[i],-rpi, rpi); @@ -2039,6 +2053,30 @@ void StQABookHist::BookHistEMC(){ } delete xb; + for(Int_t i=2; i<4; i++){ // Detector ID for BSMDE and BSMDP (BSMD eta and phi) + for (Int_t j=0; j<4; j++){ // split 120 modules into 4 histos + + Int_t k = j; + if (i>2) k = j + 4; + + name = detname[i] + PerModuleHistName[j] + "HitsPerModule"; + title = tit + detname[i] + " " + PerModuleHistName[j] + " - hits per module"; + m_emc_hits_per_module[k] = QAH::H1F(name,title, 30, ModNumLo[j], ModNumHi[j]); + + name = detname[i] + PerModuleHistName[j] + "EnergyPerModule"; + title = tit + detname[i] + " " + PerModuleHistName[j] + " - energy-weighted hits per module"; + m_emc_energy_per_module[k] = QAH::H1F(name,title, 30, ModNumLo[j], ModNumHi[j]); + + name = detname[i] + PerModuleHistName[j] + "StripHitsPerModule"; + title = tit + detname[i] + " " + PerModuleHistName[j] + " - hits in strip (within mod) vs. mod"; + m_emc_strip_hits_per_module[k] = QAH::H2F(name,title, 30, ModNumLo[j], ModNumHi[j], 150, 1., 151.); + + name = detname[i] + PerModuleHistName[j] + "StripEnergyPerModule"; + title = tit + detname[i] + " " + PerModuleHistName[j] + " - energy in strip (within mod) vs. mod"; + m_emc_strip_energy_per_module[k] = QAH::H2F(name,title, 30, ModNumLo[j], ModNumHi[j], 150, 1., 151.); + } + } + // Book the hists for cluster finder Int_t greta[4]={40,40,300,20}; // eta bins Int_t grphi[4]={120,120,60,900}; // phi bins => 16-apr by PAI diff --git a/StRoot/St_QA_Maker/StQABookHist.h b/StRoot/St_QA_Maker/StQABookHist.h index 552d33b0794..f151c6055dc 100644 --- a/StRoot/St_QA_Maker/StQABookHist.h +++ b/StRoot/St_QA_Maker/StQABookHist.h @@ -658,6 +658,10 @@ class StQABookHist : public TObject { TH2F *m_emc_energy2D[4]; //! TH1F *m_emc_adc[4]; //! TH1F *m_emc_energy[4]; //! + TH1F *m_emc_hits_per_module[8]; // SM added for BSMD eta and phi, West and East Barrels, split into 30 modules each + TH1F *m_emc_energy_per_module[8]; // SM added for BSMD eta and phi, West and East Barrels, split into 30 modules each + TH2F *m_emc_strip_hits_per_module[8]; // SM added for BSMD eta and phi, West and East Barrels, split into 30 modules each + TH2F *m_emc_strip_energy_per_module[8]; // SM added for BSMD eta and phi, West and East Barrels, split into 30 modules each // Hists for EMC cluster finder TH2F *m_emc_ncl; //!