Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
MakeMilleFiles.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file MakeMilleFiles.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
10
#ifndef MAKEMILLEFILES_H
11
#define MAKEMILLEFILES_H
12
13
#include "
AlignmentDefs.h
"
14
15
#include <
fun4all/SubsysReco.h
>
16
17
#include <string>
18
#include <vector>
19
20
#include <
trackbase/ActsGeometry.h
>
21
#include <
trackbase/ClusterErrorPara.h
>
22
#include <
trackbase/TrkrDefs.h
>
23
#include <
trackbase_historic/ActsTransformations.h
>
24
#include <
trackbase_historic/SvtxAlignmentStateMap.h
>
25
26
#include <
ActsExamples/EventData/Trajectories.hpp
>
27
28
class
PHCompositeNode
;
29
class
PHG4TpcCylinderGeomContainer
;
30
class
SvtxTrack
;
31
class
SvtxTrackMap
;
32
class
TrkrCluster
;
33
class
TrkrClusterContainer
;
34
class
Mille
;
35
class
ActsPropagator
;
36
37
using
Trajectory
=
ActsExamples::Trajectories
;
38
39
class
MakeMilleFiles
:
public
SubsysReco
40
{
41
public
:
42
MakeMilleFiles
(
const
std::string
&
name
=
"MakeMilleFiles"
);
43
44
int
InitRun
(
PHCompositeNode
* topNode)
override
;
45
int
process_event
(
PHCompositeNode
* topNode)
override
;
46
int
End
(
PHCompositeNode
* topNode)
override
;
47
48
void
set_binary
(
bool
bin) {
_binary
= bin; }
49
void
set_constraintfile_name
(
const
std::string
&
file
) {
m_constraintFileName
=
file
; }
50
void
set_datafile_name
(
const
std::string
&
file
) {
data_outfilename
=
file
; }
51
void
set_steeringfile_name
(
const
std::string
&
file
) {
steering_outfilename
=
file
; }
52
void
set_mvtx_grouping
(
int
group
) {
mvtx_group
= (
AlignmentDefs::mvtxGrp
) group; }
53
void
set_intt_grouping
(
int
group
) {
intt_group
= (
AlignmentDefs::inttGrp
) group; }
54
void
set_tpc_grouping
(
int
group
) {
tpc_group
= (
AlignmentDefs::tpcGrp
) group; }
55
void
set_mms_grouping
(
int
group
) {
mms_group
= (
AlignmentDefs::mmsGrp
) group; }
56
void
use_event_vertex
(
bool
useit) {
m_useEventVertex
= useit; }
57
void
set_layer_fixed
(
unsigned
int
layer
);
58
void
set_mvtx_layer_fixed
(
unsigned
int
layer
,
unsigned
int
clamshell);
59
void
set_layer_gparam_fixed
(
unsigned
int
layer
,
unsigned
int
param);
60
void
set_layer_lparam_fixed
(
unsigned
int
layer
,
unsigned
int
param);
61
62
void
set_layers_fixed
(
unsigned
int
minlayer,
unsigned
int
maxlayer);
63
void
set_error_inflation_factor
(
unsigned
int
layer
,
float
factor)
64
{
65
m_layerMisalignment
.insert(std::make_pair(layer, factor));
66
}
67
void
set_tpc_sector_fixed
(
unsigned
int
region,
unsigned
int
sector,
68
unsigned
int
side)
69
{
70
// make a combined subsector index
71
unsigned
int
subsector = region * 24 + side * 12 + sector;
72
fixed_sectors
.insert(subsector);
73
}
74
void
set_vtx_sigma
(
float
xysig,
float
zsig)
75
{
76
m_vtxSigma
(0) = xysig;
77
m_vtxSigma
(1) = zsig;
78
}
79
80
private
:
81
Mille
*
_mille
;
82
83
int
GetNodes
(
PHCompositeNode
* topNode);
84
Acts::Vector3
getEventVertex
();
85
86
bool
is_layer_fixed
(
unsigned
int
layer
);
87
88
bool
is_layer_param_fixed
(
unsigned
int
layer
,
unsigned
int
param,
std::set
<std::pair<unsigned int, unsigned int>>& param_fixed);
89
90
bool
is_tpc_sector_fixed
(
unsigned
int
layer
,
unsigned
int
sector,
unsigned
int
side);
91
bool
is_mvtx_layer_fixed
(
unsigned
int
layer
,
unsigned
int
clamshell);
92
void
addTrackToMilleFile
(
SvtxAlignmentStateMap::StateVec
& statevec);
93
void
getGlobalVtxDerivativesXY
(
SvtxTrack
* track,
94
const
Acts::Vector3
&
vertex
,
95
float
glblvtx_derivative[
SvtxAlignmentState::NRES
][3]);
96
bool
getLocalVtxDerivativesXY
(
SvtxTrack
* track,
97
ActsPropagator
& propagator,
98
const
Acts::Vector3
&
vertex
,
99
float
lclvtx_derivative[
SvtxAlignmentState::NRES
][
SvtxAlignmentState::NLOC
]);
100
Acts::Vector3
localToGlobalVertex
(
SvtxTrack
* track,
101
const
Acts::Vector3
&
vertex
,
102
const
Acts::Vector3
& localx)
const
;
103
void
getProjectionVtxXY
(
SvtxTrack
* track,
const
Acts::Vector3
&
vertex
,
104
Acts::Vector3
& projx,
Acts::Vector3
& projy);
105
106
std::string
data_outfilename
= (
"mille_output_data_file.bin"
);
107
std::string
steering_outfilename
= (
"steer.txt"
);
108
109
bool
m_useEventVertex
=
false
;
110
bool
_binary
=
true
;
111
112
Acts::Vector2
m_vtxSigma
= {0.1, 0.1};
113
114
std::map<unsigned int, float>
m_layerMisalignment
;
115
std::set<unsigned int>
fixed_sectors
;
116
// set default groups to lowest level
117
AlignmentDefs::mvtxGrp
mvtx_group
=
AlignmentDefs::mvtxGrp::snsr
;
118
AlignmentDefs::inttGrp
intt_group
=
AlignmentDefs::inttGrp::chp
;
119
AlignmentDefs::tpcGrp
tpc_group
=
AlignmentDefs::tpcGrp::htst
;
120
AlignmentDefs::mmsGrp
mms_group
=
AlignmentDefs::mmsGrp::tl
;
121
122
std::set<unsigned int>
fixed_layers
;
123
std::set<std::pair<unsigned int,unsigned int>>
fixed_mvtx_layers
;
124
std::set<std::pair<unsigned int, unsigned int>>
fixed_layer_gparams
,
fixed_layer_lparams
;
125
126
std::string
m_constraintFileName
=
"mp2con.txt"
;
127
std::ofstream
m_constraintFile
;
128
129
SvtxTrackMap
*
_track_map
{
nullptr
};
130
SvtxAlignmentStateMap
*
_state_map
{
nullptr
};
131
ActsGeometry
*
_tGeometry
{
nullptr
};
132
TrkrClusterContainer
*
_cluster_map
{
nullptr
};
133
ClusterErrorPara
_ClusErrPara
;
134
};
135
136
#endif // MAKEMILLEFILES_H
coresoftware
blob
master
offline
packages
TrackerMillepedeAlignment
MakeMilleFiles.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:09
using
1.8.2 with
sPHENIX GitHub integration