BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TBuilderCurl.cxx File Reference
#include "TrkReco/TBuilderCurl.h"
#include "TrackUtil/Lpav.h"
#include "TrkReco/TMLink.h"
#include "TrkReco/TTrack.h"
#include "TrkReco/TMLine.h"
#include "TrkReco/TRobustLineFitter.h"
#include "GaudiKernel/Bootstrap.h"
#include "GaudiKernel/IDataProviderSvc.h"
#include "GaudiKernel/IInterface.h"
#include "GaudiKernel/IMessageSvc.h"
#include "GaudiKernel/ISvcLocator.h"
#include "GaudiKernel/Kernel.h"
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/Service.h"
#include "GaudiKernel/SmartDataPtr.h"
#include "GaudiKernel/StatusCode.h"

Go to the source code of this file.

Macros

#define DEBUG_CURL_DUMP   0
#define DEBUG_CURL_GNUPLOT   0
#define DEBUG_CURL_MC   0

Functions

int doLineFit (AList< TMLink > &points, double &m_a, double &m_b, double &chi2, double &nhits, int ipC=1)
int checkBorder (AList< TMLink > &layer0, AList< TMLink > &layer1, AList< TMLink > &layer2)
int checkBorder (AList< TMLink > &layer0, AList< TMLink > &layer1, AList< TMLink > &layer2, AList< TMLink > &layer3)
int offsetBorder (TMLink *l)
void makeList (AList< TMLink > &layer, AList< TMLink > &list, double q, int border, int checkB, TMLink *layer0)
unsigned findMaxLocalId (unsigned layerId)
unsigned isIsolation (unsigned localId, unsigned maxLocalId, unsigned layerId, int lr, const AList< TMLink > &allStereoList)
void findTwoHits (AList< TMLink > &twoOnLayer, const AList< TMLink > &hitsOnLayer, const AList< TMLink > &allStereoList)
void setLR (AList< TMLink > &hitsOnLayer, unsigned LR=0)
bool moveLR (AList< TMLink > &hitsOnLayer)
void selectGoodWires (const AList< TMLink > &allWires, AList< TMLink > &goodWires)
void calVirtualCircle (const TMLink &hit, const TTrack &track, const int LR, HepPoint3D &center, double &radius)
void moveLR (AList< TMLink > &hits, const AList< TMLink > &hitsOnLayerOrg, const TTrack &track)

Macro Definition Documentation

◆ DEBUG_CURL_DUMP

#define DEBUG_CURL_DUMP   0

Definition at line 29 of file TBuilderCurl.cxx.

◆ DEBUG_CURL_GNUPLOT

#define DEBUG_CURL_GNUPLOT   0

Definition at line 30 of file TBuilderCurl.cxx.

◆ DEBUG_CURL_MC

#define DEBUG_CURL_MC   0

Definition at line 31 of file TBuilderCurl.cxx.

Function Documentation

◆ calVirtualCircle()

void calVirtualCircle ( const TMLink & hit,
const TTrack & track,
const int LR,
HepPoint3D & center,
double & radius )

Definition at line 1472 of file TBuilderCurl.cxx.

1473 {
1474 if ( abs( LR ) != 1 ) return;
1475 double Q = track.charge();
1476 int isOuter = 1;
1477 if ( Q > 0. && LR == 1 ) isOuter = -1; // Inner
1478 else if ( Q < 0. && LR == -1 ) isOuter = -1; // Inner
1479 radius = fabs( track.radius() );
1480 center = track.helix().center();
1481 HepPoint3D wire = hit.wire()->xyPosition();
1482 center.setZ( 0. );
1483 wire.setZ( 0. );
1484 // new center(virtual)
1485 center = wire + ( radius + ( (double)isOuter ) * ( hit.hit()->drift() ) ) *
1486 ( center - wire ).unit();
1487}
HepGeom::Point3D< double > HepPoint3D
*******INTEGER m_nBinMax INTEGER m_NdiMax !No of bins in histogram for cell exploration division $ !Last vertex $ !Last active cell $ !Last cell in buffer $ !No of sampling when dividing cell $ !No of function total $ !Flag for random ceel for $ !Flag for type of for WtMax $ !Flag which decides whether vertices are included in the sampling $ entire domain is hyp !Maximum effective eevents per saves r n generator level $ !Flag for chat level in !Latex Output unit
Definition FoamA.h:90
const HepPoint3D & center(void) const
returns position of helix center(z = 0.);
const HepPoint3D & xyPosition(void) const
returns middle position of a wire. z componet is 0.
const Helix & helix(void) const
returns helix parameter.
double radius(void) const
returns signed radius.
double charge(void) const
returns charge.

Referenced by moveLR().

◆ checkBorder() [1/2]

int checkBorder ( AList< TMLink > & layer0,
AList< TMLink > & layer1,
AList< TMLink > & layer2 )

Definition at line 891 of file TBuilderCurl.cxx.

891 {
892 AList<TMLink> list = layer0;
893 list.append( layer1 );
894 list.append( layer2 );
895 int size = list.length();
896 if ( size <= 1 ) return 0;
897 int layerId = list[0]->hit()->wire()->layerId();
898 int maxLocalId = 79;
899 if ( layerId >= 15 ) maxLocalId = 127;
900 if ( layerId >= 23 ) maxLocalId = 159;
901 if ( layerId >= 32 ) maxLocalId = 207;
902 if ( layerId >= 41 ) maxLocalId = 255;
903 int HId = (int)( 0.8 * ( maxLocalId + 1 ) );
904 int LId = (int)( 0.2 * ( maxLocalId + 1 ) );
905 int low = 0;
906 int high = 0;
907 for ( int i = 0; i > size; ++i )
908 {
909 if ( list[i]->hit()->wire()->localId() < LId ) low = 1;
910 else if ( list[i]->hit()->wire()->localId() > HId ) high = 1;
911 if ( low == 1 && high == 1 ) return 1;
912 }
913 return 0;
914}

◆ checkBorder() [2/2]

int checkBorder ( AList< TMLink > & layer0,
AList< TMLink > & layer1,
AList< TMLink > & layer2,
AList< TMLink > & layer3 )

Definition at line 916 of file TBuilderCurl.cxx.

917 {
918 AList<TMLink> list = layer0;
919 list.append( layer1 );
920 list.append( layer2 );
921 list.append( layer3 );
922 int size = list.length();
923 if ( size <= 1 ) return 0;
924 int layerId = list[0]->hit()->wire()->layerId();
925 int maxLocalId = 79;
926 if ( layerId >= 15 ) maxLocalId = 127;
927 if ( layerId >= 23 ) maxLocalId = 159;
928 if ( layerId >= 32 ) maxLocalId = 207;
929 if ( layerId >= 41 ) maxLocalId = 255;
930 int HId = (int)( 0.8 * ( maxLocalId + 1 ) );
931 int LId = (int)( 0.2 * ( maxLocalId + 1 ) );
932 int low = 0;
933 int high = 0;
934 for ( int i = 0; i > size; ++i )
935 {
936 if ( list[i]->hit()->wire()->localId() < LId ) low = 1;
937 else if ( list[i]->hit()->wire()->localId() > HId ) high = 1;
938 if ( low == 1 && high == 1 ) return 1;
939 }
940 return 0;
941}

◆ doLineFit()

int doLineFit ( AList< TMLink > & points,
double & m_a,
double & m_b,
double & chi2,
double & nhits,
int ipC = 1 )

Definition at line 775 of file TBuilderCurl.cxx.

777{
778 m_a = m_b = nhits = 0.;
779 chi2 = 1.e+10;
780 unsigned n = points.length();
781 double sum = double( n );
782 double sumX = 0., sumY = 0., sumX2 = 0., sumXY = 0., sumY2 = 0.;
783 for ( unsigned i = 0; i < n; i++ )
784 {
785 TMLink& l = *points[i];
786
787 double x = l.position().x();
788 double y = l.position().y();
789 sumX += x;
790 sumY += y;
791 sumX2 += x * x;
792 sumXY += x * y;
793 sumY2 += y * y;
794 }
795 if ( ipC != 0 ) sum += 1.0; // IP Constraint
796 nhits = sum;
797
798 double m_det = sum * sumX2 - sumX * sumX;
799 if ( m_det == 0. && sum != 2. ) { return -1; }
800 else if ( m_det == 0. && sum == 2. )
801 {
802 double x0 = points[0]->position().x();
803 double y0 = points[0]->position().y();
804 double x1 = points[1]->position().x();
805 double y1 = points[1]->position().y();
806 if ( x0 == x1 ) return -1;
807 m_a = ( y0 - y1 ) / ( x0 - x1 );
808 m_b = -m_a * x1 + y1;
809 chi2 = 0.;
810 return 0;
811 }
812 chi2 = 0.;
813 m_a = ( sumXY * sum - sumX * sumY ) / m_det;
814 m_b = ( sumX2 * sumY - sumX * sumXY ) / m_det;
815
816 for ( unsigned i = 0; i < n; i++ )
817 {
818 TMLink& l = *points[i];
819
820 double x = l.position().x();
821 double y = l.position().y();
822 double d = y - ( x * m_a + m_b );
823 chi2 += d * d;
824 }
825
826 return 0;
827}
const Int_t n
*********DOUBLE PRECISION m_pi INTEGER m_lenwt !max no of aux weights INTEGER m_phmax !maximum photon multiplicity ISR FSR *DOUBLE COMPLEX m_Pauli4 DOUBLE COMPLEX m_AmpBorn DOUBLE COMPLEX m_AmpBoxy DOUBLE COMPLEX m_AmpBorn1 DOUBLE COMPLEX m_AmpBorn2 DOUBLE COMPLEX m_AmpExpo2p DOUBLE COMPLEX m_Rmat DOUBLE COMPLEX m_BoxGZut !DOUBLE COMPLEX m_F1finPair2 !DOUBLE PRECISION m_Vcut DOUBLE PRECISION m_Alfinv DOUBLE PRECISION m_Lorin1 DOUBLE PRECISION m_Lorin2 DOUBLE PRECISION m_b
Definition GPS.h:30

◆ findMaxLocalId()

unsigned findMaxLocalId ( unsigned layerId)

Definition at line 1260 of file TBuilderCurl.cxx.

1260 {
1261 /* unsigned maxLocalId = 79;
1262 if(superLayerId == 3)maxLocalId = 127;
1263 else if(superLayerId == 5)maxLocalId = 159;
1264 else if(superLayerId == 7)maxLocalId = 207;
1265 else if(superLayerId == 9)maxLocalId = 255;
1266 return maxLocalId;
1267 */
1268 // changed to BESiii, Liuqg
1269 unsigned maxLocalId = 39;
1270 if ( layerId == 1 ) maxLocalId = 43;
1271 else if ( layerId == 2 ) maxLocalId = 47;
1272 else if ( layerId == 3 ) maxLocalId = 55;
1273 else if ( layerId == 4 ) maxLocalId = 63;
1274 else if ( layerId == 5 ) maxLocalId = 71;
1275 else if ( layerId == 6 || layerId == 7 ) maxLocalId = 79;
1276 else if ( layerId == 20 || layerId == 21 || layerId == 22 || layerId == 23 )
1277 maxLocalId = 159;
1278 else if ( layerId == 24 || layerId == 25 || layerId == 26 || layerId == 27 )
1279 maxLocalId = 175;
1280 else if ( layerId == 28 || layerId == 29 || layerId == 30 || layerId == 31 )
1281 maxLocalId = 207;
1282 else if ( layerId == 32 || layerId == 33 || layerId == 34 || layerId == 35 )
1283 maxLocalId = 239;
1284
1285 return maxLocalId;
1286}

Referenced by findTwoHits().

◆ findTwoHits()

void findTwoHits ( AList< TMLink > & twoOnLayer,
const AList< TMLink > & hitsOnLayer,
const AList< TMLink > & allStereoList )

Definition at line 1315 of file TBuilderCurl.cxx.

1316 {
1317 //...finds "two" seq. and isolated hits.
1318 //...and then sets LR for selected hits.
1319 if ( hitsOnLayer.length() == 0 || hitsOnLayer.length() > 3 ) return;
1320 twoOnLayer.removeAll();
1321 if ( hitsOnLayer.length() == 1 )
1322 {
1323 if ( hitsOnLayer[0]->wire()->superLayerId() == 0 ) return; // origin is == 1, Liuqg 060921
1324 unsigned maxLocalId = findMaxLocalId( hitsOnLayer[0]->wire()->layerId() );
1325 unsigned R = isIsolation( hitsOnLayer[0]->wire()->localId(), maxLocalId,
1326 hitsOnLayer[0]->wire()->layerId(), 1, allStereoList );
1327 unsigned L = isIsolation( hitsOnLayer[0]->wire()->localId(), maxLocalId,
1328 hitsOnLayer[0]->wire()->layerId(), -1, allStereoList );
1329 if ( R == 1 && L == 0 )
1330 {
1331 unsigned nextLocalId = hitsOnLayer[0]->wire()->localIdForPlus() + 1;
1332 L = isIsolation( nextLocalId, maxLocalId, hitsOnLayer[0]->wire()->layerId(), -1,
1333 allStereoList );
1334 if ( L == 1 )
1335 { // xuox
1336 hitsOnLayer[0]->leftRight( 1 ); // R
1337 hitsOnLayer[0]->position( hitsOnLayer[0]->arcZ( 1 ) );
1338 twoOnLayer.append( hitsOnLayer[0] );
1339 }
1340 }
1341 else if ( R == 0 && L == 1 )
1342 {
1343 unsigned nextLocalId = hitsOnLayer[0]->wire()->localIdForMinus() + 1;
1344 R = isIsolation( nextLocalId, maxLocalId, hitsOnLayer[0]->wire()->layerId(), 1,
1345 allStereoList );
1346 if ( R == 1 )
1347 { // xoux
1348 hitsOnLayer[0]->leftRight( 0 ); // L
1349 hitsOnLayer[0]->position( hitsOnLayer[0]->arcZ( 0 ) );
1350 twoOnLayer.append( hitsOnLayer[0] );
1351 }
1352 }
1353 }
1354 if ( hitsOnLayer.length() == 2 )
1355 {
1356 if ( hitsOnLayer[0]->wire()->localIdForPlus() + 1 == hitsOnLayer[1]->wire()->localId() )
1357 {
1358 unsigned maxLocalId = findMaxLocalId( hitsOnLayer[0]->wire()->layerId() );
1359 unsigned R = isIsolation( hitsOnLayer[0]->wire()->localId(), maxLocalId,
1360 hitsOnLayer[0]->wire()->layerId(), 1, allStereoList );
1361 unsigned L = isIsolation( hitsOnLayer[1]->wire()->localId(), maxLocalId,
1362 hitsOnLayer[1]->wire()->layerId(), -1, allStereoList );
1363 if ( R == 1 && L == 1 )
1364 { // xoox
1365 hitsOnLayer[0]->leftRight( 1 ); // R
1366 hitsOnLayer[0]->position( hitsOnLayer[0]->arcZ( 1 ) );
1367 hitsOnLayer[1]->leftRight( 0 ); // L
1368 hitsOnLayer[1]->position( hitsOnLayer[1]->arcZ( 0 ) );
1369 twoOnLayer.append( hitsOnLayer[0] );
1370 twoOnLayer.append( hitsOnLayer[1] );
1371 }
1372 }
1373 }
1374 if ( hitsOnLayer.length() == 3 )
1375 {
1376 if ( hitsOnLayer[0]->wire()->localIdForPlus() + 1 == hitsOnLayer[1]->wire()->localId() &&
1377 hitsOnLayer[1]->wire()->localIdForPlus() + 1 != hitsOnLayer[2]->wire()->localId() )
1378 {
1379 unsigned maxLocalId = findMaxLocalId( hitsOnLayer[0]->wire()->layerId() );
1380 unsigned R = isIsolation( hitsOnLayer[0]->wire()->localId(), maxLocalId,
1381 hitsOnLayer[0]->wire()->layerId(), 1, allStereoList );
1382 unsigned L = isIsolation( hitsOnLayer[1]->wire()->localId(), maxLocalId,
1383 hitsOnLayer[1]->wire()->layerId(), -1, allStereoList );
1384 if ( R == 1 && L == 1 )
1385 { // oxoox
1386 hitsOnLayer[0]->leftRight( 1 ); // R
1387 hitsOnLayer[0]->position( hitsOnLayer[0]->arcZ( 1 ) );
1388 hitsOnLayer[1]->leftRight( 0 ); // L
1389 hitsOnLayer[1]->position( hitsOnLayer[1]->arcZ( 0 ) );
1390 twoOnLayer.append( hitsOnLayer[0] );
1391 twoOnLayer.append( hitsOnLayer[1] );
1392 }
1393 }
1394 else if ( hitsOnLayer[0]->wire()->localIdForPlus() + 1 !=
1395 hitsOnLayer[1]->wire()->localId() &&
1396 hitsOnLayer[1]->wire()->localIdForPlus() + 1 ==
1397 hitsOnLayer[2]->wire()->localId() )
1398 {
1399 unsigned maxLocalId = findMaxLocalId( hitsOnLayer[1]->wire()->layerId() );
1400 unsigned R = isIsolation( hitsOnLayer[1]->wire()->localId(), maxLocalId,
1401 hitsOnLayer[1]->wire()->layerId(), 1, allStereoList );
1402 unsigned L = isIsolation( hitsOnLayer[2]->wire()->localId(), maxLocalId,
1403 hitsOnLayer[2]->wire()->layerId(), -1, allStereoList );
1404 if ( R == 1 && L == 1 )
1405 { // xooxo
1406 hitsOnLayer[1]->leftRight( 1 ); // R
1407 hitsOnLayer[1]->position( hitsOnLayer[1]->arcZ( 1 ) );
1408 hitsOnLayer[2]->leftRight( 0 ); // L
1409 hitsOnLayer[2]->position( hitsOnLayer[2]->arcZ( 0 ) );
1410 twoOnLayer.append( hitsOnLayer[1] );
1411 twoOnLayer.append( hitsOnLayer[2] );
1412 }
1413 }
1414 }
1415 /* if(twoOnLayer.length() != 0){
1416 std::cout << "TWO " << twoOnLayer.length() << std::endl;
1417 } */
1418}
unsigned findMaxLocalId(unsigned layerId)
unsigned isIsolation(unsigned localId, unsigned maxLocalId, unsigned layerId, int lr, const AList< TMLink > &allStereoList)
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)
Definition TUtil.h:22

◆ isIsolation()

unsigned isIsolation ( unsigned localId,
unsigned maxLocalId,
unsigned layerId,
int lr,
const AList< TMLink > & allStereoList )

Definition at line 1288 of file TBuilderCurl.cxx.

1289 {
1290 unsigned findId;
1291 if ( lr == 1 )
1292 { // R : ox, Dose a wire exist at "x"?
1293 findId = maxLocalId;
1294 if ( localId != 0 ) findId = localId - 1;
1295 }
1296 else if ( lr == -1 )
1297 { // L : xo, Dose a wire exist at "x"?
1298 findId = 0;
1299 if ( localId != maxLocalId ) findId = localId + 1;
1300 }
1301 else { return 1; }
1302 unsigned isolate = 1;
1303 for ( int i = 0; i < allStereoList.length(); ++i )
1304 {
1305 if ( allStereoList[i]->wire()->layerId() == layerId &&
1306 allStereoList[i]->wire()->localId() == findId )
1307 {
1308 isolate = 0;
1309 break;
1310 }
1311 }
1312 return isolate;
1313}

Referenced by findTwoHits().

◆ makeList()

void makeList ( AList< TMLink > & layer,
AList< TMLink > & list,
double q,
int border,
int checkB,
TMLink * layer0 )

Definition at line 953 of file TBuilderCurl.cxx.

954 {
955 int n = layer.length();
956 if ( checkB == 0 )
957 {
958 for ( int i = 0; i < n; ++i )
959 {
960 if ( q < 0. )
961 {
962 if ( layer[i]->hit()->wire()->localId() >= border ) list.append( layer[i] );
963 }
964 else
965 {
966 if ( layer[i]->hit()->wire()->localId() <= border ) list.append( layer[i] );
967 }
968 }
969 }
970 else
971 {
972 // difficult!! --> puls offset
973 int offset = offsetBorder( layer0 );
974 if ( border * 2 < offset ) border += offset;
975 for ( int i = 0; i < n; ++i )
976 {
977 int lId = layer[i]->hit()->wire()->localId();
978 if ( lId * 2 < offset ) lId += offset;
979 if ( q < 0. )
980 {
981 if ( lId >= border ) list.append( layer[i] );
982 }
983 else
984 {
985 if ( lId <= border ) list.append( layer[i] );
986 }
987 }
988 }
989}
****INTEGER imax DOUBLE PRECISION m_pi *DOUBLE PRECISION m_amfin DOUBLE PRECISION m_Chfin DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_sinw2 DOUBLE PRECISION m_GFermi DOUBLE PRECISION m_MfinMin DOUBLE PRECISION m_ta2 INTEGER m_out INTEGER m_KeyFSR INTEGER m_KeyQCD *COMMON c_Semalib $ !copy of input $ !CMS energy $ !beam mass $ !final mass $ !beam charge $ !final charge $ !smallest final mass $ !Z mass $ !Z width $ !EW mixing angle $ !Gmu Fermi $ alphaQED at q
Definition KKsem.h:33
int offsetBorder(TMLink *l)

◆ moveLR() [1/2]

void moveLR ( AList< TMLink > & hits,
const AList< TMLink > & hitsOnLayerOrg,
const TTrack & track )

Definition at line 1489 of file TBuilderCurl.cxx.

1489 {
1490 AList<TMLink> hitsOnLayer = hitsOnLayerOrg;
1491 hitsOnLayer.remove( hits );
1492 if ( hitsOnLayer.length() == 0 ) return;
1493
1494 unsigned nHits = hits.length();
1495 if ( nHits == 0 ) return;
1496
1497 //...finds "ref" from hits.
1498 // ex) LLLL|, LLL|R, LL|RR, L|RRR, |RRRR
1499 int LR = -1; // L
1500 TMLink ref;
1501 if ( hits[nHits - 1]->leftRight() == 1 )
1502 { // All R
1503 LR = 1; // R
1504 ref = *hits[nHits - 1];
1505 }
1506 for ( unsigned i = 0; i < nHits; ++i )
1507 {
1508 if ( hits[i]->leftRight() == 0 )
1509 { // L
1510 ref = *hits[i];
1511 break;
1512 }
1513 }
1514
1515 HepPoint3D center;
1516 double radius;
1517 calVirtualCircle( ref, track, LR, center, radius );
1518
1519 double Q = track.charge();
1520 for ( int i = 0; i < hitsOnLayer.length(); ++i )
1521 {
1522 int isOuter = 1;
1523 if ( ( hitsOnLayer[i]->wire()->xyPosition() - center ).mag() - radius < 0. ) isOuter = -1;
1524 if ( Q > 0. && isOuter == 1 )
1525 {
1526 hitsOnLayer[i]->position( hitsOnLayer[i]->arcZ( 0 ) ); // L
1527 hitsOnLayer[i]->leftRight( 0 ); // L
1528 }
1529 else if ( Q > 0. && isOuter == -1 )
1530 {
1531 hitsOnLayer[i]->position( hitsOnLayer[i]->arcZ( 1 ) ); // R
1532 hitsOnLayer[i]->leftRight( 1 ); // R
1533 }
1534 else if ( Q < 0. && isOuter == 1 )
1535 {
1536 hitsOnLayer[i]->position( hitsOnLayer[i]->arcZ( 1 ) ); // R
1537 hitsOnLayer[i]->leftRight( 1 ); // R
1538 }
1539 else if ( Q < 0. && isOuter == -1 )
1540 {
1541 hitsOnLayer[i]->position( hitsOnLayer[i]->arcZ( 0 ) ); // L
1542 hitsOnLayer[i]->leftRight( 0 ); // L
1543 }
1544 }
1545}
void calVirtualCircle(const TMLink &hit, const TTrack &track, const int LR, HepPoint3D &center, double &radius)

◆ moveLR() [2/2]

bool moveLR ( AList< TMLink > & hitsOnLayer)

Definition at line 1438 of file TBuilderCurl.cxx.

1438 {
1439 unsigned nHits = hitsOnLayer.length();
1440 if ( nHits == 0 ) return false;
1441 // ex) LLLL --> LLLR --> LLRR --> LRRR --> RRRR
1442 if ( hitsOnLayer[nHits - 1]->leftRight() == 1 ) return false; // All R
1443 for ( unsigned i = 0; i < nHits; ++i )
1444 {
1445 if ( hitsOnLayer[i]->leftRight() == 0 )
1446 { // L
1447 hitsOnLayer[i]->leftRight( 1 ); // R
1448 hitsOnLayer[i]->position( hitsOnLayer[i]->arcZ( 1 ) );
1449 return true;
1450 }
1451 }
1452 return false;
1453}

◆ offsetBorder()

int offsetBorder ( TMLink * l)

Definition at line 943 of file TBuilderCurl.cxx.

943 {
944 int layerId = l->hit()->wire()->layerId();
945 int maxLocalId = 79;
946 if ( layerId >= 15 ) maxLocalId = 127;
947 if ( layerId >= 23 ) maxLocalId = 159;
948 if ( layerId >= 32 ) maxLocalId = 207;
949 if ( layerId >= 41 ) maxLocalId = 255;
950 return maxLocalId + 1;
951}
const TMDCWire *const wire(void) const
returns a pointer to a TMDCWire.
unsigned layerId(void) const
returns layer id.

Referenced by makeList().

◆ selectGoodWires()

void selectGoodWires ( const AList< TMLink > & allWires,
AList< TMLink > & goodWires )

Definition at line 1455 of file TBuilderCurl.cxx.

1455 {
1456 goodWires.removeAll();
1457 for ( int i = 0; i < allWires.length(); ++i )
1458 {
1459 if ( allWires[i]->position().x() != -999. ) { goodWires.append( allWires[i] ); }
1460 }
1461}
Double_t x[10]

◆ setLR()

void setLR ( AList< TMLink > & hitsOnLayer,
unsigned LR = 0 )

Definition at line 1420 of file TBuilderCurl.cxx.

1420 {
1421 // LR = 0 : L
1422 // = 1 : R
1423 for ( unsigned i = 0; i < hitsOnLayer.length(); ++i )
1424 {
1425 if ( LR == 0 )
1426 {
1427 hitsOnLayer[i]->leftRight( 0 ); // L
1428 hitsOnLayer[i]->position( hitsOnLayer[i]->arcZ( 0 ) );
1429 }
1430 else
1431 {
1432 hitsOnLayer[i]->leftRight( 1 ); // R
1433 hitsOnLayer[i]->position( hitsOnLayer[i]->arcZ( 1 ) );
1434 }
1435 }
1436}