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