ATLAS Offline Software
CaloVertexedCell.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id$
15 #include "CaloEvent/CaloCell.h"
16 
17 
25  : m_cell (&cell),
26  m_eta (cell.eta()),
27  m_phi (cell.phi()),
28  m_sinth (cell.sinTh()),
29  m_costh (cell.cosTh()),
30  m_sinph (cell.sinPhi()),
31  m_cosph (cell.cosPhi())
32 {
33 }
34 
35 
45  const Amg::Vector3D& vx)
46  : m_cell (&cell),
47  m_eta (cell.eta()),
48  m_phi (cell.phi()),
49  m_sinth (cell.sinTh()),
50  m_costh (cell.cosTh()),
51  m_sinph (cell.sinPhi()),
52  m_cosph (cell.cosPhi())
53 {
54  computeVertexCorr (vx);
55 }
56 
57 
62 void
64 {
65  const CaloDetDescrElement& dd = *m_cell->caloDDE();
66  m_eta += ((vx.x()*dd.cosPhi()+vx.y()*dd.sinPhi())*dd.cosTh()-vx.z()*dd.sinTh())/dd.r();
67  m_phi += (vx.x()*dd.sinPhi()-vx.y()*dd.cosPhi())/dd.r() ;
68 
69  m_sinth += (vx.z()*dd.sinTh() - (vx.x()*dd.cosPhi() + vx.y()*dd.sinPhi())*dd.cosTh()) * dd.cosTh()*dd.sinTh()/dd.r();
70  m_costh += - (vx.z()*dd.sinTh() - (vx.x()*dd.cosPhi() + vx.y()*dd.sinPhi())*dd.cosTh()) * dd.sinTh()*dd.sinTh()/dd.r();
71 
72  m_sinph += - ( vx.y()*dd.cosPhi() - vx.x()*dd.sinPhi())*dd.cosPhi()/dd.r();
73  m_cosph += + ( vx.y()*dd.cosPhi() - vx.x()*dd.sinPhi())*dd.sinPhi()/dd.r();
74 }
CaloVertexedCell::m_eta
double m_eta
The recalculated cell eta.
Definition: CaloVertexedCell.h:116
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
CaloCell.h
CaloVertexedCell::m_sinph
double m_sinph
The recalculated cell sin(phi).
Definition: CaloVertexedCell.h:128
CaloVertexedCell::m_phi
double m_phi
The recalculated cell phi.
Definition: CaloVertexedCell.h:119
CaloVertexedCell::computeVertexCorr
void computeVertexCorr(const Amg::Vector3D &vx)
Calculate cell kinematics for a given vertex.
Definition: CaloVertexedCell.cxx:63
CaloVertexedCell::m_cell
const CaloCell * m_cell
The cell being proxied.
Definition: CaloVertexedCell.h:113
CaloCell::caloDDE
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition: CaloCell.h:305
CaloVertexedCell::m_cosph
double m_cosph
The recalculated cell cos(phi).
Definition: CaloVertexedCell.h:131
CaloVertexedCell::m_costh
double m_costh
The recalculated cell cos(theta).
Definition: CaloVertexedCell.h:125
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
library_scraper.dd
list dd
Definition: library_scraper.py:46
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloVertexedCell::m_sinth
double m_sinth
The recalculated cell sin(theta).
Definition: CaloVertexedCell.h:122
CaloVertexedCell::CaloVertexedCell
CaloVertexedCell(const CaloCell &cell)
Constructor.
Definition: CaloVertexedCell.cxx:24
CaloVertexedCell.h
Evaluate cell kinematics with a different vertex.