FairRoot/PandaRoot
PndLmdPairFinderTask.cxx
Go to the documentation of this file.
1 /*
2  * PairFinderTask.cpp
3  *
4  * Created on: Jul 22, 2014
5  * Author: Roman Klasen, roklasen@uni-mainz.de or klasen@kph.uni-mainz.de
6  */
7 
8 #include "PndLmdPairFinderTask.h"
9 
10 #include <PndGeoHandling.h>
11 #include <PndLmdAlignManager.h>
12 #include <PndLmdContFact.h>
13 #include <PndLmdHitPair.h>
14 #include <PndLmdGeometryHelper.h>
15 #include <PndSdsClusterPixel.h>
16 #include <PndSdsDigiPixel.h>
17 
18 #include <FairRootManager.h>
19 #include <FairRun.h>
20 #include <FairRuntimeDb.h>
21 #include <TClonesArray.h>
22 
23 #include <TCanvas.h>
24 #include <TH1D.h>
25 
26 #include <algorithm>
27 #include <sstream>
28 #include <vector>
29 
30 using std::cout;
31 using std::cerr;
32 using std::swap;
33 
35 
36 /*
37  * actually I don't need empty constructors, but fkn root crashes if no empty constructor is present
38  */
39 PndLmdPairFinderTask::PndLmdPairFinderTask() : // @suppress("Class members should be properly initialized")
40  PndSdsTask("pairfinder") {
41  digiArray = NULL;
42  recoArray = NULL;
43  clusterCandidateArray = NULL;
44 
45  unsuitable = 0;
46  _useDynamicCut = false;
48  _cutParameterFile = "";
49  _ignoreClusters = false;
50 
51 }
52 
53 PndLmdPairFinderTask::PndLmdPairFinderTask(const char* name) : // @suppress("Class members should be properly initialized")
54  PndSdsTask("pairfinder with name") {
55  digiArray = NULL;
56  recoArray = NULL;
57  clusterCandidateArray = NULL;
58 
59  if (!strcmp(name, "")) SetName(name);
60  _useDynamicCut = false;
62  _cutParameterFile = "";
63  _ignoreClusters = false;
64 }
65 
67  std::cout << "PairFinderTask destructor called." << "\n";
68 }
69 
71 
72  noOfGoodPairs = 0;
73  noOfEvents = noOfCombos = 0;
75  hitsSinglePixel = 0;
76  hitsSinglePixel = 0;
79  plane0 = plane1 = plane2 = plane3 = 0;
80 
81  fInBranchName = "LMDPixelDigis";
82  fInRecoBranchName = "LMDHitsPixel";
83  fOutBranchName = "LMDPixelPairs";
84  fInClusterCandidates = "LMDPixelClusterCand";
85 
86  fFolderName = "cbmsim";
87 
88  _maxDistance = 1250e-4;
89 
91 
92  FairRootManager* ioman = FairRootManager::Instance();
93 
94  if (!ioman) {
95  std::cout << "-E- LmdPairFinder::Init: " << "RootManager not instantiated!" << "\n";
96  return kFATAL;
97  }
98 
99  digiArray = (TClonesArray*) ioman->GetObject(fInBranchName);
100  recoArray = (TClonesArray*) ioman->GetObject(fInRecoBranchName);
101  clusterCandidateArray = (TClonesArray*) ioman->GetObject(fInClusterCandidates);
102 
103  if (!digiArray) {
104  std::cout << "-W- LmdPairFinder::Init: " << "ERROR, branch name " << fInBranchName
105  << " could not found!" << "\n";
106  return kERROR;
107  }
108 
109  if (!recoArray) {
110  std::cout << "-W- LmdPairFinder::Init: " << "ERROR, branch name " << fInRecoBranchName
111  << " not found!" << "\n";
112  return kERROR;
113  }
114 
115  if (!clusterCandidateArray) {
116  std::cout << "-W- LmdPairFinder::Init: " << "ERROR, branch name " << fInClusterCandidates
117  << " not found!" << "\n";
118  return kERROR;
119  }
120 
122 
123  const std::vector<int> overlapIDs = helper->getAvailableOverlapIDs();
124 
125  cout << "PndLmdSensorAligner: reading dynamic cut Parameters from file... ";
127  cout << "cut parameter file does not exist! using static cut instead.\n";
128  _useDynamicCut = false;
129  }
130  else {
132 
133  for (unsigned int i = 0; i < overlapIDs.size(); i++) {
134  int overlapID = overlapIDs[i];
135  dynamicCutHandler &handler = cutHandlers[overlapID];
136  handler._overlapID = overlapIDs[i];
137 
138  std::stringstream configput("");
139  configput << "dynamicCut.aligners." << handler._overlapID << ".";
140 
141  try {
142  handler._minDist = config.get<double>(configput.str() + "minDist");
143  handler._maxDist = config.get<double>(configput.str() + "maxDist");
144  }
145  catch (std::exception &e) {
146  cerr << "PndLmdSensorAligner: ERROR! Parameter not found in config file!\n";
147  }
148  handler._ready = true;
149  }
150  cout << "done.\n";
151  }
152  }
153 
155  cout << "PndLmdSensorAligner: trying to find dynamic cut Parameters.\n";
156  }
157 
158  hitPairArray = new TClonesArray("PndLmdHitPair");
159  ioman->Register("PndLmdHitPair", "PndLmd", hitPairArray, kTRUE);
160 
162 
163  std::cout << "LmdPairFinder::Init(): Initialization successful." << "\n";
164  return kSUCCESS;
165 }
166 
168  std::cout << "branch names set to " << fInBranchName << "\n";
169 }
170 
172  return InitStatus();
173 }
174 
176 
177  FairRun* ana;
178  FairRuntimeDb* rtdb;
179 
180  std::cout << "PndLmdPixelClusterTask::SetParContainers() " << "\n";
181  // Get Base Container
182  ana = FairRun::Instance();
183  rtdb = ana->GetRuntimeDb();
184 
185  PndLmdContFact* themvdcontfact = (PndLmdContFact*) rtdb->getContFactory("PndLmdContFact");
186  //read params for lumi alignment
187  TList* theAlignLMDContNames = themvdcontfact->GetAlignParNames();
188  Info("SetParContainers()", "AlignLMD The container names list contains %i entries",
189  theAlignLMDContNames->GetEntries());
190  TIter cfAlIter(theAlignLMDContNames);
191  while (TObjString* contname = (TObjString*) cfAlIter()) {
192  TString parsetname = contname->String();
193  Info("SetParContainers()", "%s", parsetname.Data());
194  }
195 
197 }
198 
199 /*
200  * Main SensorHit filter. It stores the sensor row and column info to a PndLmdHitPair object,
201  * filters for valid hit pairs and stores the decoded hit in LMD coordinate system to the HitPair.
202  * The HitPair contains BOTH original row and col hits as well as LMD xyz Coordinates (as TVector3).
203  * This consumes a lot of storage, but storage is cheap and for now we want the info.
204  */
205 void PndLmdPairFinderTask::Exec(Option_t*) {
206 
207  //clear temporary array for next event
208  hitPairArray->Clear();
209 
210  //Int_t nPixels = digiArray->GetEntriesFast();
211  noOfEvents++;
212 
213  //display some kind of progress
214  if ((noOfEvents % 10000) == 0) {
215  cout << "processed " << noOfEvents << "\n";
216  }
217 
218  // ========== loop over recos in recoArray =========
219  Int_t nRecos = recoArray->GetEntriesFast();
220 
221  Int_t storedPairsPerEvent = 0;
222 
223  //try every cluster combination and check
224  for (auto iReco = 0; iReco < nRecos; iReco++) {
225  for (auto jReco = iReco + 1; jReco < nRecos; jReco++) {
226 
227  PndSdsHit *hitOne = (PndSdsHit*) recoArray->At(iReco);
228  PndSdsHit *hitTwo = (PndSdsHit*) recoArray->At(jReco);
229 
230  int id1 = hitOne->GetSensorID();
231  int id2 = hitTwo->GetSensorID();
232 
233  // sort hits so hitOne is ALWAYS upstream
234  auto &infoOne = helper->getHitLocationInfo(id1);
235  auto &infoTwo = helper->getHitLocationInfo(id2);
236 
237  if (infoOne.module_side > infoTwo.module_side) {
238  std::swap(hitOne, hitTwo);
239  id1 = hitOne->GetSensorID();
240  id2 = hitTwo->GetSensorID();
241  }
242 
243  //from here on, the hits are sorted so hitOne is ALWAYS upstream
244 
245  const TVector3 vecOneGlobal = hitOne->GetPosition();
246  const TVector3 vecTwoGlobal = hitTwo->GetPosition();
247 
248  auto vecOneLocal = helper->transformPndGlobalToLmdLocal(vecOneGlobal);
249  auto vecTwoLocal = helper->transformPndGlobalToLmdLocal(vecTwoGlobal);
250 
251  //make PndLmdHitPair and check for data sanity, then store to vector
252  PndLmdHitPair pairCanditate(vecOneGlobal, vecTwoGlobal, id1, id2);
253 
254  //is the candidate even on an overlapping area? this swaps hits if necessary
255  if (!candHitsOverlappingArea(pairCanditate)) {
256  noOverlap++;
257  continue;
258  }
259 
260  int overlapId = helper->getOverlapIdFromSensorIDs(pairCanditate.getId1(), pairCanditate.getId2());
261  pairCanditate.setOverlapId(overlapId);
262 
263  pixelHit pixelHitOne = getPixelHitFromSdsHit(hitOne);
264  pixelHit pixelHitTwo = getPixelHitFromSdsHit(hitTwo);
265 
266  pairCanditate.setPixelHits(pixelHitOne._col, pixelHitOne._row, pixelHitTwo._col, pixelHitTwo._row);
267 
268  pairCanditate.calculateDistance();
269  pairCanditate.check();
270 
271  if (!pairCanditate.isSane()) {
272  pairCanditate.PrintPair();
273  cerr << "==== WARNING: ====" << "\n";
274  cerr << "pair seems valid but did not pass sanity check!" << "\n";
275  cerr << "===============================================" << "\n";
276  continue;
277  }
278 
279  //pair must now be sane, in LMD local and has overlapID et al.
280 
281  //are we still looking for the dynamic cut values?
283  dynamicCutHandler &handler = cutHandlers[pairCanditate.getOverlapId()];
284  handler.addToSamples(pairCanditate);
285  //we don't want to store the pair, we only need it's distance
286  continue;
287  }
288 
289  //choose whether to apply dynamic cut or simple cut.
290  if (!_useDynamicCut) {
291  if (!applyStaticDistanceCut(pairCanditate)) {
292  unsuitable++;
293  continue;
294  }
295  //pair survived distance cut? great, store!
296  }
297 
298  if (_useDynamicCut) {
299  //is the cutHandler ready for this overlapID? if not, something went wrong.
300  dynamicCutHandler &handler = cutHandlers[pairCanditate.getOverlapId()];
301  if (!handler.ready()) {
302  continue;
303  }
304  //the cutHandler is ready, apply distance cut
305  if (!applyDynamicDistanceCut(pairCanditate)) {
306  distanceTooHigh++;
307  continue;
308  }
309  //pair survived distance cut? great, store!
310  }
311 
312  // if the pair survived to this point, it's valid. store!
313  getStatistics(pairCanditate);
314  new ((*hitPairArray)[storedPairsPerEvent]) PndLmdHitPair(pairCanditate);
315  storedPairsPerEvent++;
316  }
317  }
318 
319  return;
320 }
321 
323 }
324 
326 
327  int notReady = 0;
328 
329  //were we looking for dynamic cut parameters? write them to disk
331  cout << "PndLmdSensorAligner: writing cut parameters to disk...\n";
332 
333  cout << "There are " << cutHandlers.size() << " handlers.\n";
334 
335  for (auto &handlerIt : cutHandlers) {
336  dynamicCutHandler &handler = handlerIt.second;
337  if (!handler._ready) {
338  notReady++;
339  cout << "Warning! handler " << handler._overlapID << " only has " << handler.samples.size()
340  << " pairs!\n";
341  continue;
342  }
343  handler.calcMinAndMax();
344 
345  std::stringstream configput("");
346  configput << "dynamicCut.aligners." << handler._overlapID << ".";
347  config.put(configput.str() + "minDist", handler._minDist);
348  config.put(configput.str() + "maxDist", handler._maxDist);
349  config.put(configput.str() + "mean", handler._mean);
350  config.put(configput.str() + "RMS", handler._RMS);
351 
352  }
353  if (notReady > 0) {
354  cout << "PndLmdSensorAligner: Attention! " << notReady << " handlers don't have enough pairs.\n";
355  }
356 
358  cout << "PndLmdSensorAligner: Successfully written cutParameters to " << _cutParameterFile << "\n";
359  }
360  else {
361  cout << "PndLmdSensorAligner: could not write cut parameters to disk!\n";
362  }
363  }
364 
365  //also, write statistics
366  Int_t sumOfAllPlanes = plane0 + plane1 + plane2 + plane3;
367  double plane0Percent = ((double) plane0 / noOfGoodPairs) * 100;
368  double plane1Percent = ((double) plane1 / noOfGoodPairs) * 100;
369  double plane2Percent = ((double) plane2 / noOfGoodPairs) * 100;
370  double plane3Percent = ((double) plane3 / noOfGoodPairs) * 100;
371  double allPlanesPercent = ((double) sumOfAllPlanes / noOfGoodPairs) * 100;
372  double clusterRatio = ((double) hitsClustered / (double) (hitsSinglePixel + hitsClustered)) * 100;
373  double pixelsPerEvent = (double) sumOfPixelHits / (double) noOfEvents;
374  double goodPairsPerEvent = (double) noOfGoodPairs / (double) noOfEvents;
375 
376  cout << "\n";
377  cout << "*************************************************************" << "\n";
378  cout << " pair finder done " << "\n";
379  cout << "*************************************************************" << "\n";
380  cout << "\n";
381  cout << " counting statistics:" << "\n";
382  cout << "\n";
383  printf("total events: %d \n", noOfEvents);
384  printf("events that missed all sensors: %d \n", eventMissedAllPlanes);
385  printf("total pixel hits: %d \n", sumOfPixelHits);
386  printf("cluster ratio: %.2f %% \n", clusterRatio);
387  printf("pixel hits per event: %.2f \n", pixelsPerEvent);
388  printf("----------------------------\n");
389  printf("possible hit pair combinations: %d \n", noOfCombos);
390  printf("no overlap: %d \n", noOverlap);
391  printf("distance too high: %d \n", distanceTooHigh);
392  printf("----------------------------\n");
393  printf("good pairs: %d \n", noOfGoodPairs);
394  printf("good pairs per event: %.2f \n", goodPairsPerEvent);
395  printf("----------------------------\n");
396  printf("hits on plane 0: %.2f %% \n", plane0Percent);
397  printf("hits on plane 1: %.2f %%\n", plane1Percent);
398  printf("hits on plane 2: %.2f %%\n", plane2Percent);
399  printf("hits on plane 3: %.2f %%\n", plane3Percent);
400  printf("hits on all planes: %.2f %% (should be 100%%!) \n", allPlanesPercent);
401  cout << "\n";
402  cout << "*************************************************************" << "\n";
403 
404  return;
405 }
406 
408 }
409 
411 
412  int overlapID = candidate.getOverlapId();
413 
414  double distance = candidate.getDistance();
415  dynamicCutHandler &handler = cutHandlers[overlapID];
416 
417  if (distance < handler.getMinDist() || distance > handler.getMaxDist()) {
418  return false;
419  }
420  return true;
421 }
422 
424 
425  //check distance squared
426  double distance = candidate.getDistance();
427  if (distance > _maxDistance) {
428  distanceTooHigh++;
429  return false;
430  }
431  return true;
432 }
433 
435 
436  //check for overlap
437  int fplane;
438 
439  auto &infoOne = helper->getHitLocationInfo(candidate.getId1());
440  fplane = infoOne.plane;
441 
442  //count events per plane
443  switch (fplane) {
444  case 0:
445  plane0++;
446  break;
447  case 1:
448  plane1++;
449  break;
450  case 2:
451  plane2++;
452  break;
453  case 3:
454  plane3++;
455  break;
456  default:
457  //should never happen, can only indicate decoding error
458  cerr << "WARNING: hit was deemed suitable but plane number is " << fplane << "\n";
459  cerr << "This should not happen!" << "\n";
460  }
461  noOfGoodPairs++;
462 }
463 
465 
466  pixelHit result;
467  int hitSensorId;
468  double row, col;
469 
470  int clusterIndex = sdsHit->GetClusterIndex();
471 
472  std::vector<pixelCluster> clusters;
473  PndSdsClusterPixel *clusterPixelCand = (PndSdsClusterPixel*) clusterCandidateArray->At(clusterIndex);
474 
475  int noOfClusters = clusterPixelCand->GetClusterSize();
476 
477  for (int iCluster = 0; iCluster < noOfClusters; iCluster++) {
478 
479  PndSdsDigiPixel* mcPixel = (PndSdsDigiPixel*) digiArray->At(
480  clusterPixelCand->GetDigiIndex(iCluster));
481 
482  if (!mcPixel) {
483  exit(1);
484  }
485 
486  hitSensorId = mcPixel->GetSensorID();
487 
488  col = mcPixel->GetPixelColumn();
489  row = mcPixel->GetPixelRow();
490 
491  //skip decoding errors
492  if (col < 0 || row < 0) {
493  continue;
494  }
495  else {
496  clusters.push_back(pixelCluster(pixelHit(hitSensorId, col, row)));
497  }
498  }
499 
500  //all hits are present in clusters
501 
502  /*
503  * ============ find clusters ============
504  * input: vector<pixelCluster>
505  * output vector<pixelCluster>
506  *
507  * algorithm: Hierarchical Clustering Algorithm, see https://en.wikipedia.org/wiki/Hierarchical_clustering
508  * start by putting every pixel hit in a separate cluster (done above).
509  * then merge every two clusters that are close enough (1-2 pixels, may be open to adjustment).
510  * terminate if no more clusters can be merged or after N iterations for N pixel hits.
511  * all remaining clusters contain every pixel hit.
512  */
513 
514  //for every cluster, check every other cluster
515  for (size_t i = 0; i < clusters.size(); i++) {
516  //clusters are interchangeable, check every pair only once
517  for (size_t j = i + 1; j < clusters.size(); j++) {
518 
519  //clusters must be on same sensor
520  if (clusters[i]._sensorId != clusters[j]._sensorId) {
521  continue;
522  }
523 
524  if (clusters[i].isNeighbour(clusters[j])) {
525  clusters[i].merge(clusters[j]);
526  clusters.erase(clusters.begin() + j);
527  j--;
528  }
529  }
530  }
531 
532  //calculate cluster centers and discard large clusters
533  //for statistis: count cluster ratio
534  for (size_t i = 0; i < clusters.size(); i++) {
535  clusters[i].calculateCenter();
536 
537  //FIXME: read from parameter file!
538  if (clusters[i].clusterSize > 1) {
539  hitsClustered++;
540 
541  //if ignoreClustres is set, skip clustered events
542  //FIXME: get maximum cluster size from config file
543  if (_ignoreClusters || clusters[i].clusterSize > 3) {
544  clusters.erase(clusters.begin() + i);
545  /*
546  * this is important! when you erase cluster i, cluster i+1 becomes cluster i, but the first i
547  * becomes i+1 itself.
548  * that means, cluster i (former i+1) never gets checked in the first line of the outer for loop!
549  */
550  i--;
551  }
552  }
553  else {
554  hitsSinglePixel++;
555  }
556  }
557  return pixelHit(hitSensorId, clusters[0].centerCol, clusters[0].centerRow);
558 
559 }
560 
562  int firstSensorId, secondSensorId;
563  firstSensorId = candidate.getId1();
564  secondSensorId = candidate.getId2();
565 
566  //same sensor hit?
567  if (firstSensorId == secondSensorId) {
568  return false;
569  }
570 
571  return helper->isOverlappingArea(firstSensorId, secondSensorId);
572 }
573 
575 }
576 
int row
Definition: anaLmdDigi.C:67
Int_t GetPixelRow() const
std::map< int, dynamicCutHandler > cutHandlers
virtual InitStatus ReInit()
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
Int_t GetClusterSize() const
Definition: PndSdsCluster.h:39
Int_t GetSensorID() const
Definition: PndSdsDigi.h:59
cout<< "-----------------------------------------------> Quarter VOLUME<<endl;name="QuarterShape";QuarterShape=newTGeoArb8(name,dz,vertQuar);name="Quarter4Vol";TStringmedium="air";QuarterVol=newTGeoVolumeAssembly(name);name="SubunitShape";SubunitShape=newTGeoArb8(name,dz,vertSub);TStringmedium="air";name="SubunitVol";name1="SubunitVol1";name2="SubunitVol2";name3="SubunitVol3";name4="SubunitVol4";name5="SubunitVol5";name6="SubunitVol6";name7="SubunitVol7";name8="SubunitVol8";name9="SubunitVol9";SubunitVol=newTGeoVolumeAssembly(name);SubunitVol1=newTGeoVolumeAssembly(name1);SubunitVol2=newTGeoVolumeAssembly(name2);SubunitVol3=newTGeoVolumeAssembly(name3);SubunitVol4=newTGeoVolumeAssembly(name4);SubunitVol5=newTGeoVolumeAssembly(name5);SubunitVol6=newTGeoVolumeAssembly(name6);SubunitVol7=newTGeoVolumeAssembly(name7);SubunitVol8=newTGeoVolumeAssembly(name8);SubunitVol9=newTGeoVolumeAssembly(name9);name="BoxShape";BoxShape=newTGeoArb8(name,dz,vertBox);TStringmedium="air";name="BoxVol";BoxVol=newTGeoVolumeAssembly(name);name1="BoxVol1";name2="BoxVol2";name3="BoxVol3";name4="BoxVol4";BoxVol1=newTGeoVolumeAssembly(name1);BoxVol2=newTGeoVolumeAssembly(name2);BoxVol3=newTGeoVolumeAssembly(name3);BoxVol4=newTGeoVolumeAssembly(name4);for(Int_tb=0;b<kNumOfBoxes;b++){cout<<""<<endl;cout<<"---------------->BOXnumber:"<<b<<endl;if(b==0){trBox=newTGeoTranslation(tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox,tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox,0.);rotBox=newTGeoRotation();rotBox.RotateX(0.465518);rotBox.RotateY(-0.465518);}if(b==1){trBox=newTGeoTranslation(-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox,-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox,0.);rotBox=newTGeoRotation();rotBox.RotateX(-0.465518);rotBox.RotateY(0.465518);}if(b==2){trBox=newTGeoTranslation(tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox,-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox,0.);rotBox=newTGeoRotation();rotBox.RotateX(-0.465518);rotBox.RotateY(-0.465518);}if(b==3){trBox=newTGeoTranslation(-tr-kSpaceInSub-kAlveoleThickness-0.5*kSpaceInBox,tr+kSpaceInSub+kAlveoleThickness+0.5*kSpaceInBox,0.);rotBox=newTGeoRotation();rotBox.RotateX(0.465518);rotBox.RotateY(0.465518);}TGeoCombiTrans*trrotBox=newTGeoCombiTrans(trBox,rotBox);name="BoxVol";name+=b;trrotBox->SetName(name);trrotBox->RegisterYourself();SubunitVol->AddNode(BoxVol,b,trrotBox);if(b==1){name+=b;trrotBox->SetName(name);trrotBox->RegisterYourself();SubunitVol1->AddNode(BoxVol,b,trrotBox);}if(b==2){name+=b;trrotBox->SetName(name);trrotBox->RegisterYourself();SubunitVol2->AddNode(BoxVol1,b,trrotBox);}if(b==0){name+=b;trrotBox-> SetName(name)
static std::vector< int > getAvailableOverlapIDs()
TList * GetAlignParNames()
bool applyStaticDistanceCut(PndLmdHitPair &candidate)
TString fOutBranchName
Definition: PndSdsTask.h:40
Int_t i
Definition: run_full.C:25
TVector3 GetPosition() const
Definition: PndSdsHit.h:93
exit(0)
bool applyDynamicDistanceCut(PndLmdHitPair &candidate)
Int_t GetPixelColumn() const
virtual void SetParContainers()
virtual InitStatus Init()
int col
Definition: anaLmdDigi.C:67
static PndLmdGeometryHelper & getInstance()
void getStatistics(PndLmdHitPair &candidate)
pixelHit getPixelHitFromSdsHit(PndSdsHit *sdsHit)
TClonesArray * clusterCandidateArray
PndLmdGeometryHelper * helper
Int_t GetDigiIndex(Int_t i) const
Definition: PndSdsCluster.h:40
Int_t getOverlapId() const
Double_t getDistance() const
boost::property_tree::ptree config
bool isSane() const
Definition: PndLmdHitPair.h:75
TString fInBranchName
Definition: PndSdsTask.h:39
Int_t getId2() const
Definition: PndLmdHitPair.h:60
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
const PndLmdHitLocationInfo & getHitLocationInfo(const std::string &volume_path)
void addToSamples(PndLmdHitPair pair)
TString fFolderName
Definition: PndSdsTask.h:41
static boost::property_tree::ptree readConfigFile(std::string filename)
static PndGeoHandling * Instance()
TString name
static bool exists(std::string file)
std::vector< double > samples
Int_t getId1() const
Definition: PndLmdHitPair.h:57
static bool writeConfigFile(boost::property_tree::ptree configTree, std::string filename, bool replaceExisting=true)
void setPixelHits(double col1, double row1, double col2, double row2)
Definition: PndLmdHitPair.h:99
ClassImp(PndAnaContFact)
void setOverlapId(Int_t overlapId)
void calculateDistance()
Data class to store the digi output of a pixel module.
TVector3 transformPndGlobalToLmdLocal(const TVector3 &vec)
Int_t GetClusterIndex() const
Definition: PndSdsHit.h:94
Int_t GetSensorID() const
Definition: PndSdsHit.h:90
int getOverlapIdFromSensorIDs(int id1, int id2)
bool candHitsOverlappingArea(const PndLmdHitPair &candidate)
bool isOverlappingArea(const int id1, const int id2)
void PrintPair() const
virtual void Exec(Option_t *opt)