Skip to content

Commit

Permalink
Merge branch 'main' into GMT
Browse files Browse the repository at this point in the history
  • Loading branch information
nigmatkulov authored Nov 27, 2024
2 parents 03408dd + 252a596 commit 7355aec
Show file tree
Hide file tree
Showing 149 changed files with 26,610 additions and 1,614 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
/StRoot/StEventUtilities/StRedoTracks* @genevb
/StRoot/StEventUtilities/StuFixTopoMap* @genevb
/StRoot/StEventUtilities/TwistPatch* @genevb
/StRoot/StFcs* @akioogawa @jdbrice
/StRoot/StFcs* @akioogawa @jdbrice @mrosales2016
/StRoot/StFms* @akioogawa
/StRoot/StFpd* @akioogawa
/StRoot/StFst* @jdbrice @sunxuhit @yezhenyu2003 @techuan-huang
Expand Down Expand Up @@ -85,7 +85,7 @@
/StRoot/StRHICf* @ggfdsa10
/StRoot/StRTSClient @jml985 @tonko-lj
/StRoot/StShadowMaker @genevb
/StRoot/StSpinPool @akioogawa @zlchang @veprbl
/StRoot/StSpinPool @akioogawa @zlchang @veprbl @mrosales2016
/StRoot/StSsd* @starsdong @plexoos
/StRoot/StSst* @starsdong @plexoos
/StRoot/StStarLogger @fisyak @R-Witt @iraklic
Expand Down
28 changes: 18 additions & 10 deletions OnlTools/Jevp/StJevpBuilders/fstBuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ void fstBuilder::event(daqReader *rdr)
}

PCP;
numTb = numTimeBin; //default: 9 timebins
numTb = numTb_default; //default: 9 timebins

//LOG("JEFF", "numbTB=%d", numTimeBin);

Expand Down Expand Up @@ -1401,6 +1401,12 @@ void fstBuilder::event(daqReader *rdr)
}
}
}
//set plotting range for time bin distributions
hEventSumContents.hMaxTimeBin_ZS->GetXaxis()->SetRangeUser(tb_plot_low, tb_plot_high);
hEventSumContents.hMaxTimeBin->GetXaxis()->SetRangeUser(tb_plot_low, tb_plot_high);
for(int index = 0; index < mTbVsAdcHist; index++) hTbVsAdcContents.tbVsAdcArray[index]->GetXaxis()->SetRangeUser(tb_plot_low, tb_plot_high);
for(int index = 0; index < mMaxTimeBinHist; index++) hMaxTimeBinContents.maxTimeBinArray[index]->GetXaxis()->SetRangeUser(tb_plot_low, tb_plot_high);
for(int glbElecApvIdx = 0 ; glbElecApvIdx < totAPV ; glbElecApvIdx++) hMaxTimeBinContents_APV.maxTimeBinArray_APV[glbElecApvIdx]->GetXaxis()->SetRangeUser(tb_plot_low, tb_plot_high);

PCP;

Expand Down Expand Up @@ -2060,10 +2066,11 @@ void fstBuilder::stoprun(daqReader *rdr)
}
}

double entriesTB_123=0, entriesTB_all=0, fraction = 1.0;
if(hMaxTimeBinContents.maxTimeBinArray[j]->GetEntries()>0) {
entriesTB_123 = hMaxTimeBinContents.maxTimeBinArray[j]->Integral(2, numTb-1);
entriesTB_all = hMaxTimeBinContents.maxTimeBinArray[j]->Integral(1, numTb);
double entriesTB_123=0, entriesTB_all=0, fraction = 0.;
entriesTB_all = hMaxTimeBinContents.maxTimeBinArray[j]->Integral(1, numTb);
//if(hMaxTimeBinContents.maxTimeBinArray[j]->Integral(1, numTb)>0) {
if(entriesTB_all>0.) {
entriesTB_123 = hMaxTimeBinContents.maxTimeBinArray[j]->Integral(numTb/2+1, numTb/2+1);
fraction = entriesTB_123/entriesTB_all;
if(fraction<maxTbFracOK) {
//LOG(U_FST,"maxTimeBinFraction::section RDO%d_ARM%d_GROUP%d with fraction %f!", rdoIdx, armIdx, portIdx, fraction);
Expand Down Expand Up @@ -2123,13 +2130,14 @@ void fstBuilder::stoprun(daqReader *rdr)
for(int armIdx=0; armIdx<ArmPerRdo; armIdx++){
for(int refApvIdx=0; refApvIdx<ApvPerArm; refApvIdx++){
int glbElecApvIdx = refApvIdx + armIdx*ApvPerArm + (rdoIdx-1)*ApvPerRdo; // 0-287
double entriesTB_123=0, entriesTB_all=0, fraction = 1.0;
if(hMaxTimeBinContents_APV.maxTimeBinArray_APV[glbElecApvIdx]->GetEntries()>0){
entriesTB_123 = hMaxTimeBinContents_APV.maxTimeBinArray_APV[glbElecApvIdx]->Integral(2, numTb-1);
entriesTB_all = hMaxTimeBinContents_APV.maxTimeBinArray_APV[glbElecApvIdx]->Integral(1, numTb);
double entriesTB_123=0, entriesTB_all=0, fraction = 0.;
entriesTB_all = hMaxTimeBinContents_APV.maxTimeBinArray_APV[glbElecApvIdx]->Integral(1, numTb);
//if(hMaxTimeBinContents_APV.maxTimeBinArray_APV[glbElecApvIdx]->GetEntries()>0){
if(entriesTB_all>0.){
entriesTB_123 = hMaxTimeBinContents_APV.maxTimeBinArray_APV[glbElecApvIdx]->Integral(numTb/2+1,numTb/2+1);
fraction = entriesTB_123/entriesTB_all;
}
hEventSumContents.hMaxTBfractionVsAPV_ZS->SetBinContent(glbElecApvIdx, fraction);
hEventSumContents.hMaxTBfractionVsAPV_ZS->SetBinContent(glbElecApvIdx+1, fraction);
}
}
}
Expand Down
9 changes: 6 additions & 3 deletions OnlTools/Jevp/StJevpBuilders/fstBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ class fstBuilder : public JevpBuilder {
static const int ApvNumOffset = 12; // APV RO number same as IST | used for APV number convertion
static const int ApvRoPerPort = 12; // APV RO number same as IST
static const int ApvRoPerArm = 24; // APV RO number same as IST

static const int numTimeBin = 9; // to be decided
static const int goodChCut = 64; // to be decided
static const int minPedVal = 200; // to be decided
Expand Down Expand Up @@ -129,6 +128,10 @@ class fstBuilder : public JevpBuilder {
static const float rStop[RstripPerMod];
static const float rDelta;

//Time Bin plots plot range
const float tb_plot_low = 0.;
const float tb_plot_high = 3.;

//FST mapping
int fstGeomMapping[totCh]; //FST channel mapping (electronics ID to geometry ID transform)
int fstElecMapping[totCh]; //FST channel mapping (geometry ID & electronics ID transform)
Expand All @@ -137,7 +140,7 @@ class fstBuilder : public JevpBuilder {
float fstPedestal[numTimeBin][totCh];
float fstRmsNoise[numTimeBin][totCh];
float fstRanNoise[numTimeBin][totCh];

//*** Histogram Declarations...
union {
TH2 *adcArray[1]; //ADC value of each module's channels (ADC value vs. channel index)
Expand Down Expand Up @@ -960,7 +963,7 @@ class fstBuilder : public JevpBuilder {

int sumHistogramsFilled;
int numTb;

const int numTb_default = 3;
JLatex* errorMsg;

ClassDef(fstBuilder, 1);
Expand Down
9 changes: 9 additions & 0 deletions OnlTools/Jevp/StJevpBuilders/fttBuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,17 @@ void fttBuilder::drawStrip( TH2 * h2, int row, int strip, VMMHardwareMap::Quadra

int ix0 = ax->FindBin( x0 + row * rLength );
int ix1 = ax->FindBin( x0 + (row + 1) * rLength - 1 );

/* This code does nothing! ----------------------
Most likely it was intended to adjust the indexes for this specific
region of the detector, but not known if needed; -jml 3/25/24
if ( VMMHardwareMap::Quadrant::C == q || VMMHardwareMap::Quadrant::D == q ){
int ix0 = ax->FindBin( x0 + (row - 1) * rLength );
int ix1 = ax->FindBin( x0 + (row) * rLength - 1 );
}
*/

const int iy0 = ay->FindBin( y0 + strip * sPitch );
const int iy1 = ay->FindBin( y0 + (strip) * sPitch );
floodFill( h2, ix0, iy0, ix1, iy1 );
Expand All @@ -459,10 +466,12 @@ void fttBuilder::drawStrip( TH2 * h2, int row, int strip, VMMHardwareMap::Quadra

int iy0 = ay->FindBin( y0 + row * rLength );
int iy1 = ay->FindBin( y0 + (row + 1) * rLength - 1 );
/* Does nothing, intened to adjust indexes?
if ( VMMHardwareMap::Quadrant::C == q || VMMHardwareMap::Quadrant::D == q ){
int iy0 = ay->FindBin( y0 + (row - 1) * rLength );
int iy1 = ay->FindBin( y0 + (row) * rLength - 1 );
}
*/
const int ix0 = ax->FindBin( x0 + strip * sPitch );
const int ix1 = ax->FindBin( x0 + (strip) * sPitch );
floodFill( h2, ix0, iy0, ix1, iy1 );
Expand Down
12 changes: 11 additions & 1 deletion OnlTools/Jevp/StJevpBuilders/mtdBuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,13 @@ void mtdBuilder::event(daqReader *rdr) {
int err1 = (int)(contents.MTD_Error1->GetEntries());
int err2 = (int)(contents.MTD_Error2->GetEntries());
int err3 = (int)(contents.MTD_Error3->GetEntries());

bool is_ignore = true;
for(int bin=1; bin<=contents.MTD_Error3->GetNbinsX(); bin++)
{
if(contents.MTD_Error3->GetBinContent(bin)>2)
is_ignore = false;
}

//error1 label
if(err1== 0) {
sprintf(t, "No electronics errors in %d events",nev);
Expand Down Expand Up @@ -703,6 +709,10 @@ void mtdBuilder::event(daqReader *rdr) {
sprintf(t, "No read out errors in %d events",nev);
MTD_Error3_label->SetTextColor(3);
}
else if(is_ignore) {
sprintf(t, "%d read out errors in %d events. Ignore!",err3, nev);
MTD_Error3_label->SetTextColor(4);
}
else {
sprintf(t, "%d read out errors in %d events!",err3, nev);
MTD_Error3_label->SetTextColor(2);
Expand Down
Loading

0 comments on commit 7355aec

Please sign in to comment.