ATLAS Offline Software
TrigEMClusterCnv_p2.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
9 #include "AthLinks/ElementLink.h"
12 
13 //static ElementLinkCnv_p1< ElementLink<RingerRingsContainer> > ELinkRingerRingsCnv;
14 
16  TrigEMCluster_p2* pers, MsgStream &log ) const
17 {
18 
19  log << MSG::DEBUG << "TrigEMClusterCnv_p2::tranToPers" << endmsg;
20 
21  if ( (!trans) || (!pers) ) {
22  log << MSG::ERROR << "TrigEMClusterCnv_p2::trasnToPers with trans or pers == 0" << endmsg;
23  return;
24  }
25 
26  pers->m_Energy = trans->m_Energy;
27  pers->m_Et = trans->m_Et;
28  for(int i=0; i<MAXSIZE; i++){
29  pers->m_EnergyS[i] = trans->m_EnergyS[i];
30  }
31  pers->m_Eta = trans->m_Eta;
32  pers->m_Phi = trans->m_Phi;
33  pers->m_e237 = trans->m_e237;
34  pers->m_e277 = trans->m_e277;
35  pers->m_fracs1 = trans->m_fracs1;
36  pers->m_weta2 = trans->m_weta2;
37  pers->m_ehad1 = trans->m_ehad1;
38  pers->m_Eta1 = trans->m_Eta1;
39  pers->m_emaxs1 = trans->m_emaxs1;
40  pers->m_e2tsts1 = trans->m_e2tsts1;
41 
42  m_ELinkRingerRingsCnv.transToPers(&trans->m_rings, &pers->m_rings, log);
43  ITPConverterFor<TrigCaloCluster>* cnv = nullptr;
44  pers->m_trigCaloCluster = baseToPersistent( &cnv, trans, log );
45 }
46 
48  TrigEMCluster* trans, MsgStream &log ) const
49 {
50 
51  log << MSG::DEBUG << "TrigEMClusterCnv_p2::persToTrans" << endmsg;
52 
53  if ( (!trans) || (!pers) ) {
54  log << MSG::ERROR << "RingerRingsCnv_p2::persToTrans with trans or pers == 0" << endmsg;
55  return;
56  }
57 
58  trans->m_Energy = pers->m_Energy;
59  trans->m_Et = pers->m_Et;
60  for(int i=0; i<MAXSIZE; i++){
61  trans->m_EnergyS[i] = pers->m_EnergyS[i];
62  }
63  trans->m_Eta = pers->m_Eta;
64  trans->m_Phi = pers->m_Phi;
65  trans->m_e237 = pers->m_e237;
66  trans->m_e277 = pers->m_e277;
67  trans->m_fracs1 = pers->m_fracs1;
68  trans->m_weta2 = pers->m_weta2;
69  trans->m_ehad1 = pers->m_ehad1;
70  trans->m_Eta1 = pers->m_Eta1;
71  trans->m_emaxs1 = pers->m_emaxs1;
72  trans->m_e2tsts1 = pers->m_e2tsts1;
73 
74  m_ELinkRingerRingsCnv.persToTrans(&pers->m_rings, &trans->m_rings, log);
75  ITPConverterFor<TrigCaloCluster>* cnv = nullptr;
76  fillTransFromPStore( &cnv, pers->m_trigCaloCluster, trans, log );
77 
78 }
ElementLinkCnv_p1.h
This file contains the class definition for the ElementLinkCnv_p1 class.
TrigEMCluster_p2::m_Et
float m_Et
Definition: TrigEMCluster_p2.h:55
TrigEMCluster::m_Phi
float m_Phi
Phi (calibrated)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMCluster.h:157
ITPConverterFor
Definition: TPConverter.h:37
TrigEMCluster_p2::m_Eta1
float m_Eta1
Definition: TrigEMCluster_p2.h:64
TrigEMCluster::m_Eta
float m_Eta
Eta (calibrated)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMCluster.h:155
TrigEMCluster::m_e237
float m_e237
Energy in a 3x7 cluster (no calibration) around hottest cell.
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMCluster.h:159
TrigEMCluster
Class with calibrated variables for egamma clustering.
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMCluster.h:31
TrigEMCluster::m_emaxs1
float m_emaxs1
maximum energy in sampling 1 (strip layer)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMCluster.h:172
TrigEMCluster_p2
Definition: TrigEMCluster_p2.h:27
TrigEMCluster::m_fracs1
float m_fracs1
Energy in a 7 strips (around hottest strip) minus energy in 3 strips divided by energy in 3 strips.
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMCluster.h:164
TrigEMCluster_p2::m_Phi
float m_Phi
Definition: TrigEMCluster_p2.h:58
RingerRingsContainer.h
TrigEMCluster_p2::m_fracs1
float m_fracs1
Definition: TrigEMCluster_p2.h:61
TrigEMCluster::m_e2tsts1
float m_e2tsts1
get second maximum energy in sampling 1 (strip layer)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMCluster.h:174
lumiFormat.i
int i
Definition: lumiFormat.py:85
MAXSIZE
const int MAXSIZE
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloCluster.h:36
TrigEMCluster_p2::m_e237
float m_e237
Definition: TrigEMCluster_p2.h:59
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigEMClusterConverterBase< TrigEMCluster_p2 >::persToTrans
virtual void persToTrans(const TrigEMCluster_p2 *persObj, TrigEMCluster *transObj, MsgStream &log) const override
Definition: TrigEMClusterCnv_p2.cxx:47
TrigEMCluster_p2::m_e277
float m_e277
Definition: TrigEMCluster_p2.h:60
TrigEMCluster.h
TrigEMCluster::m_rings
ElementLink< RingerRingsContainer > m_rings
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMCluster.h:180
TrigEMCluster::m_Eta1
float m_Eta1
Eta sampling 1 (strip layer)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMCluster.h:170
TrigEMCluster_p2.h
TrigEMCluster::m_e277
float m_e277
Energy in a 7x7 cluster (no calibration) around hottest cell.
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMCluster.h:161
TrigEMCluster_p2::m_weta2
float m_weta2
Definition: TrigEMCluster_p2.h:62
TrigEMCluster_p2::m_rings
ElementLinkInt_p1 m_rings
Definition: TrigEMCluster_p2.h:71
TrigEMCluster_p2::m_EnergyS
float m_EnergyS[MAXSIZE]
Definition: TrigEMCluster_p2.h:56
TrigEMCluster_p2::m_e2tsts1
float m_e2tsts1
Definition: TrigEMCluster_p2.h:66
TrigEMCluster_p2::m_Eta
float m_Eta
Definition: TrigEMCluster_p2.h:57
TrigEMCluster_p2::m_ehad1
float m_ehad1
Definition: TrigEMCluster_p2.h:63
DEBUG
#define DEBUG
Definition: page_access.h:11
TrigEMCluster::m_ehad1
float m_ehad1
hadronic Energy (first hadronic layer)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMCluster.h:168
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TrigEMCluster::m_EnergyS
float m_EnergyS[MAXSIZE]
Energy (calibrated) per sampling layer
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMCluster.h:153
TrigEMClusterCnv_p2.h
TrigEMCluster::m_weta2
float m_weta2
cluster width (based on a 3x5 cluster - 2nd layer)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMCluster.h:166
TrigEMCluster::m_Energy
float m_Energy
Energy (calibrated)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMCluster.h:149
TrigEMClusterConverterBase< TrigEMCluster_p2 >::transToPers
virtual void transToPers(const TrigEMCluster *transObj, TrigEMCluster_p2 *persObj, MsgStream &log) const override
Definition: TrigEMClusterCnv_p2.cxx:15
TrigEMCluster_p2::m_trigCaloCluster
TPObjRef m_trigCaloCluster
Definition: TrigEMCluster_p2.h:69
TrigEMCluster_p2::m_Energy
float m_Energy
Definition: TrigEMCluster_p2.h:54
TrigEMCluster_p2::m_emaxs1
float m_emaxs1
Definition: TrigEMCluster_p2.h:65
TrigEMCluster::m_Et
float m_Et
Energy (calibrated)
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMCluster.h:151