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 43 of file CSCPedestalChoice.h.

Constructor & Destructor Documentation

◆ CSCDynamicPedestal2()

CSCDynamicPedestal2::CSCDynamicPedestal2 ( )
inline

Definition at line 45 of file CSCPedestalChoice.h.

45 {}

◆ ~CSCDynamicPedestal2()

CSCDynamicPedestal2::~CSCDynamicPedestal2 ( )
inlineoverride

Definition at line 46 of file CSCPedestalChoice.h.

46 {}

Member Function Documentation

◆ pedestal()

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 47 of file CSCPedestalChoice.h.

References CSCPedestalChoice::getDefault().

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