CbmRoot
Loading...
Searching...
No Matches
CbmKFParticleFinderPID.h
Go to the documentation of this file.
1/* Copyright (C) 2014-2019 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Maksym Zyzak, Volker Friese [committer] */
4
5//-----------------------------------------------------------
6//-----------------------------------------------------------
7
8#ifndef CbmKFParticleFinderPID_HH
9#define CbmKFParticleFinderPID_HH
10
11#include "CbmMCDataArray.h"
12#include "FairTask.h"
13#include "TString.h"
14
15#include <vector>
16
17class TClonesArray;
18class TFile;
19class TObject;
20class CbmDigiManager;
21
22class CbmKFParticleFinderPID : public FairTask {
23 public:
24 struct Cuts {
25 Double_t fTrackLengthMin{0.};
26 Double_t fTrackLengthMax{1.e10};
27 Double_t fTrackTofTimeMin{0.};
28 Double_t fTrackTofTimeMax{1.e10};
29 Double_t fSP[7][5]{{0.}}; // ?
30 };
31
32 // Constructors/Destructors ---------
33 CbmKFParticleFinderPID(const char* name = "CbmKFParticleFinderPID", Int_t iVerbose = 0);
35
36 virtual InitStatus Init();
37 virtual void Exec(Option_t* opt);
38 virtual void Finish();
39
40 void SetPIDMode(int mode) { fPIDMode = mode; }
41 void UseNoPID() { fPIDMode = 0; }
42 void UseMCPID() { fPIDMode = 1; }
43 void UseDetectorPID() { fPIDMode = 2; }
44 void SetCuts(const Cuts& val) { fCuts = val; }
45
46 void DoNotUseTRD() { fTrdPIDMode = 0; }
47 void UseTRDWknPID() { fTrdPIDMode = 1; }
48 void UseTRDANNPID() { fTrdPIDMode = 2; }
49
50 void DoNotUseRICH() { fRichPIDMode = 0; }
53
54 void DoNotUseMuch() { fMuchMode = 0; }
55 void UseMuch() { fMuchMode = 1; }
56
57 void UseSTSdEdX() { fUseSTSdEdX = kTRUE; }
58 void DoNotUseSTSdEdX() { fUseSTSdEdX = kFALSE; }
59 void UseTRDdEdX() { fUseTRDdEdX = kTRUE; }
60 void DoNotUseTRDdEdX() { fUseTRDdEdX = kFALSE; }
61
62 //setters for MuCh cuts
63 void SetNMinStsHitsForMuon(int cut) { fMuchCutsInt[0] = cut; }
64 void SetNMinMuchHitsForLMVM(int cut) { fMuchCutsInt[1] = cut; }
65 void SetNMinMuchHitsForJPsi(int cut) { fMuchCutsInt[2] = cut; }
66 void SetMaxChi2ForStsMuonTrack(float cut) { fMuchCutsFloat[0] = cut; }
67 void SetMaxChi2ForMuchMuonTrack(float cut) { fMuchCutsFloat[1] = cut; }
68
69 const std::vector<int>& GetPID() const { return fPID; }
70
71 private:
74
75 void SetMCPID();
76 void SetRecoPID();
77
78 //input branches
79 TClonesArray* fRecoEvents{nullptr}; // Array of CbmEvent objects
80 TClonesArray* fGlobalTrackArray{nullptr}; // reco global tracks
81 TClonesArray* fStsTrackArray{nullptr}; // reco STS tracks
82 TClonesArray* fStsHitArray{nullptr};
83 TClonesArray* fStsClusterArray{nullptr};
84 TClonesArray* fRichRingArray{nullptr};
85 TClonesArray* fMuchTrackArray{nullptr}; //input much tracks
86 TClonesArray* fTrdTrackArray{nullptr};
87 TClonesArray* fTrdHitArray{nullptr};
88 TClonesArray* fTofHitArray{nullptr}; //input reco tracks
89
90 CbmDigiManager* fDigiManager{nullptr}; // Interface to digi branch
91
93 TClonesArray* fStsTrackMatchArray{nullptr}; // STS track match
94
95 //PID variables
96 Cuts fCuts{}; // cuts for reco PID
97 Int_t fPIDMode{0};
98 Int_t fTrdPIDMode{0};
99 Int_t fRichPIDMode{0};
100 Int_t fMuchMode{0};
101 Bool_t fUseSTSdEdX{false};
102 Bool_t fUseTRDdEdX{false};
103
104 //MuCh cuts
105 float fMuchCutsFloat[2] = {0.};
106 int fMuchCutsInt[3] = {0};
107
108 std::vector<int> fPID;
109
111};
112
113#endif
CbmDigiManager.
CbmKFParticleFinderPID(const CbmKFParticleFinderPID &)
const CbmKFParticleFinderPID & operator=(const CbmKFParticleFinderPID &)
void SetMaxChi2ForMuchMuonTrack(float cut)
void SetMaxChi2ForStsMuonTrack(float cut)
virtual void Exec(Option_t *opt)
void SetCuts(const Cuts &val)
ClassDef(CbmKFParticleFinderPID, 0)
CbmKFParticleFinderPID(const char *name="CbmKFParticleFinderPID", Int_t iVerbose=0)
const std::vector< int > & GetPID() const
Access to a MC data branch for time-based analysis.