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