BOSS 8.0.0
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 // cout<<"====== EmcRec: Offline Mode ======"<<endl;
16 // fSeedFinder=new EmcRecSeedLocalMax;
17 fSeedFinder = new EmcRecSeedEThreshold;
18 fSplitter = new EmcRecSplitWeighted;
19}
20
22 delete fSeedFinder;
23 delete fSplitter;
24}
25
27 RecEmcShowerMap& aShowerMap ) {
28 RecEmcClusterMap::iterator ciClusterMap;
29
30 RecEmcIDVector aMaxVec;
31 for ( ciClusterMap = aClusterMap.begin(); ciClusterMap != aClusterMap.end(); ++ciClusterMap )
32 {
33 //++++++++++++++++++++++++++
34 // get its local maximum list
35 fSeedFinder->Seed( ciClusterMap->second, aMaxVec );
36 //++++++++++++++++++++++++++++++++++++++++++++++
37 // put seeds to cluster
38 if ( !aMaxVec.empty() )
39 {
41 for ( ciMax = aMaxVec.begin(); ciMax != aMaxVec.end(); ++ciMax )
42 { ciClusterMap->second.InsertSeed( ciClusterMap->second.Find( *ciMax )->second ); }
43 }
44 //++++++++++++++++++++++++++++++++++++++++++++++
45 // split it into showers and push into shower map
46 fSplitter->Split( ciClusterMap->second, aMaxVec, aShowerMap );
47 }
48}
map< RecEmcID, RecEmcCluster, less< RecEmcID > > RecEmcClusterMap
RecEmcIDVector::const_iterator ci_RecEmcIDVector
map< RecEmcID, RecEmcShower, less< RecEmcID > > RecEmcShowerMap
void Convert(RecEmcClusterMap &aClusterMap, RecEmcShowerMap &aShowerMap)