CbmRoot
CbmMCPointsCuts.cxx
Go to the documentation of this file.
1 /*
2  * CbmMCPointsCuts.cxx
3  *
4  * Created on: 18 lip 2019
5  * Author: Daniel Wielanek
6  * E-mail: daniel.wielanek@gmail.com
7  * Warsaw University of Technology, Faculty of Physics
8  */
9 #include "CbmMCPointsCuts.h"
10 #include "NicaCbmMCTrack.h"
11 
12 NicaCbmMCPointsCut::NicaCbmMCPointsCut(Int_t params) : NicaTrackCut(params) {}
13 
14 Bool_t NicaCbmMCPointsCut::Init(Int_t format_id) {
15  if (FormatInhertis("NicaCbmMCEvent", format_id)) {
16  fInit = kTRUE;
17  return kTRUE;
18  }
19  return kFALSE;
20 }
21 
23  SetUnitName("N_{STS Points} [N]", 0);
24 }
25 
26 Bool_t NicaCbmStsPointsCut::Pass(NicaTrack* track) {
27  NicaCbmMCTrack* tr = (NicaCbmMCTrack*) track;
28  SetValue(tr->GetNPoints(ECbmModuleId::kSts));
29  return Validate();
30 }
31 
33  SetUnitName("N_{MVD Points} [N]", 0);
34 }
35 
36 Bool_t NicaCbmMvdPointsCut::Pass(NicaTrack* track) {
37  NicaCbmMCTrack* tr = (NicaCbmMCTrack*) track;
38  SetValue(tr->GetNPoints(ECbmModuleId::kMvd));
39  return Validate();
40 }
41 
43  SetUnitName("N_{RICH Points} [N]", 0);
44 }
45 
46 Bool_t NicaCbmRichPointsCut::Pass(NicaTrack* track) {
47  NicaCbmMCTrack* tr = (NicaCbmMCTrack*) track;
48  SetValue(tr->GetNPoints(ECbmModuleId::kRich));
49  return Validate();
50 }
51 
53  SetUnitName("N_{MUCH Points} [N]", 0);
54 }
55 
56 Bool_t NicaCbmMuchPointsCut::Pass(NicaTrack* track) {
57  NicaCbmMCTrack* tr = (NicaCbmMCTrack*) track;
58  SetValue(tr->GetNPoints(ECbmModuleId::kMuch));
59  return Validate();
60 }
61 
63  SetUnitName("N_{TRD Points} [N]", 0);
64 }
65 
66 Bool_t NicaCbmTrdPointsCut::Pass(NicaTrack* track) {
67  NicaCbmMCTrack* tr = (NicaCbmMCTrack*) track;
68  SetValue(tr->GetNPoints(ECbmModuleId::kTrd));
69  return Validate();
70 }
71 
73  SetUnitName("N_{TOFPoints} [N]", 0);
74 }
75 
76 Bool_t NicaCbmTofPointsCut::Pass(NicaTrack* track) {
77  NicaCbmMCTrack* tr = (NicaCbmMCTrack*) track;
78  SetValue(tr->GetNPoints(ECbmModuleId::kTof));
79  return Validate();
80 }
81 
83  SetUnitName("N_{ECALPoints} [N]", 0);
84 }
85 
86 Bool_t NicaCbmEcalPointsCut::Pass(NicaTrack* track) {
87  NicaCbmMCTrack* tr = (NicaCbmMCTrack*) track;
88  SetValue(tr->GetNPoints(ECbmModuleId::kEcal));
89  return Validate();
90 }
91 
93  SetUnitName("N_{PSD Points} [N]", 0);
94 }
95 
96 Bool_t NicaCbmPsdPointsCut::Pass(NicaTrack* track) {
97  NicaCbmMCTrack* tr = (NicaCbmMCTrack*) track;
98  SetValue(tr->GetNPoints(ECbmModuleId::kPsd));
99  return Validate();
100 }
NicaCbmMCTrack
Definition: NicaCbmMCTrack.h:15
NicaCbmPsdPointsCut::NicaCbmPsdPointsCut
NicaCbmPsdPointsCut()
Definition: CbmMCPointsCuts.cxx:92
NicaCbmMuchPointsCut::Pass
Bool_t Pass(NicaTrack *track)
Definition: CbmMCPointsCuts.cxx:56
ECbmModuleId::kMvd
@ kMvd
Micro-Vertex Detector.
NicaCbmStsPointsCut::Pass
Bool_t Pass(NicaTrack *track)
Definition: CbmMCPointsCuts.cxx:26
NicaCbmRichPointsCut::NicaCbmRichPointsCut
NicaCbmRichPointsCut()
Definition: CbmMCPointsCuts.cxx:42
ECbmModuleId::kTof
@ kTof
Time-of-flight Detector.
NicaCbmMCPointsCut::Init
virtual Bool_t Init(Int_t format_id)
Definition: CbmMCPointsCuts.cxx:14
NicaCbmTofPointsCut::NicaCbmTofPointsCut
NicaCbmTofPointsCut()
Definition: CbmMCPointsCuts.cxx:72
NicaCbmTofPointsCut::Pass
Bool_t Pass(NicaTrack *track)
Definition: CbmMCPointsCuts.cxx:76
NicaCbmMCTrack.h
ECbmModuleId::kRich
@ kRich
Ring-Imaging Cherenkov Detector.
NicaCbmRichPointsCut::Pass
Bool_t Pass(NicaTrack *track)
Definition: CbmMCPointsCuts.cxx:46
NicaCbmTrdPointsCut::NicaCbmTrdPointsCut
NicaCbmTrdPointsCut()
Definition: CbmMCPointsCuts.cxx:62
ECbmModuleId::kTrd
@ kTrd
Transition Radiation Detector.
NicaCbmMCPointsCut
Definition: CbmMCPointsCuts.h:15
NicaCbmStsPointsCut::NicaCbmStsPointsCut
NicaCbmStsPointsCut()
Definition: CbmMCPointsCuts.cxx:22
NicaCbmMCPointsCut::NicaCbmMCPointsCut
NicaCbmMCPointsCut(Int_t params)
Definition: CbmMCPointsCuts.cxx:12
NicaCbmMCTrack::GetNPoints
Int_t GetNPoints(ECbmModuleId detId) const
Definition: NicaCbmMCTrack.cxx:113
NicaCbmEcalPointsCut::Pass
Bool_t Pass(NicaTrack *track)
Definition: CbmMCPointsCuts.cxx:86
ECbmModuleId::kMuch
@ kMuch
Muon detection system.
ECbmModuleId::kPsd
@ kPsd
Projectile spectator detector.
CbmMCPointsCuts.h
NicaCbmTrdPointsCut::Pass
Bool_t Pass(NicaTrack *track)
Definition: CbmMCPointsCuts.cxx:66
NicaCbmMvdPointsCut::NicaCbmMvdPointsCut
NicaCbmMvdPointsCut()
Definition: CbmMCPointsCuts.cxx:32
NicaCbmMuchPointsCut::NicaCbmMuchPointsCut
NicaCbmMuchPointsCut()
Definition: CbmMCPointsCuts.cxx:52
ECbmModuleId::kEcal
@ kEcal
EM-Calorimeter.
ECbmModuleId::kSts
@ kSts
Silicon Tracking System.
NicaCbmEcalPointsCut::NicaCbmEcalPointsCut
NicaCbmEcalPointsCut()
Definition: CbmMCPointsCuts.cxx:82
NicaCbmPsdPointsCut::Pass
Bool_t Pass(NicaTrack *track)
Definition: CbmMCPointsCuts.cxx:96
NicaCbmMvdPointsCut::Pass
Bool_t Pass(NicaTrack *track)
Definition: CbmMCPointsCuts.cxx:36