ATLAS Offline Software
Loading...
Searching...
No Matches
Run1::IDScanZFinderInternal< SpacePoint > Class Template Reference

#include <IDScanZFinderInternal.h>

Collaboration diagram for Run1::IDScanZFinderInternal< SpacePoint >:

Classes

struct  vertex

Public Member Functions

 IDScanZFinderInternal (const std::string &, const std::string &)
virtual ~IDScanZFinderInternal ()
void initializeInternal (long maxLayers, long lastBarrel)
std::vector< vertex > * findZInternal (const std::vector< const SpacePoint * > &spVec, const IRoiDescriptor &roi)
const std::vector< std::vector< long > > * GetnHisto ()
const std::vector< std::vector< double > > * GetzHisto ()
long GetNMax ()
void setLayers (long maxLayers, long lastBarrelLayer)

Protected Member Functions

long fillVectors (const std::vector< const SpacePoint * > &spVec, const IRoiDescriptor &roi, std::vector< double > &phi, std::vector< double > &rho, std::vector< double > &zed, std::vector< long > &lyr, std::vector< long > &filledLayers)
const std::string & getType () const
const std::string & getName () const
const std::string & getVersion () const
int GetInternalStatus () const
int SetInternalStatus (int s)
double computeZV (double r1, double z1, double r2, double z2) const
double computeZV (double r1, double p1, double z1, double r2, double p2, double z2) const
void SetReturnValue (double d)
double GetReturnValue () const

Protected Attributes

long m_IdScan_MaxNumLayers
 maximum number of layers and last barrel layer
long m_IdScan_LastBrlLayer
double m_invPhiSliceSize
long m_NumPhiSlices
double m_phiBinSize
bool m_forcePhiBinSize
double m_usedphiBinSize
double m_ROIphiWidth
double m_usedROIphiWidth
double m_minZBinSize
double m_zBinSizeEtaCoeff
long m_numberOfPeaks
bool m_pixOnly
std::string m_Type
std::string m_Name
int m_Status
bool m_chargeAware
bool m_zHistoPerPhi
double m_dphideta
double m_neighborMultiplier
std::vector< std::vector< long > > m_extraPhi
std::vector< std::vector< long > > m_nHisto [2]
std::vector< std::vector< double > > m_zHisto [2]
long m_NMax
int m_nFirstLayers
double m_vrtxDistCut
double m_vrtxMixing
int m_nvrtxSeparation
bool m_preferCentralZ
bool m_trustSPprovider
double m_returnval
bool m_fullScanMode
int m_tripletMode
double m_tripletDZ
double m_tripletDK
double m_halfTripletDK
double m_tripletDP
double m_weightThreshold
 to apply a hreshold to the found vertex candidates

Detailed Description

template<class SpacePoint>
class Run1::IDScanZFinderInternal< SpacePoint >

Definition at line 39 of file IDScanZFinderInternal.h.

Constructor & Destructor Documentation

◆ IDScanZFinderInternal()

template<class SpacePoint>
Run1::IDScanZFinderInternal< SpacePoint >::IDScanZFinderInternal ( const std::string & type,
const std::string & name )

to allow variable size layers

why is this called from the constructor ???? it is called again during initialise? do not call that here initializeInternal( m_IdScan_MaxNumLayers, m_IdScan_LastBrlLayer );

Definition at line 172 of file IDScanZFinderInternal.h.

174 : m_Type (type),
175 m_Name (name)
176{
177 m_phiBinSize = 0.2 ;
180 m_pixOnly = false ;
181 m_ROIphiWidth = 0.2 ;
183 m_minZBinSize = 0.2 ;
184 m_zBinSizeEtaCoeff = 0.1 ;
185 m_dphideta = -0.02 ;
187 m_numberOfPeaks = 1 ;
190 m_NMax = 0 ;
191 m_nFirstLayers = 3 ;
192 m_vrtxDistCut = 0. ;
193 m_vrtxMixing = 0. ;
197 m_returnval = 0 ;
199 m_tripletMode = 0 ;
200 m_tripletDZ = 25. ;
201 m_tripletDK = 0.005 ;
203 m_tripletDP = 0.05 ;
204
205 // m_applyWeightThreshold = false;
207
208
210 m_IdScan_MaxNumLayers = 20; // dphiEC depends on this value !!! 19 without IBL, 20 with IBL!!
211 m_IdScan_LastBrlLayer = 7; // dphiBrl depends on this value
212
214 m_NumPhiSlices = 0;
215
219
220 // cppcheck-suppress missingReturn; false positive
221 m_Status = 0;
222}
double m_weightThreshold
to apply a hreshold to the found vertex candidates
long m_IdScan_MaxNumLayers
maximum number of layers and last barrel layer

◆ ~IDScanZFinderInternal()

template<class SpacePoint>
virtual Run1::IDScanZFinderInternal< SpacePoint >::~IDScanZFinderInternal ( )
inlinevirtual

Definition at line 52 of file IDScanZFinderInternal.h.

52{};

Member Function Documentation

◆ computeZV() [1/2]

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::computeZV ( double r1,
double p1,
double z1,
double r2,
double p2,
double z2 ) const
protected

Definition at line 320 of file IDScanZFinderInternal.h.

321 {
322 double x1, y1, x2, y2;
323 //sincos( p1, &y1, &x1 ); x1 *= r1; y1 *= r1;
324 //sincos( p2, &y2, &x2 ); x2 *= r2; y2 *= r2;
325 x1 = r1 * cos(p1);
326 x2 = r2 * cos(p2);
327 y1 = r1 * sin(p1);
328 y2 = r2 * sin(p2);
329
330#define _COMPUTEX0_
331#ifdef _COMPUTEX0_
332 double slope = (y2-y1)/(x2-x1);
333 double invslope = 1./slope;
334 double x0 = (slope*x1-y1)/(slope+invslope);
335 //double y0 = -1*x0*invslope;
336 double d0sqr = x0*x0*(1+invslope*invslope);
337 // s1 and s2 are the track lengths from the point of closest approach
338 double s1 = sqrt(r1*r1-d0sqr);
339 double s2 = sqrt(r2*r2-d0sqr); // or s1*(x1-x0)/(x2-x0)
340#else
341 double inv_dels = 1./sqrt( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) );
342 double dotrr = x1*x2 + y1*y2;
343 double s1 = ( dotrr - r1*r1 ) * inv_dels;
344 double s2 = ( r2*r2 - dotrr ) * inv_dels;
345#endif
346
347 return (z2*s1-z1*s2)/(s1-s2);
348}

◆ computeZV() [2/2]

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::computeZV ( double r1,
double z1,
double r2,
double z2 ) const
protected

Definition at line 315 of file IDScanZFinderInternal.h.

315 {
316 return (z2*r1-z1*r2)/(r1-r2);
317}

◆ fillVectors()

template<class SpacePoint>
long Run1::IDScanZFinderInternal< SpacePoint >::fillVectors ( const std::vector< const SpacePoint * > & spVec,
const IRoiDescriptor & roi,
std::vector< double > & phi,
std::vector< double > & rho,
std::vector< double > & zed,
std::vector< long > & lyr,
std::vector< long > & filledLayers )
protected

get from roi now

DOES NOT span the phi=pi boundary

DOES span the phi=pi boundary

resize excluding points outside the RoI

Definition at line 351 of file IDScanZFinderInternal.h.

358{
360
361 // full scan check
363
364 long nSPs = spVec.size();
365
366 // to shift the phi of space points as if the RoI starts at phi~0
367 // assumes that RoI->phi0() and the SPs are in range [-pi,+pi]
368 //
369 double roiPhiMin, roiPhiMax;
370
371 if ( m_fullScanMode || roi.isFullscan() ) {
372 roiPhiMin = -M_PI;
373 roiPhiMax = M_PI;
374 }
375 else {
376 // If we trust that all the SPs are properly input, we determine the RoI phi width
377 // using the SPs themselves.
378 // If the RoI phi range is wider than pi, we keep everything as usual.
380 {
381 double roiPhiPosMin( 9.9), roiPhiPosMax(0);
382 double roiPhiNegMin(-9.9), roiPhiNegMax(0); // least negative and most negative
383 for(long i=0; i<nSPs; ++i, ++SpItr)
384 {
385 double spphi = (*SpItr)->phi();
388
391 }
392
393 if ( roiPhiNegMax > roiPhiNegMin ) {
394 // if all SPs are in (0, pi):
397 }
398 else if ( roiPhiPosMax < roiPhiPosMin ) {
399 // if all SPs are in (-pi, 0):
402 }
403 else if ( roiPhiPosMin - roiPhiNegMin < M_PI ) {
404 // if we have an RoI that covers phi=0 axis
407 }
408 else {
409 // if we have an RoI that covers phi=pi axis
412 }
413
414 roiPhiMin -= 1e-10;
415 roiPhiMax += 1e-10;
416
417 SpItr = spVec.begin(); // rewind the iterator
418 }
419 else {
420
422 if ( roi.phiMinus()==roi.phiPlus() ) {
423 roiPhiMin = roi.phi()-0.5*m_usedROIphiWidth;
424 roiPhiMax = roi.phi()+0.5*m_usedROIphiWidth;
427 }
428 else {
429 // already wrapped by RoiDescriptor
430 roiPhiMin = roi.phiMinus();
431 roiPhiMax = roi.phiPlus();
432 }
433
434 }
435
436 }
437
438
439 double dphi = roiPhiMax-roiPhiMin;
440 if ( dphi<0 ) dphi+=2*M_PI;
441
443
444 // std::cout << "m_usedROIphiWidth: " << m_usedROIphiWidth << std::endl;
446
447
449
450 int icount = 0;
451
452 if(!piBound)
453 {
455 for(long i=0; i<nSPs; ++i, ++SpItr)
456 {
457 if (m_pixOnly && !(*SpItr)->isPixel()) continue;
458 double phi2 = (*SpItr)->phi() - roiPhiMin;
459
460 if ( phi2>=0 && phi2<dphi ) {
461 phi[i] = phi2;
462 rho[i] = (*SpItr)->r();
463 zed[i] = (*SpItr)->z();
464 lyr[i] = (*SpItr)->layer();
465 lcount[lyr[i]]=true;
466 ++icount;
467 }
468 }
469 }
470 else
471 {
473 for(long i=0; i<nSPs; ++i, ++SpItr)
474 {
475 if (m_pixOnly && !(*SpItr)->isPixel()) continue;
476 double phi2 = (*SpItr)->phi() - roiPhiMin;
477 if( phi2<0.0) phi2+=2*M_PI;
478
479 if ( phi2>=0 && phi2<dphi ) {
480 phi[i] = phi2;
481 rho[i] = (*SpItr)->r();
482 zed[i] = (*SpItr)->z();
483 lyr[i] = (*SpItr)->layer();
484 lcount[lyr[i]]=true;
485 ++icount;
486 }
487 }
488 }
489
490 if ( icount<nSPs ) {
491
492 // std::cout << "IDScanZFinderInternal::fillVectors() filtered some spacepoints " << nSPs
493 // << " -> " << icount << std::endl;
495 phi.resize(icount);
496 rho.resize(icount);
497 zed.resize(icount);
498 lyr.resize(icount);
499
500 nSPs = icount;
501 }
502
503
504 // Store in filledLayers the layerNumber of those layers that contain hits.
505 // So, if there are hits in layers 1,3,8 filledLayers[0]=1, filledLayers[1]=3
506 // and filledLayers[2]=8
507 //
508 long filled = 0;
509 for ( long i=0; i<m_IdScan_MaxNumLayers; ++i ) {
510 if ( lcount[i] ) {
512 ++filled;
513 }
514 }
515
516 // std::cout << "SUTT NSP : " << phi.size() << " " << spVec.size() << std::endl;
517 // for ( unsigned i=0 ; i<phi.size() ; i++ ) {
518 // std::cout << "SUTT SP : " << i << "\tphi " << phi[i] << "\tz " << zed[i] << "\tr " << rho[i] << std::endl;
519 // }
520
521 return filled;
522}

◆ findZInternal()

template<class SpacePoint>
std::vector< typename IDScanZFinderInternal< SpacePoint >::vertex > * Run1::IDScanZFinderInternal< SpacePoint >::findZInternal ( const std::vector< const SpacePoint * > & spVec,
const IRoiDescriptor & roi )

First calculate the pedestal to be subtracted (only used in the HI case at the moment)

skip bins used for the vertex candidates

if ( ztest >= maxh && ( ( m_applyWeightThreshold && ztest>m_weightThreshold ) || !m_applyWeightThreshold ) ) { apply threshold later - should we wish it

if we are in triplet mode, even a single pair means 3 consistent hits also bomb out if no maximum (above threshold) is found

if found a vertex flag the bins so we don't use them again

at this point we have the histogram with the highest N vertices removed so we can find the "non vertex" pedestal from these, although it will be somewhat lower than perhaps it should be, in case some of the "vertices" we are removing are just random upwards fluctuations

NB: have moved pedestal calculation to before the extraction of the vertices if we calculate it after, then we have too low a pedestal if some vertices are really random fluctuations. If we calculate it before then we overestimate the pedestal, really we should try to decide how many real vertices we have, and then only exclude them, but that level of detail is probably not justified by the correlation with the offline track multiplicity on the vertex

copy vertices to output vector - this is so we can first impose cuts on the vertices we have found should we wish to

NB: if m_weightThreshold==0 then pedestal == 0 also
AAAAAAAAARRRGHH!!! This is ridiculous, passing parameters about differently because we don't have a proper interface defined

Definition at line 525 of file IDScanZFinderInternal.h.

527{
529
530 long nsp = spVec.size();
531 if ( !nsp ) return output; //No points - return nothing
532
534
535 // Creating vectors of doubles/longs for storing phi,rho,z and layer of space points.
536 // filledLayers is used to know which of all layers contain space points
537 // and fill with relevant info...
538 //
541
542 long filled = this->fillVectors( spVec, roi, phi, rho, zed, lyr, filledLayers);
543
544 nsp = phi.size();
545
546 // std::cout << "SUTT roi " << roi << "nsp: " << nsp << std::endl;
547
548 double zMin = roi.zedMinus();
549 double zMax = roi.zedPlus();
550
551 // The bin size of the z-histo -and hence the number of bins-
552 // depends on the RoI's |eta| (to account for worsening z-resolution)
553 //
554 const double ZBinSize = m_minZBinSize + m_zBinSizeEtaCoeff*fabs(roi.eta());
555 const double invZBinSize = 1./ZBinSize;
556
557
558 const long HalfZhistoBins = long ( ceil( 0.5*(zMax-zMin)*invZBinSize ) );
559 const long NumZhistoBins = 2*HalfZhistoBins;
560
561 // number of phi bins to look at will get fewer as eta increases
562 const long extraPhiNeg = static_cast<long> ( floor( (0.9 - fabs(roi.eta()))*m_dphideta*m_invPhiSliceSize*m_neighborMultiplier ) );
563
564
565
566 // These are the z-Histograms
567 // Two sets are defined: {n/z}Histo[0][phi][z] will be for positively bending tracks
568 // {n/z}Histo[1][phi][z] will be for negatively bending tracks
569 //
570
572
573 // std::vector < std::vector < std::vector<long> > > nHisto( 2, std::vector < std::vector<long> > (numZhistos, std::vector<long> () ) );
574 // std::vector < std::vector < std::vector<double> > > zHisto( 2, std::vector < std::vector<double> > (numZhistos, std::vector<double>() ) );
575
576 for ( int i=2 ; i-- ; ) { m_nHisto[i].clear(); m_nHisto[i].resize(numZhistos); }
577 for ( int i=2 ; i-- ; ) { m_zHisto[i].clear(); m_zHisto[i].resize(numZhistos); }
578
581
582 m_NMax = 0;
583
584
585
586
587 //Make a vector of all the PhiSlice instances we need
589 for ( unsigned int sliceIndex = 0; sliceIndex < m_NumPhiSlices; sliceIndex++ )
590 {
594 }
595
596 int allSlicesSize = allSlices.size();
597 //Populate the slices
598 for ( long pointIndex = 0; pointIndex < nsp; pointIndex++ )
599 {
601 if (phiIndex > allSlicesSize) {
602 continue;
603 }
604 allSlices[ phiIndex ]->AddPoint( rho[ pointIndex ], zed[ pointIndex ], phi[ pointIndex ], lyr[ pointIndex ] );
605 }
606
607 //Read out the slices into flat structures for the whole layers
613 for ( unsigned int sliceIndex = 0; sliceIndex < m_NumPhiSlices; sliceIndex++ )
614 {
616 }
617
618 //One histogram per phi slice?
619 if ( m_zHistoPerPhi )
620 {
621 //Allocate all the histograms
622 for ( unsigned int sliceIndex = 0; sliceIndex < m_NumPhiSlices; sliceIndex++ )
623 {
624 nHisto[0][sliceIndex].resize( NumZhistoBins + 1 );
625 zHisto[0][sliceIndex].resize( NumZhistoBins + 1 );
626 }
627 if ( m_chargeAware )
628 {
629 for ( unsigned int sliceIndex = 0; sliceIndex < m_NumPhiSlices; sliceIndex++ )
630 {
631 nHisto[1][sliceIndex].resize( NumZhistoBins + 1 );
632 zHisto[1][sliceIndex].resize( NumZhistoBins + 1 );
633 }
634 }
635
636 //Populate the histograms
637 for ( unsigned int sliceIndex = 0; sliceIndex < m_NumPhiSlices; sliceIndex++ )
638 {
639 allSlices[ sliceIndex ]->GetHistogram( &( nHisto[0][sliceIndex] ), &( zHisto[0][sliceIndex] ),
640 &( nHisto[1][sliceIndex] ), &( zHisto[1][sliceIndex] ),
642 //Note the extra arguments here - pointers to the whole histogram collection
643 //This allows the filling of neighbouring slice histograms as required, but breaks thread safety
644
645 delete allSlices[ sliceIndex ];
646 }
647 }
648 else
649 {
650 //Allocate the z-axis histograms
651 nHisto[0][0].resize( NumZhistoBins + 1 );
652 zHisto[0][0].resize( NumZhistoBins + 1 );
653 if ( m_chargeAware )
654 {
655 nHisto[1][0].resize( NumZhistoBins + 1 );
656 zHisto[1][0].resize( NumZhistoBins + 1 );
657 }
658
659 //Populate the histogram - fast and memory-efficient, but not thread safe (use MakeHistogram for thread safety)
660 for ( unsigned int sliceIndex = 0; sliceIndex < m_NumPhiSlices; sliceIndex++ )
661 {
662 allSlices[ sliceIndex ]->GetHistogram( &( nHisto[0][0] ), &( zHisto[0][0] ),
663 &( nHisto[1][0] ), &( zHisto[1][0] ),
665 delete allSlices[ sliceIndex ];
666 }
667 }
668
669 /*
670 printf("etaRoI: %f\n", etaRoI);
671 printf("ZBinSize: %f\n", ZBinSize);
672 printf("m_minZBinSize %f\n", m_minZBinSize);
673 printf("NumZhistoBins: %d\n",NumZhistoBins);
674 */
675
676
677
680
681 double pedestal = 0;
682
683 if ( m_weightThreshold>0 ) {
684
685 int count = 0;
686
687 for ( long zpm=0; zpm<1 || ( m_chargeAware && zpm<2 ) ; ++zpm ) {
688
690
691 if((*nfiter).empty()) continue; // only check the filled zHistos
692 if((*nfiter).size() <= 2 ) continue;// this is only a protection : with proper inputs to zfinder, it is always satisfied
693
694 for(std::vector<long>::iterator niter=nfiter->begin()+2; niter!=nfiter->end(); ++niter ) {
696 if ( *niter>=0 ) {
697 count++;
698 pedestal += *(niter) + *(niter-1) + *(niter-2);
699 }
700 }
701 }
702 }
703
704 if ( count>0 ) pedestal /= count;
705
706 }
707
708
709
710
711 // Now the nHisto's are filled; find the 3 consecutive bins with the highest number of entries...
712 //
713
716
717
718
719 while((int)zoutput.size() < m_numberOfPeaks) {
720
721 long maxh=0; // was 1 before triplets were introduced
722 long binMax=0;
723 long bending=0, bestPhi=0;
724 long ztest;
725
726 for ( long zpm=0; zpm<1 || ( m_chargeAware && zpm<2 ) ; ++zpm ) {
727
729
730 if((*nfiter).empty()) continue; // only check the filled zHistos
731 if((*nfiter).size() <= 2 ) continue;// this is only a protection : with proper inputs to zfinder, it is always satisfied
732
733 for(std::vector<long>::iterator niter=(*nfiter).begin()+2; niter!=(*nfiter).end(); ++niter ) {
734
735 ztest = *(niter-2) + *(niter-1) + *(niter);
736 if ( ztest <= 0 || ztest < maxh ) continue;
739 if ( ztest >= maxh ) { // && ztest>m_weightThreshold ) {
740 long bintest = niter-(*nfiter).begin()-1;
741 if ( ztest > maxh ||
742 // for two candidates at same "height", prefer the more central one
744 maxh = ztest;
745 binMax = bintest;
746 bestPhi = nfiter-nHisto[zpm].begin();
747 bending = zpm;
748 }
749 }
750 }// end of niter loop
751 }
752 }
753 m_NMax = maxh;
756 if ( maxh==0 || ( m_tripletMode==0 && maxh<2 ) ) {
757 break;
758 }
759
760 // ...and compute the "entries-weighted" average bin position
761
762 double weightedMax = ( zHisto[bending][bestPhi][binMax] +
765
767 if ( m_numberOfPeaks>1 ) {
769 nHisto[bending][bestPhi][binMax-1] = -1;
770 nHisto[bending][bestPhi][binMax+1] = -1;
772 zHisto[bending][bestPhi][binMax-1] = 0;
773 zHisto[bending][bestPhi][binMax+1] = 0;
774 }
775
776 int closestVtx = -1; // find the closest vertex already put into the output list
777 float dist2closestVtx = 1000; // should be larger than m_ZFinder_MaxZ*2
778 for ( size_t iv = 0; iv < zoutput.size(); ++iv )
780 closestVtx = iv;
782 }
783
788 } else {
789 zoutput.push_back( weightedMax );
790 woutput.push_back( maxh );
791 }
792
793 }
794
795
800
808
811
812
813#if 0
814 if ( m_weightThreshold>0 ) {
815
823
824 for ( unsigned i=0 ; i<zoutput.size() ; i++ ) {
827 output->push_back( woutput[i] - pedestal );
828 }
829
830 }
831 else {
832 for ( unsigned i=0 ; i<zoutput.size() ; i++ ) output->push_back( zoutput[i] );
833 }
834
835
836#else
837
841 if ( m_weightThreshold>0 ) {
842 for ( unsigned i=0 ; i<zoutput.size() ; i++ ) {
843 output->push_back( vertex( woutput[i] - pedestal, zoutput[i] ) );
844 }
845 }
846 else {
847 for ( unsigned i=0 ; i<zoutput.size() ; i++ ) {
848 output->push_back( vertex( zoutput[i], woutput[i] - pedestal ) );
849 }
850 }
851
852
853#endif
854
855 // std::cout << "SUTT zoutput size " << zoutput.size() << "\t" << roi << std::endl;
856 // for ( unsigned i=0 ; i<zoutput.size() ; i++ ) std::cout << "SUTT zoutput " << i << "\t" << zoutput[i] << std::endl;
857
858 return output;
859}
Scalar phi() const
phi method
std::vector< std::vector< long > > m_extraPhi
std::vector< std::vector< double > > m_zHisto[2]
long fillVectors(const std::vector< const SpacePoint * > &spVec, const IRoiDescriptor &roi, std::vector< double > &phi, std::vector< double > &rho, std::vector< double > &zed, std::vector< long > &lyr, std::vector< long > &filledLayers)
std::vector< std::vector< long > > m_nHisto[2]

◆ GetInternalStatus()

template<class SpacePoint>
int Run1::IDScanZFinderInternal< SpacePoint >::GetInternalStatus ( ) const
inlineprotected

Definition at line 81 of file IDScanZFinderInternal.h.

81{ return m_Status; }

◆ getName()

template<class SpacePoint>
const std::string & Run1::IDScanZFinderInternal< SpacePoint >::getName ( ) const
inlineprotected

Definition at line 78 of file IDScanZFinderInternal.h.

78{ return m_Name; }

◆ GetnHisto()

template<class SpacePoint>
const std::vector< std::vector< long > > * Run1::IDScanZFinderInternal< SpacePoint >::GetnHisto ( )
inline

Definition at line 58 of file IDScanZFinderInternal.h.

58{ return m_nHisto; }

◆ GetNMax()

template<class SpacePoint>
long Run1::IDScanZFinderInternal< SpacePoint >::GetNMax ( )
inline

Definition at line 61 of file IDScanZFinderInternal.h.

61{ return m_NMax; }

◆ GetReturnValue()

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::GetReturnValue ( ) const
inlineprotected

Definition at line 88 of file IDScanZFinderInternal.h.

88{ return m_returnval; }

◆ getType()

template<class SpacePoint>
const std::string & Run1::IDScanZFinderInternal< SpacePoint >::getType ( ) const
inlineprotected

Definition at line 77 of file IDScanZFinderInternal.h.

77{ return m_Type; }

◆ getVersion()

template<class SpacePoint>
const std::string & Run1::IDScanZFinderInternal< SpacePoint >::getVersion ( ) const
inlineprotected

Definition at line 79 of file IDScanZFinderInternal.h.

79{ return mZFIVER; }

◆ GetzHisto()

template<class SpacePoint>
const std::vector< std::vector< double > > * Run1::IDScanZFinderInternal< SpacePoint >::GetzHisto ( )
inline

Definition at line 59 of file IDScanZFinderInternal.h.

59{ return m_zHisto; }

◆ initializeInternal()

template<class SpacePoint>
void Run1::IDScanZFinderInternal< SpacePoint >::initializeInternal ( long maxLayers,
long lastBarrel )

this has to be computed event by event !!! m_NumPhiSlices = long (ceil( m_usedROIphiWidth*m_invPhiSliceSize ));

barrel

standard Endcap

increment all the layer ids by one because of the IBL IF and ONLY IF the IBL is included

Definition at line 227 of file IDScanZFinderInternal.h.

228{
230
233
234 // std::cout << "m_IdScan_MaxNumLayers " << m_IdScan_MaxNumLayers
235 // << "\tm_IdScan_LastBrlLayer " << m_IdScan_LastBrlLayer << std::endl;
236
237 // number of phi neighbours to look at
238 // if ( m_extraPhi.size()==0 )
240
243
244 // from IDScanZFinder::initialize
247 if ( m_dphideta > 0 ) m_dphideta *= -m_dphideta;
248
252
253 for (long l1=0; l1<m_IdScan_MaxNumLayers-1; ++l1) {
254 for (long l2=l1+1; l2<m_IdScan_MaxNumLayers; ++l2) {
255 m_extraPhi[l1][l2]=1; // look at a single phi neighbour
256 }
257 }
258
260
261 long first_layer = 0;
262 long offset_layer = 1;
263 if ( m_IdScan_MaxNumLayers<20 ) {
264 first_layer = 1;
265 offset_layer = 0;
266 }
267
268 long lyrcnt = 0;
269 for (long l1=0; l1<m_IdScan_LastBrlLayer; ++l1) {
270 for (long l2=l1+1; l2<=m_IdScan_LastBrlLayer; ++l2) {
271 double dphi = ZF_dphiBrl[lyrcnt + 7*first_layer];
273 m_extraPhi[l1][l2]=static_cast<long>( ceil( sqrt(dphi*dphi+ZF_phiRes*ZF_phiRes*2) * m_invPhiSliceSize ) );
274
275 // std::cout << "test 1 " << l1 << " " << l2 << "\tmax : " << m_IdScan_MaxNumLayers << std::endl;
276
277 if (m_extraPhi[l1][l2]<1) m_extraPhi[l1][l2]=1;
278 // std::cout << "Delta Phi between layers " << l1 << " and " << l2
279 // << " = "<< ZF_dphiBrl[lyrcnt]
280 // << " rads ( " << m_extraPhi[l1][l2] << " bins including phi resln.)\n";
281 lyrcnt++;
282 }
283 }
284
285
287
288
289
290 for ( long lyrpair=12*first_layer ; lyrpair<117; ++lyrpair ) {
291
292 double dphi = ZF_dphiEC[lyrpair*4+2];
295 long l1 = (long)ZF_dphiEC[lyrpair*4] + offset_layer;
296 long l2 = (long)ZF_dphiEC[lyrpair*4+1] + offset_layer;
297 double eta = ZF_dphiEC[lyrpair*4+3];
298 // std::cout << "Delta Phi between layers " << l1 << " and " << l2
299 // << " = " << dphi << " rads @ eta=" << eta
300 // << ". Extrapolate it to eta=0.9 to get ";
301 dphi = dphi + m_dphideta * ( 0.9 - eta );
304
305 if (m_extraPhi[l1][l2]<1) m_extraPhi[l1][l2]=1;
306
307 // std::cout << "test 2 " << l1 << " " << l2 << "\tmax : " << m_IdScan_MaxNumLayers << std::endl;
308
309 // std::cout << dphi << " rads ( " << m_extraPhi[l1][l2] << " bins including phi resln.)\n";
310 }
311
312}

◆ SetInternalStatus()

template<class SpacePoint>
int Run1::IDScanZFinderInternal< SpacePoint >::SetInternalStatus ( int s)
inlineprotected

Definition at line 82 of file IDScanZFinderInternal.h.

82{ m_Status = s; return m_Status; }

◆ setLayers()

template<class SpacePoint>
void Run1::IDScanZFinderInternal< SpacePoint >::setLayers ( long maxLayers,
long lastBarrelLayer )
inline

Definition at line 64 of file IDScanZFinderInternal.h.

64 {
65 m_IdScan_MaxNumLayers = maxLayers; // dphiEC depends on this value
66 m_IdScan_LastBrlLayer = lastBarrelLayer; // dphiBrl depends on this value
67 }

◆ SetReturnValue()

template<class SpacePoint>
void Run1::IDScanZFinderInternal< SpacePoint >::SetReturnValue ( double d)
inlineprotected

Definition at line 87 of file IDScanZFinderInternal.h.

87{ m_returnval=d; }

Member Data Documentation

◆ m_chargeAware

template<class SpacePoint>
bool Run1::IDScanZFinderInternal< SpacePoint >::m_chargeAware
protected

Definition at line 120 of file IDScanZFinderInternal.h.

◆ m_dphideta

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::m_dphideta
protected

Definition at line 123 of file IDScanZFinderInternal.h.

◆ m_extraPhi

template<class SpacePoint>
std::vector< std::vector<long> > Run1::IDScanZFinderInternal< SpacePoint >::m_extraPhi
protected

Definition at line 126 of file IDScanZFinderInternal.h.

◆ m_forcePhiBinSize

template<class SpacePoint>
bool Run1::IDScanZFinderInternal< SpacePoint >::m_forcePhiBinSize
protected

Definition at line 104 of file IDScanZFinderInternal.h.

◆ m_fullScanMode

template<class SpacePoint>
bool Run1::IDScanZFinderInternal< SpacePoint >::m_fullScanMode
protected

Definition at line 146 of file IDScanZFinderInternal.h.

◆ m_halfTripletDK

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::m_halfTripletDK
protected

Definition at line 151 of file IDScanZFinderInternal.h.

◆ m_IdScan_LastBrlLayer

template<class SpacePoint>
long Run1::IDScanZFinderInternal< SpacePoint >::m_IdScan_LastBrlLayer
protected

Definition at line 95 of file IDScanZFinderInternal.h.

◆ m_IdScan_MaxNumLayers

template<class SpacePoint>
long Run1::IDScanZFinderInternal< SpacePoint >::m_IdScan_MaxNumLayers
protected

maximum number of layers and last barrel layer

Definition at line 94 of file IDScanZFinderInternal.h.

◆ m_invPhiSliceSize

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::m_invPhiSliceSize
protected

Definition at line 100 of file IDScanZFinderInternal.h.

◆ m_minZBinSize

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::m_minZBinSize
protected

Definition at line 108 of file IDScanZFinderInternal.h.

◆ m_Name

template<class SpacePoint>
std::string Run1::IDScanZFinderInternal< SpacePoint >::m_Name
protected

Definition at line 116 of file IDScanZFinderInternal.h.

◆ m_neighborMultiplier

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::m_neighborMultiplier
protected

Definition at line 124 of file IDScanZFinderInternal.h.

◆ m_nFirstLayers

template<class SpacePoint>
int Run1::IDScanZFinderInternal< SpacePoint >::m_nFirstLayers
protected

Definition at line 135 of file IDScanZFinderInternal.h.

◆ m_nHisto

template<class SpacePoint>
std::vector< std::vector<long> > Run1::IDScanZFinderInternal< SpacePoint >::m_nHisto[2]
protected

Definition at line 130 of file IDScanZFinderInternal.h.

◆ m_NMax

template<class SpacePoint>
long Run1::IDScanZFinderInternal< SpacePoint >::m_NMax
protected

Definition at line 133 of file IDScanZFinderInternal.h.

◆ m_numberOfPeaks

template<class SpacePoint>
long Run1::IDScanZFinderInternal< SpacePoint >::m_numberOfPeaks
protected

Definition at line 111 of file IDScanZFinderInternal.h.

◆ m_NumPhiSlices

template<class SpacePoint>
long Run1::IDScanZFinderInternal< SpacePoint >::m_NumPhiSlices
protected

Definition at line 101 of file IDScanZFinderInternal.h.

◆ m_nvrtxSeparation

template<class SpacePoint>
int Run1::IDScanZFinderInternal< SpacePoint >::m_nvrtxSeparation
protected

Definition at line 139 of file IDScanZFinderInternal.h.

◆ m_phiBinSize

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::m_phiBinSize
protected

Definition at line 103 of file IDScanZFinderInternal.h.

◆ m_pixOnly

template<class SpacePoint>
bool Run1::IDScanZFinderInternal< SpacePoint >::m_pixOnly
protected

Definition at line 113 of file IDScanZFinderInternal.h.

◆ m_preferCentralZ

template<class SpacePoint>
bool Run1::IDScanZFinderInternal< SpacePoint >::m_preferCentralZ
protected

Definition at line 140 of file IDScanZFinderInternal.h.

◆ m_returnval

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::m_returnval
protected

Definition at line 144 of file IDScanZFinderInternal.h.

◆ m_ROIphiWidth

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::m_ROIphiWidth
protected

Definition at line 106 of file IDScanZFinderInternal.h.

◆ m_Status

template<class SpacePoint>
int Run1::IDScanZFinderInternal< SpacePoint >::m_Status
protected

Definition at line 118 of file IDScanZFinderInternal.h.

◆ m_tripletDK

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::m_tripletDK
protected

Definition at line 150 of file IDScanZFinderInternal.h.

◆ m_tripletDP

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::m_tripletDP
protected

Definition at line 152 of file IDScanZFinderInternal.h.

◆ m_tripletDZ

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::m_tripletDZ
protected

Definition at line 149 of file IDScanZFinderInternal.h.

◆ m_tripletMode

template<class SpacePoint>
int Run1::IDScanZFinderInternal< SpacePoint >::m_tripletMode
protected

Definition at line 148 of file IDScanZFinderInternal.h.

◆ m_trustSPprovider

template<class SpacePoint>
bool Run1::IDScanZFinderInternal< SpacePoint >::m_trustSPprovider
protected

Definition at line 142 of file IDScanZFinderInternal.h.

◆ m_Type

template<class SpacePoint>
std::string Run1::IDScanZFinderInternal< SpacePoint >::m_Type
protected

Definition at line 115 of file IDScanZFinderInternal.h.

◆ m_usedphiBinSize

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::m_usedphiBinSize
protected

Definition at line 105 of file IDScanZFinderInternal.h.

◆ m_usedROIphiWidth

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::m_usedROIphiWidth
protected

Definition at line 107 of file IDScanZFinderInternal.h.

◆ m_vrtxDistCut

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::m_vrtxDistCut
protected

Definition at line 137 of file IDScanZFinderInternal.h.

◆ m_vrtxMixing

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::m_vrtxMixing
protected

Definition at line 138 of file IDScanZFinderInternal.h.

◆ m_weightThreshold

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::m_weightThreshold
protected

to apply a hreshold to the found vertex candidates

Definition at line 156 of file IDScanZFinderInternal.h.

◆ m_zBinSizeEtaCoeff

template<class SpacePoint>
double Run1::IDScanZFinderInternal< SpacePoint >::m_zBinSizeEtaCoeff
protected

Definition at line 109 of file IDScanZFinderInternal.h.

◆ m_zHisto

template<class SpacePoint>
std::vector< std::vector<double> > Run1::IDScanZFinderInternal< SpacePoint >::m_zHisto[2]
protected

Definition at line 131 of file IDScanZFinderInternal.h.

◆ m_zHistoPerPhi

template<class SpacePoint>
bool Run1::IDScanZFinderInternal< SpacePoint >::m_zHistoPerPhi
protected

Definition at line 121 of file IDScanZFinderInternal.h.


The documentation for this class was generated from the following file: