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