66{
67
68 std::vector<double> phiPart;
69 std::vector<double> etaPart;
70
71 etaPart.clear();
72 phiPart.clear();
73
74 if (!mcCollptr) {
75 return false;
76 }
77
79
80 for (itr = mcCollptr->
begin(); itr!=mcCollptr->
end(); ++itr) {
81 for (const auto& part: *(*itr))
82 {
83
84
85
88 {
89 etaPart.push_back(
part->momentum().pseudoRapidity());
90 phiPart.push_back(
part->momentum().phi());
91 }
92 }
93 }
94
95
96 if ( etaPart.empty()) return true;
97
98 for (
unsigned int i=0;
i <
m_emap.size();
i++)
99 {
100 LArHitList& theLArHitList =
m_emap[
i];
101 const CaloDetDescrElement* calodde =
m_cddMgr->get_element(IdentifierHash(i));
102 double eta=calodde->
eta();
103 double phi=calodde->
phi();
104 for(unsigned int iPart=0;iPart<etaPart.size();++iPart)
105 {
109 std::fabs(deltaEta)<deta/2. )
110 {
112 break;
113 }
114 }
115 }
116 return true;
117}
Scalar eta() const
pseudorapidity method
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
Scalar phi() const
phi method
float eta() const
cell eta
float phi() const
cell phi
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
bool isPhoton(const T &p)
bool isElectron(const T &p)
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .