FairRoot/PandaRoot
PndTrkGemCombiTask.cxx
Go to the documentation of this file.
1 //
3 // PndTrkGemCombiTask
4 //
5 // Class for GEM combinatorial suppression
6 //
7 // authors: Lia Lavezzi - University of Torino (2015)
8 //
10 
11 #include "PndTrkGemCombiTask.h"
12 
13 #include "PndTrkTools.h"
14 
15 // fairroot
16 #include "FairRootManager.h"
17 #include "FairRunAna.h"
18 #include "FairRuntimeDb.h"
19 // ROOT
20 #include "TClonesArray.h"
21 #include "TVector3.h"
22 #include "TMarker.h"
23 
24 #include "PndGemHit.h"
25 #include "PndGemMCPoint.h"
26 
27 #include <iostream>
28 
29 using namespace std;
30 
31 // ----- Default constructor -------------------------------------------
32 PndTrkGemCombiTask::PndTrkGemCombiTask() : FairTask("GEM combinatorial suppression", 0), fDisplayOn(kFALSE), fMCEval(kFALSE) {}
33 
34 PndTrkGemCombiTask::PndTrkGemCombiTask(int verbose) : FairTask("GEM combinatorial suppression", verbose), fDisplayOn(kFALSE), fMCEval(kFALSE) {}
35 
36 // -------------------------------------------------------------------------
37 
38 // ----- Destructor ----------------------------------------------------
40 
41  delete fGemHitArray;
42  delete fGemPointArray;
43 
44 
45 }
46 // -------------------------------------------------------------------------
47 
48 
49 
50 // ----- Public method Init --------------------------------------------
52  // Get RootManager
53  FairRootManager* ioman = FairRootManager::Instance();
54  if ( ! ioman ) {
55  cout << "-E- PndTrkGemCombiTask::Init: "
56  << "RootManager not instantiated, return!" << endl;
57  return kFATAL;
58  }
59 
60 
61  fGemHitArray = (TClonesArray*) ioman->GetObject("GEMHit");
62  if ( !fGemHitArray){
63  std::cout << "-W- PndTrkGemCombiTask::Init: " << "No GEM hitArray, return!" << std::endl;
64  return kERROR;
65  }
66 
67 
70  if(fMCEval) {
71  fGemPointArray = (TClonesArray*) ioman->GetObject("GEMPoint"); // to evaluate performances
74  }
75 
76 
77  return kSUCCESS;
78 
79 }
80 
81 // -------------------------------------------------------------------------
82 void PndTrkGemCombiTask::Exec(Option_t*) {
83 
84  std::map< int, bool > hitidTousability = fCombiFinder->CombinatorialSuppression();
85 
86 }
87 
88 
89 
int fVerbose
Definition: poormantracks.C:24
#define verbose
void SetMCPointTCA(TClonesArray *gempointarray)
TClonesArray * fGemHitArray
std::map< int, bool > CombinatorialSuppression()
TClonesArray * fGemPointArray
virtual void Exec(Option_t *opt)
PndTrkGemCombinatorial * fCombiFinder
ClassImp(PndAnaContFact)
virtual InitStatus Init()