Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
TrackFreezoutCut.cxx
1/*
2 * TrackFreezoutCut.cxx
3 *
4 * Created on: 05-10-2014
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#include "TrackFreezoutCut.h"
10
11#include "McTrack.h"
12#include "DataFormatManager.h"
13
14namespace Hal{
15
16TrackFreezoutCut::TrackFreezoutCut() : TrackMCCut(4) {
17 SetUnitName("X [fm]", 0);
18 SetUnitName("Y [fm]", 1);
19 SetUnitName("Z [fm]", 2);
20 SetUnitName("T [fm/c]", 3);
21 SetMinMax(-1000, 1000, 0);
22 SetMinMax(-1000, 1000, 1);
23 SetMinMax(-1000, 1000, 2);
24 SetMinMax(-1000, 1000, 3);
25}
26
27Bool_t TrackFreezoutCut::Pass(Track* track) {
28 const TLorentzVector& fr = ((McTrack*) track)->GetFreezoutPosition();
29 SetValue(fr.X(), 0);
30 SetValue(fr.Y(), 1);
31 SetValue(fr.Z(), 2);
32 SetValue(fr.T(), 3);
33 return Validate();
34}
35
36TrackFreezoutCut::~TrackFreezoutCut() {}
37
38TrackTFreezCut::TrackTFreezCut() : TrackMCCut(1) { SetUnitName("T_{freez} [fm]"); }
39
41 SetValue(((McTrack*) track)->GetFreezoutPosition().T());
42 return Validate();
43}
44
45TrackTFreezCut::~TrackTFreezCut() {}
46
47TrackTauCut::TrackTauCut() : TrackMCCut(1) { SetUnitName("#tau [fm/c]"); }
48
49Bool_t TrackTauCut::Pass(Track* track) {
50 Double_t z, t;
51 z = ((McTrack*) track)->GetFreezoutPosition().Z();
52 t = ((McTrack*) track)->GetFreezoutPosition().T();
53 if (TMath::Abs(z) > TMath::Abs(t)) {
54 SetValue(TMath::Sqrt(-t * t + z * z));
55 ForcedUpdate(kFALSE);
56 return kFALSE;
57 }
58 Double_t tau = TMath::Sqrt(t * t - z * z);
59 SetValue(tau);
60 return Validate();
61}
62
63TrackTauCut::~TrackTauCut() {}
64}
Bool_t ForcedUpdate(Bool_t state)
Definition Cut.cxx:79
void SetValue(Double_t val, Int_t i=0)
Definition Cut.h:235
Bool_t Validate()
Definition Cut.cxx:43
void SetUnitName(TString name, Int_t i=0)
Definition Cut.h:241
virtual Bool_t Pass(Track *track)
virtual Bool_t Pass(Track *track)