FairRoot/PandaRoot
PndCAMCPoint.cxx
Go to the documentation of this file.
1 // $Id: PndCAMCPoint.cxx,v 1.2 2010/09/01 10:38:27 ikulakov Exp $
2 //***************************************************************************
3 // This file is property of and copyright by the ALICE HLT Project *
4 // ALICE Experiment at CERN, All rights reserved. *
5 // *
6 // Primary Authors: Sergey Gorbunov <sergey.gorbunov@kip.uni-heidelberg.de> *
7 // Ivan Kisel <kisel@kip.uni-heidelberg.de> *
8 // for The ALICE HLT Project. *
9 // *
10 // Developed by: Igor Kulakov <I.Kulakov@gsi.de> *
11 // Maksym Zyzak <M.Zyzak@gsi.de> *
12 // *
13 // Permission to use, copy, modify and distribute this software and its *
14 // documentation strictly for non-commercial purposes is hereby granted *
15 // without fee, provided that the above copyright notice appears in all *
16 // copies and that both the copyright notice and this permission notice *
17 // appear in the supporting documentation. The authors make no claims *
18 // about the suitability of this software for any purpose. It is *
19 // provided "as is" without express or implied warranty. *
20 //***************************************************************************
21 #ifdef DO_TPCCATRACKER_EFF_PERFORMANCE
22 
23 #include "PndCAMCPoint.h"
24 #include "PndCAMath.h"
25 
26 PndCAMCPoint::PndCAMCPoint()
27  : fX( 0 ), fY( 0 ), fZ( 0 ), fSx( 0 ), fSy( 0 ), fSz( 0 ), fTime( 0 ), fISlice( 0 ), fTrackID( 0 )
28 {
29  //* Default constructor
30 }
31 
32 ostream& operator<<(ostream& out, const PndCALocalMCPoint &a)
33 {
34  out << a.fX << " " << a.fY << " " << a.fZ << std::endl;
35  out << a.fPx << " " << a.fPy << " " << a.fPz << " " << a.fQP << std::endl;
36  return out << a.fISlice << " " << a.fIRow << " " << a.fTrackI << " " << a.fTrackID << std::endl;
37 }
38 
39 
40 istream& operator>>(istream& in, PndCALocalMCPoint &a)
41 {
42  in >> a.fX >> a.fY >> a.fZ;
43  in >> a.fPx >> a.fPy >> a.fPz >> a.fQP;
44  return in >> a.fISlice >> a.fIRow >> a.fTrackI >> a.fTrackID;
45 }
46 
47 
48 void PndCALocalMCPoint::RotateXY( float alpha) {
49  const float cA = CAMath::Cos( alpha );
50  const float sA = CAMath::Sin( alpha );
51  {
52  const float x = X(), y = Y();
53  SetX( x*cA + y*sA );
54  SetY( -x*sA + y*cA );
55  }
56  {
57  const float x = Px(), y = Py();
58  SetPx( x*cA + y*sA );
59  SetPy( -x*sA + y*cA );
60  }
61 }
62 
63 #endif
static T Sin(const T &x)
Definition: PndCAMath.h:42
Double_t fX
Definition: PndCaloDraw.cxx:34
std::ostream & operator<<(std::ostream &o, const PndEventInfo &a)
double Y
Definition: anaLmdDigi.C:68
static T Cos(const T &x)
Definition: PndCAMath.h:43
Double_t fZ
Definition: PndCaloDraw.cxx:34
Int_t a
Definition: anaLmdDigi.C:126
basic_ostream< char, char_traits< char > > ostream
std::istream & operator>>(std::istream &in, RhoError &mat)
Definition: RhoError.cxx:186
basic_istream< char, char_traits< char > > istream
TFile * out
Definition: reco_muo.C:20
double X
Definition: anaLmdDigi.C:68
Double_t fY
Definition: PndCaloDraw.cxx:34
Double_t x
Double_t y
double alpha
Definition: f_Init.h:9