Tracker Examples

Load External Alignment

In this page you will find some instruction to load the alignment of outer layers on existing root data and compute residuals.

v5 (aka PGTRACK)

Details and current status of the alignment parameters can be found at TDVCalibrationNews.

Details of use of tracker external planes alignment are at TrExtAlignDB

#include "TrExtAlignDB.h"

{

for (int entry = 0; entry < nentry; entry++) { // event loop
   AMSEventR *event = amschain->GetEvent(entry);

    //
    // Here you put some event selection
    // 
 
   // To Load outer layer alignment :
   //   PG Alignment
   TrExtAlignDB::RecalcAllExtHitCoo(0);    
   //   CIEMAT Alignment
   TrExtAlignDB::RecalcAllExtHitCoo(1);
   //   No Alignment  
   TrExtAlignDB::RecalcAllExtHitCoo(2);
    

}

Compute Residuals

Details of track refit method are at TrTrackR::iTrTrackPar

#include "TrExtAlignDB.h"
{

   for (int entry = 0; entry < nentry; entry++) { // event loop
      AMSEventR *ev = amschain->GetEvent(entry);

      //
      // Here you put some event selection
      // 

      ParticleR *part = ev->pParticle(0);
      TrTrackR *track = part->pTrTrack();
      // Loop On Alignments
      for(int i_ext_alig =0; i_ext_alig<2; i_ext_alig++){

           int id = track->iTrTrackPar(algo,pattern,3+i_ext_alig*10);
           if (id<0) return;
           // Load of current Alignment 
           TrExtAlignDB::RecalcAllExtHitCoo(i_ext_alig);
           double Residual[10][2];
           for(int i_layer=1; i_layer<10; i_layer++){
               if( ! track->TestHitLayerJ(i_layer)) continue;    //check if the track has a hit on the layer i_layer   
               AMSPoint Residual_point=track->GetResidualJ(i_layer,id);
               if(   track->TestHitLayerJHasXY(i_layer) )
                   Residual[i_layer][0]=Residual_point.x();    // x residual computed only in case of XY hit
               else Residual[i_layer][0]=-99999999.;
               Residual[i_layer][1]=Residual_point.y();    // y residual 
           }
       }
   }

}

-- DomenicoDurso - 04-Jul-2012

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r5 - 2012-07-13 - DomenicoDurso
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback