Belle II Software development
ARICHReconstruction.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <arich/dbobjects/ARICHGeometryConfig.h>
11#include <arich/dbobjects/ARICHReconstructionPar.h>
12#include <arich/dbobjects/ARICHChannelMask.h>
13#include <arich/dbobjects/ARICHChannelMapping.h>
14#include <arich/dbobjects/ARICHGlobalAlignment.h>
15#include <arich/dbobjects/ARICHMirrorAlignment.h>
16#include <arich/dbobjects/ARICHAeroTilesAlignment.h>
17#include "framework/datastore/StoreArray.h"
18#include "arich/dataobjects/ARICHHit.h"
19#include "arich/dataobjects/ARICHTrack.h"
20#include "arich/dataobjects/ARICHLikelihood.h"
21#include <framework/database/DBObjPtr.h>
22
23#include <Math/Vector3D.h>
24
25namespace Belle2 {
48
49 public:
50
54 explicit ARICHReconstruction(int storePhotons = 0);
55
60
64 void initialize();
65
69 int smearTrack(ARICHTrack& arichTrack);
70
74 void transformTrackToLocal(ARICHTrack& arichTrack, bool align);
75
80 int likelihood2(ARICHTrack& arichTrack, const StoreArray<ARICHHit>& arichHits, ARICHLikelihood& arichLikelihood);
81
85 void setTrackPositionResolution(double pRes);
86
90 void setTrackAngleResolution(double aRes);
91
95 void useMirrorAlignment(bool align)
96 {
97 m_alignMirrors = align;
98 };
99
103 void correctEmissionPoint(int tileID, double r);
104
105 private:
106
108 static const int c_noOfAerogels = 5;
119 std::vector<ROOT::Math::XYZVector > m_mirrorPoints;
120 std::vector<ROOT::Math::XYZVector > m_mirrorNorms;
126 unsigned int m_nAerogelLayers;
132 ROOT::Math::XYZVector m_anorm[c_noOfAerogels];
134 double m_tilePars[124][2] = {{0}};
140 int InsideDetector(ROOT::Math::XYZVector a, int copyno);
141
148 ROOT::Math::XYZVector HitVirtualPosition(const ROOT::Math::XYZVector& hitpos, int mirrorID);
149
160 ROOT::Math::XYZVector FastTracking(ROOT::Math::XYZVector dirf, ROOT::Math::XYZVector r, double* refind, double* z, int n,
161 int opt);
162// ROOT::Math::XYZVector FastTracking(ROOT::Math::XYZVector dirf, ROOT::Math::XYZVector r, double* refind, double* z, int n);
163
174 ROOT::Math::XYZVector FastTrackingSimple(ROOT::Math::XYZVector dirf, ROOT::Math::XYZVector r, double* refind, double* z, int n);
175
208 int CherenkovPhoton(ROOT::Math::XYZVector r, ROOT::Math::XYZVector rh,
209 ROOT::Math::XYZVector& rf, ROOT::Math::XYZVector& dirf,
210 double* refind, double* z, int n, int mirrorID = 0);
211
219 bool HitsMirror(const ROOT::Math::XYZVector& pos, const ROOT::Math::XYZVector& dir, int mirrorID);
220
225 ROOT::Math::XYZVector getTrackMeanEmissionPosition(const ARICHTrack& track, int iAero);
226
231 ROOT::Math::XYZVector getTrackPositionAtZ(const ARICHTrack& track, double zout);
232
236 ROOT::Math::XYZVector getMirrorPoint(int mirrorID);
237
241 ROOT::Math::XYZVector getMirrorNorm(int mirrorID);
242
243 };
244
246} // end of namespace Belle2
This is a class to store ARICH likelihoods in the datastore.
Internal ARICH track reconstruction.
DBObjPtr< ARICHReconstructionPar > m_recPars
reconstruction parameters from the DB
std::vector< ROOT::Math::XYZVector > m_mirrorPoints
vector of points on all mirror plates
double m_zaero[c_noOfAerogels]
z-positions of aerogel layers
double p_mass[c_noOfHypotheses]
particle masses
double m_n0[c_noOfAerogels]
number of emitted photons per unit length
DBObjPtr< ARICHMirrorAlignment > m_mirrAlign
global alignment parameters from the DB
double m_transmissionLen[c_noOfAerogels]
transmission lengths of aerogel layers
bool m_alignMirrors
if set to true mirror alignment constants from DB are used
DBObjPtr< ARICHGeometryConfig > m_arichgp
geometry configuration parameters from the DB
std::vector< ROOT::Math::XYZVector > m_mirrorNorms
vector of normal vectors of all mirror plates
OptionalDBObjPtr< ARICHAeroTilesAlignment > m_tileAlign
alignment of aerogel tiles from DB
double m_trackAngRes
track direction resolution (from tracking)
ROOT::Math::XYZVector m_anorm[c_noOfAerogels]
normal vector of the aerogel plane
void useMirrorAlignment(bool align)
Use mirror alignment or not.
double m_refractiveInd[c_noOfAerogels]
refractive indices of aerogel layers
DBObjPtr< ARICHGlobalAlignment > m_alignp
global alignment parameters from the DB
unsigned int m_nAerogelLayers
number of aerogel layers
static const int c_noOfAerogels
Maximal number of aerogel layers to loop over.
double m_trackPosRes
track position resolution (from tracking)
static const int c_noOfHypotheses
Number of hypotheses to loop over.
DBObjPtr< ARICHChannelMapping > m_chnMap
map x,y channels to asic channels from the DB
int m_storePhot
set to 1 to store individual reconstructed photon information
double m_tilePars[124][2]
array of tile parameters
ROOT::Math::XYZVector FastTrackingSimple(ROOT::Math::XYZVector dirf, ROOT::Math::XYZVector r, double *refind, double *z, int n)
Calculates the intersection of the Cherenkov photon emitted from point "r" in "dirf" direction with t...
DBObjPtr< ARICHChannelMask > m_chnMask
map of masked channels from the DB
double m_thickness[c_noOfAerogels]
thicknesses of aerogel layers
Datastore class that holds position and momentum information of tracks that hit ARICH.
Definition: ARICHTrack.h:35
static const unsigned int c_SetSize
Number of elements (for use in array bounds etc.)
Definition: Const.h:615
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Optional DBObjPtr: This class behaves the same as the DBObjPtr except that it will not raise errors w...
Definition: DBObjPtr.h:48
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
void setTrackPositionResolution(double pRes)
Sets track position resolution (from tracking).
ROOT::Math::XYZVector FastTracking(ROOT::Math::XYZVector dirf, ROOT::Math::XYZVector 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...
int CherenkovPhoton(ROOT::Math::XYZVector r, ROOT::Math::XYZVector rh, ROOT::Math::XYZVector &rf, ROOT::Math::XYZVector &dirf, double *refind, double *z, int n, int mirrorID=0)
Calculates the direction of photon emission.
int likelihood2(ARICHTrack &arichTrack, const StoreArray< ARICHHit > &arichHits, ARICHLikelihood &arichLikelihood)
Computes the value of identity likelihood function for different particle hypotheses.
void initialize()
Read geometry parameters from xml and initialize class members.
ROOT::Math::XYZVector HitVirtualPosition(const ROOT::Math::XYZVector &hitpos, int mirrorID)
Returns the hit virtual position, assuming that it was reflected from mirror.
void correctEmissionPoint(int tileID, double r)
Correct mean emission point z position.
ROOT::Math::XYZVector getMirrorNorm(int mirrorID)
Returns normal vector of the mirror plate with id mirrorID.
void setTrackAngleResolution(double aRes)
Sets track direction resolution (from tracking).
int InsideDetector(ROOT::Math::XYZVector a, int copyno)
Returns 1 if vector "a" lies on "copyno"-th detector active surface of detector and 0 else.
void transformTrackToLocal(ARICHTrack &arichTrack, bool align)
Transforms track parameters from global Belle2 to ARICH local frame.
bool HitsMirror(const ROOT::Math::XYZVector &pos, const ROOT::Math::XYZVector &dir, int mirrorID)
Returns true if photon at position pos with direction dir hits mirror plate with ID mirrorID.
ROOT::Math::XYZVector getTrackMeanEmissionPosition(const ARICHTrack &track, int iAero)
Returns mean emission position of Cherenkov photons from i-th aerogel layer.
ROOT::Math::XYZVector getMirrorPoint(int mirrorID)
Returns point on the mirror plate with id mirrorID.
ROOT::Math::XYZVector getTrackPositionAtZ(const ARICHTrack &track, double zout)
Returns track direction at point with z coordinate "zout" (assumes straight track).
int smearTrack(ARICHTrack &arichTrack)
Smears track parameters ("simulate" the uncertainties of tracking).
Abstract base class for different kinds of events.