<div class="patternContent"><div class="patternTopic"> <h2><a name="Track_refit"></a> Tracker Examples </h2> In this page you will find some instructions to get the measured rigidty, to load the alignment of outer layers on existing root data and compute residuals. <p /> <strong><em>v5 (aka PGTRACK)</em></strong> <p /> Details and current status of the alignment parameters can be found at <a href="/twiki/bin/view/AMS/TDVCalibrationNews" class="twikiLink">TDVCalibrationNews</a>. <p /> Details of use of tracker external planes alignment are at <a href="http://ams.cern.ch/AMS/Analysis/hpl3itp1/root02_v5/html/B584_patches/html/classTrExtAlignDB.html" class="twikiLink">TrExtAlignDB</a> <p /> Details of track refit method are at <a href="http://ams.cern.ch/AMS/TkTemp/doc.pgtrack/html/classTrTrackR.html#644fad804e6e8d3a4b33049553615795" target="_top">TrTrackR::iTrTrackPar</a> <p /> <h2><a name="Track_refit"></a> Getting the rigidity </h2> <p /> <pre> { // event loop for (int entry = 0; entry < nentry; entry++) { AMSEventR *ev = amschain->GetEvent(entry); // // Here you put some event selection // ParticleR *part = ev->pParticle(0); TrTrackR *track = part->pTrTrack(); //Fitting with INNER pattern and the Choutko Algorithm int id = track.iTrTrackPar(1 , 3, 1); if(id<0) continue; //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- ParticleR *part = ev->pParticle(0); TrTrackR *track = part->pTrTrack(); //Fitting with INNER pattern and the Alcaraz Algorithm int id = track.iTrTrackPar(1 , 3, 2); if(id<0) continue; //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- ParticleR *part = ev->pParticle(0); TrTrackR *track = part->pTrTrack(); //Fitting with INNER pattern and the Chikanian Algorithm int id = track.iTrTrackPar(1 , 3, 3); if(id<0) continue; //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- //Fitting with Maximum span pattern, the Choutko Algorithm //and the Perugia alignment stored in the root file int id = track.iTrTrackPar(1 , 0, 1); if(id<0) continue; //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- //Fitting with Maximum span pattern, the Choutko Algorithm //and the Madrid alignment stored in the root file int id = track.iTrTrackPar(1 , 0, 11); if(id<0) continue; //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- // Retrieve the rigidity RigidityArray=track->GetPar(id).Rigidity; RigidityErr=track->GetPar(id).ErrRinv; // Retrieve the Chisq and the Number of degrees of freedom in Y/X LogChisqYArray=log10(track->GetPar(id).ChisqY); NdofYArray=track.GetPar(id)->NdofY; LogChisqXArray=log10(track->GetPar(id).ChisqX); NdofXArray=track.GetPar(id)->NdofX; } </pre> <p /> <h2><a name="Track_refit"></a> Load External Alignment </h2> <p /> <pre> #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); } </pre> <p /> <h2><a name="Track_refit"></a> Compute Residuals </h2> <p /> <p /> <pre> #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 } } } } </pre> <p /> -- Main.DomenicoDurso - 04-Jul-2012
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r7
<
r6
<
r5
<
r4
<
r3
|
B
acklinks
|
V
iew topic
|
WYSIWYG
|
M
ore topic actions
Topic revision: r7 - 2012-07-18
-
DomenicoDurso
Home
Plugins
Sandbox for tests
Support
Alice
Atlas
CMS
LHCb
Public Webs
Sandbox Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
View
Raw View
PDF version
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Cern Search
TWiki Search
Google Search
Sandbox
All webs
E
dit
A
ttach
Copyright &© 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