Project
Loading...
Searching...
No Matches
AlignableSensorHMPID.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
16
18#include "Align/utils.h"
19#include "Framework/Logger.h"
20//#include "AliTrackPointArray.h"
21//#include "AliESDtrack.h"
24
26
27using namespace o2::align::utils;
28using namespace TMath;
29
30namespace o2
31{
32namespace align
33{
34
35//_________________________________________________________
36AlignableSensorHMPID::AlignableSensorHMPID(const char* name, int vid, int iid, int isec)
37 : AlignableSensor(name, vid, iid)
38{
39 // def c-tor
40}
41
42//_________________________________________________________
47
48//____________________________________________
50{
51 // creat T2L matrix
52 double loc[3] = {0, 0, 0}, glo[3];
53 getMatrixL2GIdeal().LocalToMaster(loc, glo);
54 double alp = ATan2(glo[1], glo[0]);
55 double x = Sqrt(glo[0] * glo[0] + glo[1] * glo[1]);
56 TGeoHMatrix t2l;
57 t2l.SetDx(x);
58 t2l.RotateZ(alp * RadToDeg());
59 const TGeoHMatrix& l2gi = getMatrixL2GIdeal().Inverse();
60 t2l.MultiplyLeft(&l2gi);
61 /*
62 const TGeoHMatrix* t2l = AliGeomManager::GetTracking2LocalMatrix(getVolID());
63 if (!t2l) {
64 Print("long");
65 AliFatalF("Failed to find T2L matrix for VID:%d %s",getVolID(),getSymName());
66 }
67 */
68 setMatrixT2L(t2l);
69 //
70}
71
72} // namespace align
73} // namespace o2
Base class for detector: wrapper for set of volumes.
ClassImp(o2::align::AlignableSensorHMPID)
HMPID sensor (chamber)
Meausered point in the sensor.
Collection of auxillary methods.
AlignableSensorHMPID(const char *name=0, int vid=0, int iid=0, int isec=0)
const TGeoHMatrix & getMatrixL2GIdeal() const
void setMatrixT2L(const TGeoHMatrix &m)
GLint GLenum GLint x
Definition glcorearb.h:403
GLuint const GLchar * name
Definition glcorearb.h:781
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...