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  if(fVerbose > 1) {
49  std::cout << "PndMvdPixelClusterTask::SetParContainers: " << std::endl;
50  fDigiPar->Print();
51  fTotDigiPar->Print();
52  }
53 }
54 
56 {
57  // at Init() stage we already have fGeoH filled with the parameters
59 }
60 
62 {
63  // at Init() stage we already have fGeoH filled with the parameters
64  fDigiPar = (PndSdsPixelDigiPar*)tempList->FindObject(fParName.Data());
65  fTotDigiPar = (PndSdsTotDigiPar*)tempList->FindObject(fTotParName.Data());
66  fSensorNamePar = (PndSensorNamePar*)tempList->FindObject("PndSensorNamePar");
68  if (fGeoH == 0)
71 }
72 
74 {
77 }
78 
80 {
81  fDigiPar = (PndSdsPixelDigiPar*)tempList->FindObject(fParName.Data());
82  fTotDigiPar = (PndSdsTotDigiPar*)tempList->FindObject(fTotParName.Data());
83  fSensorNamePar = (PndSensorNamePar*)tempList->FindObject("PndSensorNamePar");
84 
87 
88 }
89 
90 // ----- Manula I/O folders/branches ----------------------------------------------------
91 void PndMvdPixelClusterTask::SetBranchNames(TString inBranchname, TString outHitBranchname, TString outClustBranchname, TString folderName)
92 {
93  fInBranchName = inBranchname;
94  fOutBranchName = outHitBranchname;
95  fClustBranchName = outClustBranchname;
96  fFolderName = folderName;
97 }
98 
99 // ----- Default I/O folder/branches ----------------------------------------------------
101 {
102  if (fInBranchName.Length() == 0){
103  if (FairRunAna::Instance()->IsTimeStamp())
104  fInBranchName = "MVDSortedPixelDigis";
105  else
106  fInBranchName = "MVDPixelDigis";
107  }
108  if (fOutBranchName.Length() == 0)
109  fOutBranchName = "MVDHitsPixel";
110  if (fClustBranchName.Length() == 0)
111  fClustBranchName = "MVDPixelClusterCand";
112  if (fFolderName.Length() == 0)
113  fFolderName = "PndMvd";
114 }
115 
117 
int fVerbose
Definition: poormantracks.C:24
virtual void GetParList(TList *tempList)
PndSdsPixelBackMapping * fBackMapping
TString fOutBranchName
Definition: PndSdsTask.h:40
ClassImp(PndMvdPixelClusterTask)
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
virtual void Print(std::ostream &out=std::cout) const
PndMvdPixelClusterTask(TString parName="MVDPixelDigiPar", TString totParName="MVDPixelTotDigiPar")
PndSdsChargedWeightedPixelMapping: Gets a vector of DigiHits and calculates the cluster center weight...
virtual void Print(std::ostream &out=std::cout) const
virtual void SetBackMappingMQ(TList *tempList)
Unique match between SensorID and path in TGeoManager.
PndSdsTotDigiPar * fTotDigiPar
Digitization Parameter Class for SDS-Pixel part.