FairRoot/PandaRoot
PndEmcMakeBump.cxx
Go to the documentation of this file.
1 //--------------------------------------------------------------------------
2 // File and Version Information:
3 // $Id:$
4 //
5 // Description:
6 // This module takes Clusters (Connected Regions) and slits them
7 // up into Bumps. They are defined by local maxima
8 //
9 // Environment:
10 // Software developed for the BaBar Detector at the SLAC B-Factory.
11 // Adapted for the PANDA experiment at GSI
12 //
13 // Author List:
14 // Xiaorong Shi Lawrence Livermore National Lab
15 // Steve Playfer University of Edinburgh
16 // Stephen J. Gowdy University of Edinburgh
17 // Phil Strother Imperial College
18 //
19 // Dima Melnychuk, adaption for PANDA
20 // Modified:
21 // M. Babai
22 //------------------------------------------------------------------------
23 
24 //-----------------------
25 // This Class's Header --
26 //-----------------------
27 #include "PndEmcMakeBump.h"
28 
29 //-------------------------------
30 // Collaborating Class Headers --
31 //-------------------------------
32 #include "FairRunAna.h"
33 
34 #include "PndEmcDataTypes.h"
35 
36 #include "PndEmcBump.h"
37 #include "PndEmcCluster.h"
38 #include "PndEmcDigi.h"
39 #include "PndEmcSharedDigi.h"
40 #include "PndEmc2DLocMaxFinder.h"
42 #include "PndEmcPhiBumpSplitter.h"
43 #include "PndEmcTwoCoordIndex.h"
44 
45 #include "TClonesArray.h"
46 #include "TROOT.h"
47 
48 //---------------
49 // C++ Headers --
50 //---------------
51 #include <iostream>
52 
53 using std::endl;
54 using std::cout;
55 
57 
58 //----------------
59 // Constructors --
60 //----------------
62 PndPersistencyTask("EMC Bump splitting Task"), fVerbose(verbose)
63 {
64  SetPersistency(persistance);
65  this->Add(new PndEmc2DLocMaxFinder());
66  this->Add(new PndEmcExpClusterSplitter());
67  this->Add(new PndEmcPhiBumpSplitter());
68 
69  TList* thistasks = this->GetListOfTasks();
70  for(Int_t i=0;i<thistasks->GetEntries();i++)
71  {
72  ((PndPersistencyTask*)thistasks->At(i))->SetVerbose(fVerbose);
73  }
74 
76 }
77 
79 {
80  SetPersistency(val);
81  TList* thistasks = this->GetListOfTasks();
82  if (thistasks->GetEntries()>0) ((PndEmc2DLocMaxFinder*)thistasks->At(0))->SetStorageOfData(GetPersistency());
83  if (thistasks->GetEntries()>1) ((PndEmcExpClusterSplitter*)thistasks->At(1))->SetStorageOfData(GetPersistency());
84  if (thistasks->GetEntries()>2) ((PndEmcPhiBumpSplitter*)thistasks->At(2))->SetStorageOfData(GetPersistency());
85  return;
86 }
87 
88 //--------------
89 // Destructor --
90 //--------------
92 {
93 }
94 
101 InitStatus PndEmcMakeBump::Init()
102 {
103  return kSUCCESS;
104 }
105 
114 void PndEmcMakeBump::Exec(Option_t*)
115 {
116  if (fVerbose>0)
117  std::cout<<"***************** PndEmcMakeBump, event: "
118  <<fEventCounter<<" **************"<<endl;
119  fEventCounter++;
120  return;
121 }
122 
124 {
125 }
126 
virtual InitStatus Init()
Init Task.
mychain Add("run.root")
virtual void Exec(Option_t *opt)
Runs the task.
splits clusters based on local maxima in the Phi direction for use with Bremstrahlung correction...
int fVerbose
Definition: poormantracks.C:24
Int_t i
Definition: run_full.C:25
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
#define verbose
void SetPersistency(Bool_t val=kTRUE)
virtual void SetParContainers()
virtual ~PndEmcMakeBump()
splits clusters on the basis of exponential distance from the bump centroid
void SetStorageOfData(Bool_t val)
Method to specify whether bumps are stored or not.
Takes clusters and slits them up into bumps.
ClassImp(PndAnaContFact)
static Int_t fEventCounter
drchit SetVerbose(iVerbose)
Searches for local maxima in a cluster.
PndEmcMakeBump(Int_t verbose=0, Bool_t storebumps=kTRUE)