FairRoot/PandaRoot
PndFTSCAMCPoint.cxx
Go to the documentation of this file.
1 // $Id: PndFTSCAMCPoint.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 
22 #include "PndFTSCAMCPoint.h"
23 #include "PndFTSCAMath.h"
24 #include "PndFtsPoint.h"
25 
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 
33 {
34  out << a.fX << " " << a.fY << " " << a.fZ << std::endl;
35  out << a.fPx << " " << a.fPy << " " << a.fPz << " " << a.fQP << std::endl;
36  out << a.fISlice << " " << a.fIRow << " " << a.fTrackI << " " << a.fTrackID << std::endl;
37  return out;
38 }
39 
40 
42 {
43  in >> a.fX >> a.fY >> a.fZ;
44  in >> a.fPx >> a.fPy >> a.fPz >> a.fQP;
45  in >> a.fISlice >> a.fIRow >> a.fTrackI >> a.fTrackID;
46  return in;
47 }
48 
50 {
51  fX = ppp->GetX();
52  fY = ppp->GetY();
53  fZ = ppp->GetZ();
54  fPx = ppp->GetPx();
55  fPy = ppp->GetPy();
56  fPz = ppp->GetPz();
57  fQP = qq/sqrt( fPx*fPx + fPy*fPy + fPz*fPz );
58  fISlice = 0;
59  //std::cout<<"ppp->GetLayerID() "<<ppp->GetLayerID()<<std::endl;
60  fIRow = ppp->GetLayerID();
61  fTrackI = ppp->GetTrackID();
62  fTrackID = ppp->GetTrackID();
63 }
64 
66 {
67  fX = rhs.X();
68  fY = rhs.Y();
69  fZ = rhs.Z();
70  fPx = rhs.Px();
71  fPy = rhs.Py();
72  fPz = rhs.Pz();
73  fQP = rhs.QP();
74  fISlice = 0;
75  fIRow = rhs.IRow();
76  fTrackI = rhs.TrackI();
77  fTrackID = rhs.TrackID();
78 
79  return *this;
80 }
81 
83  const float cA = CAMath::Cos( alpha );
84  const float sA = CAMath::Sin( alpha );
85  {
86  const float x = X(), y = Y();
87  SetX( x*cA + y*sA );
88  SetY( -x*sA + y*cA );
89  }
90  {
91  const float x = Px(), y = Py();
92  SetPx( x*cA + y*sA );
93  SetPy( -x*sA + y*cA );
94  }
95 }
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
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)
void SetPoint(PndFtsPoint *ppp, Double_t qq)
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
Double_t
basic_istream< char, char_traits< char > > istream
TFile * out
Definition: reco_muo.C:20
void RotateXY(float alpha)
Double_t fY
Definition: PndCaloDraw.cxx:34
TBuffer & operator>>(TBuffer &buf, PndAnaPidSelector *&obj)
Double_t x
Double_t y
double alpha
Definition: f_Init.h:9
Int_t GetLayerID()
Definition: PndFtsPoint.h:90
PndFTSCALocalMCPoint & operator=(const PndFTSCALocalMCPoint &rhs)