Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
TwoTrackDCACut.cxx
1/*
2 * TwoTrackDCACut.cxx
3 *
4 * Created on: 10 mar 2018
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#include "TwoTrackDCACut.h"
10
11#include "ExpTrack.h"
12#include "Helix.h"
13#include "TwoTrack.h"
14namespace Hal {
15 TwoTrackDCACut::TwoTrackDCACut() : TwoTrackCut(3) {
16 SetUnitName("DCA 1-2 [cm]", 0);
17 SetUnitName("DCAxy 1-2 [cm]", 0);
18 SetUnitName("DCAz 1-2 [cm]", 0);
19 }
20
21 Bool_t TwoTrackDCACut::Pass(TwoTrack* pair) {
22 ExpTrack* tr1 = (ExpTrack*) pair->GetTrack1();
23 ExpTrack* tr2 = (ExpTrack*) pair->GetTrack2();
24 TVector3* point1 = tr1->GetDCA();
25 TVector3* point2 = tr2->GetDCA();
26 TVector3 dif = *point1 - *point2;
27 SetValue(DCA(), dif.Mag());
28 SetValue(DCAxy(), dif.Pt());
29 SetValue(DCAz(), dif.Z());
30 return Validate();
31 }
32
33 TwoTrackDCACut::~TwoTrackDCACut() {
34 // TODO Auto-generated destructor stub
35 }
36} // namespace Hal
const TVector3 & GetDCA() const
Definition ExpTrack.h:65
Track * GetTrack1() const
Definition TwoTrack.h:75
Track * GetTrack2() const
Definition TwoTrack.h:80