PandaRoot
PndMatchBarrelForward.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef MATCH_BARREL_FORWARD_H
14 #define MATCH_BARREL_FORWARD_H
15 
16 #include "FairRootManager.h"
17 #include "FairLogger.h"
18 
19 #include "TString.h"
20 #include "TClonesArray.h"
21 
22 #include "PndPersistencyTask.h"
23 #include "PndTrack.h"
24 
26 public:
27  virtual void Exec(Option_t *option);
28  virtual InitStatus Init();
29 
32 
38  void SetBarrelTrackBranch(TString branch) { fTrackBranchBarrel = branch; };
44  void SetForwardTrackBranch(TString branch) { fTrackBranchForward = branch; };
45 
53  Bool_t DoTracksMatch(PndTrack *BarrelTrack, PndTrack *ForwardTrack);
54 
61  void CombineTracks(PndTrack *BarrelTrack, PndTrack *ForwardTrack);
62 
69  void AddTrack(PndTrack *Track, PndTrack::TrackType type);
70 
76  Bool_t FetchTracks();
77 
82  void MatchTracks();
83 
84 private:
85  Int_t fTrackCounter = 0;
86  Int_t fEvent = 0;
87 
88  TString fTrackBranchBarrel = "";
89  TString fTrackBranchForward = "";
90 
91  TClonesArray *fTracksCombined = nullptr;
92  TClonesArray *fTracksBarrel = nullptr;
93  TClonesArray *fTracksForward = nullptr;
94 
95  FairRootManager *fManager = FairRootManager::Instance();
96 
97  ClassDef(PndMatchBarrelForward, 1);
98 };
99 
100 #endif
virtual void Exec(Option_t *option)
void AddTrack(PndTrack *Track, PndTrack::TrackType type)
Add track to new container.
virtual InitStatus Init()
void MatchTracks()
Match barrel/forward tracks and fill them into a new combined container.
Bool_t DoTracksMatch(PndTrack *BarrelTrack, PndTrack *ForwardTrack)
Check if tracks should be combined.
void SetForwardTrackBranch(TString branch)
Set the Forward Track Branch.
Bool_t FetchTracks()
Fetch track containers.
void SetBarrelTrackBranch(TString branch)
Set the Barrel Track Branch.
void CombineTracks(PndTrack *BarrelTrack, PndTrack *ForwardTrack)
Create combined track.