...
 
Commits (5)
......@@ -22,6 +22,7 @@
#pragma link C++ class TNeProc+;
#pragma link C++ class TNeMParms+;
#pragma link C++ class TNeSel+;
#pragma link C++ class TDSSD16+;
#endif
......
# Go4 library for ACCULINNA2 experiments
## 24e01
### Naming conventions
- prefix L is for left shoulder R for right
- By default channel 1--16 for X-strips 16--32 for Y.
### TDSSD16
`TDSSD16` is container for double-side 1mm telescope.
Members:
- multx,multy --- multiplicity on each side
- sx,sy --- strip number
- depx,depy --- Edep in MeV
- posx,posy --- local position in mm
now only left 1mm detector added to `TNeEvent` (it named as `L1`).
......@@ -27,8 +27,17 @@ TNeAnalysis::TNeAnalysis()
:fMbsEvent(0)
,fEvents(0)
,fLastEvent(0)
,p_T1xa(0)
,p_T1ya(0)
,p_Lxa(0)
,p_Lya(0)
,p_Rxa(0)
,p_Rya(0)
,p_Rva(0)
,p_R20a(0)
,p_AnSa(0)
,p_AnRa(0)
,p_AnVa(0)
,p_Rcsa(0)
,p_Lcsa(0)
{
}
//***********************************************************
......@@ -39,8 +48,17 @@ TNeAnalysis::TNeAnalysis(int argc, char** argv)
,fMbsEvent(0)
,fEvents(0)
,fLastEvent(0)
,p_T1xa(0)
,p_T1ya(0)
,p_Lxa(0)
,p_Lya(0)
,p_Rxa(0)
,p_Rya(0)
,p_Rva(0)
,p_R20a(0)
,p_AnSa(0)
,p_AnRa(0)
,p_AnVa(0)
,p_Rcsa(0)
,p_Lcsa(0)
{
cout << "**** Create TNeAnalysis name: " << argv[0] << endl;
......@@ -84,10 +102,28 @@ TNeAnalysis::TNeAnalysis(int argc, char** argv)
// At this point, autosave file has not yet been read!
// Therefore parameter values set here will be overwritten
// if an autosave file is there.
p_T1xa = new TNeDet16("T1xa");
p_T1ya = new TNeDet16("T1ya");
AddParameter(p_T1xa);
AddParameter(p_T1ya);
p_Lxa = new TNeDet16("Lxa");
p_Lya = new TNeDet16("Lya");
p_Rxa = new TNeDet16("Rxa");
p_Rya = new TNeDet16("Rya");
p_Rva = new TNeDet16("Rva");
p_R20a = new TNeDet16("R20a");
p_AnSa = new TNeDet16("AnSa");
p_AnRa = new TNeDet16("AnRa");
p_AnVa = new TNeDet16("AnVa");
p_Rcsa = new TNeDet16("Rcsa");
p_Lcsa = new TNeDet16("Lcsa");
AddParameter(p_Lxa);
AddParameter(p_Lya);
AddParameter(p_Rxa);
AddParameter(p_Rya);
AddParameter(p_Rva);
AddParameter(p_R20a);
AddParameter(p_AnSa);
AddParameter(p_AnRa);
AddParameter(p_AnVa);
AddParameter(p_Rcsa);
AddParameter(p_Lcsa);
// pMTracks = new TNeMParms("MTRACKS");
// AddParameter(pMTracks);
......@@ -126,8 +162,17 @@ Int_t TNeAnalysis::UserPreLoop()
}
fEvents=0; // event counter
fLastEvent=0; // number of last event processed
p_T1xa->ReadData();
// p_T1ya->ReadData();>Z
p_Lxa->ReadData();
p_Lya->ReadData();
p_Rxa->ReadData();
p_Rya->ReadData();
p_Rva->ReadData();
p_R20a->ReadData();
p_AnSa->ReadData();
p_AnRa->ReadData();
p_AnVa->ReadData();
p_Rcsa->ReadData();
p_Lcsa->ReadData();
return 0;
......
......@@ -29,8 +29,17 @@ public:
virtual Int_t UserEventFunc();
virtual Int_t UserPostLoop();
TNeDet16* p_T1xa;
TNeDet16* p_T1ya;
TNeDet16* p_Lxa;
TNeDet16* p_Lya;
TNeDet16* p_Rxa;
TNeDet16* p_Rya;
TNeDet16* p_Rva;
TNeDet16* p_R20a;
TNeDet16* p_AnSa;
TNeDet16* p_AnRa;
TNeDet16* p_AnVa;
TNeDet16* p_Rcsa;
TNeDet16* p_Lcsa;
// TNeMParms* pMTracks;
ClassDef(TNeAnalysis,1)
......
/* -*- mode:c++ c-file-style:"linux" -*- */
//===================================================================
//== TNeEvent.cxx:
//== Version:
......@@ -6,6 +8,7 @@ using namespace std;
#include "TNeEvent.h"
#include "Riostream.h"
#include <algorithm>
TNeEvent::TNeEvent()
:TGo4EventElement()
......@@ -30,9 +33,33 @@ void TNeEvent::Clear(Option_t *t)
//== all members should be cleared.
//== memset(fRawData,0, sizeof(fRawData));
//==================================================================
// SQ
memset(T1xa, 0, sizeof(T1xa));
memset(T1xa, 0, sizeof(T1xa));
// Si
L1.Clear();
memset(Lxa, 0, sizeof(Lxa));
memset(Lxt, 0, sizeof(Lxt));
memset(Lya, 0, sizeof(Lya));
memset(Lyt, 0, sizeof(Lyt));
memset(Rxa, 0, sizeof(Rxa));
memset(Rxt, 0, sizeof(Rxt));
memset(Rya, 0, sizeof(Rya));
memset(Ryt, 0, sizeof(Ryt));
memset(Rva, 0, sizeof(Rva));
memset(Rvt, 0, sizeof(Rvt));
memset(R20a, 0, sizeof(R20a));
memset(R20t, 0, sizeof(R20t));
memset(AnSa, 0, sizeof(AnSa));
memset(AnSt, 0, sizeof(AnSt));
memset(AnRa, 0, sizeof(AnRa));
memset(AnRt, 0, sizeof(AnRt));
memset(AnVa, 0, sizeof(AnVa));
memset(AnVt, 0, sizeof(AnVt));
std::fill_n(Rcsa,16,0);
std::fill_n(Rcst,16,0);
std::fill_n(Lcsa,16,0);
std::fill_n(Lcst,16,0);
// ToF
memset(F3, 0, sizeof(F3));
......@@ -44,7 +71,6 @@ void TNeEvent::Clear(Option_t *t)
memset(tMWPC, 0, sizeof(tMWPC));
nevent = 0;
trigger = 0;
subevents = 0;
......
/* -*- mode:c++ c-file-style:"linux" -*- */
//===================================================================
//== TNeEvent.h:
//== Version:
......@@ -7,6 +8,7 @@
#define TNeEVENT_H
#include "TGo4EventElement.h"
#include "TDSSD16.h"
class TNeEvent : public TGo4EventElement
{
......@@ -18,11 +20,51 @@ public:
/** Method called by the framework to clear the event element. */
void Clear(Option_t *t="");
//-----SQ-----
unsigned short T1xa[16];
unsigned short T1xt[16];
unsigned short T1ya[16];
unsigned short T1yt[16];
//-----Si-----
TDSSD16 L1;
unsigned short Lxa[16];
unsigned short Lxt[16];
unsigned short Lxc[16];
unsigned short Lya[16];
unsigned short Lyt[16];
unsigned short Lyc[16];
unsigned short Rxa[16];
unsigned short Rxt[16];
unsigned short Rxc[16];
unsigned short Rya[16];
unsigned short Ryt[16];
unsigned short Ryc[16];
unsigned short Rva[16];
unsigned short Rvt[16];
unsigned short Rvc[16];
unsigned short R20a[16];
unsigned short R20t[16];
unsigned short R20c[16];
unsigned short AnSa[16];
unsigned short AnSt[16];
unsigned short AnSc[16];
unsigned short AnRa[16];
unsigned short AnRt[16];
unsigned short AnRc[16];
unsigned short AnVa[16];
unsigned short AnVt[16];
unsigned short AnVc[16];
unsigned short Rcsa[16];
unsigned short Rcst[16];
unsigned short Rcsc[16];
unsigned short Lcsa[16];
unsigned short Lcst[16];
unsigned short Lcsc[16];
unsigned short F3[4];
unsigned short tF3[4];
......
/* -*- mode:c++ c-file-style:"linux" -*- */
//===================================================================
//== EXPERIMENT A-2
//== VERSION: 30.10.2018
......@@ -49,26 +50,32 @@ TNeProc::TNeProc() : TGo4EventProcessor()
fTrigger = NULL;
fSubEvents = NULL;
fEventsSizes = NULL;
for(i = 0; i < 4; ++i)
{
for(i = 0; i < 4; ++i) {
d1F3[i] = NULL;
d1tF3[i] = NULL;
d1F5[i] = NULL;
d1tF5[i] = NULL;
d1tMWPC[i] = NULL;
}
for(i = 0; i < 16; ++i)
{
//-----SQ-----
d1T1xa[i] = NULL;
d1T1xt[i] = NULL;
d1T1xc[i] = NULL;
// d1T1ya[i] = NULL;
// d1T1yt[i] = NULL;
for(i = 0; i < 16; ++i) {
//-----Si-----
d1Lxa[i] = NULL;
d1Lxt[i] = NULL;
d1Lxc[i] = NULL;
d1Lya[i] = NULL;
d1Lyt[i] = NULL;
d1Lyc[i] = NULL;
d1Rxa[i] = NULL;
d1Rxt[i] = NULL;
d1Rxc[i] = NULL;
d1Rya[i] = NULL;
d1Ryt[i] = NULL;
d1Ryc[i] = NULL;
d1Rva[i] = NULL;
d1Rvt[i] = NULL;
d1Rvc[i] = NULL;
}
//_________________________________Neutrons
//
......@@ -93,6 +100,7 @@ TNeProc::TNeProc() : TGo4EventProcessor()
d1CY1 = NULL;
d1CX2 = NULL;
d1CY2 = NULL;
d2XYbeamOnTar = NULL;
} //-------------------------------------------------------------------
......@@ -108,23 +116,110 @@ TNeProc::TNeProc(const char* name) : TGo4EventProcessor(name)
fSubEvents = MakeTH1('I', "SubEvents", "Number of subevents", 16, 0, 15);
fEventsSizes = MakeTH1('I', "EventSizes", "Size of each event", 1024, 0, 1023);
int i;
hT1a = MakeTH2('S', "T1/T1a", "Amplitudes in T1 MADC",
4096,0,4095,32,0,31,"amp (ch.)","channel");
for (i = 0; i < 16; ++i) {
//-----SQ telescope raw-----
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.);
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.);
d1T1yc[i] = MakeTH1('D', Form("T1yc/T1ycs_%2.2d",i)
, Form("T1 x energy MeV %2.2d",i), 4000, -2., 98.);
d1Lxa[i] = MakeTH1('I', Form("Lxa/Lxas_%2.2d",i) //указывать не повторяющуюся структуру папок и уникальные имена
, Form("L x amp CH %2.2d",i), 8192, 0., 8192.);
d1Lxt[i] = MakeTH1('I', Form("Lxt/Lxts_%2.2d",i)
, Form("L x time CH %2.2d",i), 4096, 1., 4096);
d1Lxc[i] = MakeTH1('D', Form("Lxc/Lxcs_%2.2d",i)
, Form("L x energy MeV %2.2d",i), 4000, -2., 98.);
//
d1Lya[i] = MakeTH1('I', Form("Lya/Lyas_%2.2d",i) //указывать не повторяющуюся структуру папок и уникальные имена
, Form("L x amp CH %2.2d",i), 8192, 0., 8192.);
d1Lyt[i] = MakeTH1('I', Form("Lyt/Lyts_%2.2d",i)
, Form("L x time CH %2.2d",i), 4096, 1, 4096);
d1Lyc[i] = MakeTH1('D', Form("Lyc/Lycs_%2.2d",i)
//
, Form("L x energy MeV %2.2d",i), 4000, -2., 98.);
d1Rxa[i] = MakeTH1('I', Form("Rxa/Rxas_%2.2d",i)
, Form("R x amp CH %2.2d",i), 8192, 0., 8192.);
d1Rxt[i] = MakeTH1('I', Form("Rxt/Rxts_%2.2d",i)
, Form("R x time CH %2.2d",i), 4096, 1., 4096);
d1Rxc[i] = MakeTH1('D', Form("Rxc/Rxcs_%2.2d",i)
, Form("R x energy MeV %2.2d",i), 4000, -2., 98.);
//
d1Rya[i] = MakeTH1('I', Form("Rya/Ryas_%2.2d",i)
, Form("R x amp CH %2.2d",i), 8192, 0., 8192.);
d1Ryt[i] = MakeTH1('I', Form("Ryt/Ryts_%2.2d",i)
, Form("R x time CH %2.2d",i), 4096, 1, 4096);
d1Ryc[i] = MakeTH1('D', Form("Ryc/Rycs_%2.2d",i)
, Form("R x energy MeV %2.2d",i), 4000, -2., 98.);
//
d1Rva[i] = MakeTH1('I', Form("Rva/Rvas_%2.2d",i)
, Form("R veto amp CH %2.2d",i), 8192, 0., 8192.);
d1Rvt[i] = MakeTH1('I', Form("Rvt/Rvts_%2.2d",i)
, Form("R veto time CH %2.2d",i), 4096, 1, 4096);
d1Rvc[i] = MakeTH1('D', Form("Rvc/Rvcs_%2.2d",i)
, Form("R veto energy MeV %2.2d",i), 4000, -2., 98.);
//
d1AnSa[i] = MakeTH1('I', Form("AnSa/AnSas_%2.2d",i)
, Form("Sect amp CH %2.2d",i), 8192, 0., 8192.);
d1AnSt[i] = MakeTH1('I', Form("AnSt/AnSts_%2.2d",i)
, Form("Sect time CH %2.2d",i), 4096, 1, 4096);
d1AnSc[i] = MakeTH1('D', Form("AnSc/AnScs_%2.2d",i)
, Form("Sect energy MeV %2.2d",i), 4000, -2., 98.);
//
d1AnRa[i] = MakeTH1('I', Form("AnRa/AnRas_%2.2d",i)
, Form("Ring amp CH %2.2d",i), 8192, 0., 8192.);
d1AnRt[i] = MakeTH1('I', Form("AnRt/AnRts_%2.2d",i)
, Form("Ring time CH %2.2d",i), 4096, 1, 4096);
d1AnRc[i] = MakeTH1('D', Form("AnRc/AnRcs_%2.2d",i)
, Form("Ring energy MeV %2.2d",i), 4000, -2., 98.);
d1AnVa[i] = MakeTH1('I', Form("AnVa/AnVas_%2.2d",i)
, Form("Veto amp CH %2.2d",i), 8192, 0., 8192.);
d1AnVt[i] = MakeTH1('I', Form("AnVt/AnVts_%2.2d",i)
, Form("Veto time CH %2.2d",i), 4096, 1, 4096);
d1AnVc[i] = MakeTH1('D', Form("AnVc/AnVcs_%2.2d",i)
, Form("Veto energy MeV %2.2d",i), 4000, -2., 98.);
//
}
for (int i = 0; i < 16; ++i) {
d1Lcsa[i] = MakeTH1('I', Form("Lcsa/Lcsa_%02d",i),
Form("Lcs amp CH %02d",i), 8192, 0., 8192);
d1Lcst[i] = MakeTH1('I', Form("Lcst/Lcst_%02d",i)
, Form("Lcs time CH %02d",i), 4096, 1., 4095);
d1Lcsc[i] = MakeTH1('D', Form("Lcsc/Lcsc_%02d",i),
Form("Lcs energy MeV %2.2d",i), 4000, 0., 8192.);
}
for (int i = 0; i < 16; ++i) {
d1Rcsa[i] = MakeTH1('I', Form("Rcsa/Rcsa_%02d",i),
Form("Rcs amp CH %02d",i), 8192, 0., 8192);
d1Rcst[i] = MakeTH1('I', Form("Rcst/Rcst_%02d",i)
, Form("Rcs time CH %02d",i), 4096, 1., 4095);
d1Rcsc[i] = MakeTH1('D', Form("Rcsc/Rcsc_%02d",i),
Form("Rcs energy MeV %2.2d",i), 4000, -2., 98.);
}
for (int i = 0; i < 16; ++i) {
d1R20a[i] = MakeTH1('I', Form("R20a/R20a_%02d",i),
Form("R20 amp CH %02d",i), 8192, 0., 8192);
d1R20t[i] = MakeTH1('I', Form("R20t/R20t_%02d",i)
, Form("R20 time CH %02d",i), 4096, 1., 4095);
d1R20c[i] = MakeTH1('D', Form("R20c/R20c_%02d",i),
Form("R20 energy MeV %2.2d",i), 4000, -2., 98.);
}
d2ede = MakeTH2('D', "ede", "ede", 200,0.,20.,200,0.,20.,"e","de");
d2LyLcs1 = MakeTH2('D', "2D/LyLcs1", "Ly vs Lcs", 200,0.,8200.,200,0.,80.,"Lcs","Ly");
d2LyLcs2 = MakeTH2('D', "2D/LyLcs2", "Ly vs Lcs", 200,0.,8200.,200,0.,80.,"Lcs","Ly");
d2LyLcs3 = MakeTH2('D', "2D/LyLcs3", "Ly vs Lcs", 200,0.,8200.,200,0.,80.,"Lcs","Ly");
d2LyLcs4 = MakeTH2('D', "2D/LyLcs4", "Ly vs Lcs", 200,0.,8200.,200,0.,80.,"Lcs","Ly");
d2LyLcs5 = MakeTH2('D', "2D/LyLcs5", "Ly vs Lcs", 200,0.,8200.,200,0.,80.,"Lcs","Ly");
d2LyLcs6 = MakeTH2('D', "2D/LyLcs6", "Ly vs Lcs", 200,0.,8200.,200,0.,80.,"Lcs","Ly");
d2LyLcs7 = MakeTH2('D', "2D/LyLcs7", "Ly vs Lcs", 200,0.,8200.,200,0.,80.,"Lcs","Ly");
d2LyLcs8 = MakeTH2('D', "2D/LyLcs8", "Ly vs Lcs", 200,0.,8200.,200,0.,80.,"Lcs","Ly");
d2LyLcs9 = MakeTH2('D', "2D/LyLcs9", "Lx vs Lcs", 200,0.,8200.,200,0.,80.,"Lcs","Ly");
d2LyLcs10 = MakeTH2('D', "2D/LyLcs10", "Ly vs Lcs", 200,0.,8200.,200,0.,80.,"Lcs","Ly");
d2LyLcs11 = MakeTH2('D', "2D/LyLcs11", "Ly vs Lcs", 200,0.,8200.,200,0.,80.,"Lcs","Ly");
d2LyLcs12 = MakeTH2('D', "2D/LyLcs12", "Ly vs Lcs", 200,0.,8200.,200,0.,80.,"Lcs","Ly");
d2LyLcs13 = MakeTH2('D', "2D/LyLcs13", "Ly vs Lcs", 200,0.,8200.,200,0.,80.,"Lcs","Ly");
d2LyLcs14 = MakeTH2('D', "2D/LyLcs14", "Ly vs Lcs", 200,0.,8200.,200,0.,80.,"Lcs","Ly");
d2LyLcs15 = MakeTH2('D', "2D/LyLcs15", "Ly vs Lcs", 200,0.,8200.,200,0.,80.,"Lcs","Ly");
d2LyLcs16 = MakeTH2('D', "2D/LyLcs16", "Ly vs Lcs", 200,0.,8200.,200,0.,80.,"Lcs","Ly");
//
d1F3[0] = MakeTH1('I',"F3/QDC/F3_QDC_L","F3 QDC left", 4096, 0., 4095.);
d1F3[1] = MakeTH1('I',"F3/QDC/F3_QDC_R","F3 QDC right", 4096, 0., 4095.);
......@@ -158,6 +253,7 @@ TNeProc::TNeProc(const char* name) : TGo4EventProcessor(name)
//-----MWPC-----
d2XY1 = MakeTH2('I', "MWPC/XY1", "WIRES 1 Y1 vs X1", 32,0.,32.,32,0.,32.,"X1","Y1");
d2XY2 = MakeTH2('I', "MWPC/XY2", "WIRES 2 Y2 vs X2", 32,0.,32.,32,0.,32.,"X2","Y2");
d2XYbeamOnTar = MakeTH2('f', "MWPC/XY_beamOnTar", "beam profile at target", 200,-50.0,50.0,200,-50,50,"X(Z=-70.0mm)","Y(Z=-70.0mm)");
d1X1 = MakeTH1('I', "MWPC/X1","WIRES X1",32,0.,32.);
d1Y1 = MakeTH1('I', "MWPC/Y1","WIRES Y1",32,0.,32.);
......@@ -192,21 +288,22 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
TGo4Analysis *go4 = TGo4Analysis::Instance();
TNeEvent* NeEvent = (TNeEvent*) target;
NeEvent->Clear();
TGo4MbsSubEvent* psubevt;
TGo4MbsEvent* fInput = (TGo4MbsEvent* ) GetInputEvent();
if(fInput == 0)
{
cout << "AnlProc: no input event !"<< endl;
return kFALSE;
if(fInput == 0) {
TGo4Log::Error( "TNeProc::BuildEvent: no input event !");
return false;
}
bool dooutput = false;
// double value1, value2;
// double eT1xa,eT1ya;
// int mT1xa,mT1ya;
double value1, value2;
double eLxa = 0,eLya = 0, eRxa = 0, eRya = 0, eR20a = 0, eRva = 0, eAnSa = 0, eAnRa = 0, eRcsa = 0, eLcsa = 0;
int mLxa = 0, mLya = 0, mRxa = 0, mRya = 0, mR20a = 0, mRva = 0, mAnSa = 0, mAnRa = 0, mRcsa = 0, mLcsa = 0;
int nLxa = -1, nLya = -1, nRxa = -1, nRya = -1, nR20a = -1, nRva = -1, nAnSa = -1, nAnRa = -1, nRcsa = -1, nLcsa = -1;
//
int num = 0, sz = 0;
int i, n, geo, typ, header,caen_header, module_id=0, crate=-1, cnt, chnl, evnt, ch;
int i, n, geo, typ, header,caen_header, module_id=0, crate=-1, cnt, chnl, evnt /*,gch*/;
// int mDSD_X, mDSD_Y, mCsI;
bool m_bool= false, c_bool = false;
uint16_t MSB, LSB;
......@@ -216,42 +313,32 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
double af3=0., af5=0., tf3=0., tf5=0., ToF=0.;
fInput->ResetIterator();
while((psubevt = fInput->NextSubEvent()) != 0)
{
while((psubevt = fInput->NextSubEvent()) != 0) {
num++;
sz += psubevt->GetIntLen();
idata = (uint32_t*) psubevt->GetDataField();
n = -1;
while(++n < psubevt->GetIntLen())
{
while(++n < psubevt->GetIntLen()) {
header = idata[n] >> 24;
caen_header = header & 0x7;
if (dooutput)
printf("Raw data = %x\n", idata[n]);
switch (psubevt->GetProcid())
{
switch (psubevt->GetProcid()) {
case 100: //VME_0, see setup.usf
if (header==0x40)
m_bool=true; //MESYTEC header flag
else if (caen_header == 2)
c_bool=true; //CAEN header flag
else if ((idata[n]==0xaffeaffe) || (idata[n]== 0x06000000) || (idata[n]== 0x05000000))
{
else if ((idata[n]==0xaffeaffe) || (idata[n]== 0x06000000) || (idata[n]== 0x05000000)) {
c_bool=false;
m_bool=false;
}
if (m_bool) //in case of MESYTEC data
{
if (m_bool) {//in case of MESYTEC data
typ=idata[n] >> 30;
switch(typ)
{
switch(typ) {
case 1: //MESYTEC header
module_id = (idata[n] >> 16) & 0xff;
if (dooutput)
......@@ -260,35 +347,17 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
case 0: //MESYTEC data
if(idata[n] >> 24!=0x04) break;
switch (module_id)
{
case 2: // mTDC: time sect & rings p1
chnl= (idata[n] >> 16)&0x1f;
adc = idata[n] & 0xfff; //only 12 bits
if(chnl<16)
{
NeEvent->T1xt[chnl] = adc;
}
break;
case 3: // mADC: amp sect & rings p1
chnl= (idata[n] >> 16)&0x1f;
adc = idata[n] & 0xfff; //only 12 bits
if(chnl<16)
{
NeEvent->T1xa[chnl] = adc;
}
if(idata[n] >> 24!=0x04)
break;
switch (module_id) {
case 0: //mTDC: ToF
if ((idata[n] >> 16) & 0x20) break; //T bit analysis
chnl= (idata[n] >> 16) & 0x1f;
adc = idata[n] & 0xffff; //only 16 bits
if(chnl<4) NeEvent->tF3[chnl] = adc;
else if(chnl<8) NeEvent->tF5[chnl-4] = adc;
else if(chnl<12);
else if(chnl<16) NeEvent->tMWPC[chnl-12] = adc;
else if (chnl<8) NeEvent->tF5[chnl-4] = adc;
else if (chnl<12);
else if (chnl<16) NeEvent->tMWPC[chnl-12] = adc;
break;
case 1: //mQDC:
chnl= (idata[n] >> 16) & 0x1f;
......@@ -298,6 +367,123 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
break;
case 6: //scaler v560
for(i = 0; i < 16; ++i)
NeEvent->scaler[i]=idata[n++] & 0x07ffffff;
break;
case 8: // mTDC: time Lx & Ly
chnl= (idata[n] >> 16)&0x3f;
adc = idata[n] & 0xfff; //only 12 bits
if(chnl<16) {
NeEvent->Lxt[chnl] = adc;
} else if (chnl<32) {
NeEvent->Lyt[chnl-16] = adc;
}
break;
case 9: // mADC: amp Lx & Ly
chnl= (idata[n] >> 16)&0x1f;
adc = idata[n] & 0x1fff; //only 12 bits
if(chnl<16) {
NeEvent->Lxa[chnl] = adc;
} else {
NeEvent->Lya[chnl-16] = adc;
}
break;
case 10: // mTDC: time Rx & Ry
chnl= (idata[n] >> 16)&0x3f;
adc = idata[n] & 0xfff; //only 12 bits
if(chnl<16) {
NeEvent->Rxt[chnl] = adc;
} else if(chnl<32) {
NeEvent->Ryt[chnl-16] = adc;
}
break;
case 11: // mADC: amp Rx & Ry
chnl= (idata[n] >> 16)&0x1f;
adc = idata[n] & 0x1fff; //only 12 bits
if(chnl<16) {
NeEvent->Rxa[chnl] = adc;
} else {
NeEvent->Rya[chnl-16] = adc;
}
break;
case 12: // mTDC: time An S & R
chnl= (idata[n] >> 16)&0x3f;
adc = idata[n] & 0xfff; //only 12 bits
if(chnl<16) {
NeEvent->AnSt[chnl] = adc;
} else if(chnl<32) {
NeEvent->AnRt[chnl-16] = adc;
}
break;
case 13: // mADC: amp An S & R
chnl= (idata[n] >> 16)&0x1f;
adc = idata[n] & 0x1fff; //only 12 bits
if(chnl<16) {
NeEvent->AnSa[chnl] = adc;
} else {
NeEvent->AnRa[chnl-16] = adc;
}
break;
case 14: // mTDC: time R20 & AnV
chnl= (idata[n] >> 16)&0x3f;
adc = idata[n] & 0xfff; //only 12 bits
if(chnl<16) {
NeEvent->AnVt[chnl] = adc;
} else if(chnl<32) {
NeEvent->R20t[chnl-16] = adc;
}
break;
case 15: // mADC: amp R20 & AnV
chnl= (idata[n] >> 16)&0x1f;
adc = idata[n] & 0x1fff; //only 12 bits
if(chnl<16) {
NeEvent->AnVa[chnl] = adc;
} else {
NeEvent->R20a[chnl-16] = adc;
}
break;
case 2: // mTDC: time Rcs & Lcs
chnl= (idata[n] >> 16)&0x3f;
adc = idata[n] & 0xfff; //only 12 bits
if(chnl<16) {
NeEvent->Lcst[chnl] = adc;
} else if(chnl<32) {
NeEvent->Rcst[chnl-16] = adc;
}
break;
case 3: // mADC: amp Rcs & Lcs
chnl= (idata[n] >> 16)&0x1f;
adc = idata[n] & 0x1fff; //only 12 bits
if(chnl<16) {
NeEvent->Lcsa[chnl] = adc;
} else {
NeEvent->Rcsa[chnl-16] = adc;
}
break;
case 4: // mTDC: time Rvt
chnl= (idata[n] >> 16)&0x3f;
adc = idata[n] & 0xfff; //only 12 bits
if(chnl<16) NeEvent->Rvt[chnl] = adc;
break;
case 5: // mADC: amp Ra
chnl= (idata[n] >> 16)&0x1f;
adc = idata[n] & 0x1fff; //only 12 bits
if(chnl<16) NeEvent->Rva[chnl] = adc;
break;
}
break;
......@@ -311,15 +497,13 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
break;
}
}
else if (c_bool) //in case of CAEN data
{
else if (c_bool) { //in case of CAEN data
typ = (idata[n] >> 24) & 0x7;
geo = idata[n] >> 27;
if (dooutput)
printf("CAEN geo %d\n", geo);
switch(typ)
{
switch(typ) {
case 2: //CAEN header
crate = (idata[n] >> 16) & 0xff;
cnt = (idata[n] >> 8) & 0x1f;
......@@ -334,13 +518,9 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
adc = idata[n] & 0xfff;
chnl = (idata[n] >> 16) & 0x1f;
//printf("DATA: geo:%d Channel = %d\n", geo, chnl);
switch(geo)
/*switch(geo)
{
case 6: //scaler v560
for(i = 0; i < 16; ++i)
NeEvent->scaler[i]=idata[n++] & 0x07ffffff;
break;
}
}*/
// printf(" Data: geo:%d chnl:%d adc:%d\n", geo, chnl, adc);
break;
......@@ -369,9 +549,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
case 101: // CAMAC through VME_0, see setup.usf
geo = idata[n] >> 27;
switch(geo)
{
switch(geo) {
case 1:
NeEvent->nx1 = 0;
adc = idata[++n];
......@@ -447,13 +625,11 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
case 200: //VME_1, see setup.usf
if (header==0x40)
m_bool=true; //MESYTEC header flag
else if (caen_header == 2)
c_bool=true; //CAEN header flag
else if ((idata[n]==0xaffeaffe) || (idata[n]== 0x06000000) || (idata[n]== 0x05000000))
{
else if ((idata[n]==0xaffeaffe) || (idata[n]== 0x06000000) || (idata[n]== 0x05000000)) {
c_bool=false;
m_bool=false;
}
......@@ -463,8 +639,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
{
typ=idata[n] >> 30;
switch(typ)
{
switch(typ) {
case 1: //MESYTEC header
module_id = (idata[n] >> 16) & 0xff;
if (dooutput)
......@@ -474,15 +649,14 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
case 0: //MESYTEC data
if(idata[n] >> 24!=0x04) break;
switch (module_id)
{
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 {
NeEvent->T1yt[chnl-16] = adc;
NeEvent->Lxt[chnl] = adc;
} else if(chnl<32) {
NeEvent->Lyt[chnl-16] = adc;
}
break;
......@@ -490,9 +664,9 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
chnl= (idata[n] >> 16)&0x1f;
adc = idata[n] & 0xfff; //only 12 bits
if(chnl<16) {
NeEvent->T1xa[chnl] = adc;
NeEvent->Lxa[chnl] = adc;
} else {
NeEvent->T1ya[chnl-16] = adc;
NeEvent->Lya[chnl-16] = adc;
}
break;
......@@ -509,15 +683,14 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
break;
}
}
else if (c_bool) //in case of CAEN data
{
else if (c_bool) {//in case of CAEN data
typ = (idata[n] >> 24) & 0x7;
geo = idata[n] >> 27;
if (dooutput)
printf("CAEN geo %d\n", geo);
switch(typ)
{
switch(typ) {
case 2: //CAEN header
crate = (idata[n] >> 16) & 0xff;
cnt = (idata[n] >> 8) & 0x1f;
......@@ -532,8 +705,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
adc = idata[n] & 0xfff;
chnl = (idata[n] >> 16) & 0x1f;
//printf("DATA: geo:%d Channel = %d\n", geo, chnl);
switch(geo)
{
switch(geo) {
case 6: //scaler v560
for(i = 0; i < 16; ++i)
NeEvent->scaler[i]=idata[n++] & 0x07ffffff;
......@@ -580,9 +752,9 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
//
for (n=0; n<4; ++n)
for (n=0; n<4; ++n){
// if(NeEvent->trigger == 2)
{
if(NeEvent->F3[n] > 0 ) d1F3[n]->Fill(NeEvent->F3[n]);
if(NeEvent->F5[n] > 0) d1F5[n]->Fill(NeEvent->F5[n]);
......@@ -607,28 +779,80 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
// ToF = (tf5 - tf3)*0.0625;
// ToF = (tf5 - tf3)*0.0625 + 68.55;
// ToF = (tf5 - tf3)*0.0625 + 68.475;
ToF = (tf5 - tf3)*0.015625 + 68.475;
ToF = (tf5 - tf3)*0.015625 + 68.475;
if(af3*af5*tf3*tf5!=0)
{
if(af3*af5*tf3*tf5!=0) {
// if(NeEvent->trigger == 1)
{
d1ToF->Fill(ToF);
d1aF3->Fill(af3);
d2ToFaF3->Fill(ToF,af3);
d1aF5->Fill(af5);
d2ToFaF5->Fill(ToF,af5);
}
for (int n=0; n<16; ++n) {
// if(NeEvent->Lxt[n]>0)
{
d1Lxa[n]->Fill(NeEvent->Lxa[n]);
d1Lxt[n]->Fill(NeEvent->Lxt[n]);
}
// if(NeEvent->Lyt[n]>0)
{
d1Lya[n]->Fill(NeEvent->Lya[n]);
d1Lyt[n]->Fill(NeEvent->Lyt[n]);
}
// if(NeEvent->Rxt[n]>0)
{
d1Rxa[n]->Fill(NeEvent->Rxa[n]);
d1Rxt[n]->Fill(NeEvent->Rxt[n]);
}
// if(NeEvent->Ryt[n]>0)
{
d1Rya[n]->Fill(NeEvent->Rya[n]);
d1Ryt[n]->Fill(NeEvent->Ryt[n]);
}
// if(NeEvent->R20t[n]>0)
{
d1R20a[n]->Fill(NeEvent->R20a[n]);
d1R20t[n]->Fill(NeEvent->R20t[n]);
}
// if(NeEvent->AnSt[n]>0)
{
d1AnSa[n]->Fill(NeEvent->AnSa[n]);
d1AnSt[n]->Fill(NeEvent->AnSt[n]);
}
// if(NeEvent->AnRt[n]>0)
{
d1AnRa[n]->Fill(NeEvent->AnRa[n]);
d1AnRt[n]->Fill(NeEvent->AnRt[n]);
}
// if(NeEvent->AnVt[n]>0)
{
d1AnVa[n]->Fill(NeEvent->AnVa[n]);
d1AnVt[n]->Fill(NeEvent->AnVt[n]);
}
// if(NeEvent->Rcst[n]>0)
{
d1Rcsa[n]->Fill(NeEvent->Rcsa[n]);
d1Rcst[n]->Fill(NeEvent->Rcst[n]);
}
// if(NeEvent->Lcst[n]>0)
{
d1Lcsa[n]->Fill(NeEvent->Lcsa[n]);
d1Lcst[n]->Fill(NeEvent->Lcst[n]);
}
// if(NeEvent->Rvt[n]>0)
{
d1Rva[n]->Fill(NeEvent->Rva[n]);
d1Rvt[n]->Fill(NeEvent->Rvt[n]);
}
for (n=0; n<16; ++n) {
d1T1xa[n]->Fill(NeEvent->T1xa[n]);
d1T1xt[n]->Fill(NeEvent->T1xt[n]);
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);
}
//-----p1 secrors amp.-----
/*
......@@ -644,18 +868,283 @@ ToF = (tf5 - tf3)*0.015625 + 68.475;
if(NeEvent->tp1s[n] > 0)
d1_p1s[n]->Fill(NeEvent->tp1s[n]);
}
*/
//______ calibrated spectra __________________________
for (n=0; n<16; ++n)
for (int n=0; n<16; ++n) {
if(NeEvent->Lxt[n]>0){
value1 = (double)NeEvent->Lxa[n] + gRandom->Uniform();
value2 = ((TNeAnalysis*)go4)->p_Lxa->Energy(value1, n);
d1Lxc[n]->Fill(value2);
mLxa++;
eLxa = value2;
// fill TNeEvent
NeEvent->L1.sx[NeEvent->L1.multx]=n;
NeEvent->L1.posx[NeEvent->L1.multx]=NeEvent->L1.str2pos(n);
NeEvent->L1.depx[NeEvent->L1.multx]=value2;
NeEvent->L1.multx++;
}
if(NeEvent->Lyt[n]>0){
value1 = (double)NeEvent->Lya[n] + gRandom->Uniform();
value2 = ((TNeAnalysis*)go4)->p_Lya->Energy(value1, n);
d1Lyc[n]->Fill(value2);
mLya++;
eLya = value2;
NeEvent->L1.sy[NeEvent->L1.multy]=n;
NeEvent->L1.posy[NeEvent->L1.multy]=NeEvent->L1.str2pos(n);
NeEvent->L1.depy[NeEvent->L1.multy]=value2;
NeEvent->L1.multy++;
}
if(NeEvent->Rxt[n]>0){
value1 = (double)NeEvent->Rxa[n] + gRandom->Uniform();
value2 = ((TNeAnalysis*)go4)->p_Rxa->Energy(value1, n);
d1Rxc[n]->Fill(value2);
mRxa++;
eRxa = value2;
}
if(NeEvent->Ryt[n]>0){
value1 = (double)NeEvent->Rya[n] + gRandom->Uniform();
value2 = ((TNeAnalysis*)go4)->p_Rya->Energy(value1, n);
d1Ryc[n]->Fill(value2);
mRya++;
eRya = value2;
}
if(NeEvent->R20t[n]>0){
value1 = (double)NeEvent->R20a[n] + gRandom->Uniform();
value2 = ((TNeAnalysis*)go4)->p_R20a->Energy(value1, n);
d1R20c[n]->Fill(value2);
mR20a++;
eR20a = value2;
}
if(NeEvent->Rvt[n]>0){
value1 = (double)NeEvent->Rva[n] + gRandom->Uniform();
value2 = ((TNeAnalysis*)go4)->p_Rva->Energy(value1, n);
d1Rvc[n]->Fill(value2);
mRva++;
eRva = value2;
}
if(NeEvent->AnSt[n]>0){
value1 = (double)NeEvent->AnSa[n] + gRandom->Uniform();
value2 = ((TNeAnalysis*)go4)->p_AnSa->Energy(value1, n);
d1AnSc[n]->Fill(value2);
mAnSa++;
eAnSa = value2;
}
if(NeEvent->AnRt[n]>0){
value1 = (double)NeEvent->AnRa[n] + gRandom->Uniform();
value2 = ((TNeAnalysis*)go4)->p_AnRa->Energy(value1, n);
d1AnRc[n]->Fill(value2);
mAnRa++;
eAnRa = value2;
}
if(NeEvent->Rcst[n]>0){
value1 = (double)NeEvent->Rcsa[n] + gRandom->Uniform();
value2 = ((TNeAnalysis*)go4)->p_Rcsa->Energy(value1, n);
d1Rcsc[n]->Fill(value2);
mRcsa++;
eRcsa = value2;
}
if(NeEvent->Lcst[n]>0 && NeEvent->Lcsa[n]>2500){
value1 = (double)NeEvent->Lcsa[n] + gRandom->Uniform();
value2 = ((TNeAnalysis*)go4)->p_Lcsa->Energy(value1, n);
d1Lcsc[n]->Fill(value2);
mLcsa++;
nLcsa = n;
eLcsa = value2;
}
}
if(mRya==1 && mR20a==1)
{
value1 = (double)NeEvent->p1s[n] + gRandom->Uniform();
value2 = ((TNeAnalysis*)go4)->p_p1s->Energy(value1, n);
d1_T1xa_c[n]->Fill(value2);
mp1s++;
ep1s = value2;
d2ede->Fill(eRya,eR20a);
}
if(mLya==1 && mLcsa==1)
{
if(nLcsa == 0) d2LyLcs1->Fill(eLcsa,eLya);
else if(nLcsa == 1) d2LyLcs2->Fill(eLcsa,eLya);
else if(nLcsa == 2) d2LyLcs3->Fill(eLcsa,eLya);
else if(nLcsa == 3) d2LyLcs4->Fill(eLcsa,eLya);
else if(nLcsa == 4) d2LyLcs5->Fill(eLcsa,eLya);
else if(nLcsa == 5) d2LyLcs6->Fill(eLcsa,eLya);
else if(nLcsa == 6) d2LyLcs7->Fill(eLcsa,eLya);
else if(nLcsa == 7) d2LyLcs8->Fill(eLcsa,eLya);
else if(nLcsa == 8) d2LyLcs9->Fill(eLcsa,eLya);
else if(nLcsa == 9) d2LyLcs10->Fill(eLcsa,eLya);
else if(nLcsa == 10) d2LyLcs11->Fill(eLcsa,eLya);
else if(nLcsa == 11) d2LyLcs12->Fill(eLcsa,eLya);
else if(nLcsa == 12) d2LyLcs13->Fill(eLcsa,eLya);
else if(nLcsa == 13) d2LyLcs14->Fill(eLcsa,eLya);
else if(nLcsa == 14) d2LyLcs15->Fill(eLcsa,eLya);
else if(nLcsa == 15) d2LyLcs16->Fill(eLcsa,eLya);
}
//---------------------start of MWPC----------------------------------------
// if(NeEvent->trigger == 1 && ToF > 165 && ToF <185)
// {
for(i = 0; i < NeEvent->nx1; ++i) d1X1->Fill(NeEvent->x1[i]);
for(i = 0; i < NeEvent->ny1; ++i) d1Y1->Fill(NeEvent->y1[i]);
for(i = 0; i < NeEvent->nx2; ++i) d1X2->Fill(NeEvent->x2[i]);
for(i = 0; i < NeEvent->ny2; ++i) d1Y2->Fill(NeEvent->y2[i]);
// }
if(NeEvent->nx1 > 0) d1NX1->Fill(NeEvent->nx1);
if(NeEvent->ny1 > 0) d1NY1->Fill(NeEvent->ny1);
if(NeEvent->nx2 > 0) d1NX2->Fill(NeEvent->nx2);
if(NeEvent->ny2 > 0) d1NY2->Fill(NeEvent->ny2);
if(NeEvent->nx1 > 0)
d1CX1->Fill(GetClasters(NeEvent->nx1, NeEvent->x1));
if(NeEvent->ny1 > 0)
d1CY1->Fill(GetClasters(NeEvent->ny1, NeEvent->y1));
if(NeEvent->nx2 > 0)
d1CX2->Fill(GetClasters(NeEvent->nx2, NeEvent->x2));
if(NeEvent->ny2 > 0)
d1CY2->Fill(GetClasters(NeEvent->ny2, NeEvent->y2));
// Li9
// if (NeEvent->nx1*NeEvent->ny1*NeEvent->nx2*NeEvent->ny2 == 1 && 162<ToF && ToF<170 && 1000<af3 && af3<1700)
// He6
// if (NeEvent->nx1*NeEvent->ny1*NeEvent->nx2*NeEvent->ny2 == 1 && ToF>158 && ToF<168 && af3>500 && af3<1100)
if (NeEvent->nx1*NeEvent->ny1*NeEvent->nx2*NeEvent->ny2 == 1)
{
mwz1 = -816;
mwx1 = (16 - NeEvent->x1[0] + gRandom->Uniform())*1.25;
mwy1 = (NeEvent->y1[0] - 16 + gRandom->Uniform())*1.25;
mwz2 = -270;
mwx2 = (16 - NeEvent->x2[0] + gRandom->Uniform())*1.25;
mwy2 = (NeEvent->y2[0] - 16 + gRandom->Uniform())*1.25;
zbt = -70;
xbt = mwx2 + (mwx2 - mwx1)*(zbt-mwz2)/(mwz2-mwz1);
ybt = mwy2 + (mwy2 - mwy1)*(zbt-mwz2)/(mwz2-mwz1);
// if (NeEvent->trigger == 1)
{
d2XYbeamOnTar->Fill(xbt, ybt);
}
/*if (NeEvent->trigger == 2, NeEvent->trigger == 3, NeEvent->trigger == 4, NeEvent->trigger == 5)
{
d2XYbeamOnTar_trig2->Fill(xbt, ybt);
}
if (NeEvent->tF6[0]*NeEvent->tF6[1]*NeEvent->tF6[2]*NeEvent->tF6[3]>0)
{
d2XYbeamOnTar_F6->Fill(xbt, ybt);
}
*/
}
//
if(NeEvent->nx1 > 0 && NeEvent->ny1 > 0 && (GetClasters(NeEvent->nx1, NeEvent->x1)) == 1 && (GetClasters(NeEvent->ny1, NeEvent->y1)) == 1)
{
d2XY1->Fill(NeEvent->x1[0],NeEvent->y1[0]);
// if(NeEvent->tF6[2] >100) d2XY1beam->Fill(NeEvent->x1[0],NeEvent->y1[0]);
// if(NeEvent->trigger == 1) d2XY1beam->Fill(NeEvent->x1[0],NeEvent->y1[0]);
// else d2XY1->Fill(NeEvent->x1[0],NeEvent->y1[0]);
}
if(NeEvent->nx2 > 0 && NeEvent->ny2 > 0 && (GetClasters(NeEvent->nx2, NeEvent->x2)) == 1 && (GetClasters(NeEvent->ny2, NeEvent->y2)) == 1)
{
d2XY2->Fill(NeEvent->x2[0],NeEvent->y2[0]);
// if(NeEvent->tF6[2] >100) d2XY2beam->Fill(NeEvent->x2[0],NeEvent->y2[0]);
// if(NeEvent->trigger == 1) d2XY2beam->Fill(NeEvent->x2[0],NeEvent->y2[0]);
// else d2XY2->Fill(NeEvent->x2[0],NeEvent->y2[0]);
}
/*
if(NeEvent->nx1 == 1 && NeEvent->ny1 == 1 && NeEvent->trigger == 1)
{
d2XY1->Fill(NeEvent->x1[0],NeEvent->y1[0]);
}
if(NeEvent->nx2 == 1 && NeEvent->ny2 == 1 && NeEvent->trigger == 1)
{
d2XY2->Fill(NeEvent->x2[0],NeEvent->y2[0]);
}
*/
//---Pictures---
/*
if(NeEvent->nx1 == 1 && NeEvent->nx2 == 1)
{
ya1 = -0.5*pya1 + dx1 + (pya1 / 32.)*NeEvent->x1[0];
ya2 = -0.5*pya2 + dx2 + (pya2 / 32.)*NeEvent->x2[0];
ya3 = ya1 + dtx + (ya2 - ya1) * (pxa3 - pxa1) / (pxa2 - pxa1);
if(ya3 > -0.5*pya1 && ya3 < 0.5*pya1)
{
if(((TNeAnalysis*)go4)->pMTracks->mtracksx != ntrackx)
{
ntrackx = ((TNeAnalysis*)go4)->pMTracks->mtracksx;
fTracksX->Set(3*ntrackx);
itrackAX = 0;
for(i = 0; i < fTracksX->GetN(); ++i)
fTracksX->SetPoint(i,pxb1,0.);
}
if(itrackAX == fTracksX->GetN()) itrackAX = 0;
fTracksX->SetPoint(itrackAX++,pxa1,ya1);
fTracksX->SetPoint(itrackAX++,pxa3,ya3);
fTracksX->SetPoint(itrackAX++,pxa1,ya1);
}
}
if(NeEvent->ny1 == 1 && NeEvent->ny2 == 1)
{
yb1 = -0.5*pyb1 + dy1+ (pyb1 / 32.)*NeEvent->y1[0];
yb2 = -0.5*pyb2 + dy2+ (pyb2 / 32.)*NeEvent->y2[0];
yb3 = yb1 + dty + (yb2 - yb1) * (pxb3 - pxb1) / (pxb2 - pxb1);
if(yb3 > -0.5*pyb1 && yb3 < 0.5*pyb1)
{
if(((TNeAnalysis*)go4)->pMTracks->mtracksy != ntracky)
{
ntracky = ((TNeAnalysis*)go4)->pMTracks->mtracksy;
fTracksY->Set(3*ntracky);
itrackBX = 0;
for(i = 0; i < fTracksY->GetN(); ++i)
fTracksY->SetPoint(i,pxb1,0.);
}
if(itrackBX == fTracksY->GetN()) itrackBX = 0;
fTracksY->SetPoint(itrackBX++,pxb1,yb1);
fTracksY->SetPoint(itrackBX++,pxb3,yb3);
fTracksY->SetPoint(itrackBX++,pxb1,yb1);
}
}
if(NeEvent->nx1 == 1 && NeEvent->nx2 == 1 && NeEvent->ny1 == 1 && NeEvent->ny2 == 1 )
{
d2Target->Fill(ya3,yb3);
}*/
//--------------------end of MWPC----------------------------------------
NeEvent->SetValid(kTRUE); // to store
return kTRUE;
} //-------------------------------------------------------------------
......
......@@ -14,8 +14,8 @@ public:
TNeProc() ;
TNeProc(const char* name);
virtual ~TNeProc() ;
Bool_t BuildEvent(TGo4EventElement* target); // event processing function
//! event processing function
Bool_t BuildEvent(TGo4EventElement* target);
double GetClasters(unsigned short n, unsigned short *x);
static long bit[32];
......@@ -26,14 +26,63 @@ private:
//
//-----SQ-----
//-----raw-----
TH2 * hT1a;
TH2 * hT1t;
TH1 *d1T1xa[16];
TH1 *d1T1xt[16];
TH1 *d1T1xc[16];
TH1 *d1T1ya[16];
TH1 *d1T1yt[16];
TH1 *d1T1yc[16];
TH1 *d1Lxa[16];
TH1 *d1Lxt[16];
TH1 *d1Lxc[16];
TH1 *d1Lya[16];
TH1 *d1Lyt[16];
TH1 *d1Lyc[16];
TH1 *d1Rxa[16];
TH1 *d1Rxt[16];
TH1 *d1Rxc[16];
TH1 *d1Rya[16];
TH1 *d1Ryt[16];
TH1 *d1Ryc[16];
TH1 *d1Rva[16];
TH1 *d1Rvt[16];
TH1 *d1Rvc[16];
TH1 *d1AnSa[16];
TH1 *d1AnSt[16];
TH1 *d1AnSc[16];
TH1 *d1AnRa[16];
TH1 *d1AnRt[16];
TH1 *d1AnRc[16];
TH1 *d1AnVa[16];
TH1 *d1AnVt[16];
TH1 *d1AnVc[16];
TH1 *d1R20a[16];
TH1 *d1R20t[16];
TH1 *d1R20c[16];
TH1 *d1Rcsa[16];
TH1 *d1Rcst[16];
TH1 *d1Rcsc[16];
TH1 *d1Lcsa[16];
TH1 *d1Lcst[16];
TH1 *d1Lcsc[16];
//______________ 2 dim
TH2 *d2ede;
TH2 *d2LyLcs1;
TH2 *d2LyLcs2;
TH2 *d2LyLcs3;
TH2 *d2LyLcs4;
TH2 *d2LyLcs5;
TH2 *d2LyLcs6;
TH2 *d2LyLcs7;
TH2 *d2LyLcs8;
TH2 *d2LyLcs9;
TH2 *d2LyLcs10;
TH2 *d2LyLcs11;
TH2 *d2LyLcs12;
TH2 *d2LyLcs13;
TH2 *d2LyLcs14;
TH2 *d2LyLcs15;
TH2 *d2LyLcs16;
//-----clb-----
TH1 *d1sq1_x_c[16];
//-----ToF+MWPC-----
......@@ -67,6 +116,12 @@ private:
TH1 *d1CY1;
TH1 *d1CX2;
TH1 *d1CY2;
TH2 *d2XYbeamOnTar;
double mwz1, mwx1, mwy1;
double mwz2, mwx2, mwy2;
double zbt, xbt, ybt;
ClassDef(TNeProc,1)
};
......
2
16
-0.9921 0.006043 0
-1.295 0.006109 0
-1.034 0.006167 0
-1.226 0.005974 0
-1.087 0.006062 0
-1.293 0.006128 0
-1.117 0.006241 0
-1.569 0.006415 0
-0.9381 0.005942 0
-1.331 0.005939 0
-1.029 0.00602 0
-1.252 0.006154 0
-0.9552 0.006104 0
-1.25 0.005964 0
-0.9905 0.005939 0
-1.24 0.006108 0
2
16
-1.042 0.006175 0
-1.175 0.005682 0
-0.956 0.006046 0
-1.212 0.00593 0
-1.005 0.006027 0
-1.249 0.005907 0
-1.035 0.005957 0
-1.215 0.005924 0
-1.064 0.006153 0
-1.337 0.00598 0
-1.073 0.005888 0
-1.235 0.005878 0
-1.054 0.006009 0
-1.005 0.005548 0
-1.112 0.006079 0
-1.28 0.005843 0
2
16
-0.2076 0.005729 0
-0.1873 0.00575 0
-0.1988 0.005828 0
-0.197 0.005838 0
-0.2144 0.00588 0
-0.1965 0.005734 0
-0.215 0.005697 0
-0.1958 0.005678 0
-0.2061 0.005712 0
-0.2116 0.005771 0
-0.2041 0.005894 0
-0.2219 0.005869 0
-0.2133 0.005625 0
-0.2355 0.005817 0
-0.2177 0.005723 0
-0.2396 0.005987 0
2
16
-0.331 0.01068 0
-0.3837 0.01094 0
-0.3164 0.01119 0
-0.3824 0.01105 0
-0.3201 0.01086 0
-0.3969 0.01076 0
-0.3262 0.01092 0
-0.4261 0.01109 0
-0.4124 0.01064 0
-0.4005 0.01113 0
-0.4111 0.01112 0
-0.3407 0.01073 0
-0.4172 0.01071 0
-0.3712 0.01063 1
-0.4475 0.01099 0
-0.362 0.01077 0
2
16
-0.4061 0.01084 0
-0.3753 0.01097 0
-0.4124 0.01095 0
-0.374 0.01086 0
-0.4033 0.01121 0
-0.3717 0.01077 0
-0.4068 0.01111 0
-0.3854 0.01101 0
-0.346 0.01082 0
-0.4533 0.01102 0
-0.3497 0.01072 0
-0.451 0.01108 0
-0.3556 0.01093 0
-0.4478 0.01118 0
-0.364 0.01093 0
-0.4304 0.01064 0
2
16
-0.08733 0.004911 0
-0.08709 0.004893 0
-0.08096 0.004951 0
-0.07999 0.004812 0
-0.08556 0.004968 0
-0.08162 0.004784 0
-0.08238 0.004891 0
-0.0817 0.004798 0
-0.09605 0.005018 0
-0.06971 0.004917 0
-0.09164 0.004982 0
-0.07341 0.005013 0
-0.08384 0.005046 0
-0.07682 0.004999 0
-0.08593 0.005024 0
-0.07198 0.004797 0
2
16
-1.74 0.0113 0
-2.397 0.01151 0
-1.672 0.01104 0
-2.264 0.01115 0
-1.733 0.01108 0
-2.363 0.01142 0
-1.671 0.01109 0
-2.288 0.01127 0
-1.639 0.01128 0
-2.422 0.01203 0
-1.685 0.01139 0
-2.207 0.01111 0
-1.72 0.01121 0
-2.242 0.0114 0
-1.707 0.01082 0
-2.294 0.01155 0
2
16
-1.717 0.01114 0
-2.412 0.01145 0
-1.638 0.01085 0
-2.253 0.01104 0
-1.764 0.011 0
-2.403 0.01143 0
-1.654 0.01095 0
-2.305 0.01121 0
-1.63 0.01117 0
-2.329 0.01142 0
-1.659 0.01126 0
-2.202 0.01097 0
-1.698 0.01104 0
-2.253 0.0113 0
-1.699 0.01069 0
-2.305 0.01146 0
2
16
-0.4585 0.01085 0
-0.4486 0.01123 0
-0.4754 0.01117 0
-0.2406 0.01096 0
-0.481 0.01117 0
-0.495 0.01145 0
-0.492 0.01093 0
-0.5018 0.01105 0
-0.4927 0.01129 0
-0.4857 0.01117 0
-0.4859 0.01083 0
-0.4279 0.01095 0
-0.4331 0.01089 0
-0.4436 0.01121 0
-0.4329 0.0113 0
-0.4325 0.01129 0
2
16
-0.477 0.01132 0
-0.4198 0.01142 0
-0.4798 0.01101 0
-0.3945 0.01124 0
-0.4799 0.01149 0
-0.3777 0.01094 0
-0.4694 0.01119 0
-0.4171 0.01127 0
-0.4655 0.01118 0
-0.4153 0.01118 0
-0.46 0.01105 0
-0.4163 0.01102 0
-0.4773 0.0109 0
-0.427 0.01087 0
-0.4686 0.01112 0
-0.4137 0.01091 0
2
16
-0.08733 0.004911 0
-0.08709 0.004893 0
-0.08096 0.004951 0
-0.07999 0.004812 0
-0.08556 0.004968 0
-0.08162 0.004784 0
-0.08238 0.004891 0
-0.0817 0.004798 0
-0.09605 0.005018 0
-0.06971 0.004917 0
-0.09164 0.004982 0
-0.07341 0.005013 0
-0.08384 0.005046 0
-0.07682 0.004999 0
-0.08593 0.005024 0
-0.07198 0.004797 0