ATLAS Offline Software
TrigMissingETCnv_p2.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 
9 
11 
12 #include <string>
13 
14 
16  TrigMissingET* transObj,
17  MsgStream &log)
18 {
19  log << MSG::DEBUG << "TrigMissingETCnv_p2::persToTrans called " << endmsg;
20 
21  // auxiliary info
22  std::vector<TrigMissingEtComponent> compVec;
23  if (persObj->m_comp_number > 0) {
24  compVec.reserve( persObj->m_comp_number );
25 
26  for (unsigned int i=0; i<persObj->m_comp_number; ++i) {
28 
29  c.setName( persObj->m_c_name[i].c_str() );
30  c.setStatus( persObj->m_c_status[i] );
31  c.setEx( persObj->m_c_ex[i] );
32  c.setEy( persObj->m_c_ey[i] );
33  c.setEz( persObj->m_c_ez[i] );
34  c.setSumEt( persObj->m_c_sumEt[i] );
35  c.setSumE( persObj->m_c_sumE[i] );
36  c.setCalib0( persObj->m_c_calib0[i] );
37  c.setCalib1( persObj->m_c_calib1[i] );
38  c.setSumOfSigns( persObj->m_c_sumOfSigns[i] );
39  c.setUsedChannels( persObj->m_c_usedChannels[i] );
40 
41  compVec.push_back( c );
42  }
43  }
44 
45  *transObj = TrigMissingET (std::move (compVec));
46 
47  // basic info
48  transObj->setEx (persObj->m_ex);
49  transObj->setEy (persObj->m_ey);
50  transObj->setEz (persObj->m_ez);
51  transObj->setSumEt (persObj->m_sum_et);
52  transObj->setSumE (persObj->m_sum_e);
53  transObj->setFlag (persObj->m_flag);
54  transObj->set_RoIword (persObj->m_roiWord);
55 }
56 
57 
59  TrigMissingET_p2* persObj,
60  MsgStream &log)
61 {
62  log << MSG::DEBUG << "TrigMissingETCnv_p2::transToPers called " << endmsg;
63 
64  // basic info
65  persObj->m_ex = transObj->ex();
66  persObj->m_ey = transObj->ey();
67  persObj->m_ez = transObj->ez();
68  persObj->m_sum_et = transObj->sumEt();
69  persObj->m_sum_e = transObj->sumE();
70  persObj->m_flag = transObj->getFlag();
71  persObj->m_roiWord = transObj->RoIword();
72 
73  // auxiliary info
74  persObj->m_comp_number=0;
75  persObj->m_c_name.clear();
76  persObj->m_c_status.clear();
77  persObj->m_c_ex.clear();
78  persObj->m_c_ey.clear();
79  persObj->m_c_ez.clear();
80  persObj->m_c_sumEt.clear();
81  persObj->m_c_sumE.clear();
82  persObj->m_c_calib0.clear();
83  persObj->m_c_calib1.clear();
84  persObj->m_c_sumOfSigns.clear();
85  persObj->m_c_usedChannels.clear();
86  unsigned int N = transObj->getNumOfComponents();
87  if (N>0) {
88  persObj->m_comp_number=N;
89  persObj->m_c_name.reserve(N);
90  persObj->m_c_status.reserve(N);
91  persObj->m_c_ex.reserve(N);
92  persObj->m_c_ey.reserve(N);
93  persObj->m_c_ez.reserve(N);
94  persObj->m_c_sumEt.reserve(N);
95  persObj->m_c_sumE.reserve(N);
96  persObj->m_c_calib0.reserve(N);
97  persObj->m_c_calib1.reserve(N);
98  persObj->m_c_sumOfSigns.reserve(N);
99  persObj->m_c_usedChannels.reserve(N);
100 
101  for (unsigned int i=0; i<N; ++i) {
102  persObj->m_c_name.push_back( transObj->getNameOfComponent(i) );
103  persObj->m_c_status.push_back( transObj->getStatus(i) );
104  persObj->m_c_ex.push_back( transObj->getExComponent(i) );
105  persObj->m_c_ey.push_back( transObj->getEyComponent(i) );
106  persObj->m_c_ez.push_back( transObj->getEzComponent(i) );
107  persObj->m_c_sumEt.push_back( transObj->getSumEtComponent(i) );
108  persObj->m_c_sumE.push_back( transObj->getSumEComponent(i) );
109  persObj->m_c_calib0.push_back( transObj->getComponentCalib0(i) );
110  persObj->m_c_calib1.push_back( transObj->getComponentCalib1(i) );
111  persObj->m_c_sumOfSigns.push_back( transObj->getSumOfSigns(i) );
112  persObj->m_c_usedChannels.push_back( transObj->getUsedChannels(i) );
113  }
114  }
115 }
116 
TrigMissingET::getStatus
short getStatus(unsigned int index) const
get status flag for component ‘index’
Definition: TrigMissingET.cxx:157
TrigMissingETCnv_p2::persToTrans
virtual void persToTrans(const TrigMissingET_p2 *persObj, TrigMissingET *transObj, MsgStream &log)
Definition: TrigMissingETCnv_p2.cxx:15
TrigMissingET_p2.h
TrigMissingEtComponent
MET trigger slice components (auxiliary information for TrigMissingET)
Definition: TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingEtComponent.h:27
TrigMissingET_p2
Definition: TrigMissingET_p2.h:26
TrigMissingET::getUsedChannels
unsigned short getUsedChannels(unsigned int index) const
get number of used channes in component ‘index’
Definition: TrigMissingET.cxx:149
TrigMissingETCnv_p2.h
TrigMissingET::setEx
void setEx(float ex)
set Ex component
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:82
TrigMissingET::ex
float ex() const
Ex component of missing energy vector.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:50
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
TrigMissingET_p2::m_flag
int m_flag
Definition: TrigMissingET_p2.h:49
TrigMissingET::sumE
float sumE() const
sum of |E|
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:58
TrigMissingET::RoIword
long RoIword() const
RoI word.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:67
TrigMissingET::ey
float ey() const
Ey component of missing energy vector.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:52
TrigMissingET_p2::m_c_calib0
std::vector< float > m_c_calib0
Definition: TrigMissingET_p2.h:63
TrigMissingET_p2::m_c_ez
std::vector< float > m_c_ez
Definition: TrigMissingET_p2.h:60
TrigMissingET_p2::m_c_status
std::vector< short > m_c_status
Definition: TrigMissingET_p2.h:57
TrigMissingET::getEyComponent
float getEyComponent(unsigned int index) const
get Ey from component ‘index’
Definition: TrigMissingET.cxx:109
TrigMissingET_p2::m_c_sumE
std::vector< float > m_c_sumE
Definition: TrigMissingET_p2.h:62
TrigMissingET_p2::m_comp_number
unsigned int m_comp_number
Auxiliary information.
Definition: TrigMissingET_p2.h:55
TrigMissingET_p2::m_c_usedChannels
std::vector< unsigned short > m_c_usedChannels
Definition: TrigMissingET_p2.h:66
TrigMissingET::set_RoIword
void set_RoIword(long word)
set RoIword
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:95
TrigMissingET::setFlag
void setFlag(int flag)
set event flag
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:93
TrigMissingET::setSumEt
void setSumEt(float ets)
set sum of |Et|
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:88
TrigMissingET::setSumE
void setSumE(float sumE)
set sum of |E|
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:90
TrigMissingET::getNameOfComponent
std::string getNameOfComponent(unsigned int index) const
get name of component ‘index’
Definition: TrigMissingET.cxx:92
TrigMissingET_p2::m_c_ex
std::vector< float > m_c_ex
Definition: TrigMissingET_p2.h:58
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigMissingET::getComponentCalib1
float getComponentCalib1(unsigned int index) const
get scale for calibration of component ‘index’
Definition: TrigMissingET.cxx:173
TrigMissingET::getExComponent
float getExComponent(unsigned int index) const
get Ex from component ‘index’
Definition: TrigMissingET.cxx:101
TrigMissingEtComponent.h
TrigMissingET_p2::m_roiWord
long m_roiWord
Definition: TrigMissingET_p2.h:50
TrigMissingET_p2::m_c_sumEt
std::vector< float > m_c_sumEt
Definition: TrigMissingET_p2.h:61
TrigMissingET::getFlag
int getFlag() const
event flag: 0 (default) means OK
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:65
TrigMissingET::getComponentCalib0
float getComponentCalib0(unsigned int index) const
get constant term for calibration of component ‘index’
Definition: TrigMissingET.cxx:165
TrigMissingET
Class for LVL2/EF MissingET trigger.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:35
TrigMissingET_p2::m_c_calib1
std::vector< float > m_c_calib1
Definition: TrigMissingET_p2.h:64
TrigMissingET::getSumEtComponent
float getSumEtComponent(unsigned int index) const
get sum of |Et| from component ‘index’
Definition: TrigMissingET.cxx:125
TrigMissingET_p2::m_c_ey
std::vector< float > m_c_ey
Definition: TrigMissingET_p2.h:59
TrigMissingET_p2::m_c_name
std::vector< std::string > m_c_name
Definition: TrigMissingET_p2.h:56
TrigMissingET_p2::m_c_sumOfSigns
std::vector< short > m_c_sumOfSigns
Definition: TrigMissingET_p2.h:65
TrigMissingET::sumEt
float sumEt() const
sum of |Et|
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:56
TrigMissingET_p2::m_sum_e
float m_sum_e
Definition: TrigMissingET_p2.h:48
TrigMissingET::setEz
void setEz(float ez)
set Ez component
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:86
TrigMissingET::getEzComponent
float getEzComponent(unsigned int index) const
get Ez from component ‘index’
Definition: TrigMissingET.cxx:117
DEBUG
#define DEBUG
Definition: page_access.h:11
TrigMissingET::getNumOfComponents
unsigned int getNumOfComponents() const
get number of auxiliary components
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:98
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TrigMissingET::getSumOfSigns
short getSumOfSigns(unsigned int index) const
get sum of energy signs for calibration of component ‘index’
Definition: TrigMissingET.cxx:141
TrigMissingET_p2::m_sum_et
float m_sum_et
Definition: TrigMissingET_p2.h:48
TrigMissingETCnv_p2::transToPers
virtual void transToPers(const TrigMissingET *transObj, TrigMissingET_p2 *persObj, MsgStream &log)
Definition: TrigMissingETCnv_p2.cxx:58
TrigMissingET_p2::m_ez
float m_ez
Definition: TrigMissingET_p2.h:47
TrigMissingET::ez
float ez() const
Ez component of missing energy vector.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:54
TrigMissingET::getSumEComponent
float getSumEComponent(unsigned int index) const
get sum of |E| from component ‘index’
Definition: TrigMissingET.cxx:133
python.compressB64.c
def c
Definition: compressB64.py:93
TrigMissingET
TrigMissingET
Definition: TrigMissingEtEventTPCnv.cxx:27
TrigMissingET_p2::m_ey
float m_ey
Definition: TrigMissingET_p2.h:47
TrigMissingET.h
TrigMissingET::setEy
void setEy(float ey)
set Ey component
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:84
TrigMissingET_p2::m_ex
float m_ex
Basic information.
Definition: TrigMissingET_p2.h:47