CbmRoot
CbmStsTrackHitsCut.cxx
Go to the documentation of this file.
1 /*
2  * CbmStsTrackHitsCut.cxx
3  *
4  * Created on: 17 lip 2019
5  * Author: Daniel Wielanek
6  * E-mail: daniel.wielanek@gmail.com
7  * Warsaw University of Technology, Faculty of Physics
8  */
9 #include "CbmStsTrackHitsCut.h"
10 #include "CbmStsTrack.h"
11 
13  SetUnitName("STS hits [N]", Sts());
14  SetUnitName("MV Dhits [N]", Mvd());
15  SetUnitName("STS+MVD hits [N]", StsMvd());
16  SetMinMax(0, 1000, Sts());
17  SetMinMax(0, 1000, Mvd());
18  SetMinMax(0, 1000, StsMvd());
19 }
20 
21 Bool_t CbmStsTrackHitsCut::Pass(NicaTrack* track) {
22  NicaCbmTrack* tr = (NicaCbmTrack*) track;
23  CbmStsTrack* sts_tr = tr->GetStsTrack();
24  if (sts_tr == NULL) {
25  SetValue(0, Sts());
26  SetValue(0, Mvd());
27  SetValue(0, StsMvd());
28  } else {
29  SetValue(sts_tr->GetNofStsHits(), Sts());
30  SetValue(sts_tr->GetNofMvdHits(), Mvd());
31  SetValue(sts_tr->GetNofHits(), StsMvd());
32  }
33  return Validate();
34 }
35 
36 Bool_t CbmStsTrackHitsCut::Init(Int_t format_id) {
37  fInit = kTRUE;
38  if (FormatInhertis("NicaCbmEvent", format_id)) { return kTRUE; }
39  return kFALSE;
40 }
41 
43  // TODO Auto-generated destructor stub
44 }
CbmStsTrackHitsCut::Pass
virtual Bool_t Pass(NicaTrack *track)
Definition: CbmStsTrackHitsCut.cxx:21
CbmStsTrackHitsCut::Mvd
static Int_t Mvd()
Definition: CbmStsTrackHitsCut.h:20
NicaCbmTrack
Definition: NicaCbmTrack.h:20
CbmStsTrackHitsCut::~CbmStsTrackHitsCut
virtual ~CbmStsTrackHitsCut()
Definition: CbmStsTrackHitsCut.cxx:42
CbmStsTrack::GetNofHits
virtual Int_t GetNofHits() const
Definition: CbmStsTrack.h:76
CbmStsTrack::GetNofMvdHits
Int_t GetNofMvdHits() const
Definition: CbmStsTrack.h:84
CbmStsTrackHitsCut::Sts
static Int_t Sts()
Definition: CbmStsTrackHitsCut.h:19
CbmStsTrack.h
Data class for STS tracks.
NicaCbmTrack::GetStsTrack
CbmStsTrack * GetStsTrack() const
Definition: NicaCbmTrack.h:37
CbmStsTrackHitsCut::CbmStsTrackHitsCut
CbmStsTrackHitsCut()
Definition: CbmStsTrackHitsCut.cxx:12
CbmStsTrackHitsCut::StsMvd
static Int_t StsMvd()
Definition: CbmStsTrackHitsCut.h:21
CbmStsTrackHitsCut::Init
virtual Bool_t Init(Int_t format_id=0)
Definition: CbmStsTrackHitsCut.cxx:36
CbmStsTrackHitsCut.h
CbmStsTrack
Definition: CbmStsTrack.h:37
CbmStsTrack::GetNofStsHits
Int_t GetNofStsHits() const
Definition: CbmStsTrack.h:90