ATLAS Offline Software
Loading...
Searching...
No Matches
TileL2Cnv_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// TileL2Cnv_p1.cxx
8// Implementation file for class TileL2Cnv_p1
9// Author: Aranzazu Ruiz <aranzazu.ruiz.martinez@cern.ch>
10// Date: July 2008
12
13// TileEvent includes
14#include "TileEvent/TileL2.h"
15
16// TileTPCnv includes
18
19
20void TileL2Cnv_p1::transToPers(const TileL2* transObj, TileL2_p1* persObj, MsgStream &/*log*/) const {
21
22 // Drawer ID
23 persObj->m_ID = transObj->identify();
24
25 // Encoded 32-bit words
26 persObj->m_val.push_back(0); // one extra word which is not present in new transient class
27 persObj->m_val.insert (persObj->m_val.end(),
28 transObj->val().begin(),
29 transObj->val().end());
30
31 // Muon eta coordinate
32 persObj->m_eta = transObj->eta();
33
34 // Muon phi coordinate
35 persObj->m_phi = transObj->phi(0);
36
37 // Energy in the innermost layer
38 persObj->m_enemu0 = transObj->enemu0();
39
40 // Energy in the central layer
41 persObj->m_enemu1 = transObj->enemu1();
42
43 // Energy in the outermost layer
44 persObj->m_enemu2 = transObj->enemu2();
45
46 // Quality factor
47 persObj->m_quality_factor = transObj->qual();
48
49 // Transverse energy
50 persObj->m_Et = transObj->sumE(0);
51
52}
53
54
55void TileL2Cnv_p1::persToTrans(const TileL2_p1* persObj, TileL2* transObj, MsgStream &/*log*/) const
56{
57 // Drawer ID
58 *transObj = TileL2 (persObj->m_ID);
59
60 // Muon phi coordinate
61 // ??? This emulates the previous behavior of this converter,
62 // which was probably not right.
63 transObj->m_phi = persObj->m_phi;
64 transObj->m_cosphi = 0;
65 transObj->m_sinphi = 0;
66
67 // Encoded 32-bit words
68 // ignore first word, which is not in new transient format
69 // ???? Although the comments said that, the previous version
70 // of this converter was not, in fact, ignoring the first word here.
71 // That was probably a bug (a local variable was shadowed),
72 // but for now, reproduce the previous behavior.
73 //std::vector<unsigned int> val (persObj->m_val.begin()+1,
74 // persObj->m_val.end());
75
76 transObj->setMu (persObj->m_eta,
77 persObj->m_enemu0,
78 persObj->m_enemu1,
79 persObj->m_enemu2,
80 persObj->m_quality_factor,
81 persObj->m_val);
82 //val);
83
84 // Transverse energy
85 std::vector<float> sumE { persObj->m_Et };
86 transObj->setEt (std::move(sumE));
87}
virtual void transToPers(const TileL2 *transObj, TileL2_p1 *persObj, MsgStream &log) const override
Method creating the persistent representation TileL2_p1 from its transient representation TileL2.
virtual void persToTrans(const TileL2_p1 *persObj, TileL2 *transObj, MsgStream &log) const override
Method creating the transient representation TileL2 from its persistent representation TileL2_p1.
std::vector< float > m_enemu2
Definition TileL2_p1.h:41
std::vector< float > m_enemu1
Definition TileL2_p1.h:40
std::vector< unsigned int > m_val
Definition TileL2_p1.h:36
float m_Et
Definition TileL2_p1.h:43
float m_phi
Definition TileL2_p1.h:38
std::vector< float > m_eta
Definition TileL2_p1.h:37
std::vector< unsigned int > m_quality_factor
Definition TileL2_p1.h:42
std::vector< float > m_enemu0
Definition TileL2_p1.h:39
Class to store TileMuId and Et quantities computed at the TileCal ROD DSPs.
Definition TileL2.h:33
float m_phi
drawer phi
Definition TileL2.h:180
float enemu1(unsigned int ind) const
Return energy deposited in central layer (BC cells)
Definition TileL2.h:116
void setMu(const std::vector< float > &eta, const std::vector< float > &enemu0, const std::vector< float > &enemu1, const std::vector< float > &enemu2, const std::vector< unsigned int > &qual, const std::vector< unsigned int > &val)
Set Muon Info in TileL2.
Definition TileL2.h:50
int identify(void) const
Return Identifier.
Definition TileL2.h:86
void setEt(std::vector< float > &&sumE)
Set sumE vector in TileL2.
Definition TileL2.h:81
float m_cosphi
Definition TileL2.h:181
unsigned int val(unsigned int i) const
Return Data.
Definition TileL2.h:92
float sumE() const
Return sumE in a TileCal superdrawer (ROD-based)
Definition TileL2.h:150
float enemu2(unsigned int ind) const
Return energy deposited in outermost layer (D cells)
Definition TileL2.h:120
unsigned int qual(unsigned int ind) const
Return quality flag (0 or 1): set to 0 if the "energy deposition path" is MIP like in all three sampl...
Definition TileL2.h:127
float m_sinphi
Definition TileL2.h:182
float phi(unsigned int) const
Return phi (average value at the TileCal radius)
Definition TileL2.h:103
float enemu0(unsigned int ind) const
Return energy deposited in innermost layer (A cells)
Definition TileL2.h:112
float eta(unsigned int ind) const
Return eta (computed as the average of the eta values of the TileCal cells where the muon goes throug...
Definition TileL2.h:99