BmnRoot
Loading...
Searching...
No Matches
CbmStsAcceptance.h
Go to the documentation of this file.
1
6#ifndef CBMSTSACCEPTANCE_H
7#define CBMSTSACCEPTANCE_H 1
8
9#include <map>
10#include <string>
11#include "TStopwatch.h"
12#include "FairTask.h"
13
14class TClonesArray;
15
38class CbmStsAcceptance : public FairTask {
39
40
41 public:
42
45
46
48 virtual ~CbmStsAcceptance();
49
50
55 virtual void Exec(Option_t* opt);
56
57
59 virtual void Finish();
60
61
66 static Int_t GetNofPoints(Int_t trackId);
67
68
74 static Int_t GetNofPoints(Int_t trackId, Int_t stationNr);
75
76
81 static Int_t GetNofStations(Int_t trackId);
82
83
85 virtual InitStatus Init();
86
87
93 static Bool_t IsAccepted(Int_t trackId, Int_t nMinStations = 3) {
94 return ( GetNofStations(trackId) >= nMinStations );
95 }
96
97
103 static Bool_t IsInStation(Int_t trackId, Int_t stationNr) {
104 return ( GetNofPoints(trackId, stationNr) > 0 );
105 }
106
107
109 std::string ToString() const;
110
111
112
113 private:
114
115 TClonesArray* fPoints;
116 TClonesArray* fTracks;
117 TStopwatch fTimer;
118 static std::map<Int_t, std::map<Int_t, Int_t>> fCountMap;
119 static Int_t fNofInstances;
120
121 // --- Run counters
122 Int_t fNofEvents;
123 Double_t fNofPointsTot;
124 Double_t fTimeTot;
125
127 void Clear(Option_t* ="");
128
134 Bool_t Test();
135
136
137 CbmStsAcceptance(const CbmStsAcceptance&) = delete;
138 CbmStsAcceptance& operator=(const CbmStsAcceptance&) = delete;
139
140 ClassDef(CbmStsAcceptance,1);
141};
142
143#endif /* CBMSTSACCEPTANCE_H */
Singleton task class for easy access to the acceptance in the STS.
static Int_t GetNofPoints(Int_t trackId)
static Bool_t IsAccepted(Int_t trackId, Int_t nMinStations=3)
static Bool_t IsInStation(Int_t trackId, Int_t stationNr)
static Int_t GetNofStations(Int_t trackId)
virtual void Finish()
virtual void Exec(Option_t *opt)
virtual InitStatus Init()
std::string ToString() const