CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Static Public Attributes | Friends
CSCStripData Class Reference

#include <CSCStripData.h>

Public Member Functions

 CSCStripData ()
 
 CSCStripData (float phmax, int tmax, const std::vector< int > &phRaw, const std::vector< float > &ph)
 
 CSCStripData (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 More...
 
const std::vector< int > & phRaw () const
 
void reset ()
 
int tmax () const
 the time bin in which the maximum pulseheight occurs (counts from 0) More...
 
bool valid () const
 

Public Attributes

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

Static Public Attributes

static constexpr int ntbins_ = 8
 

Friends

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

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.

25 : phmax_(0.f), tmax_(-1), phRaw_(ntbins_), ph_(ntbins_) {}
std::vector< float > ph_
Definition: CSCStripData.h:71
std::vector< int > phRaw_
Definition: CSCStripData.h:70
double f[11][100]
static constexpr int ntbins_
Definition: CSCStripData.h:67
CSCStripData::CSCStripData ( float  phmax,
int  tmax,
const std::vector< int > &  phRaw,
const std::vector< float > &  ph 
)
inline

Definition at line 26 of file CSCStripData.h.

26  :
int tmax() const
the time bin in which the maximum pulseheight occurs (counts from 0)
Definition: CSCStripData.h:38
std::vector< float > ph_
Definition: CSCStripData.h:71
const std::vector< int > & phRaw() const
Definition: CSCStripData.h:48
std::vector< int > phRaw_
Definition: CSCStripData.h:70
float phmax() const
maximum pulseheight in one SCA time bin
Definition: CSCStripData.h:36
const std::vector< float > & ph() const
Definition: CSCStripData.h:43
CSCStripData::CSCStripData ( float  phmax,
int  tmax,
std::vector< int > &&  phRaw,
std::vector< float > &&  ph 
)
inline

Definition at line 29 of file CSCStripData.h.

29  :
int tmax() const
the time bin in which the maximum pulseheight occurs (counts from 0)
Definition: CSCStripData.h:38
std::vector< float > ph_
Definition: CSCStripData.h:71
const std::vector< int > & phRaw() const
Definition: CSCStripData.h:48
std::vector< int > phRaw_
Definition: CSCStripData.h:70
float phmax() const
maximum pulseheight in one SCA time bin
Definition: CSCStripData.h:36
def move(src, dest)
Definition: eostools.py:510
const std::vector< float > & ph() const
Definition: CSCStripData.h:43

Member Function Documentation

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

scale pulseheights by argument, but leave raw pulseheights unchanged.

Definition at line 53 of file CSCStripData.h.

References ph_, phmax_, and create_public_lumi_plots::transform.

53  {
54  // scale all elements of ph by 'factor'. Leaves phRaw_ unchanged.
55  std::transform( ph_.begin(), ph_.end(), ph_.begin(),
56  std::bind2nd( std::multiplies<float>(), factor ) );
57  phmax_ *= factor;
58  }
std::vector< float > ph_
Definition: CSCStripData.h:71
bool CSCStripData::operator< ( const CSCStripData data) const
inline

Definition at line 60 of file CSCStripData.h.

References operator<<, and phmax_.

60 { 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 43 of file CSCStripData.h.

References ph_.

43 {return ph_;}
std::vector< float > ph_
Definition: CSCStripData.h:71
float CSCStripData::phmax ( ) const
inline

maximum pulseheight in one SCA time bin

Definition at line 36 of file CSCStripData.h.

References phmax_.

36 {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 48 of file CSCStripData.h.

References phRaw_.

48 {return phRaw_;}
std::vector< int > phRaw_
Definition: CSCStripData.h:70
void CSCStripData::reset ( void  )
inline

Definition at line 32 of file CSCStripData.h.

References phmax_, and tmax_.

32 { phmax_=0.f;tmax_= -1;}
int CSCStripData::tmax ( ) const
inline

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

Definition at line 38 of file CSCStripData.h.

References tmax_.

38 {return tmax_;}
bool CSCStripData::valid ( ) const
inline

Definition at line 33 of file CSCStripData.h.

References tmax_.

33 { return tmax_>=0;}

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.

Referenced by operator<().

9  {
10  os << "CSCStripData " << std::endl
11  << "------------ " << std::endl
12  << "no. of time bins = " << data.ntbins_ << std::endl
13  << ", phmax = " << data.phmax_
14  << ", tmax = " << data.tmax_ << std::endl
15  << "phraw: " << std::endl;
16  std::copy( data.phRaw_.begin(), data.phRaw_.end(), std::ostream_iterator<int>(os,"\n") );
17  os << "ph: " << std::endl;
18  std::copy( data.ph_.begin(), data.ph_.end(), std::ostream_iterator<float>(os,"\n") );
19  return os;
20 }
std::vector< float > ph_
Definition: CSCStripData.h:71
std::vector< int > phRaw_
Definition: CSCStripData.h:70
static constexpr int ntbins_
Definition: CSCStripData.h:67

Member Data Documentation

constexpr int CSCStripData::ntbins_ = 8
static

Definition at line 67 of file CSCStripData.h.

Referenced by operator<<().

std::vector<float> CSCStripData::ph_

Definition at line 71 of file CSCStripData.h.

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

float CSCStripData::phmax_

Definition at line 68 of file CSCStripData.h.

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

std::vector<int> CSCStripData::phRaw_

Definition at line 70 of file CSCStripData.h.

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

int CSCStripData::tmax_

Definition at line 69 of file CSCStripData.h.

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