CMS 3D CMS Logo

List of all members | Public Member Functions
CSCDynamicPedestal2 Class Reference

#include <CSCPedestalChoice.h>

Inheritance diagram for CSCDynamicPedestal2:
CSCPedestalChoice

Public Member Functions

 CSCDynamicPedestal2 ()
 
float pedestal (const std::vector< float > &sca, const CSCRecoConditions *, const CSCDetId, int) override
 
 ~CSCDynamicPedestal2 () override
 
- Public Member Functions inherited from CSCPedestalChoice
 CSCPedestalChoice ()
 
float getDefault () const
 Return default pedestal (typically zero) More...
 
void setDefault (float ped)
 Allow reseting of default pedestal (not currently used) More...
 
virtual ~CSCPedestalChoice ()
 

Detailed Description

Concrete CSCPedestalChoice... Pedestal is dynamic, averages first two SCA time bins

Definition at line 40 of file CSCPedestalChoice.h.

Constructor & Destructor Documentation

CSCDynamicPedestal2::CSCDynamicPedestal2 ( )
inline

Definition at line 42 of file CSCPedestalChoice.h.

42 {}
CSCDynamicPedestal2::~CSCDynamicPedestal2 ( )
inlineoverride

Definition at line 43 of file CSCPedestalChoice.h.

43 {}

Member Function Documentation

float CSCDynamicPedestal2::pedestal ( const std::vector< float > &  sca,
const CSCRecoConditions cond,
const CSCDetId  id,
int  ichan 
)
inlineoverridevirtual

Return appropriate pedestal for supplied SCA vector. If using conditions data then must also supply pointer to CSCRecoConditions and CSCDetId + channel

Implements CSCPedestalChoice.

Definition at line 44 of file CSCPedestalChoice.h.

References CSCPedestalChoice::getDefault().

45  {
46  float ped = getDefault();
47  if ( !sca.empty() ){
48  ped = ( sca[0]+sca[1] )/2.;
49  }
50  return ped;
51  }
float getDefault() const
Return default pedestal (typically zero)