CMS 3D CMS Logo

Public Member Functions | Private Attributes

TkCommonModeTopology Class Reference

#include <TkCommonModeTopology.h>

List of all members.

Public Member Functions

std::vector< int > & finalStrips ()
std::vector< int > & initialStrips ()
int numberOfSets () const
int numberOfStrips () const
int numberOfStripsPerSet () const
void setNumberOfSets (int in)
void setNumberOfStrips (int in)
void setNumberOfStripsPerSet (int in)
int setOfStrip (int)
 TkCommonModeTopology (int nstrips, int nstripsperset)

Private Attributes

std::vector< int > finStrips
std::vector< int > initStrips
int numberStrips
int numberStripsPerSet

Detailed Description

Allows any topology for the Common Mode: 128 strips, 64, 32, 16, 8, ....

Definition at line 8 of file TkCommonModeTopology.h.


Constructor & Destructor Documentation

TkCommonModeTopology::TkCommonModeTopology ( int  nstrips,
int  nstripsperset 
)

Definition at line 10 of file TkCommonModeTopology.cc.

References finStrips, i, initStrips, numberOfSets(), and numberOfStripsPerSet().

                                                                         : numberStrips(nstrips), 
  numberStripsPerSet(nstripsperset){
  initStrips.clear();
  finStrips.clear();
  for (int i=0; i<numberOfSets(); i++){
    initStrips.push_back(i*numberOfStripsPerSet());
    finStrips.push_back((i+1)*numberOfStripsPerSet()-1);
  }
}

Member Function Documentation

std::vector<int>& TkCommonModeTopology::finalStrips ( ) [inline]

Definition at line 28 of file TkCommonModeTopology.h.

References finStrips.

Referenced by TT6CommonModeCalculator::calculateCommonMode(), and setOfStrip().

{return finStrips;}
std::vector<int>& TkCommonModeTopology::initialStrips ( ) [inline]

Definition at line 27 of file TkCommonModeTopology.h.

References initStrips.

Referenced by TT6CommonModeCalculator::calculateCommonMode(), and setOfStrip().

{return initStrips;}
int TkCommonModeTopology::numberOfSets ( ) const [inline]
int TkCommonModeTopology::numberOfStrips ( ) const [inline]

Definition at line 20 of file TkCommonModeTopology.h.

References numberStrips.

{return numberStrips;}
int TkCommonModeTopology::numberOfStripsPerSet ( ) const [inline]

Definition at line 21 of file TkCommonModeTopology.h.

References numberStripsPerSet.

Referenced by TkCommonModeTopology().

void TkCommonModeTopology::setNumberOfSets ( int  in) [inline]

Set number of independent groups of strips in APV for CM

Definition at line 18 of file TkCommonModeTopology.h.

References recoMuon::in, numberStrips, and numberStripsPerSet.

void TkCommonModeTopology::setNumberOfStrips ( int  in) [inline]

Set number of strips in an APV = 128

Definition at line 14 of file TkCommonModeTopology.h.

References recoMuon::in, and numberStrips.

void TkCommonModeTopology::setNumberOfStripsPerSet ( int  in) [inline]

Set number of strips in each group for which CM is to be found

Definition at line 16 of file TkCommonModeTopology.h.

References recoMuon::in, and numberStripsPerSet.

int TkCommonModeTopology::setOfStrip ( int  in)

Definition at line 3 of file TkCommonModeTopology.cc.

References finalStrips(), i, initialStrips(), and numberOfSets().

                                           {
  for (int i = 0; i<numberOfSets(); i++){
    if (in >=initialStrips()[i] && in <= finalStrips()[i]) return i;
  }
  return -1;
}

Member Data Documentation

std::vector<int> TkCommonModeTopology::finStrips [private]

Definition at line 34 of file TkCommonModeTopology.h.

Referenced by finalStrips(), and TkCommonModeTopology().

std::vector<int> TkCommonModeTopology::initStrips [private]

Definition at line 33 of file TkCommonModeTopology.h.

Referenced by initialStrips(), and TkCommonModeTopology().