PandaRoot
PndFsmCmpDet.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 // Description:
15 // Class PndFsmCmpDet
16 //
17 // Detector class that combines responses from oher detectors
18 //
19 // This software was developed for the PANDA collaboration. If you
20 // use all or part of it, please give an appropriate acknowledgement.
21 //
22 // Author List:
23 // Oscar Reinecke Original Author
24 //
25 // Copyright Information:
26 // Copyright (C) 2008 GSI
27 //
28 //------------------------------------------------------------------------
29 
30 #ifndef FsmCmpDet_hh
31 #define FsmCmpDet_hh
32 
33 //----------------------
34 // Base Class Headers --
35 //----------------------
36 
37 //-------------------------------
38 // Collaborating class Headers --
39 //-------------------------------
40 #include <iosfwd>
41 #include "ArgList.h"
42 #include "PndFsmAbsDet.h"
43 #include "PndFsmDetFactory.h"
44 #include <map>
45 
46 #include "TParameter.h"
47 
48 //--------------------------------------------
49 // Collaborating class forward declarations --
50 // -------------------------------------------
51 class PndFsmTrack;
52 class PndFsmResponse;
53 class PndFsmAbsDet;
54 class TString;
55 class TSpline3;
56 class TF1;
57 template <class p>
58 class TParameter;
59 
60 class PndFsmCmpDet : public PndFsmAbsDet {
61  public:
62  PndFsmCmpDet();
63  PndFsmCmpDet(ArgList &par);
64  virtual ~PndFsmCmpDet();
65 
66  virtual PndFsmResponse *respond(PndFsmTrack *t);
67 
68  // adds detector for pid contribution only
69  bool AddDetector(std::string name, std::string params = "");
70  // this can be used to subtract a known detector
71  // response from the parameterized track resolution
72  bool SubtractDetector(std::string name, std::string params = "");
73 
74  private:
75  bool setParameter(std::string &name, std::string &value);
76  bool setParameter(std::string &name, double value);
77  void readParameters();
78  void initParameters();
79 
80  typedef std::list<PndFsmAbsDet *> FsmAbsDetList;
81  FsmAbsDetList fDetList;
82  FsmAbsDetList fSubtractDetList;
83  PndFsmDetFactory fDetFact;
84 
85  TString _parFileName;
86  bool _parFile;
87  double _d0ResMulti;
88  double _z0ResMulti;
89  double _thtResMulti;
90  double _phiResMulti;
91  double _momResMulti;
92  // this can be used do degrade the
93  // usually sharp likelihoods created
94  // by a typical fsim detector setup
95  double _pidLhMulti;
96 
97  std::map<int, TSpline3 *> _d0;
98  std::map<int, TSpline3 *> _z0;
99  std::map<int, TSpline3 *> _tht;
100  std::map<int, TSpline3 *> _phi;
101  std::map<int, TSpline3 *> _mom;
102  std::map<int, TParameter<double> *> _mom0;
103  TParameter<double> *_tht0;
104  TParameter<double> *_tht1;
105  std::map<int, TF1 *> _d0Scale;
106  std::map<int, TF1 *> _z0Scale;
107  std::map<int, TF1 *> _thtScale;
108  std::map<int, TF1 *> _phiScale;
109  std::map<int, TF1 *> _momScale;
110 
111  double eval(TSpline3 *spline, double theta);
112 };
113 
114 #endif
std::list< std::string > ArgList
Definition: ArgList.h:19
bool SubtractDetector(std::string name, std::string params="")
virtual ~PndFsmCmpDet()
bool AddDetector(std::string name, std::string params="")
virtual PndFsmResponse * respond(PndFsmTrack *t)