Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
Vetra
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
Container Registry
Model registry
Operate
Environments
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
LHCb
Vetra
Commits
8d700833
Commit
8d700833
authored
1 year ago
by
Mingjie Feng
Browse files
Options
Downloads
Patches
Plain Diff
add fillBankCalibrationSteps
parent
23ae9628
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!82
add TrimDAC algorithm
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Ut/UTEmuAlgorithms/include/UTEmu/UTEmuTrimDAC.h
+3
-4
3 additions, 4 deletions
Ut/UTEmuAlgorithms/include/UTEmu/UTEmuTrimDAC.h
Ut/UTEmuAlgorithms/src/UTEmuTrimDAC.cpp
+19
-63
19 additions, 63 deletions
Ut/UTEmuAlgorithms/src/UTEmuTrimDAC.cpp
with
22 additions
and
67 deletions
Ut/UTEmuAlgorithms/include/UTEmu/UTEmuTrimDAC.h
+
3
−
4
View file @
8d700833
...
...
@@ -60,13 +60,12 @@ namespace UTEmu {
mutable
std
::
map
<
std
::
string
,
Gaudi
::
Accumulators
::
Histogram
<
1
>>
m_1d_tell40
;
mutable
std
::
vector
<
std
::
string
>
m_layerName
=
{
"UTaX"
,
"UTaU"
,
"UTbV"
,
"UTbX"
};
private
:
// fill ADC value
void
fillTrimTuples
(
const
LHCb
::
UTDigit
*
,
std
::
vector
<
Tuple
>&
)
const
;
void
fillTrimTuples
(
const
LHCb
::
UTDigit
*
,
const
LHCb
::
ODIN
&
,
Tuple
&
)
const
;
// fill calibrationStep of each channel
void
fillTrimStepTuples
(
const
LHCb
::
UTDigit
*
,
const
LHCb
::
ODIN
&
,
std
::
vector
<
Tuple
>&
)
const
;
void
fillTrimTuples
(
const
LHCb
::
UTDigit
*
,
Tuple
&
,
std
::
string
)
const
;
void
fillBankCalibrationSteps
(
const
std
::
pair
<
unsigned
int
,
int
>
,
const
LHCb
::
ODIN
&
)
const
;
};
...
...
This diff is collapsed.
Click to expand it.
Ut/UTEmuAlgorithms/src/UTEmuTrimDAC.cpp
+
19
−
63
View file @
8d700833
...
...
@@ -38,7 +38,6 @@ StatusCode TrimDACAlgorithm::initialize() {
void
TrimDACAlgorithm
::
operator
()(
const
UTDigits
&
digitsCont
,
const
std
::
vector
<
std
::
pair
<
unsigned
int
,
int
>>&
bank_types
,
const
LHCb
::
ODIN
&
odin
)
const
{
//create tuple for each layer
/*
std
::
vector
<
Tuple
>
eventTuple
;
Tuple
UTaX
=
nTuple
(
"UTaX"
,
""
);
Tuple
UTaU
=
nTuple
(
"UTaU"
,
""
);
...
...
@@ -48,6 +47,7 @@ void TrimDACAlgorithm::operator()( const UTDigits& digitsCont, const std::vector
eventTuple
.
push_back
(
UTaU
);
eventTuple
.
push_back
(
UTbV
);
eventTuple
.
push_back
(
UTbX
);
//store calibration step
eventTuple
[
0
]
->
column
(
"calibrationStep"
,
(
short
)
odin
.
calibrationStep
()
).
ignore
();
eventTuple
[
1
]
->
column
(
"calibrationStep"
,
(
short
)
odin
.
calibrationStep
()
).
ignore
();
...
...
@@ -55,21 +55,21 @@ void TrimDACAlgorithm::operator()( const UTDigits& digitsCont, const std::vector
eventTuple
[
3
]
->
column
(
"calibrationStep"
,
(
short
)
odin
.
calibrationStep
()
).
ignore
();
for
(
const
auto
&
d
:
digitsCont
)
fillTrimTuples
(
d
,
eventTuple
);
//for ( const auto& d : digitsCont ) fillTrimStepTuples(d, odin, eventTuple);
eventTuple
[
0
]
->
write
().
ignore
();
eventTuple
[
1
]
->
write
().
ignore
();
eventTuple
[
2
]
->
write
().
ignore
();
eventTuple
[
3
]
->
write
().
ignore
();
*/
Tuple
eventTuple
=
nTuple
(
"trimDAC"
,
""
);
eventTuple
->
column
(
"calibrationStep"
,
(
short
)
odin
.
calibrationStep
()
).
ignore
();
for
(
const
auto
&
d
:
digitsCont
)
fillTrimTuples
(
d
,
odin
,
eventTuple
);
eventTuple
->
write
().
ignore
();
//for ( const auto& d : bank_types ) fillBankCalibrationSteps( d, odin );
/*
//store information for one layer
std::string aLayer = "UTaX";
Tuple eventTuple = nTuple(aLayer, "" );
eventTuple->column( "calibrationStep", (short)odin.calibrationStep() ).ignore();
for ( const auto& d : digitsCont ) fillTrimTuples(d, eventTuple, aLayer);
eventTuple->write().ignore();
*/
for
(
const
auto
&
d
:
bank_types
)
fillBankCalibrationSteps
(
d
,
odin
);
}
void
TrimDACAlgorithm
::
fillTrimTuples
(
const
LHCb
::
UTDigit
*
aDigit
,
...
...
@@ -78,72 +78,28 @@ void TrimDACAlgorithm::fillTrimTuples( const LHCb::UTDigit* aDigit,
std
::
string
module_name
=
std
::
get
<
2
>
(
tuple
);
auto
name
=
UTEmu
::
UT_layers
[
aDigit
->
layer
()]
+
"_"
+
module_name
+
"_"
+
std
::
to_string
(
aDigit
->
asic
())
+
"_"
+
std
::
to_string
(
aDigit
->
strip
()
%
128
);
size_t
found1
=
name
.
find
(
"UTaX"
);
if
(
found1
!=
std
::
string
::
npos
){
eventTuple
[
0
]
->
column
(
name
+
"_"
+
std
::
to_string
(
aDigit
->
channelID
().
channelID
()),
(
short
)
aDigit
->
depositedCharge
()).
ignore
();
}
else
{
size_t
found2
=
name
.
find
(
"UTaU"
);
if
(
found2
!=
std
::
string
::
npos
){
eventTuple
[
1
]
->
column
(
name
+
"_"
+
std
::
to_string
(
aDigit
->
channelID
().
channelID
()),
(
short
)
aDigit
->
depositedCharge
()).
ignore
();
}
else
{
size_t
found3
=
name
.
find
(
"UTbV"
);
if
(
found3
!=
std
::
string
::
npos
){
eventTuple
[
2
]
->
column
(
name
+
"_"
+
std
::
to_string
(
aDigit
->
channelID
().
channelID
()),
(
short
)
aDigit
->
depositedCharge
()).
ignore
();
}
else
{
size_t
found4
=
name
.
find
(
"UTbX"
);
if
(
found4
!=
std
::
string
::
npos
)
{
eventTuple
[
3
]
->
column
(
name
+
"_"
+
std
::
to_string
(
aDigit
->
channelID
().
channelID
()),
(
short
)
aDigit
->
depositedCharge
()).
ignore
();
}
}
}
for
(
int
i
=
0
;
i
<
m_layerName
.
size
();
i
++
){
auto
layer
=
m_layerName
[
i
];
size_t
found
=
name
.
find
(
layer
);
if
(
found
!=
std
::
string
::
npos
){
eventTuple
[
i
]
->
column
(
name
+
"_"
+
std
::
to_string
(
aDigit
->
channelID
().
channelID
()),
(
short
)
aDigit
->
depositedCharge
()).
ignore
();
}
}
}
void
TrimDACAlgorithm
::
fillTrimTuples
(
const
LHCb
::
UTDigit
*
aDigit
,
const
LHCb
::
ODIN
&
odin
,
Tuple
&
eventTuple
)
const
{
Tuple
&
eventTuple
,
std
::
string
aLayer
)
const
{
auto
tuple
=
UTMap
.
getTuple
(
aDigit
->
module
(),
aDigit
->
face
(),
aDigit
->
stave
(),
aDigit
->
side
(),
aDigit
->
sector
()
);
std
::
string
module_name
=
std
::
get
<
2
>
(
tuple
);
auto
name
=
UTEmu
::
UT_layers
[
aDigit
->
layer
()]
+
"_"
+
module_name
+
"_"
+
std
::
to_string
(
aDigit
->
asic
())
+
"_"
+
std
::
to_string
(
aDigit
->
strip
()
%
128
);
size_t
found
=
name
.
find
(
"UTaX_1CB_M2"
);
//size_t found1 = name.find("C");
//if (found != std::string::npos && found1 !=std::string::npos){
size_t
found
=
name
.
find
(
aLayer
);
if
(
found
!=
std
::
string
::
npos
){
eventTuple
->
column
(
name
+
"_"
+
std
::
to_string
(
aDigit
->
channelID
().
channelID
()),
(
short
)
aDigit
->
depositedCharge
()).
ignore
();
}
}
void
TrimDACAlgorithm
::
fillTrimStepTuples
(
const
LHCb
::
UTDigit
*
aDigit
,
const
LHCb
::
ODIN
&
odin
,
std
::
vector
<
Tuple
>&
eventTuple
)
const
{
double
step
=
-
1
;
auto
tuple
=
UTMap
.
getTuple
(
aDigit
->
module
(),
aDigit
->
face
(),
aDigit
->
stave
(),
aDigit
->
side
(),
aDigit
->
sector
()
);
std
::
string
module_name
=
std
::
get
<
2
>
(
tuple
);
auto
name
=
UTEmu
::
UT_layers
[
aDigit
->
layer
()]
+
"_"
+
module_name
+
"_"
+
std
::
to_string
(
aDigit
->
asic
())
+
"_"
+
std
::
to_string
(
aDigit
->
strip
()
%
128
);
size_t
found1
=
name
.
find
(
"UTaX"
);
if
(
found1
!=
std
::
string
::
npos
){
eventTuple
[
0
]
->
column
(
name
,
(
short
)
odin
.
calibrationStep
()
).
ignore
();
}
else
{
size_t
found2
=
name
.
find
(
"UTaU"
);
if
(
found2
!=
std
::
string
::
npos
)
{
eventTuple
[
1
]
->
column
(
name
,
(
short
)
odin
.
calibrationStep
()
).
ignore
();
}
else
{
size_t
found3
=
name
.
find
(
"UTbV"
);
if
(
found3
!=
std
::
string
::
npos
){
eventTuple
[
2
]
->
column
(
name
,
(
short
)
odin
.
calibrationStep
()
).
ignore
();
}
else
{
size_t
found4
=
name
.
find
(
"UTbX"
);
if
(
found4
!=
std
::
string
::
npos
)
{
eventTuple
[
3
]
->
column
(
name
,
(
short
)
odin
.
calibrationStep
()
).
ignore
();
}
}
}
}
}
void
TrimDACAlgorithm
::
fillBankCalibrationSteps
(
const
std
::
pair
<
unsigned
int
,
int
>
pair
,
const
LHCb
::
ODIN
&
odin
)
const
{
auto
sourceID
=
pair
.
first
;
...
...
This diff is collapsed.
Click to expand it.
Wojciech Krupa
@wokrupa
mentioned in commit
1fc51385
·
1 year ago
mentioned in commit
1fc51385
mentioned in commit 1fc5138508bc0c9b4cda16cf28dc475e5da09a1c
Toggle commit list
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