diff --git a/NPAnalysis/SPcoincW1/Analysis.cxx b/NPAnalysis/SPcoincW1/Analysis.cxx index 746f915cb8f67f9f968b1707390805d651be35d0..88b7e30c5ec90b0463e54ff3f55ac6acf321357b 100644 --- a/NPAnalysis/SPcoincW1/Analysis.cxx +++ b/NPAnalysis/SPcoincW1/Analysis.cxx @@ -40,11 +40,12 @@ using namespace std; Analysis::Analysis() : m_cutg_SP_p(new TCutG), fEnergy(-1), - fTime(-1), fDetector(-1), fStripFront(-1), fStripBack(-1), - fBrho(-1) + fBrhoSingle(-1), + fBrhoCoinc(-1), + fTime(-10000) { } @@ -60,9 +61,13 @@ Analysis::~Analysis() //////////////////////////////////////////////////////////////////////////////// void Analysis::Init() { + // initialize branches with analysis information + InitOutputBranch(); + // Load graphical cuts TFile *fcutg = new TFile("./cuts/cutg_SelectionProtons.root"); - m_cutg_SP_p = (TCutG*) fcutg->Get("run34_plasppos"); + m_cutg_SP_p = (TCutG*) fcutg->Get("run108_plasppos"); + if (m_cutg_SP_p) m_cutg_SP_p->Print(); // Get Physical objects m_W1 = (TW1Physics*) m_DetectorManager->GetDetector("W1"); @@ -78,14 +83,25 @@ void Analysis::TreatEvent() Clear(); // select protons in SP (PlasticP vs Position) - if (!m_cutg_SP_p->IsInside(m_SP->GetPlasticG(), m_SP->GetPlasticP())) { + if (m_cutg_SP_p->IsInside(m_SP->GetPlasticG(), m_SP->GetPlasticP())) { + fBrhoSingle = m_SP->GetBrho(); // select multiplicity 1 for W1's if (m_W1->GetEventMultiplicity() == 1) { - // select good timing events - // calculate relative time between SP and W1 - Double_t time = 0; - // apply timing selection - if (time > 1150 && time < 1350) { + // select event in W1's + if (m_W1->GetFrontEnergy(0) > 0) { + // calculate relative time between SP and W1 + Double_t time = m_W1->GetFrontTime(0)- m_SP->GetTime2(); + fTime = time; + // W1 + fEnergy = m_W1->GetFrontEnergy(0); + fDetector = m_W1->GetDetectorNumber(0); + fStripFront = m_W1->GetFrontStrip(0); + fStripBack = m_W1->GetBackStrip(0); + // SP + fBrhoCoinc = m_SP->GetBrho(); + // apply timing selection + if (time > 160 && time < 280) { + } } } } @@ -105,12 +121,35 @@ void Analysis::Clear() { // W1's fEnergy = -1; - fTime = -1; fDetector = -1; fStripFront = -1; fStripBack = -1; // SP - fBrho = -1; + fBrhoSingle = -1; + fBrhoCoinc = -1; + // time + fTime = -10000; +} + + + +//////////////////////////////////////////////////////////////////////////////// +void Analysis::InitOutputBranch() +{ + RootOutput::getInstance()->GetTree()->Branch("fEnergy", &fEnergy, "fEnergy/D"); + RootOutput::getInstance()->GetTree()->Branch("fTime", &fTime, "fTime/D"); + RootOutput::getInstance()->GetTree()->Branch("fDetector", &fDetector, "fDetector/I"); + RootOutput::getInstance()->GetTree()->Branch("fStripFront", &fStripFront, "fStripFront/I"); + RootOutput::getInstance()->GetTree()->Branch("fStripBack", &fStripBack, "fStripBack/I"); + RootOutput::getInstance()->GetTree()->Branch("fBrhoSingle", &fBrhoSingle, "fBrhoSingle/D"); + RootOutput::getInstance()->GetTree()->Branch("fBrhoCoinc", &fBrhoSingle, "fBrhoCoinc/D"); +} + + + +//////////////////////////////////////////////////////////////////////////////// +void Analysis::InitInputBranch() +{ } diff --git a/NPAnalysis/SPcoincW1/Analysis.h b/NPAnalysis/SPcoincW1/Analysis.h index 7c37d44fe38fb9c82d0ebeedd78f445086de5aea..f4b76b6ce0965e4f83e59ae9824bfb4668a7e96c 100644 --- a/NPAnalysis/SPcoincW1/Analysis.h +++ b/NPAnalysis/SPcoincW1/Analysis.h @@ -26,6 +26,8 @@ // NPTool headers #include "TW1Physics.h" #include "TSplitPolePhysics.h" +#include "RootOutput.h" + // ROOT headers #include "TCutG.h" @@ -41,8 +43,10 @@ class Analysis: public NPL::VAnalysis void Init(); void TreatEvent(); void End(); - void Clear(); + + void InitInputBranch(); + void InitOutputBranch(); static NPL::VAnalysis* Construct(); private: @@ -55,12 +59,14 @@ class Analysis: public NPL::VAnalysis private: // W1's Double_t fEnergy; - Double_t fTime; Int_t fDetector; Int_t fStripFront; Int_t fStripBack; // SP - Double_t fBrho; + Double_t fBrhoSingle; + Double_t fBrhoCoinc; + // time + Double_t fTime; }; #endif diff --git a/NPAnalysis/SPcoincW1/RunToTreat.txt b/NPAnalysis/SPcoincW1/RunToTreat.txt index 9e15e7ee2e9c5288c6a4383b3b1823b5b1201e47..62739fccda2107e964b540d01cd9fd47616eb90a 100644 --- a/NPAnalysis/SPcoincW1/RunToTreat.txt +++ b/NPAnalysis/SPcoincW1/RunToTreat.txt @@ -5,6 +5,6 @@ RootFileName % /scratch/gypaos/data/al27pp/oct2015/midas/root/R50_0_W1only.root % /scratch/gypaos/data/al27pp/oct2015/midas/root/R50_0_SPonly.root % /scratch/gypaos/data/al27pp/oct2015/midas/root/R50_0.root -% /scratch/gypaos/data/al27pp/oct2015/midas/root/R131_0.root +% /scratch/gypaos/data/al27pp/oct2015/midas/root/R131_0_test.root /scratch/gypaos/data/al27pp/oct2015/midas/root/R108_0_test.root diff --git a/NPAnalysis/SPcoincW1/calibs/W1CalibrationAfter.txt b/NPAnalysis/SPcoincW1/calibs/W1CalibrationAfter.txt deleted file mode 100644 index 23d198ecc65d51b70f24b5448473dde7e50b4dce..0000000000000000000000000000000000000000 --- a/NPAnalysis/SPcoincW1/calibs/W1CalibrationAfter.txt +++ /dev/null @@ -1,189 +0,0 @@ -W1_D1_FRONT0_E -0.0409549 0.00313435 -W1_D1_FRONT1_E -0.0410288 0.00310898 -W1_D1_FRONT2_E -0.051105 0.00306224 -W1_D1_FRONT3_E -0.0426837 0.00306197 -W1_D1_FRONT4_E -0.0397345 0.00304634 -W1_D1_FRONT5_E -0.0417703 0.00299834 -W1_D1_FRONT6_E -0.0381822 0.00290766 -W1_D1_FRONT7_E -0.0478144 0.0031674 -W1_D1_FRONT8_E 0.164374 0.00301689 -W1_D1_FRONT9_E 0.170624 0.00312019 -W1_D1_FRONT10_E 0.162643 0.00308745 -W1_D1_FRONT11_E 0.160185 0.00297558 -W1_D1_FRONT12_E 0.173052 0.00304833 -W1_D1_FRONT13_E 0.172715 0.00307804 -W1_D1_FRONT14_E 0.169941 0.00303517 -W1_D1_FRONT15_E 0.15915 0.00300656 -W1_D2_FRONT0_E -0.0941011 0.0058907 -W1_D2_FRONT1_E -0.0500382 0.00293438 -W1_D2_FRONT2_E -0.0514812 0.00295577 -W1_D2_FRONT3_E -0.054977 0.00303588 -W1_D2_FRONT4_E -0.0445269 0.00268978 -W1_D2_FRONT5_E -0.0469042 0.00299963 -W1_D2_FRONT6_E -0.0624968 0.00311032 -W1_D2_FRONT7_E -0.0549835 0.00314182 -W1_D2_FRONT8_E 0.0918539 0.00311626 -W1_D2_FRONT9_E 0.0833332 0.00276323 -W1_D2_FRONT10_E 0.0745729 0.00266832 -W1_D2_FRONT11_E 0.0949944 0.00308344 -W1_D2_FRONT12_E 0.082602 0.00264991 -W1_D2_FRONT15_E 0.0881102 0.00301 -W1_D3_FRONT0_E -0.100997 0.00309023 -W1_D3_FRONT1_E -0.0990846 0.00293334 -W1_D3_FRONT2_E -0.0973923 0.00307503 -W1_D3_FRONT3_E -0.0937818 0.00288903 -W1_D3_FRONT4_E -0.104433 0.00315917 -W1_D3_FRONT5_E -0.0963817 0.00313659 -W1_D3_FRONT6_E -0.0916308 0.00311327 -W1_D3_FRONT7_E -0.0972906 0.00290672 -W1_D3_FRONT8_E 0.11131 0.00301604 -W1_D3_FRONT9_E 0.106849 0.0029876 -W1_D3_FRONT10_E 0.115998 0.00318336 -W1_D3_FRONT11_E 0.105618 0.00304804 -W1_D3_FRONT12_E 0.112477 0.0029977 -W1_D3_FRONT13_E 0.107869 0.00303139 -W1_D3_FRONT14_E 0.111101 0.00311916 -W1_D3_FRONT15_E 0.0942706 0.00294839 -W1_D4_FRONT0_E -0.106237 0.00320462 -W1_D4_FRONT1_E -0.107556 0.00322946 -W1_D4_FRONT2_E -0.105548 0.00321298 -W1_D4_FRONT3_E -0.0994305 0.00324256 -W1_D4_FRONT4_E -0.106019 0.00333701 -W1_D4_FRONT5_E -0.0968631 0.00322453 -W1_D4_FRONT6_E -0.090939 0.00325191 -W1_D4_FRONT7_E -0.0977092 0.00319298 -W1_D4_FRONT8_E 0.108767 0.00313147 -W1_D4_FRONT9_E 0.103813 0.00320612 -W1_D4_FRONT10_E 0.099437 0.0031782 -W1_D4_FRONT11_E 0.107628 0.00323347 -W1_D4_FRONT12_E 0.1074 0.00313039 -W1_D4_FRONT13_E 0.108668 0.00321249 -W1_D4_FRONT14_E 0.107253 0.00311194 -W1_D4_FRONT15_E 0.105792 0.00319968 -W1_D5_FRONT0_E -0.0926958 0.00313827 -W1_D5_FRONT1_E -0.0781478 0.0029972 -W1_D5_FRONT2_E -0.0875684 0.00308871 -W1_D5_FRONT3_E -0.0864434 0.00303376 -W1_D5_FRONT4_E -0.0995084 0.00307485 -W1_D5_FRONT5_E -0.0935788 0.00307598 -W1_D5_FRONT6_E -0.0784211 0.00281207 -W1_D5_FRONT7_E -0.0938343 0.00301414 -W1_D5_FRONT8_E 0.108972 0.00313808 -W1_D5_FRONT9_E 0.0902796 0.0030484 -W1_D5_FRONT10_E 0.108855 0.00325328 -W1_D5_FRONT11_E 0.10609 0.00297507 -W1_D5_FRONT12_E 0.114456 0.00308329 -W1_D5_FRONT13_E 0.111039 0.00302106 -W1_D5_FRONT14_E 0.106395 0.00309729 -W1_D5_FRONT15_E 0.100863 0.00299315 -W1_D6_FRONT0_E -0.0937002 0.00308873 -W1_D6_FRONT1_E -0.0955129 0.00310464 -W1_D6_FRONT2_E -0.093867 0.00304304 -W1_D6_FRONT3_E -0.0930797 0.00288798 -W1_D6_FRONT4_E -0.105773 0.00308994 -W1_D6_FRONT5_E -0.115415 0.00328086 -W1_D6_FRONT6_E -0.105691 0.00319607 -W1_D6_FRONT7_E -0.0986715 0.00291589 -W1_D6_FRONT8_E 0.0458834 0.00317465 -W1_D6_FRONT9_E 0.042146 0.00314579 -W1_D6_FRONT10_E 0.0478421 0.00320616 -W1_D6_FRONT11_E 0.0442898 0.00291247 -W1_D6_FRONT12_E 0.0588161 0.003171 -W1_D6_FRONT13_E 0.0582349 0.00318583 -W1_D6_FRONT14_E 0.0540115 0.00310784 -W1_D6_FRONT15_E 0.0490092 0.00303186 -W1_D1_BACK0_E 0.141285 0.00315736 -W1_D1_BACK1_E 0.136085 0.00310353 -W1_D1_BACK2_E 0.121734 0.00299648 -W1_D1_BACK3_E 0.134276 0.00310799 -W1_D1_BACK4_E 0.133094 0.00307772 -W1_D1_BACK5_E 0.136267 0.00298096 -W1_D1_BACK6_E 0.126339 0.00307072 -W1_D1_BACK7_E 0.130258 0.00305 -W1_D1_BACK8_E 0.138809 0.00301516 -W1_D1_BACK9_E 0.136812 0.00288719 -W1_D1_BACK10_E 0.136392 0.00307875 -W1_D1_BACK11_E 0.13789 0.00307363 -W1_D1_BACK12_E 0.142436 0.00305627 -W1_D1_BACK13_E 0.144578 0.00313217 -W1_D1_BACK14_E 0.150611 0.00320886 -W1_D1_BACK15_E 0.138998 0.00299589 -W1_D2_BACK0_E 0.108039 0.00294835 -W1_D2_BACK1_E 0.110474 0.00306965 -W1_D2_BACK2_E 0.0929269 0.00276709 -W1_D2_BACK3_E 0.105873 0.00295243 -W1_D2_BACK4_E 0.111305 0.0030714 -W1_D2_BACK6_E 0.101776 0.00287688 -W1_D2_BACK7_E 0.103488 0.00306627 -W1_D2_BACK8_E 0.0949924 0.00282114 -W1_D2_BACK9_E 0.0967456 0.00285955 -W1_D2_BACK10_E 0.0954087 0.00301817 -W1_D2_BACK11_E 0.0914745 0.00289314 -W1_D2_BACK12_E 0.0943133 0.00303329 -W1_D2_BACK13_E 0.109057 0.00316903 -W1_D2_BACK14_E 0.096039 0.00299386 -W1_D2_BACK15_E 0.100283 0.0030925 -W1_D3_BACK0_E 0.0593946 0.00311773 -W1_D3_BACK1_E 0.0539663 0.00313847 -W1_D3_BACK2_E 0.0545688 0.00310109 -W1_D3_BACK3_E 0.053254 0.00306743 -W1_D3_BACK4_E 0.0583823 0.00307701 -W1_D3_BACK5_E 0.0547078 0.00302021 -W1_D3_BACK6_E 0.0572073 0.00313382 -W1_D3_BACK7_E 0.0571082 0.0029948 -W1_D3_BACK8_E 0.0426816 0.00307163 -W1_D3_BACK9_E 0.0407515 0.00306729 -W1_D3_BACK10_E 0.0408687 0.00312192 -W1_D3_BACK11_E 0.0439494 0.0029869 -W1_D3_BACK12_E 0.0397818 0.00311219 -W1_D3_BACK13_E 0.0423886 0.00315811 -W1_D3_BACK14_E 0.0402498 0.0030188 -W1_D3_BACK15_E 0.0377333 0.00295917 -W1_D4_BACK0_E 0.0787049 0.00314301 -W1_D4_BACK1_E 0.083133 0.00324427 -W1_D4_BACK2_E 0.0822891 0.00321996 -W1_D4_BACK3_E 0.0764736 0.00312723 -W1_D4_BACK4_E 0.089532 0.00314633 -W1_D4_BACK5_E 0.0862089 0.00318996 -W1_D4_BACK6_E 0.0848565 0.00315434 -W1_D4_BACK7_E 0.0899332 0.00329949 -W1_D4_BACK8_E 0.0855566 0.00324691 -W1_D4_BACK9_E 0.0802422 0.0028576 -W1_D4_BACK10_E 0.0814808 0.00296588 -W1_D4_BACK11_E 0.0774855 0.00309764 -W1_D4_BACK12_E 0.0916775 0.00322433 -W1_D4_BACK13_E 0.0879226 0.00308798 -W1_D4_BACK14_E 0.0786999 0.00316074 -W1_D4_BACK15_E 0.0890562 0.00315636 -W1_D5_BACK0_E 0.0497013 0.00303831 -W1_D5_BACK1_E 0.0558789 0.00305851 -W1_D5_BACK2_E 0.0593762 0.00306661 -W1_D5_BACK3_E 0.0608869 0.00291325 -W1_D5_BACK4_E 0.0619463 0.00311969 -W1_D5_BACK5_E 0.0572087 0.00313044 -W1_D5_BACK6_E 0.0608907 0.00314642 -W1_D5_BACK7_E 0.0530383 0.00273615 -W1_D5_BACK8_E 0.0628523 0.00316916 -W1_D5_BACK9_E 0.0573754 0.00331551 -W1_D5_BACK10_E 0.0608419 0.00323566 -W1_D5_BACK11_E 0.0542677 0.00314917 -W1_D5_BACK12_E 0.0512325 0.00307527 -W1_D5_BACK13_E 0.0587194 0.00316172 -W1_D5_BACK14_E 0.0542702 0.00322527 -W1_D5_BACK15_E 0.0548464 0.00294143 -W1_D6_BACK0_E -0.132254 0.00316646 -W1_D6_BACK1_E -0.113267 0.00280362 -W1_D6_BACK2_E -0.120358 0.00299015 -W1_D6_BACK3_E -0.114231 0.0031603 -W1_D6_BACK4_E -0.116273 0.00292868 -W1_D6_BACK5_E -0.107985 0.00296106 -W1_D6_BACK6_E -0.129998 0.00312986 -W1_D6_BACK7_E -0.115625 0.00288843 -W1_D6_BACK8_E -0.1424 0.00305965 -W1_D6_BACK9_E -0.135977 0.00300418 -W1_D6_BACK10_E -0.15632 0.00309986 -W1_D6_BACK11_E -0.14696 0.00296463 -W1_D6_BACK12_E -0.136747 0.00310974 -W1_D6_BACK13_E -0.141839 0.00326506 -W1_D6_BACK14_E -0.14619 0.00319616 -W1_D6_BACK15_E -0.135861 0.00323235 diff --git a/NPAnalysis/SPcoincW1/calibs/W1CalibrationAfter.txt b/NPAnalysis/SPcoincW1/calibs/W1CalibrationAfter.txt new file mode 120000 index 0000000000000000000000000000000000000000..ac955b039ece87086a64d014ef4271c4c568c431 --- /dev/null +++ b/NPAnalysis/SPcoincW1/calibs/W1CalibrationAfter.txt @@ -0,0 +1 @@ +W1CalibrationAfter_Alphas.txt \ No newline at end of file diff --git a/NPAnalysis/SPcoincW1/calibs/W1CalibrationBefore.txt b/NPAnalysis/SPcoincW1/calibs/W1CalibrationBefore.txt deleted file mode 100644 index 29c23d87954f4bde4b008d5cfd5e7ef2160ba7ed..0000000000000000000000000000000000000000 --- a/NPAnalysis/SPcoincW1/calibs/W1CalibrationBefore.txt +++ /dev/null @@ -1,189 +0,0 @@ -W1_D1_FRONT0_E -0.0470911 0.00313546 -W1_D1_FRONT1_E -0.0472021 0.00310803 -W1_D1_FRONT2_E -0.0567854 0.00306771 -W1_D1_FRONT3_E -0.0487093 0.00306373 -W1_D1_FRONT4_E -0.0457374 0.00304835 -W1_D1_FRONT5_E -0.0478813 0.0030036 -W1_D1_FRONT6_E -0.0445097 0.00290749 -W1_D1_FRONT7_E -0.05315 0.00316182 -W1_D1_FRONT8_E 0.158632 0.00301553 -W1_D1_FRONT9_E 0.164661 0.00311887 -W1_D1_FRONT10_E 0.157124 0.00308769 -W1_D1_FRONT11_E 0.155147 0.00298356 -W1_D1_FRONT12_E 0.167161 0.00305057 -W1_D1_FRONT13_E 0.166866 0.00307911 -W1_D1_FRONT14_E 0.164171 0.0030383 -W1_D1_FRONT15_E 0.153155 0.00300049 -W1_D2_FRONT0_E -0.101508 0.00587286 -W1_D2_FRONT1_E -0.0566293 0.00292841 -W1_D2_FRONT2_E -0.0579355 0.00295637 -W1_D2_FRONT3_E -0.0613248 0.00303792 -W1_D2_FRONT4_E -0.0522171 0.0026988 -W1_D2_FRONT5_E -0.0546572 0.00299806 -W1_D2_FRONT6_E -0.0695951 0.00310432 -W1_D2_FRONT7_E -0.0620475 0.00314018 -W1_D2_FRONT8_E 0.0846581 0.00311718 -W1_D2_FRONT9_E 0.0755482 0.00276272 -W1_D2_FRONT10_E 0.066936 0.00266734 -W1_D2_FRONT11_E 0.0870825 0.00308409 -W1_D2_FRONT12_E 0.0749603 0.00264834 -W1_D2_FRONT15_E 0.0814968 0.00300648 -W1_D3_FRONT0_E -0.109522 0.00306779 -W1_D3_FRONT1_E -0.106606 0.00293079 -W1_D3_FRONT2_E -0.104135 0.00307037 -W1_D3_FRONT3_E -0.100592 0.00289104 -W1_D3_FRONT4_E -0.111389 0.00315779 -W1_D3_FRONT5_E -0.103317 0.00313203 -W1_D3_FRONT6_E -0.098922 0.0031127 -W1_D3_FRONT7_E -0.104371 0.00290834 -W1_D3_FRONT8_E 0.10367 0.00302263 -W1_D3_FRONT9_E 0.0982524 0.00299323 -W1_D3_FRONT10_E 0.107239 0.00318111 -W1_D3_FRONT11_E 0.0965583 0.00302867 -W1_D3_FRONT12_E 0.104487 0.00298896 -W1_D3_FRONT13_E 0.0993702 0.00301803 -W1_D3_FRONT14_E 0.10402 0.0031208 -W1_D3_FRONT15_E 0.0866901 0.00293154 -W1_D4_FRONT0_E -0.11129 0.00319853 -W1_D4_FRONT1_E -0.112696 0.00323375 -W1_D4_FRONT2_E -0.110449 0.00321639 -W1_D4_FRONT3_E -0.105076 0.00324373 -W1_D4_FRONT4_E -0.112102 0.00333712 -W1_D4_FRONT5_E -0.102868 0.00322568 -W1_D4_FRONT6_E -0.0965613 0.00324832 -W1_D4_FRONT7_E -0.103067 0.00319706 -W1_D4_FRONT8_E 0.104136 0.00313063 -W1_D4_FRONT9_E 0.0986798 0.00320655 -W1_D4_FRONT10_E 0.0951968 0.00317805 -W1_D4_FRONT11_E 0.103234 0.0032335 -W1_D4_FRONT12_E 0.102574 0.00313109 -W1_D4_FRONT13_E 0.104326 0.00320961 -W1_D4_FRONT14_E 0.102583 0.00310959 -W1_D4_FRONT15_E 0.101478 0.00319826 -W1_D5_FRONT0_E -0.101882 0.00314355 -W1_D5_FRONT1_E -0.0862697 0.00299523 -W1_D5_FRONT2_E -0.100383 0.00308853 -W1_D5_FRONT3_E -0.0960272 0.00303352 -W1_D5_FRONT4_E -0.108107 0.00307528 -W1_D5_FRONT5_E -0.102504 0.00307282 -W1_D5_FRONT6_E -0.088432 0.00281239 -W1_D5_FRONT7_E -0.103457 0.00301596 -W1_D5_FRONT8_E 0.0987793 0.00313671 -W1_D5_FRONT9_E 0.081488 0.00304994 -W1_D5_FRONT10_E 0.0979433 0.00325377 -W1_D5_FRONT11_E 0.0952734 0.00297725 -W1_D5_FRONT12_E 0.102606 0.00308396 -W1_D5_FRONT13_E 0.0999738 0.00301704 -W1_D5_FRONT14_E 0.0962652 0.00309873 -W1_D5_FRONT15_E 0.0905447 0.00299466 -W1_D6_FRONT0_E -0.103244 0.00309189 -W1_D6_FRONT1_E -0.104557 0.0031018 -W1_D6_FRONT2_E -0.10336 0.00304171 -W1_D6_FRONT3_E -0.0985242 0.00288986 -W1_D6_FRONT4_E -0.115152 0.00308888 -W1_D6_FRONT5_E -0.123671 0.00328476 -W1_D6_FRONT6_E -0.115025 0.00319241 -W1_D6_FRONT7_E -0.108393 0.00291834 -W1_D6_FRONT8_E 0.0365876 0.00317769 -W1_D6_FRONT9_E 0.0322429 0.00314283 -W1_D6_FRONT10_E 0.0378282 0.00320613 -W1_D6_FRONT11_E 0.034341 0.00290946 -W1_D6_FRONT12_E 0.0486957 0.00316346 -W1_D6_FRONT13_E 0.0478775 0.00318126 -W1_D6_FRONT14_E 0.0446913 0.00310525 -W1_D6_FRONT15_E 0.0398171 0.00303139 -W1_D1_BACK0_E 0.144942 0.00315811 -W1_D1_BACK1_E 0.139773 0.00309514 -W1_D1_BACK2_E 0.125306 0.00299183 -W1_D1_BACK3_E 0.138545 0.0031121 -W1_D1_BACK4_E 0.13634 0.00307154 -W1_D1_BACK5_E 0.140243 0.00297871 -W1_D1_BACK6_E 0.130033 0.00306213 -W1_D1_BACK7_E 0.132952 0.00304629 -W1_D1_BACK8_E 0.142242 0.00301924 -W1_D1_BACK9_E 0.142315 0.00288188 -W1_D1_BACK10_E 0.139735 0.00307449 -W1_D1_BACK11_E 0.141553 0.00307546 -W1_D1_BACK12_E 0.14596 0.00304931 -W1_D1_BACK13_E 0.148247 0.00312813 -W1_D1_BACK14_E 0.154079 0.00321109 -W1_D1_BACK15_E 0.142503 0.00296339 -W1_D2_BACK0_E 0.114555 0.00296018 -W1_D2_BACK1_E 0.113755 0.00307106 -W1_D2_BACK2_E 0.0981691 0.00275731 -W1_D2_BACK3_E 0.108195 0.0029538 -W1_D2_BACK4_E 0.114694 0.00308908 -W1_D2_BACK6_E 0.107892 0.00289905 -W1_D2_BACK7_E 0.10566 0.00306807 -W1_D2_BACK8_E 0.0996713 0.00282487 -W1_D2_BACK9_E 0.101278 0.0028536 -W1_D2_BACK10_E 0.098844 0.00301949 -W1_D2_BACK11_E 0.0962195 0.00289884 -W1_D2_BACK12_E 0.0967221 0.00304685 -W1_D2_BACK13_E 0.110764 0.00316417 -W1_D2_BACK14_E 0.0986761 0.00298733 -W1_D2_BACK15_E 0.103461 0.00312077 -W1_D3_BACK0_E 0.0557252 0.00310457 -W1_D3_BACK1_E 0.0506927 0.00312213 -W1_D3_BACK2_E 0.0539748 0.00308992 -W1_D3_BACK3_E 0.0532231 0.00306339 -W1_D3_BACK4_E 0.0546146 0.00306567 -W1_D3_BACK5_E 0.049928 0.00300604 -W1_D3_BACK6_E 0.0536454 0.00312716 -W1_D3_BACK7_E 0.0510576 0.00298797 -W1_D3_BACK8_E 0.0385472 0.00306228 -W1_D3_BACK9_E 0.0472383 0.00305881 -W1_D3_BACK10_E 0.045564 0.00311952 -W1_D3_BACK11_E 0.0469718 0.00298503 -W1_D3_BACK12_E 0.0441573 0.00310813 -W1_D3_BACK13_E 0.0455146 0.00315068 -W1_D3_BACK14_E 0.0446752 0.00301757 -W1_D3_BACK15_E 0.0413732 0.00295464 -W1_D4_BACK0_E 0.0843994 0.00312618 -W1_D4_BACK1_E 0.0893547 0.00323695 -W1_D4_BACK2_E 0.088054 0.0032212 -W1_D4_BACK3_E 0.0818549 0.00312569 -W1_D4_BACK4_E 0.0937239 0.00314846 -W1_D4_BACK5_E 0.0909748 0.00318859 -W1_D4_BACK6_E 0.0897291 0.00315863 -W1_D4_BACK7_E 0.0951684 0.00329822 -W1_D4_BACK8_E 0.0910699 0.00324943 -W1_D4_BACK9_E 0.0837377 0.0028592 -W1_D4_BACK10_E 0.0848928 0.00295914 -W1_D4_BACK11_E 0.0825768 0.00309815 -W1_D4_BACK12_E 0.0968595 0.00322098 -W1_D4_BACK13_E 0.0932317 0.00308784 -W1_D4_BACK14_E 0.084557 0.00316336 -W1_D4_BACK15_E 0.0936079 0.00314289 -W1_D5_BACK0_E 0.051925 0.00303819 -W1_D5_BACK1_E 0.0577513 0.00305989 -W1_D5_BACK2_E 0.0606664 0.00306752 -W1_D5_BACK3_E 0.0626186 0.00292008 -W1_D5_BACK4_E 0.0651779 0.00311829 -W1_D5_BACK5_E 0.0604308 0.00313221 -W1_D5_BACK6_E 0.0626782 0.00315154 -W1_D5_BACK7_E 0.0543598 0.00273612 -W1_D5_BACK8_E 0.0650053 0.00317205 -W1_D5_BACK9_E 0.0599825 0.0033174 -W1_D5_BACK10_E 0.0636803 0.00323966 -W1_D5_BACK11_E 0.0571116 0.00315416 -W1_D5_BACK12_E 0.0544097 0.00307805 -W1_D5_BACK13_E 0.0613223 0.00316234 -W1_D5_BACK14_E 0.0573792 0.00322286 -W1_D5_BACK15_E 0.0573742 0.00294563 -W1_D6_BACK0_E -0.12658 0.00316839 -W1_D6_BACK1_E -0.1064 0.00280906 -W1_D6_BACK2_E -0.116376 0.00299054 -W1_D6_BACK3_E -0.111267 0.00316048 -W1_D6_BACK4_E -0.111381 0.00293191 -W1_D6_BACK5_E -0.101893 0.00296066 -W1_D6_BACK6_E -0.126391 0.00313242 -W1_D6_BACK7_E -0.110646 0.00288933 -W1_D6_BACK8_E -0.138263 0.00306012 -W1_D6_BACK9_E -0.132171 0.00300561 -W1_D6_BACK10_E -0.152657 0.00310294 -W1_D6_BACK11_E -0.140951 0.00296906 -W1_D6_BACK12_E -0.133489 0.00311119 -W1_D6_BACK13_E -0.139044 0.00326406 -W1_D6_BACK14_E -0.142715 0.00319736 -W1_D6_BACK15_E -0.132293 0.00323413 diff --git a/NPAnalysis/SPcoincW1/calibs/W1CalibrationBefore.txt b/NPAnalysis/SPcoincW1/calibs/W1CalibrationBefore.txt new file mode 120000 index 0000000000000000000000000000000000000000..0d413c258db4284a40541899268ee43090e80400 --- /dev/null +++ b/NPAnalysis/SPcoincW1/calibs/W1CalibrationBefore.txt @@ -0,0 +1 @@ +W1CalibrationBefore_Alphas.txt \ No newline at end of file diff --git a/NPAnalysis/SPcoincW1/cuts/cutg_SelectionProtons.root b/NPAnalysis/SPcoincW1/cuts/cutg_SelectionProtons.root index c2eba2c6ca879f4a7e3a2b536dd754e7cbcc5cb2..b2e0d37d430f8ddeac3a2c7bc04a34aec0af8dbf 100644 Binary files a/NPAnalysis/SPcoincW1/cuts/cutg_SelectionProtons.root and b/NPAnalysis/SPcoincW1/cuts/cutg_SelectionProtons.root differ diff --git a/NPLib/SplitPole/TSplitPoleData.cxx b/NPLib/SplitPole/TSplitPoleData.cxx index eab6c777062382277ad3737558136c527e837ead..0a7138655e13ce5d602261feae89aa5fe6b7a9d5 100644 --- a/NPLib/SplitPole/TSplitPoleData.cxx +++ b/NPLib/SplitPole/TSplitPoleData.cxx @@ -33,7 +33,9 @@ TSplitPoleData::TSplitPoleData() fDeltaE(-1), fWire(-1), fPlasticP(-1), - fPlasticG(-1) + fPlasticG(-1), + fTime1(-1000), + fTime2(-1000) { } @@ -52,6 +54,8 @@ void TSplitPoleData::Clear() fWire = -1; fPlasticP = -1; fPlasticG = -1; + fTime1 = -1000; + fTime2 = -1000; } @@ -65,4 +69,6 @@ void TSplitPoleData::Dump() const cout << "Wire: " << fWire << endl; cout << "PlasticP: " << fPlasticP << endl; cout << "PlasticG: " << fPlasticG << endl; + cout << "Time1: " << fTime1 << endl; + cout << "Time2: " << fTime2 << endl; } diff --git a/NPLib/SplitPole/TSplitPoleData.h b/NPLib/SplitPole/TSplitPoleData.h index cfe86ff64f380af129ff5e1e70edb2f4a2fce5a0..607d4cc3bf324f2ba2e4776d6774b082984874df 100644 --- a/NPLib/SplitPole/TSplitPoleData.h +++ b/NPLib/SplitPole/TSplitPoleData.h @@ -33,6 +33,8 @@ class TSplitPoleData : public TObject Double_t fWire; Double_t fPlasticP; Double_t fPlasticG; + Double_t fTime1; // ch 117 + Double_t fTime2; // ch 126 public: @@ -49,6 +51,8 @@ class TSplitPoleData : public TObject void SetWire(Double_t wire) {fWire = wire;} void SetPlasticP(Double_t plp) {fPlasticP = plp;} void SetPlasticG(Double_t plg) {fPlasticG = plg;} + void SetTime1(Double_t time) {fTime1 = time;} + void SetTime2(Double_t time) {fTime2 = time;} void SetFocalPlane(Double_t position, Double_t deltae, Double_t wire, Double_t plp, Double_t plg) { SetPosition(position); SetDeltaE(deltae); @@ -64,6 +68,8 @@ class TSplitPoleData : public TObject Double_t GetWire() const {return fWire;} Double_t GetPlasticP() const {return fPlasticP;} Double_t GetPlasticG() const {return fPlasticG;} + Double_t GetTime1() const {return fTime1;}; + Double_t GetTime2() const {return fTime2;}; ClassDef(TSplitPoleData, 1) // TSplitPoleData raw data diff --git a/NPLib/SplitPole/TSplitPolePhysics.cxx b/NPLib/SplitPole/TSplitPolePhysics.cxx index a8460aaa56a566c37d0856121e2570a4fec0a89b..b5607c388b31957a05657d19e472c9865cf0dbd2 100644 --- a/NPLib/SplitPole/TSplitPolePhysics.cxx +++ b/NPLib/SplitPole/TSplitPolePhysics.cxx @@ -191,9 +191,12 @@ void TSplitPolePhysics::BuildSimplePhysicalEvent() fWire = m_EventData->GetWire(); fPlasticP = m_EventData->GetPlasticP(); fPlasticG = m_EventData->GetPlasticG(); + fTime1 = m_EventData->GetTime1(); + fTime2 = m_EventData->GetTime2(); // Correct for magnetic field variation - fBrho = (m_CalibP0 + m_CalibP1*m_EventData->GetPosition()) * 0.5; +// fBrho = (m_CalibP0 + m_CalibP1*m_EventData->GetPosition()) * 0.5; + fBrho = (m_CalibP0 + m_CalibP1*m_EventData->GetPlasticG()) * 0.5; } diff --git a/NPLib/SplitPole/TSplitPolePhysics.h b/NPLib/SplitPole/TSplitPolePhysics.h index 3ac5ed3ff4d0af7d7622e352952f6b10a136bfdc..297d7cc99fe2ab39d2c95a7ce9e9104a250a092b 100644 --- a/NPLib/SplitPole/TSplitPolePhysics.h +++ b/NPLib/SplitPole/TSplitPolePhysics.h @@ -58,6 +58,8 @@ class TSplitPolePhysics : public TObject, public NPL::VDetector Double_t fWire; Double_t fPlasticP; Double_t fPlasticG; + Double_t fTime1; + Double_t fTime2; public: // setters @@ -67,6 +69,8 @@ class TSplitPolePhysics : public TObject, public NPL::VDetector void SetWire(Double_t wire) {fWire = wire;} void SetPlasticP(Double_t plp) {fPlasticP = plp;} void SetPlasticG(Double_t plg) {fPlasticG = plg;} + void SetTime1(Double_t time) {fTime1 = time;} + void SetTime2(Double_t time) {fTime2 = time;} // getters Double_t GetPosition() const {return fPosition;} @@ -75,6 +79,8 @@ class TSplitPolePhysics : public TObject, public NPL::VDetector Double_t GetWire() const {return fWire;} Double_t GetPlasticP() const {return fPlasticP;} Double_t GetPlasticG() const {return fPlasticG;} + Double_t GetTime1() const {return fTime1;} + Double_t GetTime2() const {return fTime2;} public: // inherited from VDetector diff --git a/NPLib/W1/TW1Physics.cxx b/NPLib/W1/TW1Physics.cxx index 09d5b679a27b19eb5f5331e4d72bf9e6c9412ea8..c0d5961963755980b9e31e9f5005056fcc1baf1e 100644 --- a/NPLib/W1/TW1Physics.cxx +++ b/NPLib/W1/TW1Physics.cxx @@ -50,6 +50,7 @@ TW1Physics::TW1Physics() m_PreTreatedData(new TW1Data), m_EventPhysics(this), m_Spectra(0), + m_nCounter(10), m_MaximumStripMultiplicityAllowed(1), // multiplidity 1 m_StripEnergyMatchingSigma(0.060), // MeV m_StripEnergyMatchingNumberOfSigma(5), // MeV @@ -62,6 +63,10 @@ TW1Physics::TW1Physics() m_NumberOfStrips(16) { m_StripPitch = m_SiliconFace / (double)m_NumberOfStrips; + + for (Int_t i = 0; i < m_nCounter; ++i) { // loop on counters + m_Counter[i] = 0; + } // end loop on counters } @@ -87,6 +92,10 @@ void TW1Physics::Clear() fBackTime.clear(); fFrontStrip.clear(); fBackStrip.clear(); + + for (Int_t i = 0; i < m_nCounter; ++i) { // loop on counters + m_Counter[i] = 0; + } // end loop on counters } @@ -531,11 +540,13 @@ void TW1Physics::BuildSimplePhysicalEvent() { // Select active channels and apply thresholds PreTreat(); + m_Counter[0] = 1; // Begin treatement Int_t evtType = EventType(); if (evtType == 1) { // case where multiplicity front = multiplicity back + m_Counter[1] = 1; vector<TVector2> couple = Match_Front_Back(); for (UShort_t i = 0; i < couple.size(); i++) { // loop on selected events @@ -550,14 +561,16 @@ void TW1Physics::BuildSimplePhysicalEvent() Double_t TimeFront = -1000; for (UShort_t t = 0; t < m_PreTreatedData->GetFrontTMult(); t++) { if (m_PreTreatedData->GetFrontTStripNbr(couple[i].X()) == m_PreTreatedData->GetFrontTStripNbr(t) || - m_PreTreatedData->GetFrontTDetectorNbr(couple[i].X()) == m_PreTreatedData->GetFrontTDetectorNbr(t)) + m_PreTreatedData->GetFrontTDetectorNbr(couple[i].X()) == m_PreTreatedData->GetFrontTDetectorNbr(t)) { TimeFront = m_PreTreatedData->GetFrontTTime(t); + m_Counter[4] = 1; + } } // Back Double_t TimeBack = -1000; for (UShort_t t = 0; t < m_PreTreatedData->GetBackTMult(); t++) { - if (m_PreTreatedData->GetBackTStripNbr(couple[i].X()) == m_PreTreatedData->GetBackTStripNbr(t) || - m_PreTreatedData->GetBackTDetectorNbr(couple[i].X()) == m_PreTreatedData->GetBackTDetectorNbr(t)) + if (m_PreTreatedData->GetBackTStripNbr(couple[i].Y()) == m_PreTreatedData->GetBackTStripNbr(t) || + m_PreTreatedData->GetBackTDetectorNbr(couple[i].Y()) == m_PreTreatedData->GetBackTDetectorNbr(t)) TimeBack = m_PreTreatedData->GetBackTTime(t); } @@ -665,9 +678,11 @@ vector<TVector2> TW1Physics::Match_Front_Back() for (UShort_t j = 0; j < m_PreTreatedData->GetBackEMult(); j++) { // if same detector check energy if (m_PreTreatedData->GetFrontEDetectorNbr(i) == m_PreTreatedData->GetBackEDetectorNbr(j)) { + m_Counter[2] = 1; // Equal energy if (abs((m_PreTreatedData->GetFrontEEnergy(i)-m_PreTreatedData->GetBackEEnergy(j))/2.) < m_StripEnergyMatchingNumberOfSigma*m_StripEnergyMatchingSigma) { ArrayOfGoodCouple.push_back(TVector2(i,j)); + m_Counter[3] = 1; } // end test energy } // end test same detector } // end loop back multiplicity diff --git a/NPLib/W1/TW1Physics.h b/NPLib/W1/TW1Physics.h index 28ee6a3972ffa8076bd25ffe32e3c121d8b57db9..0aeeb4a63ca122e543aa6ce21fb008491cf99535 100644 --- a/NPLib/W1/TW1Physics.h +++ b/NPLib/W1/TW1Physics.h @@ -58,8 +58,6 @@ class TW1Physics : public TObject, public NPL::VDetector private: // data obtained after BuildPhysicalEvent() and stored in ROOT output file vector<Int_t> fEventType; vector<Int_t> fDetectorNumber; - - // First stage vector<Double_t> fFrontEnergy; vector<Double_t> fBackEnergy; vector<Double_t> fHalfEnergy; @@ -93,6 +91,10 @@ class TW1Physics : public TObject, public NPL::VDetector Int_t GetBackStrip(Int_t i) {return fBackStrip[i];} + public: + Int_t m_nCounter; + Bool_t m_Counter[10]; + public: // inherited from VDetector // Read stream at ConfigFile to pick-up parameters of detector (Position,...) using Token void ReadConfiguration(string); diff --git a/NPLib/W1/TW1Spectra.cxx b/NPLib/W1/TW1Spectra.cxx index 778db5fea0fa606b0de5661c4c3ea6f78d3a2c98..a61cf2af5d383d4867ac73aa0136a3abfe3549a9 100644 --- a/NPLib/W1/TW1Spectra.cxx +++ b/NPLib/W1/TW1Spectra.cxx @@ -36,7 +36,8 @@ using namespace std; TW1Spectra::TW1Spectra() : fNumberOfDetectors(0), fNumberOfStripsFront(16), - fNumberOfStripsBack(16) + fNumberOfStripsBack(16), + fNumberOfCounters(10) { SetName("W1"); } @@ -55,6 +56,7 @@ TW1Spectra::TW1Spectra(unsigned int NumberOfDetectors) fNumberOfDetectors = NumberOfDetectors; fNumberOfStripsFront = 16; fNumberOfStripsBack = 16; + fNumberOfCounters = 10; InitRawSpectra(); InitPreTreatedSpectra(); @@ -119,9 +121,21 @@ void TW1Spectra::InitRawSpectra() AddHisto2D(name, name, ntot, 0, ntot, 4096, 0, 4096, "W1/RAW"); // Energy vs time correlation plot - name = "W1_ET_COR"; + name = "W1_ET_COR_RAW"; ntot = (fNumberOfStripsFront+fNumberOfStripsBack) * fNumberOfDetectors; AddHisto2D(name, name, ntot, 0, ntot, ntot, 0, ntot, "W1/RAW"); + + // One single Energy hit pattern + name = "W1_HIT_E_RAW"; + Int_t ntotF = fNumberOfStripsFront * fNumberOfDetectors; + Int_t ntotB = fNumberOfStripsBack * fNumberOfDetectors; + AddHisto2D(name, name, ntotF, 0, ntotF, ntotB, 0, ntotB, "W1/RAW"); + + // One single Time hit pattern + name = "W1_HIT_T_RAW"; + ntotF = fNumberOfStripsFront * fNumberOfDetectors; + ntotB = fNumberOfStripsBack * fNumberOfDetectors; + AddHisto2D(name, name, ntotF, 0, ntotF, ntotB, 0, ntotB, "W1/RAW"); } @@ -156,6 +170,28 @@ void TW1Spectra::InitPreTreatedSpectra() name = "W1_STR_E_CAL"; Int_t ntot = (fNumberOfStripsFront+fNumberOfStripsBack) * fNumberOfDetectors; AddHisto2D(name, name, ntot, 0, ntot, 2000, 0, 8, "W1/CAL"); + + // One single STR_T_CAL spectrum + name = "W1_STR_T_CAL"; + ntot = (fNumberOfStripsFront+fNumberOfStripsBack) * fNumberOfDetectors; + AddHisto2D(name, name, ntot, 0, ntot, 4096, 0, 4096, "W1/CAL"); + + // Energy vs time correlation plot + name = "W1_ET_COR_CAL"; + ntot = (fNumberOfStripsFront+fNumberOfStripsBack) * fNumberOfDetectors; + AddHisto2D(name, name, ntot, 0, ntot, ntot, 0, ntot, "W1/CAL"); + + // One single Energy hit pattern + name = "W1_HIT_E_CAL"; + Int_t ntotF = fNumberOfStripsFront * fNumberOfDetectors; + Int_t ntotB = fNumberOfStripsBack * fNumberOfDetectors; + AddHisto2D(name, name, ntotF, 0, ntotF, ntotB, 0, ntotB, "W1/CAL"); + + // One single Time hit pattern + name = "W1_HIT_T_CAL"; + ntotF = fNumberOfStripsFront * fNumberOfDetectors; + ntotB = fNumberOfStripsBack * fNumberOfDetectors; + AddHisto2D(name, name, ntotF, 0, ntotF, ntotB, 0, ntotB, "W1/CAL"); } @@ -164,9 +200,23 @@ void TW1Spectra::InitPreTreatedSpectra() void TW1Spectra::InitPhysicsSpectra() { static string name; + name = "W1_CUTS"; + AddHisto1D(name, name, fNumberOfCounters, 1, fNumberOfCounters+1, "W1/PHY"); + // Kinematic Plot name = "W1_THETA_E"; AddHisto2D(name, name,360,0,180,500,0,50,"W1/PHY"); + + // Energy vs time correlation plot + name = "W1_ET_COR_PHY"; + Int_t ntot = (fNumberOfStripsFront+fNumberOfStripsBack) * fNumberOfDetectors; + AddHisto2D(name, name, ntot, 0, ntot, ntot, 0, ntot, "W1/PHY"); + + // One single Energy hit pattern + name = "W1_HIT_PHY"; + Int_t ntotF = fNumberOfStripsFront * fNumberOfDetectors; + Int_t ntotB = fNumberOfStripsBack * fNumberOfDetectors; + AddHisto2D(name, name, ntotF, 0, ntotF, ntotB, 0, ntotB, "W1/PHY"); } @@ -253,8 +303,8 @@ void TW1Spectra::FillRawSpectra(TW1Data* RawData) GetHisto(index)->Fill(RawData->GetBackTStripNbr(i) + (2*(RawData->GetBackTDetectorNbr(i)-1)+1)*fNumberOfStripsBack, RawData->GetBackTTime(i)); } // end loop on front strips - // W1_ET_COR - index = "W1/RAW/W1_ET_COR"; + // W1_ET_COR_RAW + index = "W1/RAW/W1_ET_COR_RAW"; UShort_t multFrontE = RawData->GetFrontEMult(); for (UShort_t i = 0; i < multFrontE; ++i) { // loop on front strips (E) UShort_t multFrontT = RawData->GetFrontTMult(); @@ -270,6 +320,22 @@ void TW1Spectra::FillRawSpectra(TW1Data* RawData) } // end loop on front strips (T) } // end loop on front strips (E) + // W1_HIT_E_RAW + index = "W1/RAW/W1_HIT_E_RAW"; + for (UShort_t i = 0; i < RawData->GetFrontEMult(); ++i) { // loop on front strips + for (UShort_t j = 0; j < RawData->GetBackEMult(); ++j) { // loop on back strips + GetHisto(index)->Fill(RawData->GetFrontEStripNbr(i) + fNumberOfStripsFront*(RawData->GetFrontEDetectorNbr(i)-1), RawData->GetBackEStripNbr(i) + fNumberOfStripsBack*(RawData->GetBackEDetectorNbr(i)-1)); + } + } // end loop on front strips + + // W1_HIT_T_RAW + index = "W1/RAW/W1_HIT_T_RAW"; + for (UShort_t i = 0; i < RawData->GetFrontTMult(); ++i) { // loop on front strips + for (UShort_t j = 0; j < RawData->GetBackTMult(); ++j) { // loop on back strips + GetHisto(index)->Fill(RawData->GetFrontTStripNbr(i) + fNumberOfStripsFront*(RawData->GetFrontTDetectorNbr(i)-1), RawData->GetBackTStripNbr(i) + fNumberOfStripsBack*(RawData->GetBackTDetectorNbr(i)-1)); + } + } // end loop on front strips + // STR_FRONT MULT int myMULT[fNumberOfDetectors]; for (unsigned int i = 0; i < fNumberOfDetectors; i++) myMULT[i] = 0; @@ -330,6 +396,7 @@ void TW1Spectra::FillPreTreatedSpectra(TW1Data* PreTreatedData) GetHisto(index)->Fill(PreTreatedData->GetBackEStripNbr(i), PreTreatedData->GetBackEEnergy(i)); } + // STR_E_CAL index = "W1/CAL/W1_STR_E_CAL"; UShort_t multFront = PreTreatedData->GetFrontEMult(); @@ -340,6 +407,52 @@ void TW1Spectra::FillPreTreatedSpectra(TW1Data* PreTreatedData) for (UShort_t i = 0; i < multBack; ++i) { // loop on front strips GetHisto(index)->Fill(PreTreatedData->GetBackEStripNbr(i) + (2*(PreTreatedData->GetBackEDetectorNbr(i)-1)+1)*fNumberOfStripsBack, PreTreatedData->GetBackEEnergy(i)); } // end loop on front strips + + + // STR_T_CAL + index = "W1/CAL/W1_STR_T_CAL"; + multFront = PreTreatedData->GetFrontTMult(); + for (UShort_t i = 0; i < multFront; ++i) { // loop on front strips + GetHisto(index)->Fill(PreTreatedData->GetFrontTStripNbr(i) + 2*fNumberOfStripsFront*(PreTreatedData->GetFrontTDetectorNbr(i)-1), PreTreatedData->GetFrontTTime(i)); + } // end loop on front strips + multBack = PreTreatedData->GetBackTMult(); + for (UShort_t i = 0; i < multBack; ++i) { // loop on front strips + GetHisto(index)->Fill(PreTreatedData->GetBackTStripNbr(i) + (2*(PreTreatedData->GetBackTDetectorNbr(i)-1)+1)*fNumberOfStripsBack, PreTreatedData->GetBackTTime(i)); + } // end loop on front strips + + // W1_ET_COR_CAL + index = "W1/CAL/W1_ET_COR_CAL"; + UShort_t multFrontE = PreTreatedData->GetFrontEMult(); + for (UShort_t i = 0; i < multFrontE; ++i) { // loop on front strips (E) + UShort_t multFrontT = PreTreatedData->GetFrontTMult(); + for (UShort_t j = 0; j < multFrontT; ++j) { // loop on front strips (T) + GetHisto(index)->Fill(PreTreatedData->GetFrontEStripNbr(i) + 2*fNumberOfStripsFront*(PreTreatedData->GetFrontEDetectorNbr(i)-1), PreTreatedData->GetFrontTStripNbr(i) + 2*fNumberOfStripsFront*(PreTreatedData->GetFrontTDetectorNbr(i)-1)); + } // end loop on front strips (T) + } // end loop on front strips (E) + UShort_t multBackE = PreTreatedData->GetBackEMult(); + for (UShort_t i = 0; i < multBackE; ++i) { // loop on front strips (E) + UShort_t multBackT = PreTreatedData->GetBackTMult(); + for (UShort_t j = 0; j < multBackT; ++j) { // loop on front strips (T) + GetHisto(index)->Fill(PreTreatedData->GetBackEStripNbr(i) + (2*(PreTreatedData->GetBackEDetectorNbr(i)-1)+1)*fNumberOfStripsBack, PreTreatedData->GetBackTStripNbr(i) + (2*(PreTreatedData->GetBackTDetectorNbr(i)-1)+1)*fNumberOfStripsBack); + } // end loop on front strips (T) + } // end loop on front strips (E) + + + // W1_HIT_E_CAL + index = "W1/CAL/W1_HIT_E_CAL"; + for (UShort_t i = 0; i < PreTreatedData->GetFrontEMult(); ++i) { // loop on front strips + for (UShort_t j = 0; j < PreTreatedData->GetBackEMult(); ++j) { // loop on back strips + GetHisto(index)->Fill(PreTreatedData->GetFrontEStripNbr(i) + fNumberOfStripsFront*(PreTreatedData->GetFrontEDetectorNbr(i)-1), PreTreatedData->GetBackEStripNbr(i) + fNumberOfStripsBack*(PreTreatedData->GetBackEDetectorNbr(i)-1)); + } + } // end loop on front strips + + // W1_HIT_T_CAL + index = "W1/CAL/W1_HIT_T_CAL"; + for (UShort_t i = 0; i < PreTreatedData->GetFrontTMult(); ++i) { // loop on front strips + for (UShort_t j = 0; j < PreTreatedData->GetBackTMult(); ++j) { // loop on back strips + GetHisto(index)->Fill(PreTreatedData->GetFrontTStripNbr(i) + fNumberOfStripsFront*(PreTreatedData->GetFrontTDetectorNbr(i)-1), PreTreatedData->GetBackTStripNbr(i) + fNumberOfStripsBack*(PreTreatedData->GetBackTDetectorNbr(i)-1)); + } + } // end loop on front strips // STR_FRONT MULT @@ -375,6 +488,32 @@ void TW1Spectra::FillPreTreatedSpectra(TW1Data* PreTreatedData) //////////////////////////////////////////////////////////////////////////////// void TW1Spectra::FillPhysicsSpectra(TW1Physics* Physics) { + static string index; + + // counters + index = "W1/PHY/W1_CUTS"; + for (Int_t i = 0; i < fNumberOfCounters; ++i) { // loop on counters + GetHisto(index)->Fill(i+1, Physics->m_Counter[i]); + } // end loop on counters + + + // W1_ET_COR_PHY + index = "W1/PHY/W1_ET_COR_PHY"; + for (UShort_t i = 0; i < Physics->GetEventMultiplicity(); ++i) { // loop on multiplicity + Int_t stripF = Physics->GetFrontStrip(i) + 2*fNumberOfStripsFront*(Physics->GetDetectorNumber(i)-1); + if (Physics->GetFrontEnergy(i) > 0 && Physics->GetFrontTime(i) > 0) GetHisto(index)->Fill(stripF, stripF); + Int_t stripB = Physics->GetBackStrip(i) + (2*(Physics->GetDetectorNumber(i)-1)+1)*fNumberOfStripsBack; + if (Physics->GetBackEnergy(i) > 0 && Physics->GetBackTime(i) > 0) GetHisto(index)->Fill(stripB, stripB); + } // end loop on multiplicity + + + // W1_HIT_PHY + index = "W1/PHY/W1_HIT_PHY"; + for (UShort_t i = 0; i < Physics->GetEventMultiplicity(); ++i) { // loop on multiplicity + GetHisto(index)->Fill(Physics->GetFrontStrip(i) + fNumberOfStripsFront*(Physics->GetDetectorNumber(i)-1), Physics->GetBackStrip(i) + fNumberOfStripsBack*(Physics->GetDetectorNumber(i)-1)); + } // end loop on multiplicity + + /* static string index; // Kine plot diff --git a/NPLib/W1/TW1Spectra.h b/NPLib/W1/TW1Spectra.h index 78e7c8606739a09e0b0bcc77a620bba495ac418d..aba1cec07f66e1837ef8689a1adfafd79185406a 100644 --- a/NPLib/W1/TW1Spectra.h +++ b/NPLib/W1/TW1Spectra.h @@ -53,6 +53,7 @@ class TW1Spectra:public VSpectra { unsigned int fNumberOfDetectors; unsigned int fNumberOfStripsFront; unsigned int fNumberOfStripsBack; + Int_t fNumberOfCounters; }; #endif