#include <ClusterListKG.h>
Public Member Functions | |
| ClusterListKG () | |
| virtual | ~ClusterListKG () |
| void | CreateClusters (AlgConfig &ac, StripListKG &all1, CellListKG &all2) |
| void | GetClusters (std::vector< ClusterKG > &allclust) |
| UInt_t | GetNClusters () |
| void | SetEnergy () |
| double | GetEnergy (Int_t whatKind) |
Private Attributes | |
| std::vector< ClusterKG > | allclsts |
| Double_t | energyRaw |
| Double_t | energyPe |
| Double_t | energyGeV |
|
|
Definition at line 25 of file ClusterListKG.cxx. 00025 :energyRaw(0.),energyPe(0.),energyGeV(0.){ 00026 // 00027 // Purpose: Default constructor 00028 // 00029 }
|
|
|
Definition at line 35 of file ClusterListKG.h. 00035 {};
|
|
||||||||||||||||
|
Definition at line 128 of file ClusterListKG.cxx. References allclsts, ClusterKG::Create(), find(), CellListKG::GetCellIndex(), CellListKG::GetCellPlane(), Registry::GetInt(), CellListKG::GetNCells(), CellListKG::IsNeighbour(), and MSG. Referenced by AlgCluster3DList::RunAlg(). 00128 {
00129 //
00130 // Purpose: Create clusters
00131 //
00132 // Arguments:
00133 //
00134 // Return: n/a
00135 //
00136 // Contact: K.Grzelak1@physics.ox.ac.uk
00137 //
00138 //
00139 // Program Notes:-
00140 // =============
00141 //
00142
00143 const Int_t planeDist = ac.GetInt("plnDist");
00144 const Int_t stripDist = ac.GetInt("stpDist");
00145
00146 vector <Int_t> arr1[200];
00147
00148 vector<Int_t> marked;
00149
00150 vector<Int_t> left;
00151
00152 std::vector<Int_t>::iterator pos;
00153
00154 Int_t allc = all2.GetNCells();
00155
00156 for(Int_t jj=0;jj<allc;++jj){
00157 marked.push_back(0);
00158 left.push_back(jj);
00159 }
00160
00161 Int_t notMarked=allc;
00162
00163
00164 MSG("Cluster3D", Msg::kDebug)
00165 << "notMarked = " << notMarked << endl;
00166
00167 Int_t iclust=-1;
00168 Int_t icell=0;
00169
00170 // do while the amount of not marked cells !=0
00171 while(notMarked!=0){
00172 bool neighbours=true;
00173
00174 ++iclust;
00175
00176 MSG("Cluster3D", Msg::kDebug)
00177 << "i-th cluster = " << iclust << endl;
00178
00179 MSG("Cluster3D", Msg::kDebug)
00180 << "icell= " << icell << endl;
00181
00182 icell=left[0];
00183
00184 arr1[iclust].push_back(icell);
00185
00186 MSG("Cluster3D", Msg::kDebug)
00187 << "all2.GetCellIndex(icell)= " << all2.GetCellIndex(icell)
00188 << "all2.GetCellPlane(icell)= " << all2.GetCellPlane(icell) << endl;
00189
00190 pos=find(left.begin(),left.end(),icell);
00191
00192 if (pos != left.end()){
00193 left.erase(pos);
00194 }
00195
00196 marked[icell]=1;
00197 --notMarked;
00198
00199 // while not checked neighbours exist
00200
00201 Int_t icolu=-1;
00202 while(neighbours){
00203 ++icolu;
00204 // for every cell, check if it has neighbours
00205
00206 for(Int_t kk=icell+1;kk<allc;++kk){
00207
00208 if(marked[kk]==0){
00209
00210 if(all2.IsNeighbour(arr1[iclust][icolu],kk,planeDist,stripDist)){
00211
00212 marked[kk]=1;
00213 --notMarked;
00214
00215 MSG("Cluster3D", Msg::kDebug)
00216 << "all2.GetCellIndex(kk)= " << all2.GetCellIndex(kk)
00217 << "all2.GetCellPlane(kk)= " << all2.GetCellPlane(kk) << endl;
00218
00219
00220 arr1[iclust].push_back(kk);
00221
00222 pos=find(left.begin(),left.end(),kk);
00223
00224 if (pos != left.end()){
00225 left.erase(pos);
00226 }
00227 }
00228 }
00229 }
00230 if(icolu==((Int_t)arr1[iclust].size()-1) || notMarked==0) {
00231 neighbours=false;
00232 }
00233 }
00234 }
00235
00236 MSG("Cluster3D", Msg::kDebug)
00237 << "CreateClusters: Number of clusters= " << (iclust+1) << endl;
00238
00239 ClusterKG ctmp;
00240 for(Int_t ii=0; ii<(iclust+1); ++ii){
00241 MSG("Cluster3D", Msg::kDebug)
00242 << "arr1[ii].size()= " << arr1[ii].size() << endl;
00243 if(ctmp.Create(ac,all1,all2,arr1[ii])){
00244 allclsts.push_back(ctmp);
00245 }
00246 }
00247 }
|
|
|
Definition at line 33 of file ClusterListKG.cxx. Referenced by AlgCluster3DList::RunAlg(). 00033 {
00034 //
00035 // Purpose: Return STL vector of clusters
00036 //
00037 // Arguments:
00038 //
00039 // Return: n/a
00040 //
00041 // Contact: K.Grzelak1@physics.ox.ac.uk
00042 //
00043 //
00044 // Program Notes:-
00045 // =============
00046 //
00047 allclust=allclsts;
00048 }
|
|
|
Definition at line 94 of file ClusterListKG.cxx. 00094 {
00095 //
00096 // Purpose: Return total reconstructed energy
00097 //
00098 // Arguments:
00099 // whatKind in - raw energy, energy in pe's .... ?
00100 //
00101 // Return: Double_t energy
00102 //
00103 // Contact: K.Grzelak1@physics.ox.ac.uk
00104 //
00105 //
00106 // Program Notes:-
00107 // =============
00108 //
00109
00110 if(whatKind==0){
00111 return energyRaw;
00112 }
00113 else if(whatKind==1){
00114 return energyPe;
00115 }
00116 else if(whatKind==2){
00117 return energyGeV;
00118 }
00119 else{
00120 return energyPe;
00121 }
00122
00123 // return energyPe;
00124 }
|
|
|
Definition at line 52 of file ClusterListKG.cxx. References allclsts. 00052 {
00053 //
00054 // Purpose: Return number of clusters
00055 //
00056 // Arguments: n/a
00057 //
00058 // Return: UInt_t number of clusters
00059 //
00060 // Contact: K.Grzelak1@physics.ox.ac.uk
00061 //
00062 //
00063 // Program Notes:-
00064 // =============
00065 //
00066 return allclsts.size();
00067
00068 }
|
|
|
Definition at line 72 of file ClusterListKG.cxx. References allclsts, energyPe, and energyRaw. 00072 {
00073 //
00074 // Purpose: Calculate total reconstructed energy
00075 //
00076 // Arguments: n/a
00077 //
00078 // Return: n/a
00079 //
00080 // Contact: K.Grzelak1@physics.ox.ac.uk
00081 //
00082 //
00083 // Program Notes:-
00084 // =============
00085 //
00086 for(UInt_t i=0; i<allclsts.size(); ++i){
00087 energyRaw=energyRaw+allclsts[i].GetEnergy(0);
00088 energyPe=energyPe+allclsts[i].GetEnergy(1);
00089 }
00090 }
|
|
|
Definition at line 43 of file ClusterListKG.h. Referenced by CreateClusters(), GetNClusters(), and SetEnergy(). |
|
|
Definition at line 47 of file ClusterListKG.h. |
|
|
Definition at line 46 of file ClusterListKG.h. Referenced by SetEnergy(). |
|
|
Definition at line 45 of file ClusterListKG.h. Referenced by SetEnergy(). |
1.3.9.1