BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcRecCluster2Shower.cxx
Go to the documentation of this file.
1//
2// Convert from Cluster Map to Shower Map
3//
4// Created by Zhe Wang 2004, 3, 29
5//
6#include <iostream>
7
8#include "EmcRec/EmcRecCluster2Shower.h"
9//#include "EmcRec/EmcRecSeedLocalMax.h"
10#include "EmcRec/EmcRecSeedEThreshold.h"
11#include "EmcRec/EmcRecSplitWeighted.h"
12
13// Constructors and destructors
15{
16 //cout<<"====== EmcRec: Offline Mode ======"<<endl;
17 // fSeedFinder=new EmcRecSeedLocalMax;
18 fSeedFinder=new EmcRecSeedEThreshold;
19 fSplitter=new EmcRecSplitWeighted;
20}
21
23{
24 delete fSeedFinder;
25 delete fSplitter;
26}
27
29 RecEmcShowerMap& aShowerMap)
30{
31 RecEmcClusterMap::iterator ciClusterMap;
32
33 RecEmcIDVector aMaxVec;
34 for(ciClusterMap=aClusterMap.begin();
35 ciClusterMap!=aClusterMap.end();
36 ++ciClusterMap)
37 {
38 //++++++++++++++++++++++++++
39 //get its local maximum list
40 fSeedFinder->Seed(ciClusterMap->second,aMaxVec);
41 //++++++++++++++++++++++++++++++++++++++++++++++
42 //put seeds to cluster
43 if(!aMaxVec.empty()) {
45 for(ciMax=aMaxVec.begin();
46 ciMax!=aMaxVec.end();
47 ++ciMax) {
48 ciClusterMap->second.InsertSeed(ciClusterMap->second.Find(*ciMax)->second);
49 }
50 }
51 //++++++++++++++++++++++++++++++++++++++++++++++
52 //split it into showers and push into shower map
53 fSplitter->Split(ciClusterMap->second,aMaxVec,aShowerMap);
54 }
55}
56
map< RecEmcID, RecEmcCluster, less< RecEmcID > > RecEmcClusterMap
map< RecEmcID, RecEmcShower, less< RecEmcID > > RecEmcShowerMap
void Convert(RecEmcClusterMap &aClusterMap, RecEmcShowerMap &aShowerMap)
virtual void Seed(const RecEmcCluster &aCluster, RecEmcIDVector &aMaxVec)=0
virtual void Split(RecEmcCluster &aCluster, const RecEmcIDVector &aMaxVec, RecEmcShowerMap &aShowerMap)=0