Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
TwoTrackDeltaEtaCut.cxx
1/*
2 * TwoTrackDeltaEtaCut.cxx
3 *
4 * Created on: 28 lip 2015
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#include "TwoTrackDeltaEtaCut.h"
10
11#include "Track.h"
12#include "TwoTrack.h"
13namespace Hal {
14 TwoTrackDeltaEtaCut::TwoTrackDeltaEtaCut() : TwoTrackCut(1), fAntiValidate(kTRUE) { SetUnitName("#Delta#eta"); }
15
16 Bool_t TwoTrackDeltaEtaCut::Pass(TwoTrack* pair) {
17 Track* tr1 = pair->GetTrack1();
18 Track* tr2 = pair->GetTrack2();
19 Double_t deta = tr1->GetMomentum().Eta() - tr2->GetMomentum().Eta();
20 SetValue(deta);
21 if (fAntiValidate) return AntiValidate();
22 return Validate();
23 }
24
25 TwoTrackDeltaEtaCut::~TwoTrackDeltaEtaCut() {
26 // TODO Auto-generated destructor stub
27 }
28
29 Package* TwoTrackDeltaEtaCut::Report() const {
30 Package* pack = TwoTrackCut::Report();
31
32 return pack;
33 }
34
35 TwoTrackDeltaEtaCut::TwoTrackDeltaEtaCut(const TwoTrackDeltaEtaCut& other) : TwoTrackCut(other) {
36 fAntiValidate = other.fAntiValidate;
37 }
38} // namespace Hal
const TLorentzVector & GetMomentum() const
Definition Track.h:118
Track * GetTrack1() const
Definition TwoTrack.h:75
Track * GetTrack2() const
Definition TwoTrack.h:80