FairRoot/PandaRoot
PndCAParameters.h
Go to the documentation of this file.
1 /**************************************************************************
2  * This file is property of and copyright by the ALICE HLT Project *
3  * All rights reserved. *
4  * *
5  * Primary Authors: *
6  * Copyright 2009 Matthias Kretz <kretz@kde.org> *
7  * *
8  * Permission to use, copy, modify and distribute this software and its *
9  * documentation strictly for non-commercial purposes is hereby granted *
10  * without fee, provided that the above copyright notice appears in all *
11  * copies and that both the copyright notice and this permission notice *
12  * appear in the supporting documentation. The authors make no claims *
13  * about the suitability of this software for any purpose. It is *
14  * provided "as is" without express or implied warranty. *
15  **************************************************************************/
16 
17 #ifndef PNDCAPARAMETERS_H
18 #define PNDCAPARAMETERS_H
19 
20 #include "PndCAVector.h"
21 
23 {
24  enum {
29 // LastCellLength = 4 // length of rightmost cell
31  };
32 
33  // Transform CALocal coordinates in global x y z coordinates and back
34  // CALocal coor are: X0 is normal to the station module, X2 is paralel to magnetic field. X0 X1 X2 are right handed coordinates
35  template< typename T >
36  static void CALocalToGlobal( T x0, T x1, T angle, T& x, T& y );
37  template< typename T >
38  static void GlobalToCALocal( T x, T y, T angle, T& x0, T& x1 );
39  template< typename T >
40  static void CALocalToGlobal( T x0, T x1, T x2, T angle, T& x, T& y, T &z );
41  template< typename T >
42  static void GlobalToCALocal( T x, T y, T z, T angle, T& x0, T& x1, T& x2 );
43 
44 }; // namespace PndCAParameters
45 //namespace Parameters{ using namespace PndCAParameters; }
46 
47 
48 /*
49 template< typename T >
50 void PndCAParameters::CALocalToGlobal( T x0, T x1, T angle, T& x, T& y ) {
51  const T cA = CAMath::Cos( angle );
52  const T sA = CAMath::Sin( angle );
53  x = x0*sA + x1*cA;
54  y = x0*cA - x1*sA;
55 }
56 
57 template< typename T >
58 void PndCAParameters::CALocalToGlobal( T x0, T x1, T x2, T angle, T& x, T& y, T &z ) {
59  CALocalToGlobal<T>(x0,x1,angle,x,y);
60  z = - x2;
61 }
62 */
63 template< typename T >
65  const T cA = CAMath::Cos( angle );
66  const T sA = CAMath::Sin( angle );
67  //SG!!!
68  //x0 = x*cA + y*sA;
69  //x1 = x*cA - y*cA;
70  x0 = x*sA + y*cA;
71  x1 = x*cA - y*sA;
72 }
73 
74 template< typename T >
75 void PndCAParameters::GlobalToCALocal( T x, T y, T z, T angle, T& x0, T& x1, T& x2 ) {
76  GlobalToCALocal<T>(x,y,angle,x0,x1);
77  x2 = -z;
78 }
79 
80 
81 namespace PndCAPParameters{
82 
88  enum{
89 
93  MinimumHitsForMCTrack = 6,//PndCAParameters::MinimumHitsForRecoTrack,
94 
98  MinimumMCPointsForMCTrack = MinimumHitsForMCTrack,//PndCAParameters::MinimumHitsForRecoTrack,
99 
104  }; // enum
105 
109  static const float ExtraThreshold = 0.05;
110 
114  static const float RefThreshold = 1.;
115 
116 
120  static const float MinTrackPurity = .75;
121 } // namespace PndCAPParameters
122 namespace PParameters{ using namespace PndCAPParameters; }
123 
124 #endif
Double_t x0
Definition: checkhelixhit.C:70
static const float ExtraThreshold
static const float MinTrackPurity
static T Sin(const T &x)
Definition: PndCAMath.h:42
static T Cos(const T &x)
Definition: PndCAMath.h:43
TTree * T
Definition: anaLmdReco.C:32
Double_t z
static void CALocalToGlobal(T x0, T x1, T angle, T &x, T &y)
Double_t x
static void GlobalToCALocal(T x, T y, T angle, T &x0, T &x1)
Double_t y
Double_t angle
static const float RefThreshold