Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
TrackBasicToFCut.cxx
1/*
2 * ToFBasicCut.cxx
3 *
4 * Created on: 26 wrz 2017
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9
10#include "TrackBasicToFCut.h"
11
12#include "Cut.h"
13#include "DataFormat.h"
14#include "ExpTrack.h"
15#include "ToFTrack.h"
16namespace Hal {
17 const Int_t TrackBasicToFCut::fgMass2 = 0;
18 const Int_t TrackBasicToFCut::fgBeta = 1;
19 const Int_t TrackBasicToFCut::fgFlag = 2;
20 TrackBasicToFCut::TrackBasicToFCut() : TrackExpCut(3) {
21 SetUnitName("m_{ToF}^{2} [GeV^{2}/c^{4}]", 0);
22 SetUnitName("#beta_{ToF} [c]", 1);
23 SetUnitName("flag_{ToF} [AU]", 2);
24 SetMinMax(0, 1E+9, 0);
25 SetMinMax(0, 1E+9, 1);
26 SetMinMax(0, 1E+9, 2);
27 }
28
29 Bool_t TrackBasicToFCut::Init(Int_t formad_id) {
30 Bool_t stat = TrackExpCut::Init(formad_id);
31 if (stat == kFALSE) return kFALSE;
32 if (ToFAvaiable(formad_id)) return kTRUE;
33 return kFALSE;
34 }
35
36 Bool_t TrackBasicToFCut::Pass(Track* tr) {
37 ToFTrack* tof = (ToFTrack*) ((ExpTrack*) tr)->GetDetTrack(DetectorID::kTOF);
38 SetValue(tof->GetBeta(), fgBeta);
39 SetValue(tof->GetMass2(), fgMass2);
40 SetValue(tof->GetFlag(), fgFlag);
41 return Validate();
42 }
43
44 TrackBasicToFCut::~TrackBasicToFCut() {
45 // TODO Auto-generated destructor stub
46 }
47} // namespace Hal
Int_t GetFlag() const
Float_t GetBeta() const
Definition ToFTrack.h:65
Float_t GetMass2() const
Definition ToFTrack.h:60