SND@LHC Software
Loading...
Searching...
No Matches
hcalModule.cxx
Go to the documentation of this file.
1
7
#include "
hcalModule.h
"
8
9
#include <algorithm>
10
#include <iostream>
11
12
using
std::cout;
13
using
std::endl;
14
using
std::map;
15
using
std::list;
16
17
//-----------------------------------------------------------------------------
18
Int_t
hcalModule::CountNeighbors
(
const
std::list<hcalModule*>& lst)
const
19
{
20
Int_t c=0;
21
list<hcalModule*>::const_iterator p=lst.begin();
22
for
(;p!=lst.end();++p)
23
if
(find(
fNeighbors
.begin(),
fNeighbors
.end(), *p)!=
fNeighbors
.end())
24
++c;
25
26
return
c;
27
}
28
29
//-----------------------------------------------------------------------------
30
void
hcalModule::GetClusterEnergy
(Float_t& EcalEnergy)
31
{
32
EcalEnergy=-1;
33
EcalEnergy=
GetEnergy
();
34
list<hcalModule*>::const_iterator p;
35
for
(p=
fNeighbors
.begin();p!=
fNeighbors
.end();++p)
36
{
37
EcalEnergy+=(*p)->GetEnergy();
38
}
39
}
40
hcalModule::GetEnergy
Float_t GetEnergy() const
Definition
hcalModule.h:41
hcalModule::GetClusterEnergy
void GetClusterEnergy(Float_t &EcalEnergy)
Definition
hcalModule.cxx:30
hcalModule::CountNeighbors
Int_t CountNeighbors(const std::list< hcalModule * > &lst) const
Definition
hcalModule.cxx:18
hcalModule::fNeighbors
std::list< hcalModule * > fNeighbors
Definition
hcalModule.h:87
hcalModule.h
hcal
hcalModule.cxx
Generated by
1.9.8