CMS 3D CMS Logo

DTSectCollPhCand Class Reference

DTSectCollPhCand.h A Trigger Server Phi Candidate More...

#include <L1Trigger/DTSectorCollector/interface/DTSectCollPhCand.h>

List of all members.

Public Member Functions

void clear ()
 Set the SC Candidate step.
void clearBits ()
 Clear (set to 1) the quality bits (but first/second track bit).
void clearBitsSectColl ()
 Clear (set to 1) the quality bits for Sector Collector.
int CoarseSync () const
 Return the Coarse Sync Parameter.
DTConfigSectCollconfig () const
 Configuration set.
unsigned dataword () const
 Return an uint16 with the content of the data word (for debugging).
 DTSectCollPhCand (const DTSectCollPhCand &tsccand)
 Constructor.
 DTSectCollPhCand ()
 Constructor.
 DTSectCollPhCand (DTSC *, const DTChambPhSegm *, int)
 Constructor.
int isFirst () const
 Return first/second track bit value.
bool operator< (const DTSectCollPhCand &c) const
 Operator < used for sorting.
bool operator<= (const DTSectCollPhCand &c) const
 Operator <= used for sorting.
DTSectCollPhCandoperator= (const DTSectCollPhCand &tsccand)
 Assignment operator.
void print () const
 Print the trigger.
void resetCarry ()
 Reset the carry bit.
void setBitsSectColl ()
 Set the bits for DTTSM analysis.
void setSecondTrack ()
 Set the first track bit to second track (used for carry).
DTSCtsc () const
 Return the DTTSS.
const DTChambPhSegmtsTr () const
 Return associated TSPhi trigger.
 ~DTSectCollPhCand ()
 Destructor.

Private Attributes

BitArray< 15 > _dataword
int _isCarry
DTSC_tsc
const DTChambPhSegm_tsmsegm


Detailed Description

DTSectCollPhCand.h A Trigger Server Phi Candidate

Date
2008/06/30 13:44:28

D. Bonacorsi, S. Marcellini

Definition at line 34 of file DTSectCollPhCand.h.


Constructor & Destructor Documentation

DTSectCollPhCand::DTSectCollPhCand ( DTSC tsc,
const DTChambPhSegm tsmsegm,
int  ifs 
)

Constructor.

Definition at line 30 of file DTSectCollPhCand.cc.

References _dataword, BitArray< N >::one(), and BitArray< N >::unset().

00031   : _tsc(tsc), _tsmsegm(tsmsegm) {
00032   _dataword.one();              // reset dataword to 0x1ff
00033   if(ifs==1)_dataword.unset(14); // set bit 14 (0=first, 1=second tracks)
00034 }

DTSectCollPhCand::DTSectCollPhCand (  ) 

Constructor.

Definition at line 37 of file DTSectCollPhCand.cc.

00037                                    {
00038  
00039 }

DTSectCollPhCand::DTSectCollPhCand ( const DTSectCollPhCand tsccand  ) 

Constructor.

DTSectCollPhCand::~DTSectCollPhCand (  ) 

Destructor.

Definition at line 44 of file DTSectCollPhCand.cc.

00044                                    {
00045 }


Member Function Documentation

void DTSectCollPhCand::clear ( void   )  [inline]

Set the SC Candidate step.

Clear the trigger

Definition at line 62 of file DTSectCollPhCand.cc.

References _dataword, _tsmsegm, and BitArray< N >::one().

00062                          { 
00063   _tsmsegm=0; 
00064   _dataword.one();
00065 //   std::cout << " clear dataword : " << _dataword.print() << std::endl;
00066 }

void DTSectCollPhCand::clearBits (  )  [inline]

Clear (set to 1) the quality bits (but first/second track bit).

Definition at line 59 of file DTSectCollPhCand.h.

References _dataword, and BitArray< N >::assign().

00059 { _dataword.assign(5,3,0x7); }

void DTSectCollPhCand::clearBitsSectColl (  )  [inline]

Clear (set to 1) the quality bits for Sector Collector.

Definition at line 62 of file DTSectCollPhCand.h.

References _dataword, and BitArray< N >::assign().

Referenced by setBitsSectColl().

00062 { _dataword.assign(0,13,0x1fff); }

int DTSectCollPhCand::CoarseSync (  )  const

Return the Coarse Sync Parameter.

Definition at line 69 of file DTSectCollPhCand.cc.

References _tsmsegm, DTChambPhSegm::ChamberId(), DTConfigSectColl::CoarseSync(), config(), DTChamberId::sector(), and DTChamberId::station().

Referenced by print(), and DTSectColl::runSectColl().

00069                                   {
00070   int sect= _tsmsegm->ChamberId().sector();
00071   if (sect<13) 
00072     return config()->CoarseSync(_tsmsegm->ChamberId().station());
00073   else 
00074     return config()->CoarseSync(5);
00075 }

DTConfigSectColl* DTSectCollPhCand::config (  )  const [inline]

Configuration set.

Definition at line 79 of file DTSectCollPhCand.h.

References _tsc, and DTSC::config().

Referenced by CoarseSync().

00079 { return _tsc->config(); }

unsigned DTSectCollPhCand::dataword (  )  const [inline]

Return an uint16 with the content of the data word (for debugging).

Definition at line 91 of file DTSectCollPhCand.h.

References _dataword, and BitArray< N >::dataWord().

00091 { return _dataword.dataWord(0)&0x1ff; }

int DTSectCollPhCand::isFirst (  )  const [inline]

Return first/second track bit value.

Definition at line 85 of file DTSectCollPhCand.h.

References _dataword, and BitArray< N >::element().

Referenced by DTSC::addDTSectCollPhCand(), and DTSC::addPhCand().

00085 { return _dataword.element(14)==0; }

bool DTSectCollPhCand::operator< ( const DTSectCollPhCand c  )  const [inline]

Operator < used for sorting.

Definition at line 94 of file DTSectCollPhCand.h.

References _dataword.

00094 { return _dataword<c._dataword; }

bool DTSectCollPhCand::operator<= ( const DTSectCollPhCand c  )  const [inline]

Operator <= used for sorting.

Definition at line 97 of file DTSectCollPhCand.h.

References _dataword.

00097 { return _dataword<=c._dataword; }

DTSectCollPhCand & DTSectCollPhCand::operator= ( const DTSectCollPhCand tsccand  ) 

Assignment operator.

Definition at line 53 of file DTSectCollPhCand.cc.

References _tsc, and _tsmsegm.

00053                                                            {
00054   if(this != &tsccand){
00055     _tsc = tsccand._tsc;
00056     _tsmsegm = tsccand._tsmsegm;
00057   }
00058   return *this;
00059 }

void DTSectCollPhCand::print ( void   )  const

Print the trigger.

Definition at line 110 of file DTSectCollPhCand.cc.

References _dataword, _tsmsegm, CoarseSync(), GenMuonPlsPt100GeV_cfg::cout, BitArray< N >::element(), lat::endl(), BitArray< N >::print(), DTChambPhSegm::pvCode(), and DTChambPhSegm::step().

00110                                 {
00111     std::cout << "Sector Collector Phi Candidate: " << std::endl; 
00112     if(_dataword.element(14)==0) {std::cout << "First track type" << std::endl;}
00113     else {std::cout << "Second track type" << std::endl;}
00114        std::cout << " code=" << _tsmsegm->pvCode();
00115         std::cout << " dataword=";
00116         _dataword.print();
00117     // SM double TSM remove datawordbk section
00118         std::cout << " SC step=" << CoarseSync()+_tsmsegm->step(); 
00119     std::cout << std::endl;
00120   }

void DTSectCollPhCand::resetCarry (  )  [inline]

Reset the carry bit.

Definition at line 68 of file DTSectCollPhCand.h.

References _isCarry.

00068 { _isCarry=0; }

void DTSectCollPhCand::setBitsSectColl (  ) 

Set the bits for DTTSM analysis.

Definition at line 79 of file DTSectCollPhCand.cc.

References _dataword, _tsmsegm, a1, a2, funct::abs(), BitArray< N >::assign(), clearBitsSectColl(), DTChambPhSegm::code(), GenMuonPlsPt100GeV_cfg::cout, DTChambPhSegm::DeltaPsiR(), lat::endl(), and BitArray< N >::unset().

Referenced by DTSC::DTSectCollsort1(), and DTSC::DTSectCollsort2().

00079                                   {
00080 
00081   clearBitsSectColl();
00082     
00083   if(abs(_tsmsegm->DeltaPsiR())>1024 ){ // Check phiB within 10 bits range
00084     std::cout << "DTSectCollPhCand::setBitsSectColl phiB outside valid range: " << _tsmsegm->DeltaPsiR();
00085     std::cout << " deltaPsiR set to 512" <<  std::endl;
00086   }
00087   else {
00088     // SM double TSM
00089     // assign preview in dataword (common to any other assignment)
00090     _dataword.assign(0,10,abs(_tsmsegm->DeltaPsiR()));
00091     // 
00092     int a2  = 12;
00093     int a1  = 11;
00094     int a0  = 10;
00095    
00096     if( _tsmsegm->code()==6 ) { _dataword.unset(a2); _dataword.unset(a1); _dataword.unset(a0); }  // 1-000
00097     if( _tsmsegm->code()==5 ) { _dataword.unset(a2); _dataword.unset(a1); }                         // 1-001
00098     if( _tsmsegm->code()==4 ) { _dataword.unset(a2); _dataword.unset(a0); }                         // 1-010
00099     if( _tsmsegm->code()==3 ) { _dataword.unset(a1); }                                                // 1-101
00100     if( _tsmsegm->code()==2 ) { _dataword.unset(a1); _dataword.unset(a0); }                         // 1-100
00101     // if( _tsmsegm->code()==1 ) no unset needed => 111
00102     if( _tsmsegm->code()==0 ) { _dataword.unset(a0); }                                                // 1-110
00103 
00104   }
00105   
00106 }

void DTSectCollPhCand::setSecondTrack (  )  [inline]

Set the first track bit to second track (used for carry).

Definition at line 65 of file DTSectCollPhCand.h.

References _dataword, _isCarry, and BitArray< N >::set().

Referenced by DTSC::DTSectCollsort1().

00065 { _dataword.set(14); _isCarry=1; }

DTSC* DTSectCollPhCand::tsc (  )  const [inline]

Return the DTTSS.

Definition at line 82 of file DTSectCollPhCand.h.

References _tsc.

00082 { return _tsc; }

const DTChambPhSegm* DTSectCollPhCand::tsTr (  )  const [inline]

Return associated TSPhi trigger.

Definition at line 88 of file DTSectCollPhCand.h.

References _tsmsegm.

Referenced by DTSectColl::runSectColl().

00088 { return _tsmsegm; } 


Member Data Documentation

BitArray<15> DTSectCollPhCand::_dataword [private]

Definition at line 112 of file DTSectCollPhCand.h.

Referenced by clear(), clearBits(), clearBitsSectColl(), dataword(), DTSectCollPhCand(), isFirst(), operator<(), operator<=(), print(), setBitsSectColl(), and setSecondTrack().

int DTSectCollPhCand::_isCarry [private]

Definition at line 114 of file DTSectCollPhCand.h.

Referenced by resetCarry(), and setSecondTrack().

DTSC* DTSectCollPhCand::_tsc [private]

Definition at line 108 of file DTSectCollPhCand.h.

Referenced by config(), operator=(), and tsc().

const DTChambPhSegm* DTSectCollPhCand::_tsmsegm [private]

Definition at line 109 of file DTSectCollPhCand.h.

Referenced by clear(), CoarseSync(), operator=(), print(), setBitsSectColl(), and tsTr().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:19:03 2009 for CMSSW by  doxygen 1.5.4