Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
scdaq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scouting-demonstrator
scdaq
Commits
db16adde
Commit
db16adde
authored
4 years ago
by
Thomas Owen James
Browse files
Options
Downloads
Patches
Plain Diff
changes for run3 data format
parent
657015be
No related branches found
No related tags found
1 merge request
!59
CMSSW json file
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/elastico.cc
+4
-4
4 additions, 4 deletions
src/elastico.cc
src/format.h
+38
-7
38 additions, 7 deletions
src/format.h
with
42 additions
and
11 deletions
src/elastico.cc
+
4
−
4
View file @
db16adde
...
...
@@ -120,9 +120,9 @@ void ElasticProcessor::makeAppendToBulkRequest(std::ostringstream &particle_data
uint32_t
chrgv
=
(
ms
>>
shifts
::
chrgv
)
&
masks
::
chrgv
;
uint32_t
index
=
(
ms
>>
shifts
::
index
)
&
masks
::
index
;
float
phi
=
((
ms
>>
shifts
::
phi
)
&
masks
::
phi
)
*
gmt_scales
::
phi_scale
;
uint32_t
ieta
=
(
ms
>>
shifts
::
eta
)
&
masks
::
etav
;
if
(((
mf
>>
shifts
::
eta
)
&
masks
::
etas
)
!=
0
)
ieta
-=
512
;
float
eta
=
ieta
*
gmt_scales
::
eta_scale
;
//
uint32_t ieta = (ms >> shifts::eta) & masks::etav;
//
if(((mf >> shifts::eta) & masks::etas)!=0) ieta -= 512;
//
float eta = ieta*gmt_scales::eta_scale;
(
void
)(
iso
);
// TODO: Unused variable
(
void
)(
chrgv
);
// TODO: Unused variable
...
...
@@ -132,7 +132,7 @@ void ElasticProcessor::makeAppendToBulkRequest(std::ostringstream &particle_data
particle_data
<<
"{
\"
index
\"
: {}}
\n
"
<<
"{
\"
orbit
\"
: "
<<
orbit
<<
','
<<
"
\"
bx
\"
: "
<<
bx
<<
','
<<
"
\"
eta
\"
: "
<<
eta
<<
','
//
<< "\"eta\": " << eta << ','
<<
"
\"
phi
\"
: "
<<
phi
<<
','
<<
"
\"
etap
\"
: "
<<
etaext
<<
','
<<
"
\"
phip
\"
: "
<<
phiext
<<
','
...
...
This diff is collapsed.
Click to expand it.
src/format.h
+
38
−
7
View file @
db16adde
...
...
@@ -5,8 +5,8 @@
#include
<math.h>
struct
block1
{
uint32_t
bx
[
8
];
uint32_t
orbit
[
8
];
uint32_t
bx
[
8
];
uint32_t
mu1f
[
8
];
uint32_t
mu1s
[
8
];
uint32_t
mu2f
[
8
];
...
...
@@ -19,12 +19,13 @@ struct muon{
};
struct
block
{
uint32_t
bx
;
uint32_t
orbit
;
uint32_t
bx
;
muon
mu
[
16
];
};
struct
masks
{
//original format
/*struct masks{
//bx word: 16 bits used for actual bx, MS 4 bits are muon type
//(0xf intermediate, 0x0 final, following 4 bits for link id)
static constexpr uint32_t bx = 0xffff;
...
...
@@ -48,14 +49,43 @@ struct masks{
//NOTA BENE: reserved two bits are used for muon id
//0x1==intermediate, 0x2==final
static constexpr uint32_t rsv = 0x0003;
};*/
//run3 format --tj
struct
masks
{
//bx word: 16 bits used for actual bx, MS 4 bits are muon type
//(0xf intermediate, 0x0 final, following 4 bits for link id)
static
constexpr
uint32_t
bx
=
0x1fff
;
static
constexpr
uint32_t
interm
=
0x0001
;
//masks for muon 64 bits
static
constexpr
uint32_t
phiext
=
0x03ff
;
static
constexpr
uint32_t
pt
=
0x01ff
;
static
constexpr
uint32_t
ptuncon
=
0x00ff
;
//--8bits
static
constexpr
uint32_t
qual
=
0x000f
;
static
constexpr
uint32_t
etaext
=
0x01ff
;
static
constexpr
uint32_t
etaextv
=
0x00ff
;
static
constexpr
uint32_t
etaexts
=
0x0100
;
static
constexpr
uint32_t
iso
=
0x0003
;
static
constexpr
uint32_t
chrg
=
0x0001
;
static
constexpr
uint32_t
chrgv
=
0x0001
;
static
constexpr
uint32_t
index
=
0x007f
;
static
constexpr
uint32_t
phi
=
0x03ff
;
static
constexpr
uint32_t
eta
=
0x01ff
;
static
constexpr
uint32_t
etav
=
0x00ff
;
static
constexpr
uint32_t
etas
=
0x0100
;
static
constexpr
uint32_t
impact
=
0x0003
;
//NOTA BENE: reserved two bits are used for muon id
//0x1==intermediate, 0x2==final
// static constexpr uint32_t rsv = 0x0003;//-- no longer anything reserved
};
struct
shifts
{
//bx word: 16 bits used for actual bx, MS 4 bits are muon type
//(0xf intermediate, 0x0 final, following 4 bits for link id)
static
constexpr
uint32_t
bx
=
0
;
static
constexpr
uint32_t
interm
=
27
;
static
constexpr
uint32_t
linkid
=
23
;
static
constexpr
uint32_t
interm
=
31
;
//updated for new run3 format //tj
//
static constexpr uint32_t linkid = 23;
//no longer exists in data format //tj
//shifts for muon 64 bits
static
constexpr
uint32_t
phiext
=
0
;
static
constexpr
uint32_t
pt
=
10
;
...
...
@@ -66,8 +96,9 @@ struct shifts{
static
constexpr
uint32_t
chrgv
=
3
;
static
constexpr
uint32_t
index
=
4
;
static
constexpr
uint32_t
phi
=
11
;
static
constexpr
uint32_t
eta
=
21
;
static
constexpr
uint32_t
rsv
=
30
;
//static constexpr uint32_t eta = 21; --hack for now --tj -- only store etaext
static
constexpr
uint32_t
ptuncon
=
21
;
static
constexpr
uint32_t
impact
=
30
;
};
struct
header_shifts
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment