FairRoot/PandaRoot
PndMQMvdPixelDigiProcessorBursts.cxx
Go to the documentation of this file.
1 /*
2  * File: PndMQMvdPixelDigiProcessorBursts.tpl
3  * Author: winckler, A. Rybalchenko
4  *
5  * Created on March 11, 2014, 12:12 PM
6  */
7 
8 // Implementation of PndMQMvdPixelDigiProcessorBursts::Run() with Boost transport data format
10 
11 
12 
14 {
15  fGeoPar->GetGeometry();
16  fDigiPar = (PndSdsPixelDigiPar*)fParCList->FindObject("MVDPixelDigiPar");
17  fTotPar = (PndSdsTotDigiPar*)fParCList->FindObject("MVDPixelTotDigiPar");
18  fSensorPar = (PndSensorNamePar*)fParCList->FindObject("PndSensorNamePar");
20  if (fGeoHandler == 0){
22  } else {
24  }
25 
26  LOG(INFO) << "Conversion Method: " << *fDigiPar;
27  LOG(INFO) << "Tot Info: " << *fTotPar;
28  if (fPixelMapping == 0){
30  } else {
34  }
35 }
36 
37 
39 {
40 
42  for (auto dataItr : fBurstDataIn.fData)
43  fMapSorter.AddElements(dataItr);
45  std::vector<FairTimeStamp*> sortedData = fMapSorter.GetOutputData();
46 
47 // for (auto dataItr: sortedData)
48 // LOG(INFO) << "DataAfterSorter " << dataItr->GetTimeStamp() ;
49 
50 
51  fEventBuilder.FillData(sortedData);
52  std::vector<std::vector<FairTimeStamp*> > gapData = fEventBuilder.GetSeparatedData();
53  std::vector<std::vector<FairTimeStamp*> > lastData = fEventBuilder.GetLastData();
54  gapData.insert(gapData.end(), lastData.begin(), lastData.end());
55 // for (auto eventItr : gapData)
56 // for (auto dataItr : eventItr)
57 // LOG(INFO) << "DataAfterEventBuilder: " << dataItr->GetTimeStamp();
58  if (fBurstDataIn.fHeader.fBranchName == "MVDPixelDigis"){
59  std::vector<std::vector<FairTimeStamp*> > hitsInGaps;
60  for (auto gapIter : gapData){
61  std::vector<PndSdsDigiPixel*> digiPixel;
62  std::vector<FairTimeStamp*> hits;
63  if (gapIter.size() > 0){
64  // LOG(INFO) << "GapSize > 0 " << gapIter.size();
65  for (auto dataIter : gapIter){ //iterate hits in gap
66  digiPixel.push_back((PndSdsDigiPixel*) dataIter);
67 // LOG(INFO) << "DataInGap: " << *(PndSdsDigiPixel*) dataIter;
68  }
69  std::vector<std::vector< Int_t> > clusterInts = fClusterFinder.GetClusters(digiPixel);
70 
71  for (auto clusterIter : clusterInts) //iterate all found cluster
72  {
73  //LOG(INFO) << "ClusterSize: " << clusterIter.size();
74  std::vector<PndSdsDigiPixel*> digiInCluster;
75  for (auto digiInClusterItr : clusterIter){ //iterate digisInt in one cluster
76  int pos = digiInClusterItr;
77  digiInCluster.push_back(digiPixel[pos]);
78  }
79 // LOG(INFO) << "DigisInCluster: ";
80  if (digiInCluster.size() > 0){
81 // for (auto digiIter : digiInCluster)
82 // LOG(INFO) << digiIter->GetTimeStamp();
83  PndSdsHit* hit = new PndSdsHit(fPixelMapping->GetCluster(digiInCluster));
84  hits.push_back(hit);
85 // LOG(INFO) << "Hit: " << hit->GetTimeStamp();
86  digiInCluster.clear();
87  // LOG(INFO) << "Hit: " << *(PndSdsHit*)(*hits.rbegin());
88  }
89  }
90  hitsInGaps.push_back(hits);
91  }
92  }
93  fBurstDataOut.fHeader.fBranchName = "MVDHitsPixel";
94  fBurstDataOut.fData = hitsInGaps;
95  }
96 }
TVector3 pos
void SetSensorNamePar(PndSensorNamePar *par)
virtual void SetGeoHandling(PndGeoHandling *geo)
PndMQMvdChargeWeightedPixelMapping * fPixelMapping
virtual void Reset()
Charge Digitization Parameter Class for SDS.
PndSdsHit GetCluster(std::vector< PndSdsDigiPixel * > &pixelArray)
Main function of class to calculate the PndSdsHit out of the given PndSdsDigis.
virtual void SetTotPar(PndSdsTotDigiPar *par)
Class to access the naming information of the MVD.
std::vector< std::vector< PndSdsDigiTopix4 > > GetLastData()
std::vector< std::vector< Int_t > > GetClusters(std::vector< PndSdsDigiPixel * > &hits)
PndSdsChargedWeightedPixelMapping: Gets a vector of DigiHits and calculates the cluster center weight...
std::vector< std::vector< PndSdsDigiTopix4 > > GetSeparatedData()
virtual void AddElements(std::vector< FairTimeStamp * > dataArray)
std::vector< std::vector< FairTimeStamp * > > fData
virtual std::vector< FairTimeStamp * > GetOutputData()
Data class to store the digi output of a pixel module.
PndSdsMCPoint * hit
Definition: anasim.C:70
CbmHit * hits[nHits]
Definition: RiemannTest.C:19
virtual void SetDigiPar(PndSdsPixelDigiPar *par)
Unique match between SensorID and path in TGeoManager.
Digitization Parameter Class for SDS-Pixel part.