SND@LHC Software
Loading...
Searching...
No Matches
ecalMaximum.cxx
Go to the documentation of this file.
1#include "ecalMaximum.h"
2
3#include "ecalCell.h"
4
5#include "TMath.h"
6
7#include <list>
8
9using namespace std;
10
12 : TObject(),
13 fCell(cell),
14 fCX(0.),
15 fCY(0.),
16 fX(0.),
17 fY(0.),
18 fMark(0),
19 fTheta(0)
20{
21 Double_t me=cell->GetEnergy();
22 Double_t e;
23 Int_t i;
24 list<ecalCell*> cells;
25 list<ecalCell*>::const_iterator p;
26
27 fCX=cell->GetCenterX();
28 fCY=cell->GetCenterY();
29 fX=cell->GetEnergy()*fCX;
30 fY=cell->GetEnergy()*fCY;
31
32
33 cell->GetNeighborsList(cells);
34 for(p=cells.begin();p!=cells.end();++p)
35 {
36 fX+=(*p)->GetEnergy()*(*p)->GetCenterX();
37 fY+=(*p)->GetEnergy()*(*p)->GetCenterY();
38 }
39 fX/=me; fY/=me;
40}
41
void GetNeighborsList(std::list< ecalCell * > &neib) const
Definition ecalCell.h:48
Float_t GetCenterX() const
Definition ecalCell.h:35
Float_t GetCenterY() const
Definition ecalCell.h:36
Float_t GetEnergy() const
Definition ecalCell.h:42
Double_t fCY
Definition ecalMaximum.h:35
Double_t fX
Definition ecalMaximum.h:37
Double_t fCX
Definition ecalMaximum.h:34
Double_t fY
Definition ecalMaximum.h:38
ClassImp(ecalContFact) ecalContFact