Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
TwoTrackAntiSplittingCut.cxx
1/*
2 * TwoTrackAntiSplittingCut.cxx
3 *
4 * Created on: 28 kwi 2021
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#include "TwoTrackAntiSplittingCut.h"
10
11#include "ComplexTrack.h"
12#include "TwoTrack.h"
13
14namespace Hal {
15 TwoTrackAntiSplittingCut::TwoTrackAntiSplittingCut() : TwoTrackCut(1) { SetUnitName("AntiSplitting [Stat]"); }
16
17 Bool_t TwoTrackAntiSplittingCut::Pass(TwoTrack* pair) {
18 ComplexTrack* tr1 = (ComplexTrack*) pair->GetTrack1();
19 ComplexTrack* tr2 = (ComplexTrack*) pair->GetTrack2();
20 if (tr1->GetImgTrack() == nullptr) {
21 SetValue(0);
22 return ForcedUpdate(kTRUE);
23 }
24 if (tr1->GetImgTrack() == tr2->GetImgTrack()) {
25 SetValue(1);
26 } else {
27 SetValue(0);
28 }
29 return Validate();
30 }
31
32 TwoTrackAntiSplittingCut::~TwoTrackAntiSplittingCut() {}
33} // namespace Hal
Track * GetTrack1() const
Definition TwoTrack.h:75
Track * GetTrack2() const
Definition TwoTrack.h:80