]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding important addition information to the
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 24 Feb 2010 16:07:36 +0000 (16:07 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 24 Feb 2010 16:07:36 +0000 (16:07 +0000)
ideal "surveyed" laser track, in order to make calibration
and fitting  easier

Arrays of information for each pad-row

1. Sector
2. Snp
3. Global phi
4. Local position
5. Global position

(Marian)

TPC/AliTPCLaserTrack.cxx
TPC/AliTPCLaserTrack.h

index 9f8efd4c9e27a07e87065ef3f9ef4fbb42272f8a..236686cdb54aa6fe267b4a7d1fcab7d32ff0353f 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "AliLog.h"
 #include "AliTPCLaserTrack.h"
+#include "AliTPCROC.h"
 
 ClassImp(AliTPCLaserTrack)
 
@@ -33,7 +34,16 @@ AliTPCLaserTrack::AliTPCLaserTrack() :
   fRod(-1),
   fBundle(-1),
   fBeam(-1),
-  fRayLength(0)
+  fRayLength(0),
+  fVecSec(0),       // points vectors - sector
+  fVecP2(0),       // points vectors - snp
+  fVecPhi(0),       // points vectors - global phi
+  fVecGX(0),       // points vectors - globalX
+  fVecGY(0),       // points vectors - globalY
+  fVecGZ(0),       // points vectors - globalZ
+  fVecLX(0),       // points vectors - localX
+  fVecLY(0),       // points vectors - localY
+  fVecLZ(0)        // points vectors - localZ
 {
   //
   // Default constructor
@@ -48,11 +58,29 @@ AliTPCLaserTrack::AliTPCLaserTrack(const AliTPCLaserTrack &ltr) :
   fRod(ltr.fRod),
   fBundle(ltr.fBundle),
   fBeam(ltr.fBeam),
-  fRayLength(ltr.fRayLength)
+  fRayLength(ltr.fRayLength),
+  fVecSec(0),       // points vectors - sector
+  fVecP2(0),       // points vectors - snp
+  fVecPhi(0),       // points vectors - global phi
+  fVecGX(0),       // points vectors - globalX
+  fVecGY(0),       // points vectors - globalY
+  fVecGZ(0),       // points vectors - globalZ
+  fVecLX(0),       // points vectors - localX
+  fVecLY(0),       // points vectors - localY
+  fVecLZ(0)        // points vectors - localZ
 {
   //
   // Default constructor
   //
+  fVecSec=new TVectorD(*ltr.fVecSec);       // points vectors - sector
+  fVecP2 =new TVectorD(*ltr.fVecP2);       // points vectors - snp
+  fVecPhi=new TVectorD(*ltr.fVecPhi);       // points vectors - global phi
+  fVecGX =new TVectorD(*ltr.fVecGX);       // points vectors - globalX
+  fVecGY =new TVectorD(*ltr.fVecGY);       // points vectors - globalY
+  fVecGZ =new TVectorD(*ltr.fVecGZ);       // points vectors - globalZ
+  fVecLX =new TVectorD(*ltr.fVecLX);       // points vectors - localX
+  fVecLY =new TVectorD(*ltr.fVecLY);       // points vectors - localY
+  fVecLZ =new TVectorD(*ltr.fVecLZ);       // points vectors - localY
 
 }
 
@@ -67,12 +95,22 @@ AliTPCLaserTrack::AliTPCLaserTrack(const Int_t id, const Int_t side, const Int_t
   fRod(rod),
   fBundle(bundle),
   fBeam(beam),
-  fRayLength(rayLength)
+  fRayLength(rayLength),
+  fVecSec(new TVectorD(159)),       // points vectors - sector
+  fVecP2(new TVectorD(159)),       // points vectors - snp
+  fVecPhi(new TVectorD(159)),       // points vectors - global phi
+  fVecGX(new TVectorD(159)),       // points vectors - globalX
+  fVecGY(new TVectorD(159)),       // points vectors - globalY
+  fVecGZ(new TVectorD(159)),       // points vectors - globalZ
+  fVecLX(new TVectorD(159)),       // points vectors - localX
+  fVecLY(new TVectorD(159)),       // points vectors - localY
+  fVecLZ(new TVectorD(159))        // points vectors - localZ
+
 {
   //
   // create laser track from arguments
   //
-
+  
 }
 //_____________________________________________________________________
 AliTPCLaserTrack& AliTPCLaserTrack::operator = (const  AliTPCLaserTrack &source)
@@ -86,6 +124,22 @@ AliTPCLaserTrack& AliTPCLaserTrack::operator = (const  AliTPCLaserTrack &source)
   return *this;
 }
 
+
+AliTPCLaserTrack::~AliTPCLaserTrack(){
+  //
+  // destructor
+  //
+  delete fVecSec;      //                - sector numbers  
+  delete fVecP2;       //                - P2  
+  delete fVecPhi;       // points vectors - global phi
+  delete fVecGX;       // points vectors - globalX
+  delete fVecGY;       // points vectors - globalY
+  delete fVecGZ;       // points vectors - globalZ
+  delete fVecLX;       // points vectors - localX
+  delete fVecLY;       // points vectors - localY
+  delete fVecLZ;       // points vectors - localZ
+}
+
 void AliTPCLaserTrack::LoadTracks()
 {
     //
@@ -115,12 +169,85 @@ void AliTPCLaserTrack::LoadTracks()
 //         AliWarning(Form("No informatino found for Track %d!",itrack));
            continue;
        }
+       ltr->UpdatePoints();
         fgArrLaserTracks->AddAt(new AliTPCLaserTrack(*ltr),itrack);
     }
     delete f;
 }
 
 
+void AliTPCLaserTrack::UpdatePoints(){
+  //
+  // update track points
+  //
+  const Double_t kMaxSnp=0.99;
+  AliTPCROC* roc = AliTPCROC::Instance();
+  //
+  //
+  if (!fVecSec){
+    fVecSec=new TVectorD(159);
+    fVecP2 =new TVectorD(159);       //                - P2  
+    fVecPhi=new TVectorD(159);       //                - Phi
+    fVecGX=new TVectorD(159);       // points vectors - globalX
+    fVecGY=new TVectorD(159);       // points vectors - globalY
+    fVecGZ=new TVectorD(159);       // points vectors - globalZ
+    fVecLX=new TVectorD(159);       // points vectors - localX
+    fVecLY=new TVectorD(159);       // points vectors - localY
+    fVecLZ=new TVectorD(159);       // points vectors - localZ
+
+  }
+  for (Int_t irow=158; irow>=0; irow--){
+    (*fVecSec)[irow]= 0;       //                - 
+    (*fVecP2)[irow] = 0;       //                - P2  -snp
+    (*fVecPhi)[irow]= 0;       //                - global phi
+    (*fVecGX)[irow] = 0;       // points vectors - globalX
+    (*fVecGY)[irow] = 0;       // points vectors - globalY
+    (*fVecGZ)[irow] = 0;       // points vectors - globalZ
+    (*fVecLX)[irow] = 0;       // points vectors - localX
+    (*fVecLY)[irow] = 0;       // points vectors - localY
+    (*fVecLZ)[irow] = 0;       // points vectors - localZ
+
+  }
+  Double_t gxyz[3];
+  Double_t lxyz[3];
+  AliTPCLaserTrack*ltrp=new AliTPCLaserTrack(*this);  //make temporary track
+
+  for (Int_t irow=158; irow>=0; irow--){
+    UInt_t srow = irow;
+    Int_t sector=0;
+   
+    if (srow >=roc->GetNRows(0)) {
+      srow-=roc->GetNRows(0);
+      sector=36    ;
+    }
+    lxyz[0]= roc->GetPadRowRadii(sector,srow);
+    if (!ltrp->PropagateTo(lxyz[0],5)) break;
+    ltrp->GetXYZ(gxyz);
+    //
+    Double_t alpha=TMath::ATan2(gxyz[1],gxyz[0]);
+    if (alpha<0) alpha+=2*TMath::Pi();
+    sector      +=TMath::Nint(-0.5+9*alpha/TMath::Pi());
+    Double_t salpha   = TMath::Pi()*(sector+0.5)/9.;    
+    if (!ltrp->Rotate(salpha)) break;
+    if (!ltrp->PropagateTo(lxyz[0],5)) break;
+    if (TMath::Abs(ltrp->GetSnp())>kMaxSnp) break;
+    ltrp->GetXYZ(gxyz);
+    lxyz[1]=ltrp->GetY();
+    lxyz[2]=ltrp->GetZ();
+    (*fVecSec)[irow]= sector;
+    (*fVecP2)[irow] = ltrp->GetSnp();                 //                - P2  -snp
+    (*fVecPhi)[irow]= TMath::ATan2(gxyz[1],gxyz[0]);  //                - global phi
+    (*fVecGX)[irow] = gxyz[0];       // points vectors - globalX
+    (*fVecGY)[irow] = gxyz[1];       // points vectors - globalY
+    (*fVecGZ)[irow] = gxyz[2];       // points vectors - globalZ
+    (*fVecLX)[irow] = lxyz[0];       // points vectors - localX
+    (*fVecLY)[irow] = lxyz[1];       // points vectors - localY
+    (*fVecLZ)[irow] = lxyz[2];       // points vectors - localZ
+
+  }
+  delete ltrp;  // delete temporary track
+}
+
 Int_t AliTPCLaserTrack::IdentifyTrack(AliExternalTrackParam *track, Int_t side)
 {
   //
index 2e1d471dcc198cbc8876c5bee5c197d92c5ea394..12777d540ecfa75329259c75c1980afcfa420d7c 100644 (file)
@@ -6,6 +6,7 @@
 #include <TString.h>
 
 #include "AliExternalTrackParam.h"
+#include "TVectorD.h"
 
 class TObjArray;
 
@@ -14,6 +15,7 @@ class TObjArray;
 class AliTPCLaserTrack : public AliExternalTrackParam {
 public:
   AliTPCLaserTrack();
+  ~AliTPCLaserTrack();
   AliTPCLaserTrack(const AliTPCLaserTrack &ltr);
   AliTPCLaserTrack(const Int_t id, const Int_t side, const Int_t rod,
                    const Int_t bundle, const Int_t beam,
@@ -22,7 +24,7 @@ public:
                    const Double_t covar[15], const Float_t rayLength=0);
   
   AliTPCLaserTrack& operator = (const  AliTPCLaserTrack &source);
-  
+  void UpdatePoints();   // update track points
   static void LoadTracks();
   static TObjArray* GetTracks() {return fgArrLaserTracks;}
   
@@ -62,8 +64,17 @@ private:
   Float_t fRayLength;     //distance from the last common point of the laser Rays
                           //(Splitter box on the A-Side at the bottom of the TPC)
                           //to each mirror [cm](needed for an exact drift velocity estimation)
-  
-  
+public:
+  TVectorD *fVecSec;      //                - sector numbers  
+  TVectorD *fVecP2;       //                - P2  
+  TVectorD *fVecPhi;       //               - global phi
+  TVectorD *fVecGX;       // points vectors - globalX
+  TVectorD *fVecGY;       // points vectors - globalY
+  TVectorD *fVecGZ;       // points vectors - globalZ
+  TVectorD *fVecLX;       // points vectors - localX
+  TVectorD *fVecLY;       // points vectors - localY
+  TVectorD *fVecLZ;       // points vectors - localZ
+private:  
   static TObjArray* fgArrLaserTracks; //! Array of all Laser Tracks,
                                         //  keeps instances of this class;
   
@@ -74,7 +85,7 @@ private:
   
 //    static const char* fgkDataFileName = "$ALIC_ROOT/TPC/Calib/LaserTracks.root";  //Path to the Data File
   
-  ClassDef(AliTPCLaserTrack,2)        // Laser Track positions and track identification
+  ClassDef(AliTPCLaserTrack,3)        // Laser Track positions and track identification
 };
 
 #endif