PandaRoot
PndSttMatchTracks.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 // -------------------------------------------------------------------------
14 // ----- CbmStsMatchTracks header file -----
15 // ----- Created 22/11/05 by V. Friese -----
16 // -------------------------------------------------------------------------
17 
27 #ifndef PNDSTTMATCHTRACKS_H
28 #define PNDSTTMATCHTRACKS_H 1
29 
30 #include <PndPersistencyTask.h>
31 #include <vector>
32 #include <map>
33 #include "PndSttHit.h"
34 #include "FairMCPoint.h"
35 
36 class TClonesArray;
37 
39 
40  public:
43 
45  PndSttMatchTracks(Int_t verbose);
46 
53  PndSttMatchTracks(const char *name, const char *title = "Pnd Stt Match Tracks Task", Int_t verbose = 1);
54 
56  virtual ~PndSttMatchTracks();
57 
59  virtual InitStatus Init();
60 
62  virtual void Exec(Option_t *opt);
63 
65  virtual void Finish();
66 
68  void AddHitCollectionName(char *hitCollectionName, char *pointCollectionName);
69  PndSttHit *GetHitFromCollections(Int_t hitCounter);
70  FairMCPoint *GetPointFromCollections(Int_t hitCounter);
71 
73  void SetPersistence(Bool_t persistence) { SetPersistency(persistence); }
74 
75  private:
76  void AddAllCollections();
77  void AddHitCollection(char const *collectionName, char const *pointCollectionName);
78 
79  TClonesArray *fTrackCandidates; // Array of PndTrackCand
80  TClonesArray *fMatches; // Array of PndSttTrackMatch
81 
83  std::map<Int_t, Int_t> fMatchMap;
84 
86  Int_t fVerbose;
87 
88  Bool_t fCollectionsComplete;
89 
90  std::vector<std::string> fHitCollectionNames;
91  std::vector<std::string> fPointCollectionNames;
92  TList fHitCollectionList;
93  TList fPointCollectionList;
94 
96  PndSttMatchTracks &operator=(const PndSttMatchTracks &) { return *this; };
97 
98  ClassDef(PndSttMatchTracks, 1);
99 };
100 
101 #endif
void SetPersistency(Bool_t val=kTRUE)
void AddHitCollectionName(char *hitCollectionName, char *pointCollectionName)
virtual ~PndSttMatchTracks()
virtual void Finish()
virtual InitStatus Init()
void SetPersistence(Bool_t persistence)
FairMCPoint * GetPointFromCollections(Int_t hitCounter)
PndSttHit * GetHitFromCollections(Int_t hitCounter)
virtual void Exec(Option_t *opt)