Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
TrackRandomCut.cxx
1/*
2 * TrackRandomCut.cxx
3 *
4 * Created on: 26 kwi 2018
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#include "TrackRandomCut.h"
10
11#include "Track.h"
12
13#include <TRandom.h>
14
15namespace Hal {
16 TrackRandomCut::TrackRandomCut() : TrackCut(1) { SetUnitName("Rndm [Rand]", 0); }
17
18 TrackRandomCut::~TrackRandomCut() {}
19
20 Bool_t TrackRandomCut::Pass(Track* track) {
21 Double_t z = gRandom->Rndm();
22 SetValue(z);
23 if (z < GetMax()) return kTRUE;
24 return kFALSE;
25 }
26} // namespace Hal