PandaRoot
PndFtsTrackerIdeal.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 // Original author: Ralf Kliemt ralf.kliemt(at)hiskp(dot)uni-bonn(dot)de
15 // Maintainer: martin (dot) j [dot] galuska <at> physik {dot} uni (minus) giessen <dot> de
16 //
17 // ideal tracker using MC id & track info
18 // Gaussian momentum smearing & fake efficiency included
19 //
20 // removed tracks that turn around in the dipole field (because of fitter problems)
21 // removed tracks that have less than 5 hits in the FTS (TODO a more realistic criterion is needed)
22 // user can specify that number via SetMinFtsHitsPerTrack()
23 // for FTS studies SetMinFtsHitsPerTrack(5) should be good,
24 // for studies of overall detector performance SetMinFtsHitsPerTrack(1) gets rid off an efficiency drop 5⁰ < theta < 9⁰ that is due to the current lack of tracking starting from
25 // GEM hits
26 //
27 // Created: 28.01.2011
28 // Last modification: 24.02.2014
29 //
30 // *************************************************************************
31 
32 #ifndef FTSTRACKERIDEALH
33 #define FTSTRACKERIDEALH
34 
35 //#include "TObject.h"
36 //#include "TObjArray.h"
37 //#include "TArrayI.h"
38 //#include "TBenchmark.h"
39 #include "TVector3.h"
40 #include "TDatabasePDG.h"
41 //#include "Riostream.h"
42 #include "FairTask.h"
43 #include "PndGeoFtsPar.h"
44 #include <cmath>
45 #include "Rtypes.h" // for Double_t, Int_t, etc
46 
47 class PndFtsTrackerIdeal : public FairTask {
48 
49  public:
51  virtual ~PndFtsTrackerIdeal();
52 
53  virtual void Exec(Option_t *option);
54  virtual InitStatus Init();
55  virtual void Finish();
56 
57  void Reset();
58  void Register();
59 
60  void SetParContainers();
61 
62  void SetTrackOutput(TString name = "FTSTrkIdeal") { fTracksArrayName = name; };
63 
64  void SetMomentumSmearing(Double_t sigmax = -1., Double_t sigmay = -1., Double_t sigmaz = -1.)
65  {
66  fMomSigma.SetXYZ(fabs(sigmax), fabs(sigmay), fabs(sigmaz));
67  fRelative = kFALSE;
68  }; // in GeV
69  void SetRelativeMomentumSmearing(Double_t dpop = -1.)
70  {
71  fDPoP = fabs(dpop);
72  fRelative = kTRUE;
73  }; // in GeV
74  void SetVertexSmearing(Double_t sigmax = -1., Double_t sigmay = -1., Double_t sigmaz = -1.) { fVtxSigma.SetXYZ(fabs(sigmax), fabs(sigmay), fabs(sigmaz)); }; // in cm
75  void SetTrackingEfficiency(Double_t eff = 1.) { fEfficiency = eff; };
76  Int_t SetMinFtsHitsPerTrack(Int_t minFtsHitsPerTrack = 5); // checks argument, sets fMinFtsHitsPerTrack (in any case) and gives new value back
77 
78  void DeactivateFtsStation(Int_t i) { fStationsDisabled[i] = true; };
79 
80  void SetFtsActivity(Bool_t act = kTRUE) { fBranchActive[0] = act; }
81  void SetGemActivity(Bool_t act = kTRUE) { fBranchActive[1] = act; }
82  void SetMvdActivity(Bool_t act = kTRUE)
83  {
84  fBranchActive[2] = act;
85  fBranchActive[3] = act;
86  }
87 
88  void SetPersistence(Bool_t persistence) { fPersistence = persistence; }
89 
90  protected:
91  void SmearFWD(TVector3 &vec, const TVector3 &sigma); // smearing with doubled sigma in z direction
92 
93  TClonesArray *fMCTracks;
94  TClonesArray *fMCPoints[4];
95  TClonesArray *fHits[4];
96  Int_t fBranchIDs[4];
97  Bool_t fBranchActive[4];
98  std::map<int, bool> fStationsDisabled;
99 
100  TClonesArray *fTrackCands;
101  TClonesArray *fTracks;
102  TClonesArray *fTrackIds;
103 
104  // Parameters for fake tracking
105  Int_t fMinFtsHitsPerTrack; // Only tracks that have at least this number of hits in the FTS can be found by the ideal tracker
106  // default is 1 for overall detector performance studies (see explanation in forum)
107  // 5 should be used for FTS standalone performance studies
108  TVector3 fMomSigma; // Momentum smearing sigma [GeV]
109  Double_t fDPoP; // Relative momentum Smearing
110  Bool_t fRelative; // falg
111  TVector3 fVtxSigma; // Vertex smearing sigma [cm]
112  Double_t fEfficiency; // Tracking efficiency - if (0 <= e < 1), some tracks will be discarded
113  Bool_t fPersistence; // Persistence of tracking TCAs
114 
115  TString fTracksArrayName; // Branch name where to store the Track candidates
116  TDatabasePDG *pdg;
117 
119  TClonesArray *fTubeArrayFts;
120 
122  PndFtsTrackerIdeal &operator=(const PndFtsTrackerIdeal &) { return *this; }
123 
125 };
126 #endif
void SetGemActivity(Bool_t act=kTRUE)
Int_t fMinFtsHitsPerTrack
Array of track IDs (Links)
void SetMvdActivity(Bool_t act=kTRUE)
void SetTrackOutput(TString name="FTSTrkIdeal")
void SetTrackingEfficiency(Double_t eff=1.)
PndFtsTrackerIdeal & operator=(const PndFtsTrackerIdeal &)
TClonesArray * fTrackIds
Array of found tracks.
std::map< int, bool > fStationsDisabled
Array of Branch Activeness.
Bool_t fBranchActive[4]
Array of Branch IDs.
void SetMomentumSmearing(Double_t sigmax=-1., Double_t sigmay=-1., Double_t sigmaz=-1.)
unsigned int i
Definition: P4_F32vec4.h:33
ClassDef(PndFtsTrackerIdeal, 1)
TClonesArray * fHits[4]
Array of event&#39;s points.
void SmearFWD(TVector3 &vec, const TVector3 &sigma)
TClonesArray * fMCTracks
void SetFtsActivity(Bool_t act=kTRUE)
TClonesArray * fTubeArrayFts
virtual void Exec(Option_t *option)
void SetVertexSmearing(Double_t sigmax=-1., Double_t sigmay=-1., Double_t sigmaz=-1.)
virtual ~PndFtsTrackerIdeal()
void SetPersistence(Bool_t persistence)
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:58
TClonesArray * fTrackCands
Array of disabled stations.
Int_t fBranchIDs[4]
Array of event&#39;s hits.
PndGeoFtsPar * fFtsParameters
Particle DB.
virtual void Finish()
Int_t SetMinFtsHitsPerTrack(Int_t minFtsHitsPerTrack=5)
TClonesArray * fTracks
Array of found track candidates.
TClonesArray * fMCPoints[4]
Array of PndMCTrack.
virtual InitStatus Init()
void DeactivateFtsStation(Int_t i)
void SetRelativeMomentumSmearing(Double_t dpop=-1.)