ATLAS Offline Software
TrigMissingETCnv_p3.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_p3::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_allTheFloats[0]);
49  transObj->setEy (persObj->m_allTheFloats[1]);
50  transObj->setEz (persObj->m_allTheFloats[2]);
51  transObj->setSumEt (persObj->m_allTheFloats[3]);
52  transObj->setSumE (persObj->m_allTheFloats[4]);
53 
54  transObj->setFlag (persObj->m_flag);
55  transObj->set_RoIword (persObj->m_roiWord);
56 }
57 
58 
60  TrigMissingET_p3* persObj,
61  MsgStream &log)
62 {
63  log << MSG::DEBUG << "TrigMissingETCnv_p3::transToPers called " << endmsg;
64 
65  // basic info
66  persObj->m_allTheFloats[0] = transObj->ex();
67  persObj->m_allTheFloats[1] = transObj->ey();
68  persObj->m_allTheFloats[2] = transObj->ez();
69  persObj->m_allTheFloats[3] = transObj->sumEt();
70  persObj->m_allTheFloats[4] = transObj->sumE();
71 
72  persObj->m_flag = transObj->getFlag();
73  persObj->m_roiWord = transObj->RoIword();
74 
75  // auxiliary info
76  persObj->m_comp_number=0;
77  persObj->m_c_name.clear();
78  persObj->m_c_status.clear();
79  persObj->m_c_ex.clear();
80  persObj->m_c_ey.clear();
81  persObj->m_c_ez.clear();
82  persObj->m_c_sumEt.clear();
83  persObj->m_c_sumE.clear();
84  persObj->m_c_calib0.clear();
85  persObj->m_c_calib1.clear();
86  persObj->m_c_sumOfSigns.clear();
87  persObj->m_c_usedChannels.clear();
88  unsigned int N = transObj->getNumOfComponents();
89  if (N>0) {
90  persObj->m_comp_number=N;
91  persObj->m_c_name.reserve(N);
92  persObj->m_c_status.reserve(N);
93  persObj->m_c_ex.reserve(N);
94  persObj->m_c_ey.reserve(N);
95  persObj->m_c_ez.reserve(N);
96  persObj->m_c_sumEt.reserve(N);
97  persObj->m_c_sumE.reserve(N);
98  persObj->m_c_calib0.reserve(N);
99  persObj->m_c_calib1.reserve(N);
100  persObj->m_c_sumOfSigns.reserve(N);
101  persObj->m_c_usedChannels.reserve(N);
102 
103  for (unsigned int i=0; i<N; ++i) {
104  persObj->m_c_name.push_back( transObj->getNameOfComponent(i) );
105  persObj->m_c_status.push_back( transObj->getStatus(i) );
106  persObj->m_c_ex.push_back( transObj->getExComponent(i) );
107  persObj->m_c_ey.push_back( transObj->getEyComponent(i) );
108  persObj->m_c_ez.push_back( transObj->getEzComponent(i) );
109  persObj->m_c_sumEt.push_back( transObj->getSumEtComponent(i) );
110  persObj->m_c_sumE.push_back( transObj->getSumEComponent(i) );
111  persObj->m_c_calib0.push_back( transObj->getComponentCalib0(i) );
112  persObj->m_c_calib1.push_back( transObj->getComponentCalib1(i) );
113  persObj->m_c_sumOfSigns.push_back( transObj->getSumOfSigns(i) );
114  persObj->m_c_usedChannels.push_back( transObj->getUsedChannels(i) );
115  }
116  }
117 }
118 
TrigMissingET::getStatus
short getStatus(unsigned int index) const
get status flag for component ‘index’
Definition: TrigMissingET.cxx:157
TrigMissingET_p3::m_roiWord
long m_roiWord
Definition: TrigMissingET_p3.h:46
TrigMissingEtComponent
MET trigger slice components (auxiliary information for TrigMissingET)
Definition: TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingEtComponent.h:27
TrigMissingET::getUsedChannels
unsigned short getUsedChannels(unsigned int index) const
get number of used channes in component ‘index’
Definition: TrigMissingET.cxx:149
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_p3::m_c_name
std::vector< std::string > m_c_name
Definition: TrigMissingET_p3.h:52
TrigMissingETCnv_p3.h
TrigMissingETCnv_p3::persToTrans
virtual void persToTrans(const TrigMissingET_p3 *persObj, TrigMissingET *transObj, MsgStream &log)
Definition: TrigMissingETCnv_p3.cxx:15
TrigMissingET_p3::m_c_sumE
std::vector< float > m_c_sumE
Definition: TrigMissingET_p3.h:58
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_p3::m_c_ey
std::vector< float > m_c_ey
Definition: TrigMissingET_p3.h:55
TrigMissingET_p3::m_c_usedChannels
std::vector< unsigned short > m_c_usedChannels
Definition: TrigMissingET_p3.h:62
TrigMissingET_p3.h
TrigMissingET::getEyComponent
float getEyComponent(unsigned int index) const
get Ey from component ‘index’
Definition: TrigMissingET.cxx:109
TrigMissingET_p3::m_c_ex
std::vector< float > m_c_ex
Definition: TrigMissingET_p3.h:54
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_p3::m_c_ez
std::vector< float > m_c_ez
Definition: TrigMissingET_p3.h:56
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_p3::m_c_sumEt
std::vector< float > m_c_sumEt
Definition: TrigMissingET_p3.h:57
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigMissingET_p3::m_c_calib0
std::vector< float > m_c_calib0
Definition: TrigMissingET_p3.h:59
TrigMissingET_p3::m_flag
int m_flag
Definition: TrigMissingET_p3.h:45
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_p3
Definition: TrigMissingET_p3.h:23
TrigMissingET_p3::m_c_status
std::vector< short > m_c_status
Definition: TrigMissingET_p3.h:53
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::getSumEtComponent
float getSumEtComponent(unsigned int index) const
get sum of |Et| from component ‘index’
Definition: TrigMissingET.cxx:125
TrigMissingET::sumEt
float sumEt() const
sum of |Et|
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:56
TrigMissingET_p3::m_c_sumOfSigns
std::vector< short > m_c_sumOfSigns
Definition: TrigMissingET_p3.h:61
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
TrigMissingET_p3::m_comp_number
unsigned int m_comp_number
Auxiliary information.
Definition: TrigMissingET_p3.h:51
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
TrigMissingETCnv_p3::transToPers
virtual void transToPers(const TrigMissingET *transObj, TrigMissingET_p3 *persObj, MsgStream &log)
Definition: TrigMissingETCnv_p3.cxx:59
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_p3::m_allTheFloats
float m_allTheFloats[5]
Basic information.
Definition: TrigMissingET_p3.h:42
TrigMissingET
TrigMissingET
Definition: TrigMissingEtEventTPCnv.cxx:27
TrigMissingET.h
TrigMissingET::setEy
void setEy(float ey)
set Ey component
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:84
TrigMissingET_p3::m_c_calib1
std::vector< float > m_c_calib1
Definition: TrigMissingET_p3.h:60