FairRoot/PandaRoot
PndMvdPixelClusterTask.cxx
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndMvdPixelClusterTasksource file -----
3 // -------------------------------------------------------------------------
4 
5 
7 #include "FairRuntimeDb.h"
8 #include "FairRunAna.h"
9 #include "PndSdsPixelDigiPar.h"
10 // ----- Default constructor -------------------------------------------
12 PndSdsPixelClusterTask("MVD Clustertisation Task"),
13  fParName(parName),
14  fTotParName(totParName),
15  fTotDigiPar(NULL),
16  fSensorNamePar(NULL)
17 {
18  SetPersistency(kTRUE);
19 }
20 // -------------------------------------------------------------------------
21 
22 // ----- Destructor ----------------------------------------------------
24 {
25 }
26 // -------------------------------------------------------------------------
27 
28 void PndMvdPixelClusterTask::GetParList(TList* tempList) {
29  fDigiPar = new PndSdsPixelDigiPar(fParName.Data());
30  tempList->Add(fDigiPar);
32  tempList->Add(fTotDigiPar);
33  fSensorNamePar = new PndSensorNamePar("PndSensorNamePar");
34  tempList->Add(fSensorNamePar);
35 
36  return;
37 }
38 
39 // ----- Initialization of Parameter Containers -------------------------
41 {
42  // Get Base Container
43  FairRun* ana = FairRun::Instance();
44  FairRuntimeDb* rtdb=ana->GetRuntimeDb();
45  fDigiPar = (PndSdsPixelDigiPar*)(rtdb->getContainer(fParName.Data()));
46  fTotDigiPar = (PndSdsTotDigiPar*)(rtdb->getContainer(fTotParName.Data()));
48 }
49 
51 {
52  // at Init() stage we already have fGeoH filled with the parameters
54 }
55 
57 {
58  // at Init() stage we already have fGeoH filled with the parameters
59  fDigiPar = (PndSdsPixelDigiPar*)tempList->FindObject(fParName.Data());
60  fTotDigiPar = (PndSdsTotDigiPar*)tempList->FindObject(fTotParName.Data());
61  fSensorNamePar = (PndSensorNamePar*)tempList->FindObject("PndSensorNamePar");
63  if (fGeoH == 0)
66 }
67 
69 {
71 }
72 
74 {
75  fDigiPar = (PndSdsPixelDigiPar*)tempList->FindObject(fParName.Data());
76  fTotDigiPar = (PndSdsTotDigiPar*)tempList->FindObject(fTotParName.Data());
77  fSensorNamePar = (PndSensorNamePar*)tempList->FindObject("PndSensorNamePar");
78 
81 
82 }
83 
84 // ----- Manula I/O folders/branches ----------------------------------------------------
85 void PndMvdPixelClusterTask::SetBranchNames(TString inBranchname, TString outHitBranchname, TString outClustBranchname, TString folderName)
86 {
87  fInBranchName = inBranchname;
88  fOutBranchName = outHitBranchname;
89  fClustBranchName = outClustBranchname;
90  fFolderName = folderName;
91 }
92 
93 // ----- Default I/O folder/branches ----------------------------------------------------
95 {
96  if (fInBranchName.Length() == 0){
97  if (FairRunAna::Instance()->IsTimeStamp())
98  fInBranchName = "MVDSortedPixelDigis";
99  else
100  fInBranchName = "MVDPixelDigis";
101  }
102  if (fOutBranchName.Length() == 0)
103  fOutBranchName = "MVDHitsPixel";
104  if (fClustBranchName.Length() == 0)
105  fClustBranchName = "MVDPixelClusterCand";
106  if (fFolderName.Length() == 0)
107  fFolderName = "PndMvd";
108 }
109 
111 
int fVerbose
Definition: poormantracks.C:24
virtual void GetParList(TList *tempList)
PndSdsPixelBackMapping * fBackMapping
TString fOutBranchName
Definition: PndSdsTask.h:40
void SetPersistency(Bool_t val=kTRUE)
PndSensorNamePar * fSensorNamePar
Charge Digitization Parameter Class for SDS.
virtual void SetClusterFinderMQ(TList *tempList)
Class to access the naming information of the MVD.
PndSdsPixelDigiPar * fDigiPar
TString fInBranchName
Definition: PndSdsTask.h:39
PndSdsPixelClusterFinder * fClusterFinder
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
TString fFolderName
Definition: PndSdsTask.h:41
ClassImp(PndAnaContFact)
PndMvdPixelClusterTask(TString parName="MVDPixelDigiPar", TString totParName="MVDPixelTotDigiPar")
PndSdsChargedWeightedPixelMapping: Gets a vector of DigiHits and calculates the cluster center weight...
virtual void SetBackMappingMQ(TList *tempList)
Unique match between SensorID and path in TGeoManager.
PndSdsTotDigiPar * fTotDigiPar
Digitization Parameter Class for SDS-Pixel part.