#include <RecEmcCluster.h>
Inheritance diagram for RecEmcCluster:
Public Member Functions | |
RecEmcHitMap::const_iterator | Begin () const |
RecEmcHitMap::const_iterator | Begin () const |
RecEmcHitMap::const_iterator | BeginSeed () const |
RecEmcHitMap::const_iterator | BeginSeed () const |
void | Clear () |
void | Clear () |
virtual const CLID & | clID () const |
virtual const CLID & | clID () const |
void | ClusterId (const RecEmcID id) |
void | ClusterId (const RecEmcID id) |
void | Dump () const |
void | Dump () const |
RecEmcHitMap::const_iterator | End () const |
RecEmcHitMap::const_iterator | End () const |
RecEmcHitMap::const_iterator | EndSeed () const |
RecEmcHitMap::const_iterator | EndSeed () const |
void | Erase (const RecEmcHit &aHit) |
void | Erase (const RecEmcHit &aHit) |
RecEmcHitMap::const_iterator | Find (const RecEmcID &CellId) const |
RecEmcHitMap::const_iterator | Find (const RecEmcID &CellId) const |
RecEmcHitMap::const_iterator | FindSeed (const RecEmcID &CellId) const |
RecEmcHitMap::const_iterator | FindSeed (const RecEmcID &CellId) const |
RecEmcID | getClusterId () const |
RecEmcID | getClusterId () const |
RecEmcEnergy | getEnergy () const |
RecEmcEnergy | getEnergy () const |
HepPoint3D | getPosition () const |
HepPoint3D | getPosition () const |
double | getSecondMoment () const |
double | getSecondMoment () const |
int | getSeedSize () const |
int | getSeedSize () const |
vector< RecEmcID > | getShowerIdVec () const |
vector< RecEmcID > | getShowerIdVec () const |
int | getShowerSize () const |
int | getShowerSize () const |
void | Insert (const RecEmcHit &aHit) |
void | Insert (const RecEmcHit &aHit) |
void | InsertSeed (const RecEmcHit &aSeed) |
void | InsertSeed (const RecEmcHit &aSeed) |
void | InsertShowerId (const RecEmcID id) |
void | InsertShowerId (const RecEmcID id) |
RecEmcCluster () | |
RecEmcCluster () | |
void | ShowerIdVec (const vector< RecEmcID > &showerIdVec) |
void | ShowerIdVec (const vector< RecEmcID > &showerIdVec) |
~RecEmcCluster () | |
~RecEmcCluster () | |
Static Public Member Functions | |
const CLID & | classID () |
const CLID & | classID () |
Protected Attributes | |
RecEmcID | fClusterId |
RecEmcHitMap | fHitMap |
RecEmcHitMap | fSeedMap |
vector< RecEmcID > | fShowerIdVec |
vector< RecEmcID > | fShowerIdVec |
|
00015 { 00016 Clear(); 00017 }
|
|
00020 { 00021 Clear(); 00022 }
|
|
|
|
|
|
|
|
00116 { 00117 return fHitMap.begin(); 00118 }
|
|
|
|
00177 { 00178 return fSeedMap.begin(); 00179 }
|
|
00026 { return CLID_RecEmcCluster; }
|
|
00026 { return CLID_RecEmcCluster; }
|
|
|
|
00097 { 00098 fClusterId.clear(); 00099 fHitMap.clear(); 00100 fSeedMap.clear(); 00101 fShowerIdVec.clear(); 00102 }
|
|
00025 { return RecEmcCluster::classID();}
|
|
00025 { return RecEmcCluster::classID();}
|
|
|
|
00111 { 00112 fClusterId=id; 00113 }
|
|
|
|
00289 { 00290 RecEmcHitMap::const_iterator pHitMap; 00291 00292 cout<<"EMC Cluster: "; 00293 00294 cout<<"Cluster Id= "; 00295 cout<<fClusterId<<endl; 00296 00297 for(pHitMap=fHitMap.begin(); 00298 pHitMap!=fHitMap.end(); 00299 pHitMap++) 00300 { 00301 pHitMap->second.Dump(); 00302 } 00303 }
|
|
|
|
00121 { 00122 return fHitMap.end(); 00123 }
|
|
|
|
00182 { 00183 return fSeedMap.end(); 00184 }
|
|
|
|
00140 { 00141 RecEmcHitMap::const_iterator pHitMap; 00142 pHitMap=fHitMap.find(aHit.getCellId()); 00143 00144 //blank HitMap 00145 if(fHitMap.empty()) 00146 { 00147 return; 00148 } 00149 00150 //not find 00151 if(pHitMap==End()) 00152 { 00153 return; 00154 } 00155 00156 //find it 00157 if(pHitMap!=End()) 00158 { 00159 fHitMap.erase(pHitMap->first); 00160 //empty 00161 if(fHitMap.empty()) 00162 { 00163 Clear(); 00164 return; 00165 } 00166 //not empty 00167 else 00168 { 00169 fClusterId=fHitMap.begin()->first; 00170 return; 00171 } 00172 } 00173 }
|
|
|
|
00126 { 00127 // If failed the return vale is End(). 00128 return fHitMap.find(CellId); 00129 }
|
|
|
|
00187 { 00188 // If failed the return vale is End(). 00189 return fSeedMap.find(CellId); 00190 }
|
|
00041 { return fClusterId; }
|
|
00041 { return fClusterId; }
|
|
|
|
00217 { 00218 RecEmcHitMap::const_iterator pHitMap; 00219 double etot=0; 00220 00221 for(pHitMap=fHitMap.begin(); 00222 pHitMap!=fHitMap.end(); 00223 pHitMap++) { 00224 etot+=pHitMap->second.getEnergy(); 00225 } 00226 return etot; 00227 }
|
|
|
|
00231 { 00232 IEmcRecGeoSvc* iGeoSvc; 00233 ISvcLocator* svcLocator = Gaudi::svcLocator(); 00234 StatusCode sc = svcLocator->service("EmcRecGeoSvc",iGeoSvc); 00235 if(sc!=StatusCode::SUCCESS) { 00236 cout<<"Error: Can't get EmcRecGeoSvc"<<endl; 00237 } 00238 00239 RecEmcHitMap::const_iterator pHitMap; 00240 HepPoint3D pos(0,0,0); 00241 HepPoint3D possum(0,0,0); 00242 double etot=0; 00243 00244 for(pHitMap=fHitMap.begin(); 00245 pHitMap!=fHitMap.end(); 00246 pHitMap++) { 00247 etot+=pHitMap->second.getEnergy(); 00248 pos=iGeoSvc->GetCFrontCenter(pHitMap->second.getCellId()); 00249 possum+=pos*pHitMap->second.getEnergy(); 00250 } 00251 00252 if(etot>0) { 00253 possum/=etot; 00254 } 00255 return possum; 00256 }
|
|
|
|
00260 { 00261 IEmcRecGeoSvc* iGeoSvc; 00262 ISvcLocator* svcLocator = Gaudi::svcLocator(); 00263 StatusCode sc = svcLocator->service("EmcRecGeoSvc",iGeoSvc); 00264 if(sc!=StatusCode::SUCCESS) { 00265 cout<<"Error: Can't get EmcRecGeoSvc"<<endl; 00266 } 00267 00268 double etot=0; 00269 double sum=0; 00270 HepPoint3D center(getPosition()); 00271 RecEmcHitMap::const_iterator pHitMap; 00272 00273 for(pHitMap=fHitMap.begin(); 00274 pHitMap!=fHitMap.end(); 00275 pHitMap++) { 00276 HepPoint3D pos(pHitMap->second.getFrontCenter()); 00277 etot+=pHitMap->second.getEnergy(); 00278 sum+=pHitMap->second.getEnergy()*pos.distance2(center); 00279 } 00280 00281 if(etot>0) { 00282 sum/=etot; 00283 } 00284 return sum; 00285 }
|
|
|
|
00200 { 00201 return fSeedMap.size(); 00202 }
|
|
00072 { return fShowerIdVec; }
|
|
00072 { return fShowerIdVec; }
|
|
|
|
00205 { 00206 return fShowerIdVec.size(); 00207 }
|
|
|
|
00133 { 00134 fHitMap[aHit.getCellId()]=aHit; 00135 //fClusterId=fHitMap.begin()->first; 00136 return; 00137 }
|
|
|
|
|
|
|
|
00211 { 00212 fShowerIdVec.push_back(id); 00213 }
|
|
00073 { fShowerIdVec=showerIdVec; }
|
|
00073 { fShowerIdVec=showerIdVec; }
|
|
|
|
|
|
|
|
|
|
|