Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
TrackExpCut.cxx
1
/*
2
* TrackExpCut.cxx
3
*
4
* Created on: 5 mar 2018
5
* Author: Daniel Wielanek
6
* E-mail: daniel.wielanek@gmail.com
7
* Warsaw University of Technology, Faculty of Physics
8
*/
9
#include "TrackExpCut.h"
10
11
#include "DataFormat.h"
12
#include "DataFormatManager.h"
13
#include "ExpEvent.h"
14
#include "ExpTrack.h"
15
16
namespace
Hal
{
17
TrackExpCut::TrackExpCut(Int_t size) : TrackCut(size) {}
18
19
Bool_t TrackExpCut::Init(Int_t format_id) {
20
if
(TrackCut::Init(format_id) == kFALSE)
return
kFALSE;
21
const
Event
* ev = DataFormatManager::Instance()->GetFormat(format_id, EFormatDepth::kNonBuffered);
22
if
(
dynamic_cast<
const
Hal::ExpEvent
*
>
(ev)) {
return
kTRUE; }
23
return
kTRUE;
24
}
25
26
TrackExpCut::~TrackExpCut() {}
27
28
Bool_t TrackExpCut::TpcAvaiable(Int_t format_id)
const
{
29
const
Event
* ev = DataFormatManager::Instance()->GetFormat(format_id);
30
Bool_t res = kFALSE;
31
if
(ev->InheritsFrom(
"Hal::ExpEvent"
)) {
32
ExpTrack
* tr = (
ExpTrack
*) ev->
GetNewTrack
();
33
if
(tr->
GetDetTrack
(DetectorID::kTPC) != NULL) res = kTRUE;
34
delete
tr;
35
}
36
return
res;
37
}
38
39
Bool_t TrackExpCut::ToFAvaiable(Int_t format_id)
const
{
40
if
(FormatInhertis(
"Hal::ExpEvent"
, format_id) == kFALSE)
return
kFALSE;
41
const
Event
* ev = DataFormatManager::Instance()->GetFormat(format_id);
42
Bool_t res = kFALSE;
43
ExpTrack
* tr = (
ExpTrack
*) ev->
GetNewTrack
();
44
if
(tr->
GetDetTrack
(DetectorID::kTOF) != NULL) res = kTRUE;
45
delete
tr;
46
return
res;
47
}
48
}
// namespace Hal
Hal::Event
Definition
Event.h:50
Hal::Event::GetNewTrack
Track * GetNewTrack() const
Definition
Event.cxx:204
Hal::ExpEvent
Definition
ExpEvent.h:21
Hal::ExpTrack
Definition
ExpTrack.h:25
Hal::ExpTrack::GetDetTrack
virtual DetectorTrack * GetDetTrack(const UInt_t) const
Definition
ExpTrack.h:93
Hal
Definition
EventAnaChain.cxx:28
cuts
trackcuts
detector
TrackExpCut.cxx
Generated on Wed Oct 23 2024 15:07:51 for Heavy ion Analysis Libriares by
1.12.0