CbmRoot
CbmKFParticleFinderQA.h
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 //-----------------------------------------------------------
3 
4 #ifndef CbmKFParticleFinderQA_HH
5 #define CbmKFParticleFinderQA_HH
6 
7 #include "FairTask.h"
8 
9 #include "TString.h"
10 
11 #include <vector>
12 
13 class KFParticleTopoReconstructor;
14 class KFTopoPerformance;
15 class TClonesArray;
16 class CbmMCEventList;
17 class CbmMCDataArray;
18 class TFile;
19 class TObject;
20 
21 class CbmKFParticleFinderQA : public FairTask {
22 public:
23  // Constructors/Destructors ---------
24  CbmKFParticleFinderQA(const char* name = "CbmKFParticleFinderQA",
25  Int_t iVerbose = 0,
26  const KFParticleTopoReconstructor* tr = 0,
27  TString outFileName = "CbmKFParticleFinderQA.root");
29 
30  void SetEffFileName(const TString& name) { fEfffileName = name; }
31  void SetMCTrackBranchName(const TString& name) { fMCTracksBranchName = name; }
32  void SetTrackMatchBranchName(const TString& name) {
33  fTrackMatchBranchName = name;
34  }
35 
36  virtual InitStatus Init();
37  virtual void Exec(Option_t* opt);
38  virtual void Finish();
39 
40  void SetPrintEffFrequency(Int_t n);
41 
42  void SaveParticles(Bool_t b = 1) { fSaveParticles = b; }
43  void SaveMCParticles(Bool_t b = 1) { fSaveMCParticles = b; }
44 
45  // Set SE analysis
47 
48  //Tests
49  void SetCheckDecayQA() { fCheckDecayQA = true; }
50  void SetReferenceResults(TString t) { fReferenceResults = t; }
51  void SetDecayToAnalyse(int iDecay) { fDecayToAnalyse = iDecay; }
52  bool IsTestPassed() { return fTestOk; }
53 
54 private:
57 
58  void WriteHistosCurFile(TObject* obj);
59  void FitDecayQAHistograms(float sigma[14],
60  const bool saveReferenceResults = false) const;
61  void CheckDecayQA();
62 
63  //names of input branches
66 
67  //input branches
69  TClonesArray* fMCTrackArrayEvent;
70  CbmMCEventList* fEventList; //mc event list in timeslice
71  TClonesArray* fTrackMatchArray; //track match
72 
73  // output arrays of particles
74  TClonesArray* fRecParticles; // output array of KF Particles
75  TClonesArray* fMCParticles; // output array of MC Particles
76  TClonesArray* fMatchParticles; // output array of match objects
77 
80 
82 
83  //output file with histograms
84  TString fOutFileName;
85  TFile* fOutFile;
86  TString fEfffileName;
87  //KF Particle QA
88  KFTopoPerformance* fTopoPerformance;
89 
91  Int_t fNEvents;
92  Double_t fTime[5];
93 
94  //for super event analysis
96 
97  //for tests
101  bool fTestOk;
102 
104 };
105 
106 #endif
CbmKFParticleFinderQA::fMCTrackArray
CbmMCDataArray * fMCTrackArray
Name of the input TCA with track match.
Definition: CbmKFParticleFinderQA.h:68
CbmKFParticleFinderQA::SetPrintEffFrequency
void SetPrintEffFrequency(Int_t n)
Definition: CbmKFParticleFinderQA.cxx:445
CbmKFParticleFinderQA::ClassDef
ClassDef(CbmKFParticleFinderQA, 1)
CbmKFParticleFinderQA::fTrackMatchArray
TClonesArray * fTrackMatchArray
Definition: CbmKFParticleFinderQA.h:71
CbmKFParticleFinderQA::fMCTracksBranchName
TString fMCTracksBranchName
Definition: CbmKFParticleFinderQA.h:64
CbmKFParticleFinderQA::Init
virtual InitStatus Init()
Definition: CbmKFParticleFinderQA.cxx:101
CbmKFParticleFinderQA::SaveParticles
void SaveParticles(Bool_t b=1)
Definition: CbmKFParticleFinderQA.h:42
CbmKFParticleFinderQA::fNEvents
Int_t fNEvents
Definition: CbmKFParticleFinderQA.h:91
CbmKFParticleFinderQA::fTime
Double_t fTime[5]
Definition: CbmKFParticleFinderQA.h:92
CbmKFParticleFinderQA::WriteHistosCurFile
void WriteHistosCurFile(TObject *obj)
Definition: CbmKFParticleFinderQA.cxx:426
CbmKFParticleFinderQA
Definition: CbmKFParticleFinderQA.h:21
CbmKFParticleFinderQA::SetTrackMatchBranchName
void SetTrackMatchBranchName(const TString &name)
Definition: CbmKFParticleFinderQA.h:32
CbmKFParticleFinderQA::~CbmKFParticleFinderQA
~CbmKFParticleFinderQA()
Definition: CbmKFParticleFinderQA.cxx:91
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
CbmKFParticleFinderQA::fSuperEventAnalysis
bool fSuperEventAnalysis
Definition: CbmKFParticleFinderQA.h:95
CbmKFParticleFinderQA::FitDecayQAHistograms
void FitDecayQAHistograms(float sigma[14], const bool saveReferenceResults=false) const
Definition: CbmKFParticleFinderQA.cxx:450
CbmKFParticleFinderQA::fCheckDecayQA
bool fCheckDecayQA
Definition: CbmKFParticleFinderQA.h:100
CbmKFParticleFinderQA::fSaveParticles
Bool_t fSaveParticles
Definition: CbmKFParticleFinderQA.h:78
CbmKFParticleFinderQA::SetEffFileName
void SetEffFileName(const TString &name)
Definition: CbmKFParticleFinderQA.h:30
CbmKFParticleFinderQA::CbmKFParticleFinderQA
CbmKFParticleFinderQA(const char *name="CbmKFParticleFinderQA", Int_t iVerbose=0, const KFParticleTopoReconstructor *tr=0, TString outFileName="CbmKFParticleFinderQA.root")
Definition: CbmKFParticleFinderQA.cxx:39
CbmKFParticleFinderQA::SaveMCParticles
void SaveMCParticles(Bool_t b=1)
Definition: CbmKFParticleFinderQA.h:43
CbmKFParticleFinderQA::CheckDecayQA
void CheckDecayQA()
Definition: CbmKFParticleFinderQA.cxx:521
CbmKFParticleFinderQA::SetDecayToAnalyse
void SetDecayToAnalyse(int iDecay)
Definition: CbmKFParticleFinderQA.h:51
CbmKFParticleFinderQA::fDecayToAnalyse
int fDecayToAnalyse
Definition: CbmKFParticleFinderQA.h:99
CbmKFParticleFinderQA::fOutFile
TFile * fOutFile
Definition: CbmKFParticleFinderQA.h:85
CbmKFParticleFinderQA::SetSuperEventAnalysis
void SetSuperEventAnalysis()
Definition: CbmKFParticleFinderQA.h:46
CbmKFParticleFinderQA::fMCParticles
TClonesArray * fMCParticles
Definition: CbmKFParticleFinderQA.h:75
CbmKFParticleFinderQA::fTopoPerformance
KFTopoPerformance * fTopoPerformance
Definition: CbmKFParticleFinderQA.h:88
CbmMCEventList
Container class for MC events with number, file and start time.
Definition: CbmMCEventList.h:38
CbmKFParticleFinderQA::fTestOk
bool fTestOk
Definition: CbmKFParticleFinderQA.h:101
CbmKFParticleFinderQA::fEventList
CbmMCEventList * fEventList
Definition: CbmKFParticleFinderQA.h:70
CbmKFParticleFinderQA::fRecParticles
TClonesArray * fRecParticles
Definition: CbmKFParticleFinderQA.h:74
CbmKFParticleFinderQA::fTrackMatchBranchName
TString fTrackMatchBranchName
Name of the input TCA with MC tracks.
Definition: CbmKFParticleFinderQA.h:65
CbmKFParticleFinderQA::SetCheckDecayQA
void SetCheckDecayQA()
Definition: CbmKFParticleFinderQA.h:49
CbmKFParticleFinderQA::SetMCTrackBranchName
void SetMCTrackBranchName(const TString &name)
Definition: CbmKFParticleFinderQA.h:31
CbmKFParticleFinderQA::CbmKFParticleFinderQA
CbmKFParticleFinderQA(const CbmKFParticleFinderQA &)
CbmKFParticleFinderQA::operator=
const CbmKFParticleFinderQA & operator=(const CbmKFParticleFinderQA &)
CbmKFParticleFinderQA::fPrintFrequency
Int_t fPrintFrequency
Definition: CbmKFParticleFinderQA.h:90
CbmKFParticleFinderQA::fReferenceResults
TString fReferenceResults
Definition: CbmKFParticleFinderQA.h:98
CbmKFParticleFinderQA::SetReferenceResults
void SetReferenceResults(TString t)
Definition: CbmKFParticleFinderQA.h:50
CbmKFParticleFinderQA::fSaveMCParticles
Bool_t fSaveMCParticles
Definition: CbmKFParticleFinderQA.h:79
CbmKFParticleFinderQA::fMCTrackArrayEvent
TClonesArray * fMCTrackArrayEvent
Definition: CbmKFParticleFinderQA.h:69
CbmKFParticleFinderQA::fMatchParticles
TClonesArray * fMatchParticles
Definition: CbmKFParticleFinderQA.h:76
CbmKFParticleFinderQA::IsTestPassed
bool IsTestPassed()
Definition: CbmKFParticleFinderQA.h:52
CbmKFParticleFinderQA::fEfffileName
TString fEfffileName
Definition: CbmKFParticleFinderQA.h:86
CbmKFParticleFinderQA::Finish
virtual void Finish()
Definition: CbmKFParticleFinderQA.cxx:367
CbmKFParticleFinderQA::fTimeSliceMode
bool fTimeSliceMode
Definition: CbmKFParticleFinderQA.h:81
CbmKFParticleFinderQA::fOutFileName
TString fOutFileName
Definition: CbmKFParticleFinderQA.h:84
CbmKFParticleFinderQA::Exec
virtual void Exec(Option_t *opt)
Definition: CbmKFParticleFinderQA.cxx:172