CMS 3D CMS Logo

Public Member Functions | Private Attributes | Static Private Attributes | Friends

CSCStripData Class Reference

#include <CSCStripData.h>

List of all members.

Public Member Functions

 CSCStripData ()
 CSCStripData (int istrip, float phmax, int tmax, std::vector< int > phRaw, std::vector< float > ph)
void operator*= (float factor)
bool operator< (const CSCStripData &data) const
const std::vector< float > & ph () const
float phmax () const
 maximum pulseheight in one SCA time bin
const std::vector< int > & phRaw () const
int strip () const
 strip to which these data belong (counts from 1)
int tmax () const
 the time bin in which the maximum pulseheight occurs (counts from 0)

Private Attributes

int istrip_
std::vector< float > ph_
float phmax_
std::vector< int > phRaw_
int tmax_

Static Private Attributes

static const int ntbins_ = 8

Friends

std::ostream & operator<< (std::ostream &, const CSCStripData &)
 for debugging purposes

Detailed Description

Hold strip data while building strip hits in CSCHitFromStripOnly.

Definition at line 15 of file CSCStripData.h.


Constructor & Destructor Documentation

CSCStripData::CSCStripData ( ) [inline]

The default ctor initializes all elements of thePulseHeightMap for which explicit digis do not exist. Use sentinel value for istrip and tmax.

Note that _raw_ pulseheights are int.

Definition at line 25 of file CSCStripData.h.

: istrip_(-1), phmax_(0.), tmax_(-1), phRaw_( ntbins_ ), ph_( ntbins_ ) {};
CSCStripData::CSCStripData ( int  istrip,
float  phmax,
int  tmax,
std::vector< int >  phRaw,
std::vector< float >  ph 
) [inline]

Definition at line 26 of file CSCStripData.h.

                                                                                                 :
      istrip_(istrip), phmax_(phmax), tmax_(tmax), phRaw_(phRaw), ph_(ph) {};

Member Function Documentation

void CSCStripData::operator*= ( float  factor) [inline]

scale pulseheights by argument, but leave raw pulseheights unchanged.

Definition at line 49 of file CSCStripData.h.

References ph_, phmax_, and create_public_pileup_plots::transform.

                                 {
    // scale all elements of ph by 'factor'. Leaves phRaw_ unchanged.
    std::transform( ph_.begin(), ph_.end(), ph_.begin(), 
                   std::bind2nd( std::multiplies<float>(), factor ) );
    phmax_ *= factor;
  }
bool CSCStripData::operator< ( const CSCStripData data) const [inline]

Definition at line 56 of file CSCStripData.h.

References phmax_.

{ return phmax_ < data.phmax_; }
const std::vector<float>& CSCStripData::ph ( ) const [inline]

pulseheights in the 8 SCA time bins, after pedestal subtraction and (possibly) gain-correction

Definition at line 39 of file CSCStripData.h.

References ph_.

{return ph_;}
float CSCStripData::phmax ( ) const [inline]

maximum pulseheight in one SCA time bin

Definition at line 32 of file CSCStripData.h.

References phmax_.

{return phmax_;}
const std::vector<int>& CSCStripData::phRaw ( ) const [inline]

pulseheights in the 8 SCA time bins, after pedestal subtraction but without gain-correction

Definition at line 44 of file CSCStripData.h.

References phRaw_.

{return phRaw_;}
int CSCStripData::strip ( void  ) const [inline]

strip to which these data belong (counts from 1)

Definition at line 30 of file CSCStripData.h.

References istrip_.

{return istrip_;}
int CSCStripData::tmax ( ) const [inline]

the time bin in which the maximum pulseheight occurs (counts from 0)

Definition at line 34 of file CSCStripData.h.

References tmax_.

{return tmax_;}

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CSCStripData data 
) [friend]

for debugging purposes

Definition at line 9 of file CSCStripData.cc.

                                                                    {
  os << "CSCStripData " << std::endl
     << "------------ " << std::endl
     << "no. of time bins = " << data.ntbins_ << std::endl
     << "strip = " << data.istrip_ 
     << ", phmax = " << data.phmax_ 
     << ", tmax = " << data.tmax_ << std::endl
     << "phraw: " << std::endl;
  std::copy( data.phRaw_.begin(), data.phRaw_.end(), std::ostream_iterator<int>(os,"\n") );
  os << "ph: " << std::endl;
  std::copy( data.ph_.begin(), data.ph_.end(), std::ostream_iterator<float>(os,"\n") );
  return os;     
}

Member Data Documentation

int CSCStripData::istrip_ [private]

Definition at line 64 of file CSCStripData.h.

Referenced by operator<<(), and strip().

const int CSCStripData::ntbins_ = 8 [static, private]

Definition at line 63 of file CSCStripData.h.

Referenced by operator<<().

std::vector<float> CSCStripData::ph_ [private]

Definition at line 68 of file CSCStripData.h.

Referenced by operator*=(), operator<<(), and ph().

float CSCStripData::phmax_ [private]

Definition at line 65 of file CSCStripData.h.

Referenced by operator*=(), operator<(), operator<<(), and phmax().

std::vector<int> CSCStripData::phRaw_ [private]

Definition at line 67 of file CSCStripData.h.

Referenced by operator<<(), and phRaw().

int CSCStripData::tmax_ [private]

Definition at line 66 of file CSCStripData.h.

Referenced by operator<<(), and tmax().