diff --git a/NPLib/Detectors/ComptonTelescope/TComptonTelescopeSpectra.cxx b/NPLib/Detectors/ComptonTelescope/TComptonTelescopeSpectra.cxx index 12c0c5c369065c889dc18c360a5fa5a0cde2cea3..bf6693dc9cdffe15e5346dd1d56537de02f70e72 100644 --- a/NPLib/Detectors/ComptonTelescope/TComptonTelescopeSpectra.cxx +++ b/NPLib/Detectors/ComptonTelescope/TComptonTelescopeSpectra.cxx @@ -337,6 +337,10 @@ void TComptonTelescopeSpectra::InitPhysicsSpectra() name = "CT"+NPL::itoa(i+1)+"_SUM_BIDIM"; AddHisto2D(name, name, 1400, 0, 1.4, 1000, 0, 500000, "COMPTONTELESCOPE/PHY/SUM_BIDIM"); + + // DELTAĆ T + name = "CT"+NPL::itoa(i+1)+"_DELTA_T"; + AddHisto1D(name, name, 2000, -1000, 1000, "COMPTONTELESCOPE/PHY/DELTA_T"); } } @@ -908,5 +912,14 @@ void TComptonTelescopeSpectra::FillPhysicsSpectra(TComptonTelescopePhysics* Phys } } + // DELTA T + for (unsigned int i = 0; i < fNumberOfTelescope; i++) { + name = "CT"+NPL::itoa(i+1)+"_DELTA_T"; + family = "COMPTONTELESCOPE/PHY/DELTA_T"; + for (vector<int>::iterator it = Physics->deltaT.begin(); it != Physics->deltaT.end(); ++it) { + FillSpectra(family, name, *it); + } + } + } diff --git a/Projects/ComptonTelescope/online/CanvasList.txt b/Projects/ComptonTelescope/online/CanvasList.txt index 17674119738f8a100a720686e532bc3d1ff7fbe7..6c49bb383d5bc5abde13a4dfe5258dacc712ee36 100644 --- a/Projects/ComptonTelescope/online/CanvasList.txt +++ b/Projects/ComptonTelescope/online/CanvasList.txt @@ -28,5 +28,5 @@ Canvas Canvas Path= ComptonTelescope - Divide= 1 1 - Histo= CT1_SUM_SPECTRUM + Divide= 2 2 + Histo= CT1_SUM_SPECTRUM CT1_DELTA_T CT1_RAW_SUM_BIDIM CT1_SUM_BIDIM diff --git a/Projects/ComptonTelescope/online/configs/ConfigComptonTelescope.dat b/Projects/ComptonTelescope/online/configs/ConfigComptonTelescope.dat index 8cbde818e92e90e9b6bde673d58a78c41afa1d72..f70468ddd860ff7eb5060b7980b83ee7b787f0cd 100644 --- a/Projects/ComptonTelescope/online/configs/ConfigComptonTelescope.dat +++ b/Projects/ComptonTelescope/online/configs/ConfigComptonTelescope.dat @@ -4,7 +4,8 @@ ConfigComptonTelescope FRONT_BACK_ENERGY_MATCHING_SIGMA 0.006 FRONT_BACK_ENERGY_MATCHING_NUMBER_OF_SIGMA 2 DISABLE_CHANNEL COMPTONTELESCOPE_D1_STRIP_FRONT21_E - DISABLE_CHANNEL COMPTONTELESCOPE_D1_STRIP_FRONT30_E + DISABLE_CHANNEL COMPTONTELESCOPE_D1_STRIP_BACK18_E + DISABLE_CHANNEL COMPTONTELESCOPE_D1_STRIP_BACK22_E STRIP_FRONT_E_RAW_THRESHOLD 0 STRIP_BACK_E_RAW_THRESHOLD 0 STRIP_FRONT_E_THRESHOLD 0.012 diff --git a/Projects/ComptonTelescope/online/src/online_coinc.cpp b/Projects/ComptonTelescope/online/src/online_coinc.cpp index 83a575a38fa2d3618f3f26e4125b69ce17c6e1c9..e9363bb9b9fa89a38088e47f06e7282c437ab516 100644 --- a/Projects/ComptonTelescope/online/src/online_coinc.cpp +++ b/Projects/ComptonTelescope/online/src/online_coinc.cpp @@ -17,10 +17,10 @@ #include "DecodeT.h" #define __TEST_ZONE__ -//#undef __TEST_ZONE__ +#undef __TEST_ZONE__ #define __USE_CUTG__ -#undef __USE_CUTG__ +//#undef __USE_CUTG__ #define __RESET_SEARCH__ #undef __RESET_SEARCH__ @@ -87,7 +87,7 @@ void setCTTracker(TComptonTelescopeData* ccamData, newframe_t* event, vector<int int main() { #ifdef __RESET_SEARCH__ - int resetCountSearch = 1000; + int resetCountSearch = 3; int timestampDiffSearch = 1000; int timestampNBins = 100; auto fout = new TFile("pipo.root", "recreate"); @@ -96,15 +96,12 @@ int main() timestampNBins, -timestampDiffSearch, timestampDiffSearch); #endif #ifdef __USE_CUTG__ -/* TFile* fcut = new TFile("/disk/proto-data/data/coinc-si/CUT_Compton.root"); + TFile* fcut = new TFile("/disk/proto-data/data/CUT_Compton.root"); TCutG* mcut = (TCutG*) fcut -> Get("CUT_Compton"); fcut -> Close(); cout << fcut << endl; cout << mcut << endl; - TCanvas* can = new TCanvas(); - can->cd(); - mcut->Draw();*/ - TCutG *mcut = new TCutG("CUT_Compton",7); +/* TCutG *mcut = new TCutG("CUT_Compton",7); mcut->SetVarX("Calor_E"); mcut->SetVarY("Half_Energy"); mcut->SetTitle("Graph"); @@ -115,7 +112,7 @@ int main() mcut->SetPoint(3,629341,0.02586437); mcut->SetPoint(4,627908.3,0.211152); mcut->SetPoint(5,540157.6,0.5981453); - mcut->SetPoint(6,526905.4,0.6145632); + mcut->SetPoint(6,526905.4,0.6145632);*/ #endif /////////////////////////////////////////////////////////////////////////// @@ -214,27 +211,27 @@ int main() cout << "Done" << endl; // Search for reset count in trigger data - int resetCount = 0; DT -> setRaw(tbuff); DT -> decodeBlobMFM(); + int resetCount = DT -> getResetCount(); while (not(DT->hasTrigged(2))) { DT -> decodeBlobMFM(); } - resetCount = DT->getResetCount(); + resetCount = DT->getResetCount() - resetCount; cout << "Found reset count: " << resetCount << endl; #ifdef __RESET_SEARCH__ // Fill control bidim for (int reset=-resetCountSearch; reset<resetCountSearch+1; reset++) { - int cr = /*-resetCount+*/reset; + int cr = resetCount+reset; cout << "Filling coincidence bidim with reset #" << cr << endl; DD -> rewind(); #else int cr = resetCount; #endif - DR -> setRaw(rbuff); + DR -> setRaw(rbuff); DR -> decodeBlobMFM(); DD -> decodeEvent(); @@ -245,7 +242,8 @@ int main() int td = DD -> getTime(); // int dt = 100; #ifdef __RESET_SEARCH__ - while(c < 1000) + while(DR -> getCursor() < rlen and DD -> getCursor() < dlen) + //while(c < 1000) { // cout << DR -> getTime() << " " << DD -> getTime() << endl; if (cr == cd) { @@ -258,8 +256,8 @@ int main() { if (cr == cd) { -// if (td-tr < 150 and tr-td < 10) { // That one is the real one - if (tr-td > 50 and tr-td < 1000) { // Same width, bad position + if (td-tr < 110 and td-tr > 0) { // That one is the real one +// if (tr-td > 50 and tr-td < 1000) { //DR -> Dump(); //DD -> Dump(); c++; @@ -278,7 +276,7 @@ int main() // Fill object in output ROOT file if (ccamPhys->EventMultiplicity > 0) { #ifdef __USE_CUTG__ - if (mcut->IsInside(ccamPhys->Calor_E[0], ccamPhys->Half_Energy[0])) { + if (mcut->IsInside(ccamPhys->Half_Energy[0], ccamPhys->Calor_E[0])) { //cout << "c" << endl; cc++; m_OutputTree->Fill();