Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
blob
sPHENIX
Alignment
CI
cmake
Core
docs
Examples
Algorithms
Detectors
Framework
include
ActsExamples
EventData
AverageSimHits.hpp
Cluster.hpp
ExtractedSimulationProcess.hpp
GeometryContainers.hpp
Index.hpp
IndexSourceLink.hpp
Measurement.hpp
MeasurementCalibration.hpp
ProtoTrack.hpp
ProtoVertex.hpp
ScalingCalibrator.hpp
SimHit.hpp
SimParticle.hpp
SimSeed.hpp
SimSpacePoint.hpp
SimVertex.hpp
Track.hpp
Trajectories.hpp
Framework
Utilities
Validation
ML
src
Io
Python
Run
Scripts
Fatras
Plugins
Tests
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ScalingCalibrator.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file ScalingCalibrator.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2023 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#pragma once
10
11
#include <
Acts/Geometry/GeometryIdentifier.hpp
>
12
#include <
ActsExamples/EventData/MeasurementCalibration.hpp
>
13
14
#include <filesystem>
15
16
#include <TFile.h>
17
#include <TH2D.h>
18
19
namespace
ActsExamples {
20
21
class
ScalingCalibrator
:
public
MeasurementCalibrator
{
22
public
:
23
struct
ConstantTuple
{
24
double
x_offset
{0};
25
double
x_scale
{1};
26
double
y_offset
{0};
27
double
y_scale
{1};
28
};
29
30
struct
MapTuple
{
31
TH2D
x_offset
;
32
TH2D
x_scale
;
33
TH2D
y_offset
;
34
TH2D
y_scale
;
35
36
ConstantTuple
at
(
size_t
sizeLoc0,
size_t
sizeLoc1)
const
{
37
ConstantTuple
ct;
38
ct.
x_offset
=
39
x_offset
.GetBinContent(
x_offset
.FindFixBin(sizeLoc0, sizeLoc1));
40
ct.
x_scale
=
41
x_scale
.GetBinContent(
x_scale
.FindFixBin(sizeLoc0, sizeLoc1));
42
ct.
y_offset
=
43
y_offset
.GetBinContent(
y_offset
.FindFixBin(sizeLoc0, sizeLoc1));
44
ct.
y_scale
=
45
y_scale
.GetBinContent(
y_scale
.FindFixBin(sizeLoc0, sizeLoc1));
46
return
ct;
47
}
48
};
49
50
ScalingCalibrator
(
const
std::filesystem::path
&
path
);
51
52
void
calibrate
(
53
const
MeasurementContainer
& measurements,
54
const
ClusterContainer
*
clusters
,
const
Acts::GeometryContext
&
gctx
,
55
const
Acts::CalibrationContext
& cctx,
const
Acts::SourceLink
& sourceLink,
56
Acts::VectorMultiTrajectory::TrackStateProxy
& trackState)
const override
;
57
58
bool
needsClusters
()
const override
{
return
true
; }
59
60
private
:
61
std::map<Acts::GeometryIdentifier, MapTuple>
m_calib_maps
;
62
std::bitset<3>
m_mask
;
63
};
64
65
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Framework
include
ActsExamples
EventData
ScalingCalibrator.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:38
using
1.8.2 with
sPHENIX GitHub integration