From 13493d00e5658ee47fa2c8e02446931a560cf608 Mon Sep 17 00:00:00 2001 From: mbsdaq Date: Wed, 11 Sep 2024 20:52:56 +0300 Subject: [PATCH] Some changes in histogram filling --- TNeEvent.cxx | 4 +++- TNeProc.cxx | 13 +++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/TNeEvent.cxx b/TNeEvent.cxx index 922c73e..39ebba5 100644 --- a/TNeEvent.cxx +++ b/TNeEvent.cxx @@ -32,7 +32,9 @@ void TNeEvent::Clear(Option_t *t) //================================================================== // SQ memset(T1xa, 0, sizeof(T1xa)); - memset(T1xa, 0, sizeof(T1xa)); + memset(T1xt, 0, sizeof(T1xt)); + memset(T1ya, 0, sizeof(T1ya)); + memset(T1yt, 0, sizeof(T1yt)); // ToF memset(F3, 0, sizeof(F3)); diff --git a/TNeProc.cxx b/TNeProc.cxx index fdaa02d..934fef4 100644 --- a/TNeProc.cxx +++ b/TNeProc.cxx @@ -115,13 +115,13 @@ TNeProc::TNeProc(const char* name) : TGo4EventProcessor(name) d1T1xa[i] = MakeTH1('I', Form("T1xa/T1xas_%2.2d",i) //указывать не повторяющуюся структуру папок и уникальные имена , Form("T1 x amp CH %2.2d",i), 8192, 0., 8192.); d1T1xt[i] = MakeTH1('I', Form("T1xt/T1xts_%2.2d",i) - , Form("T1 x time CH %2.2d",i), 4096, 0., 4095.); + , Form("T1 x time CH %2.2d",i), 4096, 1., 4096); d1T1xc[i] = MakeTH1('D', Form("T1xc/T1xcs_%2.2d",i) , Form("T1 x energy MeV %2.2d",i), 4000, -2., 98.); d1T1ya[i] = MakeTH1('I', Form("T1ya/T1yas_%2.2d",i) //указывать не повторяющуюся структуру папок и уникальные имена , Form("T1 x amp CH %2.2d",i), 8192, 0., 8192.); d1T1yt[i] = MakeTH1('I', Form("T1yt/T1yts_%2.2d",i) - , Form("T1 x time CH %2.2d",i), 4096, 0., 4095.); + , Form("T1 x time CH %2.2d",i), 4096, 1, 4096); d1T1yc[i] = MakeTH1('D', Form("T1yc/T1ycs_%2.2d",i) , Form("T1 x energy MeV %2.2d",i), 4000, -2., 98.); } @@ -192,6 +192,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target) TGo4Analysis *go4 = TGo4Analysis::Instance(); TNeEvent* NeEvent = (TNeEvent*) target; + target->Clear(); TGo4MbsSubEvent* psubevt; TGo4MbsEvent* fInput = (TGo4MbsEvent* ) GetInputEvent(); @@ -477,11 +478,11 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target) switch (module_id) { case 3: // mTDC: time sect & rings p1 - chnl= (idata[n] >> 16)&0x1f; + chnl= (idata[n] >> 16)&0x3f; adc = idata[n] & 0xfff; //only 12 bits if(chnl<16) { NeEvent->T1xt[chnl] = adc; - } else { + } else if(chnl<32) { NeEvent->T1yt[chnl-16] = adc; } break; @@ -623,9 +624,9 @@ ToF = (tf5 - tf3)*0.015625 + 68.475; } } for (n=0; n<16; ++n) { - d1T1xa[n]->Fill(NeEvent->T1xa[n]); + if(NeEvent->T1xt[n]>0) d1T1xa[n]->Fill(NeEvent->T1xa[n]); d1T1xt[n]->Fill(NeEvent->T1xt[n]); - d1T1ya[n]->Fill(NeEvent->T1ya[n]); + if(NeEvent->T1yt[n]>0) d1T1ya[n]->Fill(NeEvent->T1ya[n]); d1T1yt[n]->Fill(NeEvent->T1yt[n]); hT1a->Fill(NeEvent->T1xa[n],n); hT1a->Fill(NeEvent->T1ya[n],n+16); -- 2.18.1