PandaRoot
PndLmdPairFinderTask.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 /*
14  * PairFinderTask.h
15  *
16  * Created on: Jul 22, 2014
17  * Author: R. Klasen, roklasen@uni-mainz.de or r.klasen@gsi.de or r.klasen@ep1.rub.de
18  */
19 
20 #ifndef PNDLMDPAIRFINDERTASK_H_
21 #define PNDLMDPAIRFINDERTASK_H_
22 
23 #include "PndLmdAlignStructs.h"
24 #include <PndLmdHitPair.h>
25 #include <PndSdsHit.h>
26 #include "PndSdsTask.h"
27 
28 #include "TClonesArray.h"
29 
30 #include <iostream>
31 #include <string>
32 #include <vector>
33 
35 
37 
38  private:
39  // for statistics
40  Int_t noOfGoodPairs, noOfEvents;
41  Int_t plane0, plane1, plane2, plane3;
42  Int_t eventMissedAllPlanes, noOverlap;
43  Int_t distanceTooHigh;
44  Int_t sumOfPixelHits;
45  Int_t unsuitable;
46  Int_t hitsClustered, hitsSinglePixel;
47  Int_t noOfCombos;
48 
49  Double_t _maxDistance;
50 
51  Bool_t _ignoreClusters;
52 
53  pixelHit getPixelHitFromSdsHit(PndSdsHit *sdsHit);
54 
55  public:
56  void SetParContainers();
57 
59  PndLmdPairFinderTask(const char *name);
60  virtual ~PndLmdPairFinderTask();
61 
63  virtual void SetBranchNames();
64 
66  virtual InitStatus Init();
67  virtual InitStatus ReInit();
68 
70  virtual void Exec(Option_t *opt);
71 
72  virtual void FinishEvent();
73  virtual void FinishTask();
74 
75  // apply distance cut, will be ignored when using dynamic cut
76  void setMaxDistance(Double_t value) { _maxDistance = value; }
77 
78  void ignoreClusters(Bool_t value) { _ignoreClusters = value; }
79 
80  protected:
81  // PndLmdDim* dimension;
82 
84 
85  TClonesArray *digiArray;
86  TClonesArray *recoArray;
87  TClonesArray *hitPairArray;
88  TClonesArray *clusterCandidateArray;
89 
92 
93  std::map<int, TClonesArray *> hitPairMap;
94 
95  void Register();
96  void Reset();
97 
98  // function to return result of all checks, distance cut etc.
99  void getStatistics(PndLmdHitPair &candidate);
100 
101  bool pairDistanceValid(PndLmdHitPair &candidate);
102 
103  // self explanatory
104  bool candHitsOverlappingArea(const PndLmdHitPair &candidate);
105 
107 };
108 
109 #endif /* PAIRFINDERTASK_H_ */
void ignoreClusters(Bool_t value)
bool pairDistanceValid(PndLmdHitPair &candidate)
void getStatistics(PndLmdHitPair &candidate)
virtual ~PndLmdPairFinderTask()
virtual InitStatus ReInit()
TClonesArray * clusterCandidateArray
PndLmdGeometryHelper * helper
ClassDef(PndLmdPairFinderTask, 20)
virtual void FinishEvent()
virtual void FinishTask()
virtual void Exec(Option_t *opt)
std::map< int, TClonesArray * > hitPairMap
virtual void SetBranchNames()
bool candHitsOverlappingArea(const PndLmdHitPair &candidate)
virtual InitStatus Init()
void setMaxDistance(Double_t value)