Analysis Software
Documentation for sPHENIX simulation software
|
#include <coresoftware/blob/master/offline/packages/TrackerMillepedeAlignment/MakeMilleFiles.h>
Public Member Functions | |
MakeMilleFiles (const std::string &name="MakeMilleFiles") | |
int | InitRun (PHCompositeNode *topNode) override |
int | process_event (PHCompositeNode *topNode) override |
int | End (PHCompositeNode *topNode) override |
Called at the end of all processing. | |
void | set_binary (bool bin) |
void | set_constraintfile_name (const std::string &file) |
void | set_datafile_name (const std::string &file) |
void | set_steeringfile_name (const std::string &file) |
void | set_mvtx_grouping (int group) |
void | set_intt_grouping (int group) |
void | set_tpc_grouping (int group) |
void | set_mms_grouping (int group) |
void | use_event_vertex (bool useit) |
void | set_layer_fixed (unsigned int layer) |
void | set_mvtx_layer_fixed (unsigned int layer, unsigned int clamshell) |
void | set_layer_gparam_fixed (unsigned int layer, unsigned int param) |
void | set_layer_lparam_fixed (unsigned int layer, unsigned int param) |
void | set_layers_fixed (unsigned int minlayer, unsigned int maxlayer) |
void | set_error_inflation_factor (unsigned int layer, float factor) |
void | set_tpc_sector_fixed (unsigned int region, unsigned int sector, unsigned int side) |
void | set_vtx_sigma (float xysig, float zsig) |
Public Member Functions inherited from SubsysReco | |
~SubsysReco () override | |
virtual int | EndRun (const int) |
Called at the end of each run. | |
virtual int | Init (PHCompositeNode *) |
virtual int | Reset (PHCompositeNode *) |
Reset. | |
virtual int | ResetEvent (PHCompositeNode *) |
Clean up after each event. | |
void | Print (const std::string &="ALL") const override |
Public Member Functions inherited from Fun4AllBase | |
virtual | ~Fun4AllBase () |
virtual const std::string | Name () const |
Returns the name of this module. | |
virtual void | Name (const std::string &name) |
Sets the name of this module. | |
virtual void | Verbosity (const int ival) |
Sets the verbosity of this module (0 by default=quiet). | |
virtual void | Verbosity (enu_Verbosity ival) |
Sets the verbosity of this module (0 by default=quiet). | |
virtual int | Verbosity () const |
Gets the verbosity of this module. | |
Private Attributes | |
Mille * | _mille |
std::string | data_outfilename = ("mille_output_data_file.bin") |
std::string | steering_outfilename = ("steer.txt") |
bool | m_useEventVertex = false |
bool | _binary = true |
Acts::Vector2 | m_vtxSigma = {0.1, 0.1} |
std::map< unsigned int, float > | m_layerMisalignment |
std::set< unsigned int > | fixed_sectors |
AlignmentDefs::mvtxGrp | mvtx_group = AlignmentDefs::mvtxGrp::snsr |
AlignmentDefs::inttGrp | intt_group = AlignmentDefs::inttGrp::chp |
AlignmentDefs::tpcGrp | tpc_group = AlignmentDefs::tpcGrp::htst |
AlignmentDefs::mmsGrp | mms_group = AlignmentDefs::mmsGrp::tl |
std::set< unsigned int > | fixed_layers |
std::set< std::pair< unsigned int, unsigned int > > | fixed_mvtx_layers |
std::set< std::pair< unsigned int, unsigned int > > | fixed_layer_gparams |
std::set< std::pair< unsigned int, unsigned int > > | fixed_layer_lparams |
std::string | m_constraintFileName = "mp2con.txt" |
std::ofstream | m_constraintFile |
SvtxTrackMap * | _track_map {nullptr} |
SvtxAlignmentStateMap * | _state_map {nullptr} |
ActsGeometry * | _tGeometry {nullptr} |
TrkrClusterContainer * | _cluster_map {nullptr} |
ClusterErrorPara | _ClusErrPara |
Additional Inherited Members | |
Public Types inherited from Fun4AllBase | |
enum | enu_Verbosity { VERBOSITY_QUIET = 0, VERBOSITY_SOME = 1, VERBOSITY_MORE = 2, VERBOSITY_EVEN_MORE = 3, VERBOSITY_A_LOT = 4, VERBOSITY_MAX = std::numeric_limits<int>::max() - 10 } |
Protected Member Functions inherited from SubsysReco | |
SubsysReco (const std::string &name="NONAME") | |
Definition at line 39 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 39 of file MakeMilleFiles.h
MakeMilleFiles::MakeMilleFiles | ( | const std::string & | name = "MakeMilleFiles" | ) |
Definition at line 54 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 54 of file MakeMilleFiles.cc
|
private |
For N residual local coordinates x, z
Definition at line 424 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 424 of file MakeMilleFiles.cc
References _ClusErrPara, _cluster_map, _mille, _tGeometry, Acts::UnitConstants::cm, TrkrClusterContainer::findCluster(), fixed_layer_gparams, fixed_layer_lparams, ClusterErrorPara::get_clusterv5_modified_error(), ActsGeometry::getGlobalPosition(), TrkrDefs::getHitSetKeyFromClusKey(), AlignmentDefs::getInttGlobalLabels(), TrkrDefs::getLayer(), AlignmentDefs::getMMGlobalLabels(), AlignmentDefs::getMvtxClamshell(), AlignmentDefs::getMvtxGlobalLabels(), TpcDefs::getSectorId(), TpcDefs::getSide(), MvtxDefs::getStaveId(), ActsSurfaceMaps::getSurface(), AlignmentDefs::getTpcGlobalLabels(), TrkrDefs::getTrkrId(), i, intt_group, TrkrDefs::inttId, is_layer_fixed(), is_layer_param_fixed(), is_mvtx_layer_fixed(), is_tpc_sector_fixed(), j, k, layer, m_layerMisalignment, ActsGeometry::maps(), Mille::mille(), mms_group, mvtx_group, TrkrDefs::mvtxId, SvtxAlignmentState::NGL, SvtxAlignmentState::NLOC, SvtxAlignmentState::NRES, AlignmentDefs::printBuffers(), filter::state, surf(), tpc_group, TrkrDefs::tpcId, and Fun4AllBase::Verbosity().
Referenced by process_event().
|
overridevirtual |
Called at the end of all processing.
Reimplemented from SubsysReco.
Definition at line 214 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 214 of file MakeMilleFiles.cc
References _mille, Fun4AllReturnCodes::EVENT_OK, and m_constraintFile.
|
private |
Returns event vertex in cm as averaged track positions
The track vertex is given by the fit as the PCA to the beamline
Definition at line 390 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 390 of file MakeMilleFiles.cc
References _state_map, _track_map, SvtxTrackMap::end(), SvtxTrackMap::find(), SvtxTrack::get_x(), SvtxTrack::get_y(), and SvtxTrack::get_z().
Referenced by process_event().
|
private |
swap sign to fit expectation of pede to have derivative of fit rather than residual
Definition at line 305 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 305 of file MakeMilleFiles.cc
References getProjectionVtxXY(), i, Acts::PrimitivesView3DTest::identity, and j.
Referenced by process_event().
|
private |
Get the first track state beyond the vertex, which will be the innermost track state and propagate it to the vertex surface to get the jacobian at the vertex
Definition at line 255 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 255 of file MakeMilleFiles.cc
References _cluster_map, _tGeometry, SvtxTrack::begin_states(), deriv(), TrkrClusterContainer::findCluster(), ActsGeometry::geometry(), SvtxTrack::get_charge(), SvtxTrackState::get_cluskey(), ActsTrackingGeometry::getGeoContext(), ActsSurfaceMaps::getSurface(), i, j, ActsTrackingGeometry::magFieldContext, ActsPropagator::makePropagator(), ActsPropagator::makeTrackParams(), ActsPropagator::makeVertexSurface(), ActsGeometry::maps(), next, ckf::options, surf(), value, and Fun4AllBase::Verbosity().
Referenced by process_event().
|
private |
Definition at line 222 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 222 of file MakeMilleFiles.cc
References _cluster_map, _state_map, _tGeometry, _track_map, Fun4AllReturnCodes::ABORTEVENT, Fun4AllReturnCodes::EVENT_OK, and PHWHERE.
Referenced by InitRun().
|
private |
Definition at line 330 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 330 of file MakeMilleFiles.cc
References SvtxTrack::get_px(), SvtxTrack::get_py(), SvtxTrack::get_pz(), localToGlobalVertex(), TauVsDIS_MachineLearning_Differentiation::X, and TauVsDIS_MachineLearning_Differentiation::Y.
Referenced by getGlobalVtxDerivativesXY().
|
overridevirtual |
Called for first event when run number is known. Typically this is where you may want to fetch data from database, because you know the run number.
Reimplemented from SubsysReco.
Definition at line 61 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 61 of file MakeMilleFiles.cc
References _binary, _mille, data_outfilename, Fun4AllReturnCodes::EVENT_OK, GetNodes(), AlignmentDefs::glbl_vtx_label, i, intt_group, m_constraintFile, m_constraintFileName, m_useEventVertex, mms_group, mvtx_group, AlignmentDefs::NGLVTX, steering_outfilename, and tpc_group.
|
private |
Definition at line 585 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 585 of file MakeMilleFiles.cc
References fixed_layers, and it.
Referenced by addTrackToMilleFile().
|
private |
Definition at line 622 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 622 of file MakeMilleFiles.cc
References it.
Referenced by addTrackToMilleFile().
|
private |
Definition at line 607 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 607 of file MakeMilleFiles.cc
References fixed_mvtx_layers, and it.
Referenced by addTrackToMilleFile().
|
private |
Definition at line 641 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 641 of file MakeMilleFiles.cc
References fixed_sectors, AlignmentDefs::getTpcRegion(), and it.
Referenced by addTrackToMilleFile().
|
private |
Definition at line 357 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 357 of file MakeMilleFiles.cc
References SvtxTrack::get_px(), SvtxTrack::get_py(), SvtxTrack::get_pz(), ActsTests::PropagationDatasets::phi, and physmon_track_finding_ttbar::r.
Referenced by getProjectionVtxXY().
|
overridevirtual |
Called for each event. This is where you do the real work.
Make any desired track cuts here Maybe set a lower pT limit - low pT tracks are not very sensitive to alignment
Only take tracks that have 2 mm within event vertex
set x and y to 0 since we are constraining to the x-y origin and add constraints to pede later
Finish this track
Reimplemented from SubsysReco.
Definition at line 92 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 92 of file MakeMilleFiles.cc
References _mille, _state_map, _tGeometry, _track_map, addTrackToMilleFile(), Acts::UnitConstants::cm, SvtxTrackMap::end(), Mille::end(), Fun4AllReturnCodes::EVENT_OK, SvtxTrackMap::find(), SvtxTrack::get_charge(), TrackAnalysisUtils::get_dca(), SvtxTrack::get_id(), SvtxTrack::get_phi(), SvtxTrack::get_x(), SvtxTrack::get_y(), SvtxTrack::get_z(), getEventVertex(), getGlobalVtxDerivativesXY(), getLocalVtxDerivativesXY(), AlignmentDefs::glbl_vtx_label, i, j, m_useEventVertex, m_vtxSigma, Mille::mille(), AlignmentDefs::NGLVTX, SvtxAlignmentState::NLOC, SvtxAlignmentState::NRES, PHWHERE, SvtxTrackMap::size(), SvtxAlignmentStateMap::size(), SvtxTrack::size_cluster_keys(), and Fun4AllBase::Verbosity().
|
inline |
Definition at line 48 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 48 of file MakeMilleFiles.h
References _binary.
|
inline |
Definition at line 49 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 49 of file MakeMilleFiles.h
References file, and m_constraintFileName.
|
inline |
Definition at line 50 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 50 of file MakeMilleFiles.h
References data_outfilename, and file.
|
inline |
Definition at line 63 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 63 of file MakeMilleFiles.h
References m_layerMisalignment.
|
inline |
Definition at line 53 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 53 of file MakeMilleFiles.h
References intt_group.
void MakeMilleFiles::set_layer_fixed | ( | unsigned int | layer | ) |
Definition at line 602 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 602 of file MakeMilleFiles.cc
References fixed_layers.
void MakeMilleFiles::set_layer_gparam_fixed | ( | unsigned int | layer, |
unsigned int | param | ||
) |
Definition at line 633 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 633 of file MakeMilleFiles.cc
References fixed_layer_gparams.
void MakeMilleFiles::set_layer_lparam_fixed | ( | unsigned int | layer, |
unsigned int | param | ||
) |
Definition at line 637 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 637 of file MakeMilleFiles.cc
References fixed_layer_lparams.
void MakeMilleFiles::set_layers_fixed | ( | unsigned int | minlayer, |
unsigned int | maxlayer | ||
) |
Definition at line 594 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 594 of file MakeMilleFiles.cc
References fixed_layers, and i.
|
inline |
Definition at line 55 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 55 of file MakeMilleFiles.h
References mms_group.
|
inline |
Definition at line 52 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 52 of file MakeMilleFiles.h
References mvtx_group.
void MakeMilleFiles::set_mvtx_layer_fixed | ( | unsigned int | layer, |
unsigned int | clamshell | ||
) |
Definition at line 618 of file MakeMilleFiles.cc.
View newest version in sPHENIX GitHub at line 618 of file MakeMilleFiles.cc
References fixed_mvtx_layers.
|
inline |
Definition at line 51 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 51 of file MakeMilleFiles.h
References file, and steering_outfilename.
|
inline |
Definition at line 54 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 54 of file MakeMilleFiles.h
References tpc_group.
|
inline |
Definition at line 67 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 67 of file MakeMilleFiles.h
References fixed_sectors.
|
inline |
Definition at line 74 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 74 of file MakeMilleFiles.h
References m_vtxSigma.
|
inline |
Definition at line 56 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 56 of file MakeMilleFiles.h
References m_useEventVertex.
|
private |
Definition at line 110 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 110 of file MakeMilleFiles.h
Referenced by InitRun(), and set_binary().
|
private |
Definition at line 133 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 133 of file MakeMilleFiles.h
Referenced by addTrackToMilleFile().
|
private |
Definition at line 132 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 132 of file MakeMilleFiles.h
Referenced by addTrackToMilleFile(), getLocalVtxDerivativesXY(), and GetNodes().
|
private |
Definition at line 81 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 81 of file MakeMilleFiles.h
Referenced by addTrackToMilleFile(), End(), InitRun(), and process_event().
|
private |
Definition at line 130 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 130 of file MakeMilleFiles.h
Referenced by getEventVertex(), GetNodes(), and process_event().
|
private |
Definition at line 131 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 131 of file MakeMilleFiles.h
Referenced by addTrackToMilleFile(), getLocalVtxDerivativesXY(), GetNodes(), and process_event().
|
private |
Definition at line 129 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 129 of file MakeMilleFiles.h
Referenced by getEventVertex(), GetNodes(), and process_event().
|
private |
Definition at line 106 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 106 of file MakeMilleFiles.h
Referenced by InitRun(), and set_datafile_name().
|
private |
Definition at line 124 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 124 of file MakeMilleFiles.h
Referenced by addTrackToMilleFile(), and set_layer_gparam_fixed().
|
private |
Definition at line 124 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 124 of file MakeMilleFiles.h
Referenced by addTrackToMilleFile(), and set_layer_lparam_fixed().
|
private |
Definition at line 122 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 122 of file MakeMilleFiles.h
Referenced by is_layer_fixed(), set_layer_fixed(), and set_layers_fixed().
|
private |
Definition at line 123 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 123 of file MakeMilleFiles.h
Referenced by is_mvtx_layer_fixed(), and set_mvtx_layer_fixed().
|
private |
Definition at line 115 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 115 of file MakeMilleFiles.h
Referenced by is_tpc_sector_fixed(), and set_tpc_sector_fixed().
|
private |
Definition at line 118 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 118 of file MakeMilleFiles.h
Referenced by addTrackToMilleFile(), InitRun(), and set_intt_grouping().
|
private |
Definition at line 127 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 127 of file MakeMilleFiles.h
|
private |
Definition at line 126 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 126 of file MakeMilleFiles.h
Referenced by InitRun(), and set_constraintfile_name().
|
private |
Definition at line 114 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 114 of file MakeMilleFiles.h
Referenced by addTrackToMilleFile(), and set_error_inflation_factor().
|
private |
Definition at line 109 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 109 of file MakeMilleFiles.h
Referenced by InitRun(), process_event(), and use_event_vertex().
|
private |
Definition at line 112 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 112 of file MakeMilleFiles.h
Referenced by process_event(), and set_vtx_sigma().
|
private |
Definition at line 120 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 120 of file MakeMilleFiles.h
Referenced by addTrackToMilleFile(), InitRun(), and set_mms_grouping().
|
private |
Definition at line 117 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 117 of file MakeMilleFiles.h
Referenced by addTrackToMilleFile(), InitRun(), and set_mvtx_grouping().
|
private |
Definition at line 107 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 107 of file MakeMilleFiles.h
Referenced by InitRun(), and set_steeringfile_name().
|
private |
Definition at line 119 of file MakeMilleFiles.h.
View newest version in sPHENIX GitHub at line 119 of file MakeMilleFiles.h
Referenced by addTrackToMilleFile(), InitRun(), and set_tpc_grouping().