Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DDIRCLut.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DDIRCLut.h
4 //
5 
6 #ifndef _DDIRCLut_
7 #define _DDIRCLut_
8 
9 #include <JANA/JFactory.h>
10 #include <JANA/JObject.h>
11 using namespace jana;
12 
13 #include <DANA/DApplication.h>
14 #include <PID/DDetectorMatches.h>
15 #include <DIRC/DDIRCGeometry.h>
16 #include <DIRC/DDIRCLutReader.h>
17 #include <DIRC/DDIRCTruthBarHit.h>
18 #include <DIRC/DDIRCPmtHit.h>
19 
20 #include "TROOT.h"
21 #include "TVector3.h"
22 #include "TFile.h"
23 #include "TTree.h"
24 #include "TH1.h"
25 #include "TH2.h"
26 #include "TF1.h"
27 
28 class DDIRCLut: public JObject {
29 
30 public:
31 
32  JOBJECT_PUBLIC(DDIRCLut);
33 
34  DDIRCLut();
35  ~DDIRCLut(){};
36 
37  bool brun(JEventLoop *loop);
38  bool CreateDebugHistograms();
39  bool CalcLUT(TVector3 locProjPos, TVector3 locProjMom, const vector<const DDIRCPmtHit*> locDIRCHits, double locFlightTime, Particle_t locPID, shared_ptr<DDIRCMatchParams>& locDIRCMatchParams, const vector<const DDIRCTruthBarHit*> locDIRCBarHits, map<shared_ptr<const DDIRCMatchParams>, vector<const DDIRCPmtHit*> >& locDIRCTrackMatchParams) const;
40  vector<pair<double,double>> CalcPhoton(const DDIRCPmtHit *locDIRCHit, double locFlightTime, TVector3 posInBar, TVector3 momInBar, map<Particle_t, double> locExpectedAngle, double locAngle, Particle_t locPID, map<Particle_t, double> &logLikelihoodSum, int &nPhotonsThetaC, double &meanThetaC, double &meanDeltaT, bool &isGood) const;
41  vector<pair<double,double>> CalcPhoton(const DDIRCPmtHit *locDIRCHit, double locFlightTime, TVector3 posInBar, TVector3 momInBar, map<Particle_t, double> locExpectedAngle, double locAngle, Particle_t locPID, map<Particle_t, double> &logLikelihoodSum) const;
42  double CalcLikelihood(double locExpectedThetaC, double locThetaC) const;
43  double CalcAngle(TVector3 momInBar, double locMass) const;
44  map<Particle_t, double> CalcExpectedAngles(TVector3 momInBar) const;
45 
46 private:
50 
54 
58  double DIRC_LIGHT_V;
59 
61  double dCriticalAngle, dIndex;
62 
63  TH1I *hDiff, *hDiffT, *hDiffD, *hDiffR, *hTime, *hCalc, *hNph, *hNphC;
64  TH2I *hDiff_Pixel[2];
65  deque<Particle_t> dFinalStatePIDs;
66  map<Particle_t, TH1I*> hDeltaThetaC;
67  map<Particle_t, TH2I*> hDeltaThetaC_Pixel;
68 };
69 
70 #endif // _DDIRCLut_
71 
~DDIRCLut()
Definition: DDIRCLut.h:35
bool DIRC_TRUTH_BARHIT
Definition: DDIRCLut.h:52
double dIndex
Definition: DDIRCLut.h:61
deque< Particle_t > dFinalStatePIDs
Definition: DDIRCLut.h:65
double DIRC_LIGHT_V
Definition: DDIRCLut.h:58
DDIRCLutReader * dDIRCLutReader
Definition: DDIRCLut.h:48
double DIRC_CUT_TDIFFD
Definition: DDIRCLut.h:55
double DIRC_CUT_TDIFFR
Definition: DDIRCLut.h:56
bool DIRC_TRUTH_PIXELTIME
Definition: DDIRCLut.h:53
const DDIRCGeometry * dDIRCGeometry
Definition: DDIRCLut.h:49
map< Particle_t, TH2I * > hDeltaThetaC_Pixel
Definition: DDIRCLut.h:67
map< Particle_t, TH1I * > hDeltaThetaC
Definition: DDIRCLut.h:66
DApplication * dapp
Definition: DDIRCLut.h:47
bool DIRC_DEBUG_HISTS
Definition: DDIRCLut.h:51
int dMaxChannels
Definition: DDIRCLut.h:60
double DIRC_SIGMA_THETAC
Definition: DDIRCLut.h:57
TH1I * hTime
Definition: DDIRCLut.h:63
Particle_t
Definition: particleType.h:12