5 #include "FairRootManager.h"
6 #include "FairRunAna.h"
8 #include "TClonesArray.h"
15 FairTask(
"PndEmcClusterRemoveDuplCrys", verbose) {
21 FairRootManager* ioman = FairRootManager::Instance();
23 cout <<
"-E- PndEmcClusterRemoveDuplCrys::Init: "
24 <<
"RootManager not instantiated!" << endl;
29 fClusterArray = (TClonesArray*) ioman->GetObject(
"EmcCluster");
31 cout <<
"-W- PndEmcClusterRemoveDuplCrys::Init: "
32 <<
"No PndEmcHit array! Needed for MC Truth" << endl;
36 fDigiArray = FairRunAna::Instance()->IsTimeStamp() ? (TClonesArray*) ioman->GetObject(
"EmcDigiClusterBase") : (TClonesArray*) ioman->GetObject(
"EmcDigi");
38 cout <<
"-W- PndEmcClusterRemoveDuplCrys::Init: "
39 <<
"No PndEmcDigi array!" << endl;
43 cout <<
"-I- PndEmcClusterRemoveDuplCrys: "
44 <<
"Got both arrays" << endl;
51 for(Int_t iClu=0; iClu<
fClusterArray->GetEntriesFast(); ++iClu) {
54 for(std::vector<Int_t>::reverse_iterator rit = theCluster->
DigiList().rbegin(); rit!=theCluster->
DigiList().rend(); ) {
63 Int_t tmp_pos = theCluster->
MemberDigiMap().find(detId)->second;
represents the reconstructed hit of one emc crystal
Int_t GetDetectorId() const
TClonesArray * fClusterArray
const std::vector< Int_t > & DigiList() const
virtual InitStatus Init()
TClonesArray * fDigiArray
virtual void removeDigi(const TClonesArray *digiArray, Int_t iDigi)
a cluster (group of neighboring crystals) of hit emc crystals
const std::map< Int_t, Int_t > & MemberDigiMap() const
virtual void AbsorbEnergy(PndEmcDigi &otherDigi)
PndEmcClusterRemoveDuplCrys(Int_t verbose=0)
virtual void Exec(Option_t *opt)