FairRoot/PandaRoot
PndEmcBump.cxx
Go to the documentation of this file.
1 //--------------------------------------------------------------------------
2 // File and Version Information:
3 // $Id:$
4 //
5 // Description:
6 // Class PndEmcBump
7 //
8 // Environment:
9 // Software developed for the BaBar Detector at the SLAC B-Factory.
10 // Adapted for the PANDA experiment at GSI
11 //
12 // Author List:
13 // Stephen J. Gowdy Originator
14 // Copyright Information:
15 // Copyright (C) 1997 University of Edinburgh
16 //
17 // Dima Melnychuk, adaption for PANDA
18 //------------------------------------------------------------------------
19 
20 
21 //-----------------------
22 // This Class's Header --
23 //-----------------------
24 
25 #include "PndEmcBump.h"
26 
27 //---------------
28 // C++ Headers --
29 //---------------
30 
31 #include <iostream>
32 #include <iomanip>
33 #include <vector>
34 using std::vector;
35 
36 //-------------------------------
37 // Collaborating Class Headers --
38 //-------------------------------
39 
40 #include "PndEmcSharedDigi.h"
41 using std::endl;
42 using std::ios;
43 using std::ostream;
44 using std::setw;
45 
46 //----------------
47 // Constructors --
48 //----------------
49 
51  : fClusterIndex( 0 )
52 {
53  SetNBumps(1);
54 }
55 
56 //use compiler-generated copy constructor
57 
58 //--------------
59 // Destructor --
60 //--------------
61 
63 {
64 }
65 
66 void
67 PndEmcBump::Print(Int_t iBump) const
68 {
69  std::cout<<"Bump["<<iBump<<"], (digis, E)=("<<DigiList().size()<<", "<<energy()<<")"<<endl;
70 }
71 //-------------
72 // Modifiers --
73 //-------------
74 
75 void
76 PndEmcBump::MadeFrom( Int_t clusterIndex )
77 {
78  fClusterIndex = clusterIndex;
79 }
80 
81 
82 // Double_t
83 // PndEmcBump::RnumberOfDigis() const
84 // {
85 // Double_t sum = 0;
86 // PndEmcDigi* current;
87 //
88 // std::vector<PndEmcDigi*>::const_iterator digi_iter;
89 // for (digi_iter=fDigiList.begin();digi_iter!=fDigiList.end();++digi_iter)
90 // {
91 // sum+=(*digi_iter)->dynamic_cast_PndEmcSharedDigi()->weight();
92 // }
93 //
94 // return sum;
95 // }
96 //
97 // Int_t
98 // PndEmcBump::NumberOfDigis() const
99 // {
100 // Int_t numberOfDigis = Int_t( RnumberOfDigis() + 0.5 );
101 // if( numberOfDigis < 1 ) numberOfDigis = 1;
102 //
103 // return( numberOfDigis );
104 // }
virtual void MadeFrom(Int_t clusterIndex)
Definition: PndEmcBump.cxx:76
virtual void Print(Int_t iBump) const
Definition: PndEmcBump.cxx:67
virtual void SetNBumps(unsigned nbumps)
const std::vector< Int_t > & DigiList() const
Definition: PndEmcCluster.h:40
Int_t fClusterIndex
Definition: PndEmcBump.h:61
basic_ostream< char, char_traits< char > > ostream
virtual Double_t energy() const
virtual ~PndEmcBump()
Definition: PndEmcBump.cxx:62