FEDRA emulsion software from the OPERA Collaboration
EdbShowAlgClean.h
Go to the documentation of this file.
1 #ifndef ROOT_EdbShowAlgClean
2 #define ROOT_EdbShowAlgClean
3 
4 #include "TROOT.h"
5 #include "TFile.h"
6 #include "TVector3.h"
7 #include "TIndexCell.h"
8 #include "TArrayF.h"
9 #include "TBenchmark.h"
10 #include "TMultiLayerPerceptron.h"
11 #include "TMLPAnalyzer.h"
12 #include "TCanvas.h"
13 #include "EdbVertex.h"
14 #include "EdbPVRec.h"
15 #include "EdbPhys.h"
16 #include "EdbMath.h"
17 #include "EdbMomentumEstimator.h"
18 #include "EdbLog.h"
19 #include "EdbPattern.h"
20 #include "EdbShowerP.h"
21 using namespace std;
22 
23 //______________________________________________________________________________
24 //___
25 //___ Declaration of EdbShowAlgClean Class:
26 //______________________________________________________________________________
27 
28 
29 //______________________________________________________________________________
30 
31 class EdbShowAlgClean : public TObject {
32 
33 private:
34 
35  // TObjArray storing Source (to be cleaned)
36  TObjArray* eSource;
38  // TObjArray storing Dirt (to be cleaned from, can of course be identical to the source...)
39  TObjArray* eDirt;
41  // TObjArray storing Target (which is cleaned)
42  TObjArray* eTarget;
44 
45  //Numerator to tell which kind of cleaning should be done
46  TArrayI* eCleaningType;
47 
48  // Flag if source/dirt/target is already set.
49  Bool_t eIsSet[3];
50 
51 
52 
53  // Init;
54  void Init();
55  // Set0;
56  void Set0();
57 
58 public:
59 
61  EdbShowAlgClean(TObjArray* Source);
62  EdbShowAlgClean(TObjArray* Source,TObjArray* Dirt);
63  EdbShowAlgClean(TObjArray* Source,TObjArray* Dirt,TObjArray* Target);
64 
65 
66  inline TObjArray* GetSource( ) const {
67  return eSource;
68  }
69  inline TObjArray* GetDirt( ) const {
70  return eDirt;
71  }
72  inline TObjArray* GetTarget( ) const {
73  return eTarget;
74  }
75 
76  void SetSource(TObjArray* Source);
77  void SetDirt(TObjArray* Dirt);
78  void SetTarget(TObjArray* Target);
79 
80  void SetSource(EdbShowerP* SourceShower);
81  void SetDirt(EdbTrackP* DirtTrack);
82  void SetTarget(EdbShowerP* TargetShower);
83 
84  inline void SetCleaningType(Int_t CleaningType, Int_t Value) {
85  eCleaningType[CleaningType]=Value;
86  return;
87  }
88 
89  virtual ~EdbShowAlgClean(); // virtual constructor due to inherited class
90 
91  void CheckClassType();
92  void CheckClassTypeEntries();
93 
94 
95  void RemovePassingDirtFromSource(); // General source/dirt remove function. one cleaning step
96  void RemoveStoppingDirtFromSource(); // General source/dirt remove function. another cleaning step
97 
98 
99  // Specialized source/dirt remove functions.
100  // To have them quickly there...
101  void SimpleRemoveTrackSegmentsFromShower(); // source = shower; dirt = track;
102  Int_t SimpleRemoveTrackSegmentsFromShower(EdbShowerP* shower, EdbTrackP* track);
103  void SimpleRemoveDoubleBTViewOverlap(); // source = shower; dirt = shower;
104  Int_t SimpleRemoveDoubleBTViewOverlap(EdbShowerP* shower);
105  void SimpleRemoveBGSegmentsFromShower(); // source = shower; dirt = shower;
106  Int_t SimpleRemoveBGSegmentsFromShower(EdbShowerP* shower);
107 
108 
109  void Execute(); // does the actual cleaning steps
110 
111  // Any Helper Functions:
112  Bool_t CompareSegmentsByPosition(EdbSegP* s1,EdbSegP* s2, Int_t type);
113 
114 
115  void Print();
116  void Help();
117  ClassDef(EdbShowAlgClean,1); // Root Class Definition for my Objects
118 };
119 
120 //______________________________________________________________________________
121 
122 #endif /* EdbShowAlgClean */
Definition: EdbSegP.h:18
Definition: EdbShowAlgClean.h:31
TArrayI * eCleaningType
Definition: EdbShowAlgClean.h:46
TObjArray * GetTarget() const
Definition: EdbShowAlgClean.h:72
void SetCleaningType(Int_t CleaningType, Int_t Value)
Definition: EdbShowAlgClean.h:84
TObjArray * eTarget
Definition: EdbShowAlgClean.h:42
TObjArray * GetSource() const
Definition: EdbShowAlgClean.h:66
ClassDef(EdbShowAlgClean, 1)
TObjArray * eSource
Definition: EdbShowAlgClean.h:36
Int_t eSourceClassType
Definition: EdbShowAlgClean.h:37
Int_t eTargetClassType
Definition: EdbShowAlgClean.h:43
TObjArray * eDirt
Definition: EdbShowAlgClean.h:39
void SetTarget(EdbShowerP *TargetShower)
TObjArray * GetDirt() const
Definition: EdbShowAlgClean.h:69
Int_t eDirtClassType
Definition: EdbShowAlgClean.h:40
Definition: EdbShowerP.h:28
Definition: EdbPattern.h:118
Definition: bitview.h:14
Alg Print()
Alg Execute()
void Help()
Definition: mc2raw.cxx:20
Int_t type
Definition: testBGReduction_By_ANN.C:15
EdbSegP * s1
Definition: tlg2pattern.C:30
EdbSegP * s2
Definition: tlg2pattern.C:31