#include <ClusterKG.h>
Public Member Functions | |
| ClusterKG () | |
| virtual | ~ClusterKG () |
| Bool_t | Create (AlgConfig &ac, StripListKG &all1, CellListKG &all2, const std::vector< Int_t > &row) |
| void | SetEnergy (StripListKG &all1) |
| Double_t | GetEnergy (Int_t whatKind) const |
| void | FindNbOfAmbStrips (StripListKG &all1) |
| Int_t | GetNbOfAmbStrips () const |
Public Attributes | |
| Int_t | index |
| std::vector< Int_t > | stpindexes |
Private Attributes | |
| Double_t | energyRaw |
| Double_t | energyPe |
| Double_t | energyGeV |
| Int_t | nbOfAmbStrips |
|
|
Definition at line 24 of file ClusterKG.cxx. References MSG. 00024 :energyRaw(0.),energyPe(0.),energyGeV(0.),nbOfAmbStrips(0){ 00025 // 00026 // Purpose: Default constructor 00027 // 00028 MSG("Cluster3D", Msg::kVerbose) 00029 << "Default constructor " << endl; 00030 }
|
|
|
Definition at line 35 of file ClusterKG.h. 00035 {};
|
|
||||||||||||||||||||
|
Definition at line 34 of file ClusterKG.cxx. References energyPe, energyRaw, FindNbOfAmbStrips(), CellListKG::GetCellElem1(), CellListKG::GetCellElem2(), Registry::GetDouble(), Registry::GetInt(), StripListKG::GetStripAmbiguity(), StripListKG::GetStripIndex(), StripListKG::GetStripPlane(), StripListKG::GetStripStrip(), StripListKG::GetStripXTalk(), MSG, nbOfAmbStrips, SetEnergy(), StripListKG::SetStripAmbiguity(), and stpindexes. Referenced by ClusterListKG::CreateClusters(). 00034 {
00035 //
00036 // Purpose: Create a single cluster
00037 //
00038 // Arguments:
00039 //
00040 // Return:
00041 //
00042 // Contact: K.Grzelak1@physics.ox.ac.uk
00043 //
00044 // // Program Notes:-
00045 // =============
00046 // Finally cluster should consist of strips, not cells
00047
00048 Bool_t bigcluster = true;
00049 stpindexes.clear();
00050
00051 //
00052 // Make sure that cluster consists of unique strips only
00053 //
00054 for(UInt_t jj=0; jj<row.size(); ++jj){
00055 Int_t imult1=0;
00056 Int_t imult2=0;
00057
00058 Int_t istp1 = all1.GetStripIndex(all2.GetCellElem1(row[jj]));
00059 Int_t istp2 = all1.GetStripIndex(all2.GetCellElem2(row[jj]));
00060
00061 // "Long" cells have elem1 = elem2
00062
00063 for(UInt_t ll=0; ll<stpindexes.size(); ++ll){
00064 Int_t istp = all1.GetStripIndex(stpindexes[ll]);
00065 if(istp1 == istp){
00066 ++imult1;
00067 }
00068 if(istp2 == istp){
00069 ++imult2;
00070 }
00071 }
00072 if(imult1==0){
00073 Int_t ind = all2.GetCellElem1(row[jj]) ;
00074 stpindexes.push_back(ind);
00075 all1.SetStripAmbiguity(ind);
00076 }
00077 // Check if it was not a "long" cell
00078 if(imult2==0 && istp1 != istp2){
00079 Int_t ind = all2.GetCellElem2(row[jj]) ;
00080 stpindexes.push_back(ind);
00081 all1.SetStripAmbiguity(ind);
00082 }
00083 }
00084
00085 // Set cluster energy
00086 SetEnergy(all1);
00087 // Check how many strips belong to other clusters as well
00088 FindNbOfAmbStrips(all1);
00089
00090 MSG("Cluster3D", Msg::kDebug)
00091 << " Cluster3D create "
00092 << "energyRaw= " << energyRaw
00093 << "energyPe= " << energyPe << endl;
00094
00095 const Int_t minStp = ac.GetInt("minClustStp");
00096 const Int_t minAmbStp = ac.GetInt("minClustAmbStp");
00097 const Double_t minClustPe = ac.GetDouble("minClustPe");
00098
00099 MSG("Cluster3D", Msg::kDebug)
00100 << " Cluster3D create "
00101 << " nbOfAmbStrips= " << nbOfAmbStrips
00102 << "stpindexes.size()= " << stpindexes.size() << endl;
00103
00104 //
00105 // How many strips belongs ONLY to this cluster ?
00106 // If less than minAmbStp, than it is not an interesting cluster
00107 //
00108
00109 if(((Int_t)stpindexes.size() - nbOfAmbStrips) < minAmbStp){
00110 bigcluster=false;
00111 }
00112
00113 //
00114 // Is it simply a big or a small cluster ?
00115 // If total number of strips is less than minSt
00116 // or total pulse height is less than minClustPe
00117 // than again -> it is not an interesting cluster
00118 //
00119
00120 if((Int_t)stpindexes.size() < minStp || energyPe < minClustPe){
00121 bigcluster=false;
00122 }
00123
00124 for(UInt_t ll=0; ll<stpindexes.size(); ++ll){
00125 MSG("Cluster3D", Msg::kDebug)
00126 << " Cluster3D create "
00127 << "all1.GetStripXTalk(stpindexes[ll])= "
00128 << all1.GetStripXTalk(stpindexes[ll])
00129 << "all1.GetStripAmbiguity(stpindexes[ll])= "
00130 << all1.GetStripAmbiguity(stpindexes[ll])
00131 << "all1.GetStripStrip(stpindexes[ll])= "
00132 << all1.GetStripStrip(stpindexes[ll])
00133 << "all1.GetStripPlane(stpindexes[ll])= "
00134 << all1.GetStripPlane(stpindexes[ll]) << endl;
00135 }
00136 return bigcluster;
00137
00138 }
|
|
|
Definition at line 200 of file ClusterKG.cxx. References StripListKG::GetStripAmbiguity(), nbOfAmbStrips, and stpindexes. Referenced by Create(). 00200 {
00201 //
00202 // Purpose: Find number of strips which belongs not only to this cluster
00203 //
00204 // Arguments:
00205 //
00206 // Return:
00207 //
00208 // Contact: K.Grzelak1@physics.ox.ac.uk
00209 //
00210 // Program Notes:-
00211 // =============
00212
00213 for(UInt_t i=0; i<stpindexes.size(); ++i){
00214 if(all1.GetStripAmbiguity(stpindexes[i])>1){
00215 nbOfAmbStrips=nbOfAmbStrips+1;
00216 }
00217 }
00218 }
|
|
|
Definition at line 168 of file ClusterKG.cxx. 00168 {
00169 //
00170 // Purpose: Returns energy of a cluster
00171 //
00172 // Arguments:
00173 //
00174 // Return:
00175 //
00176 // Contact: K.Grzelak1@physics.ox.ac.uk
00177 //
00178 // // Program Notes:-
00179 // =============
00180 //
00181
00182 if(whatKind==0){
00183 return energyRaw;
00184 }
00185 else if(whatKind==1){
00186 return energyPe;
00187 }
00188 else if(whatKind==2){
00189 return energyGeV;
00190 }
00191 else{
00192 return energyPe;
00193 }
00194
00195 return energyPe;
00196 }
|
|
|
Definition at line 222 of file ClusterKG.cxx. 00222 {
00223 //
00224 // Purpose: Return number of strips which belongs not only to this cluster
00225 //
00226 // Arguments:
00227 //
00228 // Return:
00229 //
00230 // Contact: K.Grzelak1@physics.ox.ac.uk
00231 //
00232 // Program Notes:-
00233 // =============
00234 //
00235
00236 return nbOfAmbStrips;
00237 }
|
|
|
Definition at line 142 of file ClusterKG.cxx. References energyPe, energyRaw, StripListKG::GetStripPeE(), StripListKG::GetStripPeW(), StripListKG::GetStripRawE(), StripListKG::GetStripRawW(), and stpindexes. Referenced by Create(). 00142 {
00143 //
00144 // Purpose: Calculate energy of a cluster
00145 //
00146 // Arguments:
00147 //
00148 // Return:
00149 //
00150 // Contact: K.Grzelak1@physics.ox.ac.uk
00151 //
00152 // // Program Notes:-
00153 // =============
00154
00155 energyRaw=0.0;
00156 energyPe=0.0;
00157
00158 for(UInt_t i=0; i<stpindexes.size(); ++i){
00159 energyRaw=energyRaw+all1.GetStripRawE(stpindexes[i])
00160 +all1.GetStripRawW(stpindexes[i]);
00161 energyPe=energyPe+all1.GetStripPeE(stpindexes[i])
00162 +all1.GetStripPeW(stpindexes[i]);
00163 }
00164 }
|
|
|
Definition at line 53 of file ClusterKG.h. |
|
|
Definition at line 52 of file ClusterKG.h. Referenced by Create(), and SetEnergy(). |
|
|
Definition at line 51 of file ClusterKG.h. Referenced by Create(), and SetEnergy(). |
|
|
Definition at line 37 of file ClusterKG.h. |
|
|
Definition at line 55 of file ClusterKG.h. Referenced by Create(), and FindNbOfAmbStrips(). |
|
|
Definition at line 39 of file ClusterKG.h. Referenced by Create(), FindNbOfAmbStrips(), and SetEnergy(). |
1.3.9.1