Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
TrackOnlyPrimariesCut.cxx
1/*
2 * TrackOnlyPrimariesCut.cxx
3 *
4 * Created on: 07-08-2014
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#include "TrackOnlyPrimariesCut.h"
10
11#include "McTrack.h"
12
13namespace Hal {
14 TrackOnlyPrimariesCut::TrackOnlyPrimariesCut() : TrackCut(1) {
15 SetUnitName("IsPrimary");
16 SetMinAndMax(1);
17 }
18
19 Bool_t TrackOnlyPrimariesCut::Pass(Track* track) {
20 if (track->IsPrimary()) {
21 SetValue(1);
22 return Validate();
23 } else {
24 SetValue(0);
25 return Validate();
26 }
27 }
28
29 TrackOnlyPrimariesCut::~TrackOnlyPrimariesCut() {}
30} // namespace Hal
Bool_t IsPrimary() const
Definition Track.h:209