Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
acc2go4
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pavel Sharov
acc2go4
Commits
756eb644
Commit
756eb644
authored
Sep 25, 2024
by
Pavel Sharov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* update crate config.
parent
ec74e750
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
314 additions
and
192 deletions
+314
-192
README.md
README.md
+7
-0
TNeEvent.cxx
TNeEvent.cxx
+41
-32
TNeEvent.h
TNeEvent.h
+7
-2
TNeProc.cxx
TNeProc.cxx
+240
-153
TNeProc.h
TNeProc.h
+19
-5
No files found.
README.md
0 → 100644
View file @
756eb644
# Go4 library for ACCULINNA2 experiments
## 24e01
### Naming conventions
-
prefix T
[
number
]
x is for telescope
-
By default channel 1--16 for X-strips 16--32 for Y.
TNeEvent.cxx
View file @
756eb644
/* -*- mode:c++ c-file-style:"linux" -*- */
//===================================================================
//===================================================================
//== TNeEvent.cxx:
//== TNeEvent.cxx:
//== Version:
//== Version:
//===================================================================
//===================================================================
using
namespace
std
;
using
namespace
std
;
#include "TNeEvent.h"
#include "TNeEvent.h"
#include "Riostream.h"
#include "Riostream.h"
#include <algorithm>
TNeEvent
::
TNeEvent
()
TNeEvent
::
TNeEvent
()
:
TGo4EventElement
()
:
TGo4EventElement
()
{
{
cout
<<
"**** TNeEvent: Create instance"
<<
endl
;
cout
<<
"**** TNeEvent: Create instance"
<<
endl
;
}
//-------------------------------------------------------------------
}
//-------------------------------------------------------------------
TNeEvent
::
TNeEvent
(
const
char
*
name
)
TNeEvent
::
TNeEvent
(
const
char
*
name
)
:
TGo4EventElement
(
name
)
:
TGo4EventElement
(
name
)
{
{
cout
<<
"**** TNeEvent: Create instance "
<<
name
<<
endl
;
cout
<<
"**** TNeEvent: Create instance "
<<
name
<<
endl
;
...
@@ -26,45 +29,51 @@ TNeEvent::~TNeEvent()
...
@@ -26,45 +29,51 @@ TNeEvent::~TNeEvent()
void
TNeEvent
::
Clear
(
Option_t
*
t
)
void
TNeEvent
::
Clear
(
Option_t
*
t
)
{
{
//==================================================================
//==================================================================
//== all members should be cleared.
//== all members should be cleared.
//== memset(fRawData,0, sizeof(fRawData));
//== memset(fRawData,0, sizeof(fRawData));
//==================================================================
//==================================================================
// Si
// Si
memset
(
Lxa
,
0
,
sizeof
(
Lxa
));
memset
(
Lxa
,
0
,
sizeof
(
Lxa
));
memset
(
Lxt
,
0
,
sizeof
(
Lxt
));
memset
(
Lxt
,
0
,
sizeof
(
Lxt
));
memset
(
Lya
,
0
,
sizeof
(
Lya
));
memset
(
Lya
,
0
,
sizeof
(
Lya
));
memset
(
Lyt
,
0
,
sizeof
(
Lyt
));
memset
(
Lyt
,
0
,
sizeof
(
Lyt
));
memset
(
Rxa
,
0
,
sizeof
(
Rxa
));
memset
(
Rxa
,
0
,
sizeof
(
Rxa
));
memset
(
Rxt
,
0
,
sizeof
(
Rxt
));
memset
(
Rxt
,
0
,
sizeof
(
Rxt
));
memset
(
Rya
,
0
,
sizeof
(
Rya
));
memset
(
Rya
,
0
,
sizeof
(
Rya
));
memset
(
Ryt
,
0
,
sizeof
(
Ryt
));
memset
(
Ryt
,
0
,
sizeof
(
Ryt
));
memset
(
RVa
,
0
,
sizeof
(
RVa
));
memset
(
RVa
,
0
,
sizeof
(
RVa
));
memset
(
RVt
,
0
,
sizeof
(
RVt
));
memset
(
RVt
,
0
,
sizeof
(
RVt
));
memset
(
R60a
,
0
,
sizeof
(
R60a
));
memset
(
R20a
,
0
,
sizeof
(
R20a
));
memset
(
R60t
,
0
,
sizeof
(
R60t
));
memset
(
R20t
,
0
,
sizeof
(
R20t
));
memset
(
AnSa
,
0
,
sizeof
(
AnSa
));
memset
(
AnSa
,
0
,
sizeof
(
AnSa
));
memset
(
AnSt
,
0
,
sizeof
(
AnSt
));
memset
(
AnSt
,
0
,
sizeof
(
AnSt
));
memset
(
AnRa
,
0
,
sizeof
(
AnRa
));
memset
(
AnRa
,
0
,
sizeof
(
AnRa
));
memset
(
AnRt
,
0
,
sizeof
(
AnRt
));
memset
(
AnRt
,
0
,
sizeof
(
AnRt
));
memset
(
AnVa
,
0
,
sizeof
(
AnVa
));
memset
(
AnVa
,
0
,
sizeof
(
AnVa
));
memset
(
AnVt
,
0
,
sizeof
(
AnVt
));
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
// ToF
memset
(
F3
,
0
,
sizeof
(
F3
));
memset
(
F3
,
0
,
sizeof
(
F3
));
memset
(
tF3
,
0
,
sizeof
(
tF3
));
memset
(
tF3
,
0
,
sizeof
(
tF3
));
memset
(
F5
,
0
,
sizeof
(
F5
));
memset
(
F5
,
0
,
sizeof
(
F5
));
memset
(
tF5
,
0
,
sizeof
(
tF5
));
memset
(
tF5
,
0
,
sizeof
(
tF5
));
// MWPC
// MWPC
memset
(
tMWPC
,
0
,
sizeof
(
tMWPC
));
memset
(
tMWPC
,
0
,
sizeof
(
tMWPC
));
nevent
=
0
;
nevent
=
0
;
trigger
=
0
;
trigger
=
0
;
subevents
=
0
;
subevents
=
0
;
evsize
=
0
;
evsize
=
0
;
mtime
=
0
;
mtime
=
0
;
}
//-------------------------------------------------------------------
}
//-------------------------------------------------------------------
TNeEvent.h
View file @
756eb644
/* -*- mode:c++ c-file-style:"linux" -*- */
//===================================================================
//===================================================================
//== TNeEvent.h:
//== TNeEvent.h:
//== Version:
//== Version:
...
@@ -29,14 +30,18 @@ public:
...
@@ -29,14 +30,18 @@ public:
unsigned
short
Ryt
[
16
];
unsigned
short
Ryt
[
16
];
unsigned
short
RVa
[
16
];
unsigned
short
RVa
[
16
];
unsigned
short
RVt
[
16
];
unsigned
short
RVt
[
16
];
unsigned
short
R
6
0a
[
16
];
unsigned
short
R
2
0a
[
16
];
unsigned
short
R
6
0t
[
16
];
unsigned
short
R
2
0t
[
16
];
unsigned
short
AnSa
[
16
];
unsigned
short
AnSa
[
16
];
unsigned
short
AnSt
[
16
];
unsigned
short
AnSt
[
16
];
unsigned
short
AnRa
[
16
];
unsigned
short
AnRa
[
16
];
unsigned
short
AnRt
[
16
];
unsigned
short
AnRt
[
16
];
unsigned
short
AnVa
[
16
];
unsigned
short
AnVa
[
16
];
unsigned
short
AnVt
[
16
];
unsigned
short
AnVt
[
16
];
unsigned
short
Rcsa
[
16
];
unsigned
short
Rcst
[
16
];
unsigned
short
Lcsa
[
16
];
unsigned
short
Lcst
[
16
];
unsigned
short
F3
[
4
];
unsigned
short
F3
[
4
];
unsigned
short
tF3
[
4
];
unsigned
short
tF3
[
4
];
...
...
TNeProc.cxx
View file @
756eb644
...
@@ -22,7 +22,7 @@ using namespace std;
...
@@ -22,7 +22,7 @@ using namespace std;
#include "TGo4Picture.h"
#include "TGo4Picture.h"
#include "TGo4MbsEvent.h"
#include "TGo4MbsEvent.h"
#include "snprintf.h"
#include "snprintf.h"
#include "TNeEvent.h"
#include "TNeEvent.h"
#include "TNeDet16.h"
#include "TNeDet16.h"
#include "TNeAnalysis.h"
#include "TNeAnalysis.h"
...
@@ -109,7 +109,7 @@ TNeProc::~TNeProc()
...
@@ -109,7 +109,7 @@ TNeProc::~TNeProc()
}
//-------------------------------------------------------------------
}
//-------------------------------------------------------------------
TNeProc
::
TNeProc
(
const
char
*
name
)
:
TGo4EventProcessor
(
name
)
TNeProc
::
TNeProc
(
const
char
*
name
)
:
TGo4EventProcessor
(
name
)
{
{
TGo4Log
::
Info
(
"**** TNeProc: Create instance %s"
,
name
);
TGo4Log
::
Info
(
"**** TNeProc: Create instance %s"
,
name
);
fTrigger
=
MakeTH1
(
'I'
,
"Trigger"
,
"Values of trigger"
,
16
,
0.
,
15.
);
fTrigger
=
MakeTH1
(
'I'
,
"Trigger"
,
"Values of trigger"
,
16
,
0.
,
15.
);
fSubEvents
=
MakeTH1
(
'I'
,
"SubEvents"
,
"Number of subevents"
,
16
,
0
,
15
);
fSubEvents
=
MakeTH1
(
'I'
,
"SubEvents"
,
"Number of subevents"
,
16
,
0
,
15
);
...
@@ -117,48 +117,73 @@ TNeProc::TNeProc(const char* name) : TGo4EventProcessor(name)
...
@@ -117,48 +117,73 @@ TNeProc::TNeProc(const char* name) : TGo4EventProcessor(name)
int
i
;
int
i
;
for
(
i
=
0
;
i
<
16
;
++
i
)
{
for
(
i
=
0
;
i
<
16
;
++
i
)
{
//-----SQ telescope raw-----
//-----SQ telescope raw-----
d1Lxa
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"Lxa/Lxas_%2.2d"
,
i
)
//указывать не повторяющуюся структуру папок и уникальные имена
d1Lxa
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"Lxa/Lxas_%2.2d"
,
i
)
//указывать не повторяющуюся структуру папок и уникальные имена
,
Form
(
"L x amp CH %2.2d"
,
i
),
8192
,
0.
,
8192.
);
,
Form
(
"L x amp CH %2.2d"
,
i
),
8192
,
0.
,
8192.
);
d1Lxt
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"Lxt/Lxts_%2.2d"
,
i
)
d1Lxt
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"Lxt/Lxts_%2.2d"
,
i
)
,
Form
(
"L x time CH %2.2d"
,
i
),
4096
,
1.
,
4096
);
,
Form
(
"L x time CH %2.2d"
,
i
),
4096
,
1.
,
4096
);
d1Lxc
[
i
]
=
MakeTH1
(
'D'
,
Form
(
"Lxc/Lxcs_%2.2d"
,
i
)
d1Lxc
[
i
]
=
MakeTH1
(
'D'
,
Form
(
"Lxc/Lxcs_%2.2d"
,
i
)
,
Form
(
"L x energy MeV %2.2d"
,
i
),
4000
,
-
2.
,
98.
);
,
Form
(
"L x energy MeV %2.2d"
,
i
),
4000
,
-
2.
,
98.
);
//
//
d1Lya
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"Lya/Lyas_%2.2d"
,
i
)
//указывать не повторяющуюся структуру папок и уникальные имена
d1Lya
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"Lya/Lyas_%2.2d"
,
i
)
//указывать не повторяющуюся структуру папок и уникальные имена
,
Form
(
"L x amp CH %2.2d"
,
i
),
8192
,
0.
,
8192.
);
,
Form
(
"L x amp CH %2.2d"
,
i
),
8192
,
0.
,
8192.
);
d1Lyt
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"Lyt/Lyts_%2.2d"
,
i
)
d1Lyt
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"Lyt/Lyts_%2.2d"
,
i
)
,
Form
(
"L x time CH %2.2d"
,
i
),
4096
,
1
,
4096
);
,
Form
(
"L x time CH %2.2d"
,
i
),
4096
,
1
,
4096
);
d1Lyc
[
i
]
=
MakeTH1
(
'D'
,
Form
(
"Lyc/Lycs_%2.2d"
,
i
)
d1Lyc
[
i
]
=
MakeTH1
(
'D'
,
Form
(
"Lyc/Lycs_%2.2d"
,
i
)
//
//
,
Form
(
"L x energy MeV %2.2d"
,
i
),
4000
,
-
2.
,
98.
);
,
Form
(
"L x energy MeV %2.2d"
,
i
),
4000
,
-
2.
,
98.
);
d1Rxa
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"Rxa/Rxas_%2.2d"
,
i
)
//указывать не повторяющуюся структуру папок и уникальные имена
d1Rxa
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"Rxa/Rxas_%2.2d"
,
i
)
//указывать не повторяющуюся структуру папок и уникальные имена
,
Form
(
"R x amp CH %2.2d"
,
i
),
8192
,
0.
,
8192.
);
,
Form
(
"R x amp CH %2.2d"
,
i
),
8192
,
0.
,
8192.
);
d1Rxt
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"Rxt/Rxts_%2.2d"
,
i
)
d1Rxt
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"Rxt/Rxts_%2.2d"
,
i
)
,
Form
(
"R x time CH %2.2d"
,
i
),
4096
,
1.
,
4096
);
,
Form
(
"R x time CH %2.2d"
,
i
),
4096
,
1.
,
4096
);
d1Rxc
[
i
]
=
MakeTH1
(
'D'
,
Form
(
"Rxc/Rxcs_%2.2d"
,
i
)
d1Rxc
[
i
]
=
MakeTH1
(
'D'
,
Form
(
"Rxc/Rxcs_%2.2d"
,
i
)
,
Form
(
"R x energy MeV %2.2d"
,
i
),
4000
,
-
2.
,
98.
);
,
Form
(
"R x energy MeV %2.2d"
,
i
),
4000
,
-
2.
,
98.
);
//
//
d1Rya
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"Rya/Ryas_%2.2d"
,
i
)
//указывать не повторяющуюся структуру папок и уникальные имена
d1Rya
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"Rya/Ryas_%2.2d"
,
i
)
//указывать не повторяющуюся структуру папок и уникальные имена
,
Form
(
"R x amp CH %2.2d"
,
i
),
8192
,
0.
,
8192.
);
,
Form
(
"R x amp CH %2.2d"
,
i
),
8192
,
0.
,
8192.
);
d1Ryt
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"Ryt/Ryts_%2.2d"
,
i
)
d1Ryt
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"Ryt/Ryts_%2.2d"
,
i
)
,
Form
(
"R x time CH %2.2d"
,
i
),
4096
,
1
,
4096
);
,
Form
(
"R x time CH %2.2d"
,
i
),
4096
,
1
,
4096
);
d1Ryc
[
i
]
=
MakeTH1
(
'D'
,
Form
(
"Ryc/Rycs_%2.2d"
,
i
)
d1Ryc
[
i
]
=
MakeTH1
(
'D'
,
Form
(
"Ryc/Rycs_%2.2d"
,
i
)
,
Form
(
"R x energy MeV %2.2d"
,
i
),
4000
,
-
2.
,
98.
);
,
Form
(
"R x energy MeV %2.2d"
,
i
),
4000
,
-
2.
,
98.
);
//
//
d1AnSa
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"AnSa/AnSas_%2.2d"
,
i
)
//указывать не повторяющуюся структуру папок и уникальные имена
d1AnSa
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"AnSa/AnSas_%2.2d"
,
i
)
//указывать не повторяющуюся структуру папок и уникальные имена
,
Form
(
"Sect amp CH %2.2d"
,
i
),
8192
,
0.
,
8192.
);
,
Form
(
"Sect amp CH %2.2d"
,
i
),
8192
,
0.
,
8192.
);
d1AnSt
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"AnSt/AnSts_%2.2d"
,
i
)
d1AnSt
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"AnSt/AnSts_%2.2d"
,
i
)
,
Form
(
"Sect time CH %2.2d"
,
i
),
4096
,
1
,
4096
);
,
Form
(
"Sect time CH %2.2d"
,
i
),
4096
,
1
,
4096
);
d1AnSc
[
i
]
=
MakeTH1
(
'D'
,
Form
(
"AnSc/AnScs_%2.2d"
,
i
)
d1AnSc
[
i
]
=
MakeTH1
(
'D'
,
Form
(
"AnSc/AnScs_%2.2d"
,
i
)
,
Form
(
"Sect energy MeV %2.2d"
,
i
),
4000
,
-
2.
,
98.
);
,
Form
(
"Sect energy MeV %2.2d"
,
i
),
4000
,
-
2.
,
98.
);
//
//
d1AnRa
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"AnRa/AnRas_%2.2d"
,
i
)
//указывать не повторяющуюся структуру папок и уникальные имена
d1AnRa
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"AnRa/AnRas_%2.2d"
,
i
)
//указывать не повторяющуюся структуру папок и уникальные имена
,
Form
(
"Ring amp CH %2.2d"
,
i
),
8192
,
0.
,
8192.
);
,
Form
(
"Ring amp CH %2.2d"
,
i
),
8192
,
0.
,
8192.
);
d1AnRt
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"AnRt/AnRts_%2.2d"
,
i
)
d1AnRt
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"AnRt/AnRts_%2.2d"
,
i
)
,
Form
(
"Ring time CH %2.2d"
,
i
),
4096
,
1
,
4096
);
,
Form
(
"Ring time CH %2.2d"
,
i
),
4096
,
1
,
4096
);
d1AnRc
[
i
]
=
MakeTH1
(
'D'
,
Form
(
"AnRc/AnRcs_%2.2d"
,
i
)
d1AnRc
[
i
]
=
MakeTH1
(
'D'
,
Form
(
"AnRc/AnRcs_%2.2d"
,
i
)
,
Form
(
"Ring energy MeV %2.2d"
,
i
),
4000
,
-
2.
,
98.
);
,
Form
(
"Ring 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
),
4096
,
0.
,
4096
);
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
,
-
2.
,
98.
);
}
for
(
int
i
=
0
;
i
<
16
;
++
i
)
{
d1Rcsa
[
i
]
=
MakeTH1
(
'I'
,
Form
(
"Rcsa/Rcsa_%02d"
,
i
),
Form
(
"Rcs amp CH %02d"
,
i
),
4096
,
0.
,
4096
);
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
),
4096
,
0.
,
4096
);
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.
);
}
//
//
d1F3
[
0
]
=
MakeTH1
(
'I'
,
"F3/QDC/F3_QDC_L"
,
"F3 QDC left"
,
4096
,
0.
,
4095.
);
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.
);
d1F3
[
1
]
=
MakeTH1
(
'I'
,
"F3/QDC/F3_QDC_R"
,
"F3 QDC right"
,
4096
,
0.
,
4095.
);
...
@@ -188,8 +213,8 @@ TNeProc::TNeProc(const char* name) : TGo4EventProcessor(name)
...
@@ -188,8 +213,8 @@ TNeProc::TNeProc(const char* name) : TGo4EventProcessor(name)
d1aF5
=
MakeTH1
(
'D'
,
"ToF/aF5"
,
"amplitude of plastic F5"
,
4000
,
0.
,
4000.
,
"amp F5"
);
d1aF5
=
MakeTH1
(
'D'
,
"ToF/aF5"
,
"amplitude of plastic F5"
,
4000
,
0.
,
4000.
,
"amp F5"
);
d2ToFaF5
=
MakeTH2
(
'D'
,
"ToF/ToFaF5"
,
"ToF vs aF5"
,
400
,
50.
,
200.
,
400
,
0.
,
4000.
,
"ToF"
,
"aF5"
);
d2ToFaF5
=
MakeTH2
(
'D'
,
"ToF/ToFaF5"
,
"ToF vs aF5"
,
400
,
50.
,
200.
,
400
,
0.
,
4000.
,
"ToF"
,
"aF5"
);
//-----MWPC-----
//-----MWPC-----
d2XY1
=
MakeTH2
(
'I'
,
"MWPC/XY1"
,
"WIRES 1 Y1 vs X1"
,
32
,
0.
,
32.
,
32
,
0.
,
32.
,
"X1"
,
"Y1"
);
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"
);
d2XY2
=
MakeTH2
(
'I'
,
"MWPC/XY2"
,
"WIRES 2 Y2 vs X2"
,
32
,
0.
,
32.
,
32
,
0.
,
32.
,
"X2"
,
"Y2"
);
...
@@ -223,17 +248,16 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -223,17 +248,16 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
{
{
// called by framework from TNeEvent to fill it
// called by framework from TNeEvent to fill it
TGo4Analysis
*
go4
=
TGo4Analysis
::
Instance
();
//
TGo4Analysis *go4 = TGo4Analysis::Instance();
TNeEvent
*
NeEvent
=
(
TNeEvent
*
)
target
;
TNeEvent
*
NeEvent
=
(
TNeEvent
*
)
target
;
target
->
Clear
();
target
->
Clear
();
TGo4MbsSubEvent
*
psubevt
;
TGo4MbsSubEvent
*
psubevt
;
TGo4MbsEvent
*
fInput
=
(
TGo4MbsEvent
*
)
GetInputEvent
();
TGo4MbsEvent
*
fInput
=
(
TGo4MbsEvent
*
)
GetInputEvent
();
if
(
fInput
==
0
)
if
(
fInput
==
0
)
{
{
TGo4Log
::
Error
(
"TNeProc::BuildEvent: no input event !"
);
cout
<<
"AnlProc: no input event !"
<<
endl
;
return
false
;
return
kFALSE
;
}
}
bool
dooutput
=
false
;
bool
dooutput
=
false
;
// double value1, value2;
// double value1, value2;
...
@@ -241,13 +265,13 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -241,13 +265,13 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
// int mLxa,mLya;
// int mLxa,mLya;
//
//
int
num
=
0
,
sz
=
0
;
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;
// int mDSD_X, mDSD_Y, mCsI;
bool
m_bool
=
false
,
c_bool
=
false
;
bool
m_bool
=
false
,
c_bool
=
false
;
uint16_t
MSB
,
LSB
;
uint16_t
MSB
,
LSB
;
uint32_t
MSBLSB
,
adc
;
uint32_t
MSBLSB
,
adc
;
uint32_t
*
idata
;
uint32_t
*
idata
;
double
af3
=
0.
,
af5
=
0.
,
tf3
=
0.
,
tf5
=
0.
,
ToF
=
0.
;
double
af3
=
0.
,
af5
=
0.
,
tf3
=
0.
,
tf5
=
0.
,
ToF
=
0.
;
fInput
->
ResetIterator
();
fInput
->
ResetIterator
();
...
@@ -256,9 +280,9 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -256,9 +280,9 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
num
++
;
num
++
;
sz
+=
psubevt
->
GetIntLen
();
sz
+=
psubevt
->
GetIntLen
();
idata
=
(
uint32_t
*
)
psubevt
->
GetDataField
();
idata
=
(
uint32_t
*
)
psubevt
->
GetDataField
();
n
=
-
1
;
n
=
-
1
;
while
(
++
n
<
psubevt
->
GetIntLen
())
while
(
++
n
<
psubevt
->
GetIntLen
())
{
{
header
=
idata
[
n
]
>>
24
;
header
=
idata
[
n
]
>>
24
;
caen_header
=
header
&
0x7
;
caen_header
=
header
&
0x7
;
...
@@ -281,106 +305,142 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -281,106 +305,142 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
}
}
if
(
m_bool
)
//in case of MESYTEC data
if
(
m_bool
)
{
//in case of MESYTEC data
{
typ
=
idata
[
n
]
>>
30
;
typ
=
idata
[
n
]
>>
30
;
switch
(
typ
)
switch
(
typ
)
{
{
case
1
:
//MESYTEC header
case
1
:
//MESYTEC header
module_id
=
(
idata
[
n
]
>>
16
)
&
0xff
;
module_id
=
(
idata
[
n
]
>>
16
)
&
0xff
;
if
(
dooutput
)
if
(
dooutput
)
printf
(
"Mesytec Module ID %d
\n
"
,
module_id
);
printf
(
"Mesytec Module ID %d
\n
"
,
module_id
);
break
;
case
0
:
//MESYTEC data
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
;
break
;
break
;
case
1
:
//mQDC:
chnl
=
(
idata
[
n
]
>>
16
)
&
0x1f
;
adc
=
idata
[
n
]
&
0xfff
;
//only 12 bits
if
(
chnl
<
4
)
NeEvent
->
F3
[
chnl
]
=
adc
;
else
if
(
chnl
<
8
)
NeEvent
->
F5
[
chnl
-
4
]
=
adc
;
break
;
case
0
:
//MESYTEC data
case
6
:
//scaler v560
if
(
idata
[
n
]
>>
24
!=
0x04
)
break
;
for
(
i
=
0
;
i
<
16
;
++
i
)
switch
(
module_id
)
NeEvent
->
scaler
[
i
]
=
idata
[
n
++
]
&
0x07ffffff
;
{
break
;
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
;
break
;
case
1
:
//mQDC:
chnl
=
(
idata
[
n
]
>>
16
)
&
0x1f
;
adc
=
idata
[
n
]
&
0xfff
;
//only 12 bits
if
(
chnl
<
4
)
NeEvent
->
F3
[
chnl
]
=
adc
;
else
if
(
chnl
<
8
)
NeEvent
->
F5
[
chnl
-
4
]
=
adc
;
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
6
:
//scaler v560
case
9
:
// mADC: amp Lx & Ly
for
(
i
=
0
;
i
<
16
;
++
i
)
chnl
=
(
idata
[
n
]
>>
16
)
&
0x1f
;
NeEvent
->
scaler
[
i
]
=
idata
[
n
++
]
&
0x07ffffff
;
adc
=
idata
[
n
]
&
0xfff
;
//only 12 bits
break
;
if
(
chnl
<
16
)
{
NeEvent
->
Lxa
[
chnl
]
=
adc
;
}
else
{
NeEvent
->
Lya
[
chnl
-
16
]
=
adc
;
}
break
;
case
8
:
// mTDC: time Lx & L
y
case
10
:
// mTDC: time Rx & R
y
chnl
=
(
idata
[
n
]
>>
16
)
&
0x3f
;
chnl
=
(
idata
[
n
]
>>
16
)
&
0x3f
;
adc
=
idata
[
n
]
&
0xfff
;
//only 12 bits
adc
=
idata
[
n
]
&
0xfff
;
//only 12 bits
if
(
chnl
<
16
)
{
if
(
chnl
<
16
)
{
NeEvent
->
L
xt
[
chnl
]
=
adc
;
NeEvent
->
R
xt
[
chnl
]
=
adc
;
}
else
if
(
chnl
<
32
)
{
}
else
if
(
chnl
<
32
)
{
NeEvent
->
L
yt
[
chnl
-
16
]
=
adc
;
NeEvent
->
R
yt
[
chnl
-
16
]
=
adc
;
}
}
break
;
break
;
case
9
:
// mADC: amp Lx & L
y
case
11
:
// mADC: amp Rx & R
y
chnl
=
(
idata
[
n
]
>>
16
)
&
0x1f
;
chnl
=
(
idata
[
n
]
>>
16
)
&
0x1f
;
adc
=
idata
[
n
]
&
0xfff
;
//only 12 bits
adc
=
idata
[
n
]
&
0xfff
;
//only 12 bits
if
(
chnl
<
16
)
{
if
(
chnl
<
16
)
{
NeEvent
->
L
xa
[
chnl
]
=
adc
;
NeEvent
->
R
xa
[
chnl
]
=
adc
;
}
else
{
}
else
{
NeEvent
->
L
ya
[
chnl
-
16
]
=
adc
;
NeEvent
->
R
ya
[
chnl
-
16
]
=
adc
;
}
}
break
;
break
;
case
10
:
// mTDC: time Rx & Ry
case
12
:
// mTDC: time An S & R
chnl
=
(
idata
[
n
]
>>
16
)
&
0x3f
;
chnl
=
(
idata
[
n
]
>>
16
)
&
0x3f
;
adc
=
idata
[
n
]
&
0xfff
;
//only 12 bits
adc
=
idata
[
n
]
&
0xfff
;
//only 12 bits
if
(
chnl
<
16
)
{
if
(
chnl
<
16
)
{
NeEvent
->
Rx
t
[
chnl
]
=
adc
;
NeEvent
->
AnS
t
[
chnl
]
=
adc
;
}
else
if
(
chnl
<
32
)
{
}
else
if
(
chnl
<
32
)
{
NeEvent
->
Ry
t
[
chnl
-
16
]
=
adc
;
NeEvent
->
AnR
t
[
chnl
-
16
]
=
adc
;
}
}
break
;
break
;
case
11
:
// mADC: amp Rx & Ry
case
13
:
// mADC: amp An S & R
chnl
=
(
idata
[
n
]
>>
16
)
&
0x1f
;
chnl
=
(
idata
[
n
]
>>
16
)
&
0x1f
;
adc
=
idata
[
n
]
&
0xfff
;
//only 12 bits
adc
=
idata
[
n
]
&
0xfff
;
//only 12 bits
if
(
chnl
<
16
)
{
if
(
chnl
<
16
)
{
NeEvent
->
Rx
a
[
chnl
]
=
adc
;
NeEvent
->
AnS
a
[
chnl
]
=
adc
;
}
else
{
}
else
{
NeEvent
->
Ry
a
[
chnl
-
16
]
=
adc
;
NeEvent
->
AnR
a
[
chnl
-
16
]
=
adc
;
}
}
break
;
break
;
case
12
:
// mTDC: time An S & R
case
14
:
// mTDC: time R20 & AnV
chnl
=
(
idata
[
n
]
>>
16
)
&
0x3f
;
chnl
=
(
idata
[
n
]
>>
16
)
&
0x3f
;
adc
=
idata
[
n
]
&
0xfff
;
//only 12 bits
adc
=
idata
[
n
]
&
0xfff
;
//only 12 bits
if
(
chnl
<
16
)
{
if
(
chnl
<
16
)
{
NeEvent
->
AnS
t
[
chnl
]
=
adc
;
NeEvent
->
AnV
t
[
chnl
]
=
adc
;
}
else
if
(
chnl
<
32
)
{
}
else
if
(
chnl
<
32
)
{
NeEvent
->
AnR
t
[
chnl
-
16
]
=
adc
;
NeEvent
->
R20
t
[
chnl
-
16
]
=
adc
;
}
}
break
;
break
;
case
13
:
// mADC: amp An S & R
case
15
:
// mADC: amp R20 & AnV
chnl
=
(
idata
[
n
]
>>
16
)
&
0x1f
;
chnl
=
(
idata
[
n
]
>>
16
)
&
0x1f
;
adc
=
idata
[
n
]
&
0xfff
;
//only 12 bits
adc
=
idata
[
n
]
&
0xfff
;
//only 12 bits
if
(
chnl
<
16
)
{
if
(
chnl
<
16
)
{
NeEvent
->
AnS
a
[
chnl
]
=
adc
;
NeEvent
->
AnV
a
[
chnl
]
=
adc
;
}
else
{
}
else
{
NeEvent
->
AnR
a
[
chnl
-
16
]
=
adc
;
NeEvent
->
R20
a
[
chnl
-
16
]
=
adc
;
}
}
break
;
break
;
}
break
;
case
16
:
// 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
17
:
// mADC: amp Rcs & Lcs
chnl
=
(
idata
[
n
]
>>
16
)
&
0x1f
;
adc
=
idata
[
n
]
&
0xfff
;
//only 12 bits
if
(
chnl
<
16
)
{
NeEvent
->
Lcsa
[
chnl
]
=
adc
;
}
else
{
NeEvent
->
Rcsa
[
chnl
-
16
]
=
adc
;
}
}
break
;
break
;
...
@@ -389,26 +449,26 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -389,26 +449,26 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
break
;
break
;
default
:
default
:
printf
(
"ERROR !!!!!! Unknown MESYTEC typ %d
\n
"
,
typ
);
printf
(
"ERROR !!!!!! Unknown MESYTEC typ %d
\n
"
,
typ
);
printf
(
"Data = %x
\n
"
,
idata
[
n
]);
printf
(
"Data = %x
\n
"
,
idata
[
n
]);
break
;
break
;
}
}
}
}
else
if
(
c_bool
)
//in case of CAEN data
else
if
(
c_bool
)
//in case of CAEN data
{
{
typ
=
(
idata
[
n
]
>>
24
)
&
0x7
;
typ
=
(
idata
[
n
]
>>
24
)
&
0x7
;
geo
=
idata
[
n
]
>>
27
;
geo
=
idata
[
n
]
>>
27
;
if
(
dooutput
)
if
(
dooutput
)
printf
(
"CAEN geo %d
\n
"
,
geo
);
printf
(
"CAEN geo %d
\n
"
,
geo
);
switch
(
typ
)
switch
(
typ
)
{
{
case
2
:
//CAEN header
case
2
:
//CAEN header
crate
=
(
idata
[
n
]
>>
16
)
&
0xff
;
crate
=
(
idata
[
n
]
>>
16
)
&
0xff
;
cnt
=
(
idata
[
n
]
>>
8
)
&
0x1f
;
cnt
=
(
idata
[
n
]
>>
8
)
&
0x1f
;
if
(
geo
==
30
)
if
(
geo
==
30
)
NeEvent
->
mtime
=
idata
[
++
n
];
//machine time
NeEvent
->
mtime
=
idata
[
++
n
];
//machine time
if
(
dooutput
)
if
(
dooutput
)
printf
(
"Header: geo:%d crate:%d cnt = %d
\n
"
,
geo
,
crate
,
cnt
);
printf
(
"Header: geo:%d crate:%d cnt = %d
\n
"
,
geo
,
crate
,
cnt
);
break
;
break
;
...
@@ -425,7 +485,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -425,7 +485,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
case
4
:
//CAEN footer
case
4
:
//CAEN footer
c_bool
=
false
;
c_bool
=
false
;
evnt
=
idata
[
n
]
&
0xffffff
;
evnt
=
idata
[
n
]
&
0xffffff
;
if
(
dooutput
)
if
(
dooutput
)
printf
(
" Event: geo:%d number:%d
\n
"
,
geo
,
evnt
);
printf
(
" Event: geo:%d number:%d
\n
"
,
geo
,
evnt
);
break
;
break
;
...
@@ -439,7 +499,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -439,7 +499,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
default
:
default
:
printf
(
"ERROR !!!!!! Uncknown CAEN typ %d
\n
"
,
typ
);
printf
(
"ERROR !!!!!! Uncknown CAEN typ %d
\n
"
,
typ
);
printf
(
"Data = %x
\n
"
,
idata
[
n
]);
printf
(
"Data = %x
\n
"
,
idata
[
n
]);
break
;
break
;
}
}
}
}
...
@@ -451,19 +511,19 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -451,19 +511,19 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
switch
(
geo
)
switch
(
geo
)
{
{
case
1
:
case
1
:
NeEvent
->
nx1
=
0
;
NeEvent
->
nx1
=
0
;
adc
=
idata
[
++
n
];
adc
=
idata
[
++
n
];
LSB
=
adc
;
LSB
=
adc
;
//printf("First word from MWPC X1= %x\n", adc);
//printf("First word from MWPC X1= %x\n", adc);
for
(
i
=
0
;
i
<
16
;
++
i
)
for
(
i
=
0
;
i
<
16
;
++
i
)
if
((
adc
&
bit
[
i
])
>
0
)
NeEvent
->
x1
[
NeEvent
->
nx1
++
]
=
i
;
if
((
adc
&
bit
[
i
])
>
0
)
NeEvent
->
x1
[
NeEvent
->
nx1
++
]
=
i
;
adc
=
idata
[
++
n
];
adc
=
idata
[
++
n
];
MSB
=
adc
;
MSB
=
adc
;
MSBLSB
=
(
MSB
<<
16
)
|
LSB
;
MSBLSB
=
(
MSB
<<
16
)
|
LSB
;
//printf("Second word from MWPC X1= %x\n", adc);
//printf("Second word from MWPC X1= %x\n", adc);
for
(
i
=
0
;
i
<
16
;
++
i
)
for
(
i
=
0
;
i
<
16
;
++
i
)
if
((
adc
&
bit
[
i
])
>
0
)
NeEvent
->
x1
[
NeEvent
->
nx1
++
]
=
i
+
16
;
if
((
adc
&
bit
[
i
])
>
0
)
NeEvent
->
x1
[
NeEvent
->
nx1
++
]
=
i
+
16
;
adc
=
idata
[
++
n
];
//pass throug footer
adc
=
idata
[
++
n
];
//pass throug footer
//printf("Third word from MWPC X1= %x\n", adc);
//printf("Third word from MWPC X1= %x\n", adc);
NeEvent
->
rx1
=
MSBLSB
;
NeEvent
->
rx1
=
MSBLSB
;
...
@@ -475,7 +535,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -475,7 +535,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
LSB
=
adc
;
LSB
=
adc
;
//printf("First word from MWPC Y1 = %x\n", adc);
//printf("First word from MWPC Y1 = %x\n", adc);
for
(
i
=
0
;
i
<
16
;
++
i
)
for
(
i
=
0
;
i
<
16
;
++
i
)
if
((
adc
&
bit
[
i
])
>
0
)
NeEvent
->
y1
[
NeEvent
->
ny1
++
]
=
i
;
if
((
adc
&
bit
[
i
])
>
0
)
NeEvent
->
y1
[
NeEvent
->
ny1
++
]
=
i
;
adc
=
idata
[
++
n
];
adc
=
idata
[
++
n
];
MSB
=
adc
;
MSB
=
adc
;
MSBLSB
=
(
MSB
<<
16
)
|
LSB
;
MSBLSB
=
(
MSB
<<
16
)
|
LSB
;
...
@@ -485,7 +545,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -485,7 +545,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
adc
=
idata
[
++
n
];
//pass through footer
adc
=
idata
[
++
n
];
//pass through footer
//printf("Third word from MWPC Y1 = %x\n", adc);
//printf("Third word from MWPC Y1 = %x\n", adc);
NeEvent
->
ry1
=
MSBLSB
;
NeEvent
->
ry1
=
MSBLSB
;
break
;
break
;
case
3
:
case
3
:
NeEvent
->
nx2
=
0
;
NeEvent
->
nx2
=
0
;
adc
=
idata
[
++
n
];
adc
=
idata
[
++
n
];
...
@@ -508,7 +568,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -508,7 +568,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
adc
=
idata
[
++
n
];
adc
=
idata
[
++
n
];
LSB
=
adc
;
LSB
=
adc
;
//printf("First word from MWPC Y2 = %x\n", adc);
//printf("First word from MWPC Y2 = %x\n", adc);
for
(
i
=
0
;
i
<
16
;
++
i
)
for
(
i
=
0
;
i
<
16
;
++
i
)
if
((
adc
&
bit
[
i
])
>
0
)
NeEvent
->
y2
[
NeEvent
->
ny2
++
]
=
i
;
if
((
adc
&
bit
[
i
])
>
0
)
NeEvent
->
y2
[
NeEvent
->
ny2
++
]
=
i
;
adc
=
idata
[
++
n
];
adc
=
idata
[
++
n
];
MSB
=
adc
;
MSB
=
adc
;
...
@@ -521,9 +581,9 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -521,9 +581,9 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
NeEvent
->
ry2
=
MSBLSB
;
NeEvent
->
ry2
=
MSBLSB
;
break
;
break
;
}
}
break
;
// end of CAMAC
break
;
// end of CAMAC
case
200
:
//VME_1, see setup.usf
case
200
:
//VME_1, see setup.usf
...
@@ -541,12 +601,12 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -541,12 +601,12 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
if
(
m_bool
)
//in case of MESYTEC data
if
(
m_bool
)
//in case of MESYTEC data
{
{
typ
=
idata
[
n
]
>>
30
;
typ
=
idata
[
n
]
>>
30
;
switch
(
typ
)
switch
(
typ
)
{
{
case
1
:
//MESYTEC header
case
1
:
//MESYTEC header
module_id
=
(
idata
[
n
]
>>
16
)
&
0xff
;
module_id
=
(
idata
[
n
]
>>
16
)
&
0xff
;
if
(
dooutput
)
if
(
dooutput
)
printf
(
"Mesytec Module ID %d
\n
"
,
module_id
);
printf
(
"Mesytec Module ID %d
\n
"
,
module_id
);
break
;
break
;
...
@@ -583,26 +643,26 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -583,26 +643,26 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
break
;
break
;
default
:
default
:
printf
(
"ERROR !!!!!! Unknown MESYTEC typ %d
\n
"
,
typ
);
printf
(
"ERROR !!!!!! Unknown MESYTEC typ %d
\n
"
,
typ
);
printf
(
"Data = %x
\n
"
,
idata
[
n
]);
printf
(
"Data = %x
\n
"
,
idata
[
n
]);
break
;
break
;
}
}
}
}
else
if
(
c_bool
)
//in case of CAEN data
else
if
(
c_bool
)
//in case of CAEN data
{
{
typ
=
(
idata
[
n
]
>>
24
)
&
0x7
;
typ
=
(
idata
[
n
]
>>
24
)
&
0x7
;
geo
=
idata
[
n
]
>>
27
;
geo
=
idata
[
n
]
>>
27
;
if
(
dooutput
)
if
(
dooutput
)
printf
(
"CAEN geo %d
\n
"
,
geo
);
printf
(
"CAEN geo %d
\n
"
,
geo
);
switch
(
typ
)
switch
(
typ
)
{
{
case
2
:
//CAEN header
case
2
:
//CAEN header
crate
=
(
idata
[
n
]
>>
16
)
&
0xff
;
crate
=
(
idata
[
n
]
>>
16
)
&
0xff
;
cnt
=
(
idata
[
n
]
>>
8
)
&
0x1f
;
cnt
=
(
idata
[
n
]
>>
8
)
&
0x1f
;
if
(
geo
==
30
)
if
(
geo
==
30
)
NeEvent
->
mtime
=
idata
[
++
n
];
//machine time
NeEvent
->
mtime
=
idata
[
++
n
];
//machine time
if
(
dooutput
)
if
(
dooutput
)
printf
(
"Header: geo:%d crate:%d cnt = %d
\n
"
,
geo
,
crate
,
cnt
);
printf
(
"Header: geo:%d crate:%d cnt = %d
\n
"
,
geo
,
crate
,
cnt
);
break
;
break
;
...
@@ -614,7 +674,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -614,7 +674,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
switch
(
geo
)
switch
(
geo
)
{
{
case
6
:
//scaler v560
case
6
:
//scaler v560
for
(
i
=
0
;
i
<
16
;
++
i
)
for
(
i
=
0
;
i
<
16
;
++
i
)
NeEvent
->
scaler
[
i
]
=
idata
[
n
++
]
&
0x07ffffff
;
NeEvent
->
scaler
[
i
]
=
idata
[
n
++
]
&
0x07ffffff
;
break
;
break
;
}
}
...
@@ -623,7 +683,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -623,7 +683,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
case
4
:
//CAEN footer
case
4
:
//CAEN footer
c_bool
=
false
;
c_bool
=
false
;
evnt
=
idata
[
n
]
&
0xffffff
;
evnt
=
idata
[
n
]
&
0xffffff
;
if
(
dooutput
)
if
(
dooutput
)
printf
(
" Event: geo:%d number:%d
\n
"
,
geo
,
evnt
);
printf
(
" Event: geo:%d number:%d
\n
"
,
geo
,
evnt
);
break
;
break
;
...
@@ -637,7 +697,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -637,7 +697,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
default
:
default
:
printf
(
"ERROR !!!!!! Uncknown CAEN typ %d
\n
"
,
typ
);
printf
(
"ERROR !!!!!! Uncknown CAEN typ %d
\n
"
,
typ
);
printf
(
"Data = %x
\n
"
,
idata
[
n
]);
printf
(
"Data = %x
\n
"
,
idata
[
n
]);
break
;
break
;
}
}
}
}
...
@@ -649,7 +709,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -649,7 +709,7 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
}
//end of NextSubEvent
}
//end of NextSubEvent
NeEvent
->
nevent
=
fInput
->
GetCount
();
NeEvent
->
nevent
=
fInput
->
GetCount
();
NeEvent
->
trigger
=
fInput
->
GetTrigger
();
NeEvent
->
trigger
=
fInput
->
GetTrigger
();
NeEvent
->
subevents
=
num
;
NeEvent
->
subevents
=
num
;
NeEvent
->
evsize
=
sz
;
NeEvent
->
evsize
=
sz
;
...
@@ -657,10 +717,10 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -657,10 +717,10 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
fSubEvents
->
Fill
(
num
);
fSubEvents
->
Fill
(
num
);
fEventsSizes
->
Fill
(
sz
);
fEventsSizes
->
Fill
(
sz
);
//
//
for
(
n
=
0
;
n
<
4
;
++
n
)
for
(
n
=
0
;
n
<
4
;
++
n
)
// if(NeEvent->trigger == 2)
// if(NeEvent->trigger == 2)
{
{
if
(
NeEvent
->
F3
[
n
]
>
0
)
d1F3
[
n
]
->
Fill
(
NeEvent
->
F3
[
n
]);
if
(
NeEvent
->
F3
[
n
]
>
0
)
d1F3
[
n
]
->
Fill
(
NeEvent
->
F3
[
n
]);
if
(
NeEvent
->
F5
[
n
]
>
0
)
d1F5
[
n
]
->
Fill
(
NeEvent
->
F5
[
n
]);
if
(
NeEvent
->
F5
[
n
]
>
0
)
d1F5
[
n
]
->
Fill
(
NeEvent
->
F5
[
n
]);
...
@@ -673,12 +733,12 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
...
@@ -673,12 +733,12 @@ Bool_t TNeProc::BuildEvent(TGo4EventElement* target)
//
//
if
(
NeEvent
->
F3
[
0
]
>
0
&&
NeEvent
->
F3
[
1
]
>
0
&&
NeEvent
->
F3
[
2
]
>
0
&&
NeEvent
->
F3
[
3
]
>
0
)
if
(
NeEvent
->
F3
[
0
]
>
0
&&
NeEvent
->
F3
[
1
]
>
0
&&
NeEvent
->
F3
[
2
]
>
0
&&
NeEvent
->
F3
[
3
]
>
0
)
af3
=
(
NeEvent
->
F3
[
0
]
+
NeEvent
->
F3
[
1
]
+
NeEvent
->
F3
[
2
]
+
NeEvent
->
F3
[
3
]
+
4.
*
gRandom
->
Uniform
())
/
4.
;
af3
=
(
NeEvent
->
F3
[
0
]
+
NeEvent
->
F3
[
1
]
+
NeEvent
->
F3
[
2
]
+
NeEvent
->
F3
[
3
]
+
4.
*
gRandom
->
Uniform
())
/
4.
;
if
(
NeEvent
->
F5
[
0
]
>
0
&&
NeEvent
->
F5
[
1
]
>
0
&&
NeEvent
->
F5
[
2
]
>
0
&&
NeEvent
->
F5
[
3
]
>
0
)
if
(
NeEvent
->
F5
[
0
]
>
0
&&
NeEvent
->
F5
[
1
]
>
0
&&
NeEvent
->
F5
[
2
]
>
0
&&
NeEvent
->
F5
[
3
]
>
0
)
af5
=
(
NeEvent
->
F5
[
0
]
+
NeEvent
->
F5
[
1
]
+
NeEvent
->
F5
[
2
]
+
NeEvent
->
F5
[
3
]
+
4.
*
gRandom
->
Uniform
())
/
4.
;
af5
=
(
NeEvent
->
F5
[
0
]
+
NeEvent
->
F5
[
1
]
+
NeEvent
->
F5
[
2
]
+
NeEvent
->
F5
[
3
]
+
4.
*
gRandom
->
Uniform
())
/
4.
;
if
(
NeEvent
->
tF3
[
0
]
>
0
&&
NeEvent
->
tF3
[
1
]
>
0
&&
NeEvent
->
tF3
[
2
]
>
0
&&
NeEvent
->
tF3
[
3
]
>
0
)
if
(
NeEvent
->
tF3
[
0
]
>
0
&&
NeEvent
->
tF3
[
1
]
>
0
&&
NeEvent
->
tF3
[
2
]
>
0
&&
NeEvent
->
tF3
[
3
]
>
0
)
tf3
=
(
NeEvent
->
tF3
[
0
]
+
NeEvent
->
tF3
[
1
]
+
NeEvent
->
tF3
[
2
]
+
NeEvent
->
tF3
[
3
]
+
4.
*
gRandom
->
Uniform
())
/
4.
;
tf3
=
(
NeEvent
->
tF3
[
0
]
+
NeEvent
->
tF3
[
1
]
+
NeEvent
->
tF3
[
2
]
+
NeEvent
->
tF3
[
3
]
+
4.
*
gRandom
->
Uniform
())
/
4.
;
if
(
NeEvent
->
tF5
[
0
]
>
0
&&
NeEvent
->
tF5
[
1
]
>
0
&&
NeEvent
->
tF5
[
2
]
>
0
&&
NeEvent
->
tF5
[
3
]
>
0
)
if
(
NeEvent
->
tF5
[
0
]
>
0
&&
NeEvent
->
tF5
[
1
]
>
0
&&
NeEvent
->
tF5
[
2
]
>
0
&&
NeEvent
->
tF5
[
3
]
>
0
)
tf5
=
(
NeEvent
->
tF5
[
0
]
+
NeEvent
->
tF5
[
1
]
+
NeEvent
->
tF5
[
2
]
+
NeEvent
->
tF5
[
3
]
+
4.
*
gRandom
->
Uniform
())
/
4.
;
tf5
=
(
NeEvent
->
tF5
[
0
]
+
NeEvent
->
tF5
[
1
]
+
NeEvent
->
tF5
[
2
]
+
NeEvent
->
tF5
[
3
]
+
4.
*
gRandom
->
Uniform
())
/
4.
;
//
//
...
@@ -690,7 +750,7 @@ ToF = (tf5 - tf3)*0.015625 + 68.475;
...
@@ -690,7 +750,7 @@ ToF = (tf5 - tf3)*0.015625 + 68.475;
if
(
af3
*
af5
*
tf3
*
tf5
!=
0
)
if
(
af3
*
af5
*
tf3
*
tf5
!=
0
)
{
{
// if(NeEvent->trigger == 1)
// if(NeEvent->trigger == 1)
{
{
d1ToF
->
Fill
(
ToF
);
d1ToF
->
Fill
(
ToF
);
d1aF3
->
Fill
(
af3
);
d1aF3
->
Fill
(
af3
);
...
@@ -701,19 +761,46 @@ ToF = (tf5 - tf3)*0.015625 + 68.475;
...
@@ -701,19 +761,46 @@ ToF = (tf5 - tf3)*0.015625 + 68.475;
}
}
}
}
for
(
n
=
0
;
n
<
16
;
++
n
)
{
for
(
int
n
=
0
;
n
<
16
;
++
n
)
{
if
(
NeEvent
->
Lxt
[
n
]
>
0
)
d1Lxa
[
n
]
->
Fill
(
NeEvent
->
Lxa
[
n
]);
if
(
NeEvent
->
Lxt
[
n
]
>
0
){
d1Lxt
[
n
]
->
Fill
(
NeEvent
->
Lxt
[
n
]);
d1Lxa
[
n
]
->
Fill
(
NeEvent
->
Lxa
[
n
]);
if
(
NeEvent
->
Lyt
[
n
]
>
0
)
d1Lya
[
n
]
->
Fill
(
NeEvent
->
Lya
[
n
]);
d1Lxt
[
n
]
->
Fill
(
NeEvent
->
Lxt
[
n
]);
d1Lyt
[
n
]
->
Fill
(
NeEvent
->
Lyt
[
n
]);
}
if
(
NeEvent
->
Rxt
[
n
]
>
0
)
d1Rxa
[
n
]
->
Fill
(
NeEvent
->
Rxa
[
n
]);
if
(
NeEvent
->
Lyt
[
n
]
>
0
){
d1Rxt
[
n
]
->
Fill
(
NeEvent
->
Rxt
[
n
]);
d1Lya
[
n
]
->
Fill
(
NeEvent
->
Lya
[
n
]);
if
(
NeEvent
->
Ryt
[
n
]
>
0
)
d1Rya
[
n
]
->
Fill
(
NeEvent
->
Rya
[
n
]);
d1Lyt
[
n
]
->
Fill
(
NeEvent
->
Lyt
[
n
]);
d1Ryt
[
n
]
->
Fill
(
NeEvent
->
Ryt
[
n
]);
}
if
(
NeEvent
->
AnSt
[
n
]
>
0
)
d1AnSa
[
n
]
->
Fill
(
NeEvent
->
AnSa
[
n
]);
if
(
NeEvent
->
Rxt
[
n
]
>
0
){
d1AnSt
[
n
]
->
Fill
(
NeEvent
->
AnSt
[
n
]);
d1Rxa
[
n
]
->
Fill
(
NeEvent
->
Rxa
[
n
]);
if
(
NeEvent
->
AnRt
[
n
]
>
0
)
d1AnRa
[
n
]
->
Fill
(
NeEvent
->
AnRa
[
n
]);
d1Rxt
[
n
]
->
Fill
(
NeEvent
->
Rxt
[
n
]);
d1AnRt
[
n
]
->
Fill
(
NeEvent
->
AnRt
[
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
->
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
]);
}
}
}
//-----p1 secrors amp.-----
//-----p1 secrors amp.-----
/*
/*
...
@@ -734,7 +821,7 @@ ToF = (tf5 - tf3)*0.015625 + 68.475;
...
@@ -734,7 +821,7 @@ ToF = (tf5 - tf3)*0.015625 + 68.475;
for (n=0; n<16; ++n)
for (n=0; n<16; ++n)
{
{
value1 = (double)NeEvent->p1s[n] + gRandom->Uniform();
value1 = (double)NeEvent->p1s[n] + gRandom->Uniform();
value2 = ((TNeAnalysis*)go4)->p_p1s->Energy(value1, n);
value2 = ((TNeAnalysis*)go4)->p_p1s->Energy(value1, n);
d1_Lxa_c[n]->Fill(value2);
d1_Lxa_c[n]->Fill(value2);
mp1s++;
mp1s++;
...
...
TNeProc.h
View file @
756eb644
...
@@ -8,17 +8,17 @@
...
@@ -8,17 +8,17 @@
//-----class TNeParam-----;
//-----class TNeParam-----;
extern
int
otl
;
extern
int
otl
;
class
TNeProc
:
public
TGo4EventProcessor
class
TNeProc
:
public
TGo4EventProcessor
{
{
public
:
public
:
TNeProc
()
;
TNeProc
()
;
TNeProc
(
const
char
*
name
);
TNeProc
(
const
char
*
name
);
virtual
~
TNeProc
()
;
virtual
~
TNeProc
()
;
//! event processing function
Bool_t
BuildEvent
(
TGo4EventElement
*
target
);
// event processing function
Bool_t
BuildEvent
(
TGo4EventElement
*
target
);
double
GetClasters
(
unsigned
short
n
,
unsigned
short
*
x
);
double
GetClasters
(
unsigned
short
n
,
unsigned
short
*
x
);
static
long
bit
[
32
];
static
long
bit
[
32
];
private
:
private
:
TH1
*
fTrigger
;
TH1
*
fTrigger
;
TH1
*
fSubEvents
;
TH1
*
fSubEvents
;
...
@@ -47,6 +47,20 @@ private:
...
@@ -47,6 +47,20 @@ private:
TH1
*
d1AnVa
[
16
];
TH1
*
d1AnVa
[
16
];
TH1
*
d1AnVt
[
16
];
TH1
*
d1AnVt
[
16
];
TH1
*
d1AnVc
[
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
];
//-----clb-----
//-----clb-----
TH1
*
d1sq1_x_c
[
16
];
TH1
*
d1sq1_x_c
[
16
];
//-----ToF+MWPC-----
//-----ToF+MWPC-----
...
@@ -64,7 +78,7 @@ private:
...
@@ -64,7 +78,7 @@ private:
TH2
*
d2ToFaF5
;
TH2
*
d2ToFaF5
;
//-----CALIBRATED-----
//-----CALIBRATED-----
//-----neutrons-----
//-----neutrons-----
//-----WIRES-----
//-----WIRES-----
TH1
*
d1X1
;
TH1
*
d1X1
;
TH1
*
d1Y1
;
TH1
*
d1Y1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment