Belle II Software  release-05-02-19
ARICHReconstruction.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Luka Santelj, Rok Pestotnik *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef ARICHRECONSTRUCTION_H
12 #define ARICHRECONSTRUCTION_H
13 
14 #include <arich/dbobjects/ARICHGeometryConfig.h>
15 #include <arich/dbobjects/ARICHReconstructionPar.h>
16 #include <arich/dbobjects/ARICHChannelMask.h>
17 #include <arich/dbobjects/ARICHChannelMapping.h>
18 #include <arich/dbobjects/ARICHGlobalAlignment.h>
19 #include <arich/dbobjects/ARICHMirrorAlignment.h>
20 #include <arich/dbobjects/ARICHAeroTilesAlignment.h>
21 #include "framework/datastore/StoreArray.h"
22 #include "arich/dataobjects/ARICHHit.h"
23 #include "arich/dataobjects/ARICHTrack.h"
24 #include "arich/dataobjects/ARICHLikelihood.h"
25 #include <framework/database/DBObjPtr.h>
26 
27 
28 #include <TVector3.h>
29 
30 namespace Belle2 {
52  class ARICHReconstruction {
53 
54  public:
55 
57  explicit ARICHReconstruction(int storePhotons = 0);
58 
61 
63  void initialize();
64 
66  int smearTrack(ARICHTrack& arichTrack);
67 
69  void transformTrackToLocal(ARICHTrack& arichTrack, bool align);
70 
72  int likelihood2(ARICHTrack& arichTrack, const StoreArray<ARICHHit>& arichHits, ARICHLikelihood& arichLikelihood);
73 
75  void setTrackPositionResolution(double pRes);
77  void setTrackAngleResolution(double aRes);
78 
80  void useMirrorAlignment(bool align)
81  {
82  m_alignMirrors = align;
83  };
84 
86  void correctEmissionPoint(int tileID, double r);
87 
88  private:
89 
91  static const int c_noOfAerogels = 5;
92  double p_mass[c_noOfHypotheses];
102  std::vector<TVector3> m_mirrorPoints;
103  std::vector<TVector3> m_mirrorNorms;
105  double m_trackPosRes;
106  double m_trackAngRes;
109  unsigned int m_nAerogelLayers;
112  double m_thickness[c_noOfAerogels];
116  int m_storePhot;
117  double m_tilePars[124][2] = {0};
118 
120  int InsideDetector(TVector3 a, int copyno);
122 
126  TVector3 HitVirtualPosition(const TVector3& hitpos, int mirrorID);
127 
129 
136  TVector3 FastTracking(TVector3 dirf, TVector3 r, double* refind, double* z, int n, int opt);
137 // TVector3 FastTracking(TVector3 dirf, TVector3 r, double* refind, double* z, int n);
138 
140 
147  TVector3 FastTrackingSimple(TVector3 dirf, TVector3 r, double* refind, double* z, int n);
148 
150 
161  int CherenkovPhoton(TVector3 r, TVector3 rh,
162  TVector3& rf, TVector3& dirf,
163  double* refind, double* z, int n, int mirrorID = 0);
164 
166  /*
167  \param pos photon position
168  \param dir photon direction
169  \param mirrorID ID of mirrro plate
170  */
171  bool HitsMirror(const TVector3& pos, const TVector3& dir, int mirrorID);
172 
174  TVector3 getTrackMeanEmissionPosition(const ARICHTrack& track, int iAero);
175 
177  TVector3 getTrackPositionAtZ(const ARICHTrack& track, double zout);
178 
180  TVector3 getMirrorPoint(int mirrorID);
181 
183  TVector3 getMirrorNorm(int mirrorID);
184 
185  };
186 
188 } // end of namespace Belle2
189 
190 #endif // ARICHRECONSTRUCTION_H
191 
Belle2::ARICHReconstruction::m_trackPosRes
double m_trackPosRes
track position resolution (from tracking)
Definition: ARICHReconstruction.h:113
Belle2::ARICHReconstruction::m_tileAlign
OptionalDBObjPtr< ARICHAeroTilesAlignment > m_tileAlign
alignment of aerogel tiles from DB
Definition: ARICHReconstruction.h:108
Belle2::ARICHReconstruction::InsideDetector
int InsideDetector(TVector3 a, int copyno)
Returns 1 if vector "a" lies on "copyno"-th detector active surface of detector and 0 else.
Definition: ARICHReconstruction.cc:111
Belle2::ARICHReconstruction::FastTracking
TVector3 FastTracking(TVector3 dirf, TVector3 r, double *refind, double *z, int n, int opt)
Calculates the intersection of the Cherenkov photon emitted from point "r" in "dirf" direction with t...
Definition: ARICHReconstruction.cc:152
Belle2::Const::ChargedStable::c_SetSize
static const unsigned int c_SetSize
Number of elements (for use in array bounds etc.)
Definition: Const.h:491
Belle2::ARICHReconstruction::m_transmissionLen
double m_transmissionLen[c_noOfAerogels]
transmission lengths of aerogel layers
Definition: ARICHReconstruction.h:121
Belle2::ARICHLikelihood
This is a class to store ARICH likelihoods in the datastore.
Definition: ARICHLikelihood.h:38
Belle2::ARICHReconstruction::m_alignMirrors
bool m_alignMirrors
if set to true mirror alignment constants from DB are used
Definition: ARICHReconstruction.h:115
Belle2::ARICHReconstruction::m_recPars
DBObjPtr< ARICHReconstructionPar > m_recPars
reconstruction parameters from the DB
Definition: ARICHReconstruction.h:103
Belle2::ARICHReconstruction::m_mirrorNorms
std::vector< TVector3 > m_mirrorNorms
vector of nomal vectors of all mirror plates
Definition: ARICHReconstruction.h:111
Belle2::ARICHReconstruction::p_mass
double p_mass[c_noOfHypotheses]
particle masses
Definition: ARICHReconstruction.h:100
Belle2::ARICHReconstruction::m_anorm
TVector3 m_anorm[c_noOfAerogels]
normal vector of the aerogle plane
Definition: ARICHReconstruction.h:123
Belle2::ARICHReconstruction::HitVirtualPosition
TVector3 HitVirtualPosition(const TVector3 &hitpos, int mirrorID)
Returns the hit virtual position, assuming that it was reflected from mirror.
Definition: ARICHReconstruction.cc:226
Belle2::ARICHReconstruction::m_mirrAlign
DBObjPtr< ARICHMirrorAlignment > m_mirrAlign
global alignment parameters from the DB
Definition: ARICHReconstruction.h:107
Belle2::ARICHReconstruction::ARICHReconstruction
ARICHReconstruction(int storePhotons=0)
Constructor.
Definition: ARICHReconstruction.cc:40
Belle2::ARICHReconstruction::m_n0
double m_n0[c_noOfAerogels]
number of emmited photons per unit length
Definition: ARICHReconstruction.h:122
Belle2::ARICHReconstruction::m_storePhot
int m_storePhot
set to 1 to store individual reconstructed photon information
Definition: ARICHReconstruction.h:124
Belle2::ARICHReconstruction::m_thickness
double m_thickness[c_noOfAerogels]
thicknesses of areogel layers
Definition: ARICHReconstruction.h:120
Belle2::ARICHReconstruction::m_alignp
DBObjPtr< ARICHGlobalAlignment > m_alignp
global alignment parameters from the DB
Definition: ARICHReconstruction.h:106
Belle2::ARICHReconstruction::smearTrack
int smearTrack(ARICHTrack &arichTrack)
Smeares track parameters ("simulate" the uncertainties of tracking).
Definition: ARICHReconstruction.cc:134
Belle2::DBObjPtr
Class for accessing objects in the database.
Definition: DBObjPtr.h:31
Belle2::OptionalDBObjPtr
Optional DBObjPtr: This class behaves the same as the DBObjPtr except that it will not raise errors w...
Definition: DBObjPtr.h:55
Belle2::ARICHReconstruction::initialize
void initialize()
read geomerty parameters from xml and initialize class memebers
Definition: ARICHReconstruction.cc:61
Belle2::ARICHReconstruction::getTrackPositionAtZ
TVector3 getTrackPositionAtZ(const ARICHTrack &track, double zout)
Returns track direction at point with z coordinate "zout" (assumes straight track).
Definition: ARICHReconstruction.cc:707
Belle2::ARICHReconstruction::HitsMirror
bool HitsMirror(const TVector3 &pos, const TVector3 &dir, int mirrorID)
returns true if photon at position pos with direction dir hits mirror plate with ID mirrorID
Definition: ARICHReconstruction.cc:236
Belle2::ARICHReconstruction::m_chnMask
DBObjPtr< ARICHChannelMask > m_chnMask
map of masked channels from the DB
Definition: ARICHReconstruction.h:104
Belle2::ARICHReconstruction::setTrackPositionResolution
void setTrackPositionResolution(double pRes)
Sets track position resolution (from tracking)
Definition: ARICHReconstruction.cc:684
Belle2::ARICHReconstruction::getMirrorPoint
TVector3 getMirrorPoint(int mirrorID)
Returns point on the mirror plate with id mirrorID.
Definition: ARICHReconstruction.cc:736
Belle2::ARICHReconstruction::transformTrackToLocal
void transformTrackToLocal(ARICHTrack &arichTrack, bool align)
Transforms track parameters from global Belle2 to ARICH local frame.
Definition: ARICHReconstruction.cc:716
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ARICHTrack
Datastore class that holds position and momentum information of tracks that hit ARICH.
Definition: ARICHTrack.h:42
Belle2::ARICHReconstruction::~ARICHReconstruction
~ARICHReconstruction()
Destructor.
Definition: ARICHReconstruction.h:68
Belle2::ARICHReconstruction::m_mirrorPoints
std::vector< TVector3 > m_mirrorPoints
vector of points on all mirror plates
Definition: ARICHReconstruction.h:110
Belle2::ARICHReconstruction::getTrackMeanEmissionPosition
TVector3 getTrackMeanEmissionPosition(const ARICHTrack &track, int iAero)
Returns mean emission position of Cherenkov photons from i-th aerogel layer.
Definition: ARICHReconstruction.cc:693
Belle2::ARICHReconstruction::m_zaero
double m_zaero[c_noOfAerogels]
z-positions of aerogel layers
Definition: ARICHReconstruction.h:119
Belle2::ARICHReconstruction::CherenkovPhoton
int CherenkovPhoton(TVector3 r, TVector3 rh, TVector3 &rf, TVector3 &dirf, double *refind, double *z, int n, int mirrorID=0)
Calculates the direction of photon emission.
Definition: ARICHReconstruction.cc:253
Belle2::ARICHReconstruction::likelihood2
int likelihood2(ARICHTrack &arichTrack, const StoreArray< ARICHHit > &arichHits, ARICHLikelihood &arichLikelihood)
Computes the value of identity likelihood function for different particle hypotheses.
Definition: ARICHReconstruction.cc:349
Belle2::ARICHReconstruction::correctEmissionPoint
void correctEmissionPoint(int tileID, double r)
correct mean emission point z position
Definition: ARICHReconstruction.cc:758
Belle2::ARICHReconstruction::setTrackAngleResolution
void setTrackAngleResolution(double aRes)
Sets track direction resolution (from tracking)
Definition: ARICHReconstruction.cc:688
Belle2::ARICHReconstruction::useMirrorAlignment
void useMirrorAlignment(bool align)
use mirror alignment or not
Definition: ARICHReconstruction.h:88
Belle2::ARICHReconstruction::m_refractiveInd
double m_refractiveInd[c_noOfAerogels]
refractive indices of aerogel layers
Definition: ARICHReconstruction.h:118
Belle2::ARICHReconstruction::FastTrackingSimple
TVector3 FastTrackingSimple(TVector3 dirf, TVector3 r, double *refind, double *z, int n)
Calculates the intersection of the Cherenkov photon emitted from point "r" in "dirf" direction with t...
Belle2::ARICHReconstruction::c_noOfHypotheses
static const int c_noOfHypotheses
Number of hypotheses to loop over.
Definition: ARICHReconstruction.h:98
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::ARICHReconstruction::m_nAerogelLayers
unsigned int m_nAerogelLayers
number of aerogel layers
Definition: ARICHReconstruction.h:117
Belle2::ARICHReconstruction::getMirrorNorm
TVector3 getMirrorNorm(int mirrorID)
Returns normal vector of the mirror plate with id mirrorID.
Definition: ARICHReconstruction.cc:745
Belle2::ARICHReconstruction::m_trackAngRes
double m_trackAngRes
track direction resolution (from tracking)
Definition: ARICHReconstruction.h:114
Belle2::ARICHReconstruction::m_arichgp
DBObjPtr< ARICHGeometryConfig > m_arichgp
geometry configuration parameters from the DB
Definition: ARICHReconstruction.h:102
Belle2::ARICHReconstruction::c_noOfAerogels
static const int c_noOfAerogels
Maximal number of aerogel layers to loop over.
Definition: ARICHReconstruction.h:99
Belle2::ARICHReconstruction::m_chnMap
DBObjPtr< ARICHChannelMapping > m_chnMap
map x,y channels to asic channels from the DB
Definition: ARICHReconstruction.h:105