ATLAS Offline Software
Loading...
Searching...
No Matches
TileCosmicMuonCnv_p1.cxx
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5*/
6
7// TileCosmicMuonCnv_p1.cxx
8// Implementation file for class TileCosmicMuonCnv_p1
9// Author: Aranzazu Ruiz <aranzazu.ruiz.martinez@cern.ch>
10// Date: July 2008
12
15
16
17void TileCosmicMuonCnv_p1::transToPers(const TileCosmicMuon* transObj, TileCosmicMuon_p1* persObj, MsgStream &/*log*/) const {
18
19 persObj->m_time = transObj->GetTime();
20 persObj->m_positionX = transObj->GetPositionX();
21 persObj->m_positionY = transObj->GetPositionY();
22 persObj->m_positionZ = transObj->GetPositionZ();
23 persObj->m_directionPhi = transObj->GetDirectionPhi();
24 persObj->m_directionTheta = transObj->GetDirectionTheta();
25 persObj->m_fitQuality = transObj->GetFitQuality();
26 persObj->m_fitNCells = transObj->GetFitNCells();
27
28 size_t sz = transObj->GetNSamples();
29 persObj->m_pathTop.resize(sz);
30 persObj->m_pathBottom.resize(sz);
31 persObj->m_energyTop.resize(sz);
32 persObj->m_energyBottom.resize(sz);
33 for (size_t i = 0; i < sz; i++) {
34 persObj->m_pathTop[i] = transObj->GetPathTop(i);
35 persObj->m_pathBottom[i] = transObj->GetPathBottom(i);
36 persObj->m_energyTop[i] = transObj->GetEnergyTop(i);
37 persObj->m_energyBottom[i] = transObj->GetEnergyBottom(i);
38 }
39
40 size_t ncells = transObj->GetTrackNCells();
41 persObj->m_trackCellHash.resize(ncells);
42 for (size_t i = 0; i < ncells; i++) {
43 persObj->m_trackCellHash[i] = transObj->GetTrackCellHash(i);
44 }
45}
46
47
48void TileCosmicMuonCnv_p1::persToTrans(const TileCosmicMuon_p1* persObj, TileCosmicMuon* transObj, MsgStream &/*log*/) const {
49
50 transObj->SetTime (persObj->m_time);
51 transObj->SetPositionX (persObj->m_positionX);
52 transObj->SetPositionY (persObj->m_positionY);
53 transObj->SetPositionZ (persObj->m_positionZ);
54 transObj->SetDirectionPhi (persObj->m_directionPhi);
55 transObj->SetDirectionTheta (persObj->m_directionTheta);
56 transObj->SetFitQuality (persObj->m_fitQuality);
57 transObj->SetFitNCells (persObj->m_fitNCells);
58
59 transObj->SetPathTop (std::vector<double> (persObj->m_pathTop.begin(),
60 persObj->m_pathTop.end()));
61
62 transObj->SetPathBottom (std::vector<double> (persObj->m_pathBottom.begin(),
63 persObj->m_pathBottom.end()));
64
65 transObj->SetEnergyTop (std::vector<double> (persObj->m_energyTop.begin(),
66 persObj->m_energyTop.end()));
67
68 transObj->SetEnergyBottom (std::vector<double> (persObj->m_energyBottom.begin(),
69 persObj->m_energyBottom.end()));
70
71 transObj->SetTrackCellHash (std::vector<IdentifierHash> (persObj->m_trackCellHash.begin(),
72 persObj->m_trackCellHash.end()));
73
74 transObj->SetSegmentPath (std::vector<double>());
75 transObj->SetSegmentPartition (std::vector<int>());
76 transObj->SetSegmentModule (std::vector<int>());
77 transObj->SetSegmentSampling (std::vector<int>());
78}
static Double_t sz
virtual void persToTrans(const TileCosmicMuon_p1 *persObj, TileCosmicMuon *transObj, MsgStream &log) const override
Method creating the transient representation TileCosmicMuon from its persistent representation TileCo...
virtual void transToPers(const TileCosmicMuon *transObj, TileCosmicMuon_p1 *persObj, MsgStream &log) const override
Method creating the persistent representation TileCosmicMuon_p1 from its transient representation Til...
float m_positionZ
Z coordinate of point in track at selected plane (y=0 for cosmics z=0 for beam)
std::vector< unsigned int > m_trackCellHash
Vector with list of Identifier Hash of cells close to track.
std::vector< float > m_pathBottom
Vector with length of track within Tile on bottom modules [0]:sampling A; [1]: BC; [2]: D.
float m_directionPhi
Phi angle of track direction.
float m_fitQuality
Fit parameter: 0= no fit; (Hough) 1=fit ok; (Minuit) >0 chi-square.
float m_positionX
X coordinate of point in track at selected plane (y=0 for cosmics z=0 for beam)
float m_directionTheta
Theta angle of track direction.
std::vector< float > m_energyTop
Vector with sum energy of cells close to track on top modules [0]:sampling A; [1]: BC; [2]: D.
std::vector< float > m_energyBottom
Vector with sum energy of cells close to track on bottom modules [0]:sampling A; [1]: BC; [2]: D.
float m_time
Time of track at selected plane (y=0 for cosmics z=0 for beam)
int m_fitNCells
Number of cells used in fit.
float m_positionY
Y coordinate of point in track at selected plane (y=0 for cosmics z=0 for beam)
std::vector< float > m_pathTop
Vector with length of track within Tile on top modules [0]:sampling A; [1]: BC; [2]: D.
Class containing detailed results from TileMuonFitter.
int GetTrackNCells() const
IdentifierHash GetTrackCellHash(int ind) const
void SetSegmentModule(const std::vector< int > &module)
void SetPathBottom(const std::vector< double > &path)
void SetEnergyBottom(const std::vector< double > &energy)
double GetPositionY() const
double GetPathBottom(int ind) const
int GetFitNCells() const
void SetPositionZ(double posz)
void SetPositionY(double posy)
double GetPositionZ() const
void SetTime(double time)
Setters.
void SetDirectionTheta(double theta)
double GetDirectionPhi() const
double GetPathTop(int ind) const
void SetSegmentPath(const std::vector< double > &path)
double GetEnergyBottom(int ind) const
void SetSegmentSampling(const std::vector< int > &sampling)
void SetSegmentPartition(const std::vector< int > &partition)
void SetEnergyTop(const std::vector< double > &energy)
void SetFitNCells(int ncells)
void SetTrackCellHash(const std::vector< IdentifierHash > &cells)
int GetNSamples() const
double GetFitQuality() const
void SetPositionX(double posx)
void SetPathTop(const std::vector< double > &path)
double GetEnergyTop(int ind) const
double GetTime() const
Getters.
void SetFitQuality(double quality)
double GetPositionX() const
void SetDirectionPhi(double phi)
double GetDirectionTheta() const