CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends
DummyOOTPileupCorrection Class Reference

#include <DummyOOTPileupCorrection.h>

Inheritance diagram for DummyOOTPileupCorrection:
AbsOOTPileupCorrection

Public Member Functions

void apply (const HcalDetId &id, const double *inputCharge, unsigned lenInputCharge, const BunchXParameter *bcParams, unsigned lenBcParams, unsigned firstTimeSlice, unsigned nTimeSlices, double *correctedCharge, unsigned lenCorrectedCharge, bool *pulseShapeCorrApplied, bool *leakCorrApplied, bool *readjustTiming) const override
 
const std::string & description () const
 
 DummyOOTPileupCorrection ()
 
 DummyOOTPileupCorrection (const std::string &itemDescription, const double scale)
 
double getScale () const
 
bool inputIsEnergy () const override
 
 ~DummyOOTPileupCorrection () override
 
- Public Member Functions inherited from AbsOOTPileupCorrection
bool operator!= (const AbsOOTPileupCorrection &r) const
 
bool operator== (const AbsOOTPileupCorrection &r) const
 
virtual ~AbsOOTPileupCorrection ()
 

Protected Member Functions

bool isEqual (const AbsOOTPileupCorrection &otherBase) const override
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, unsigned)
 

Private Attributes

std::string descr_
 
double scale_
 

Friends

class boost::serialization::access
 

Detailed Description

Definition at line 10 of file DummyOOTPileupCorrection.h.

Constructor & Destructor Documentation

◆ DummyOOTPileupCorrection() [1/2]

DummyOOTPileupCorrection::DummyOOTPileupCorrection ( const std::string &  itemDescription,
const double  scale 
)
inline

Definition at line 13 of file DummyOOTPileupCorrection.h.

14  : descr_(itemDescription), scale_(scale) {}

◆ ~DummyOOTPileupCorrection()

DummyOOTPileupCorrection::~DummyOOTPileupCorrection ( )
inlineoverride

Definition at line 17 of file DummyOOTPileupCorrection.h.

17 {}

◆ DummyOOTPileupCorrection() [2/2]

DummyOOTPileupCorrection::DummyOOTPileupCorrection ( )
inline

Definition at line 47 of file DummyOOTPileupCorrection.h.

47 {}

Member Function Documentation

◆ apply()

void DummyOOTPileupCorrection::apply ( const HcalDetId id,
const double *  inputCharge,
unsigned  lenInputCharge,
const BunchXParameter *  bcParams,
unsigned  lenBcParams,
unsigned  firstTimeSlice,
unsigned  nTimeSlices,
double *  correctedCharge,
unsigned  lenCorrectedCharge,
bool *  pulseShapeCorrApplied,
bool *  leakCorrApplied,
bool *  readjustTiming 
) const
overridevirtual

Implements AbsOOTPileupCorrection.

Definition at line 7 of file DummyOOTPileupCorrection.cc.

18  {
19  // Check the arguments
20  if (inputCharge == nullptr || correctedCharge == nullptr || lenCorrectedCharge < lenInputCharge ||
21  pulseShapeCorrApplied == nullptr || leakCorrApplied == nullptr || readjustTiming == nullptr)
22  throw cms::Exception("Invalid arguments in DummyOOTPileupCorrection::apply");
23 
24  // Perform the correction
25  for (unsigned i = 0; i < lenInputCharge; ++i)
26  correctedCharge[i] = scale_ * inputCharge[i];
27 
28  // Tell the code that runs after this which additional
29  // corrections should be discarded
30  *pulseShapeCorrApplied = false;
31  *leakCorrApplied = false;
32 
33  // Tell the code that runs after this whether corrected
34  // amplitudes should be used for timing calculations
35  *readjustTiming = false;
36 }

References Exception, mps_fire::i, and scale_.

Referenced by heavyIonTools.ConfigureHeavyIons::__call__(), coreTools.RunOnData::__call__(), trackTools.MakeAODTrackCandidates::__call__(), runJetUncertainties.RunJetUncertainties::__call__(), metTools.AddMETCollection::__call__(), heavyIonTools.ProductionDefaults::__call__(), cmsswVersionTools.PickRelValInputFiles::__call__(), coreTools.RemoveMCMatching::__call__(), trackTools.MakePATTrackCandidates::__call__(), trigTools.SwitchOnTrigger::__call__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties::__call__(), heavyIonTools.SelectionDefaults::__call__(), heavyIonTools.DisbaleMonteCarloDeps::__call__(), trigTools.SwitchOnTriggerStandAlone::__call__(), tauTools.AddTauCollection::__call__(), trackTools.MakeTrackCandidates::__call__(), trigTools.SwitchOnTriggerMatching::__call__(), trigTools.SwitchOnTriggerMatchingStandAlone::__call__(), trigTools.SwitchOnTriggerMatchEmbedding::__call__(), jetTools.AddJetCollection::__call__(), jetTools.SwitchJetCollection::__call__(), jetTools.UpdateJetCollection::__call__(), jetTools.AddJetID::__call__(), and jetTools.SetTagInfos::__call__().

◆ description()

const std::string& DummyOOTPileupCorrection::description ( ) const
inline

Definition at line 20 of file DummyOOTPileupCorrection.h.

20 { return descr_; }

References descr_.

◆ getScale()

double DummyOOTPileupCorrection::getScale ( ) const
inline

Definition at line 21 of file DummyOOTPileupCorrection.h.

21 { return scale_; }

References scale_.

◆ inputIsEnergy()

bool DummyOOTPileupCorrection::inputIsEnergy ( ) const
inlineoverridevirtual

Implements AbsOOTPileupCorrection.

Definition at line 38 of file DummyOOTPileupCorrection.h.

38 { return false; }

◆ isEqual()

bool DummyOOTPileupCorrection::isEqual ( const AbsOOTPileupCorrection otherBase) const
overrideprotectedvirtual

Implements AbsOOTPileupCorrection.

Definition at line 38 of file DummyOOTPileupCorrection.cc.

38  {
39  // Note the use of static_cast rather than dynamic_cast below.
40  // static_cast works faster and it is guaranteed to succeed here.
41  const DummyOOTPileupCorrection& r = static_cast<const DummyOOTPileupCorrection&>(otherBase);
42  return descr_ == r.descr_ && scale_ == r.scale_;
43 }

References descr_, alignCSCRings::r, and scale_.

◆ serialize()

template<class Archive >
void DummyOOTPileupCorrection::serialize ( Archive &  ar,
unsigned   
)
inlineprivate

Definition at line 56 of file DummyOOTPileupCorrection.h.

56  {
57  boost::serialization::base_object<AbsOOTPileupCorrection>(*this);
58  ar& descr_& scale_;
59  }

References descr_, and scale_.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 53 of file DummyOOTPileupCorrection.h.

Member Data Documentation

◆ descr_

std::string DummyOOTPileupCorrection::descr_
private

Definition at line 50 of file DummyOOTPileupCorrection.h.

Referenced by description(), isEqual(), and serialize().

◆ scale_

double DummyOOTPileupCorrection::scale_
private

Definition at line 51 of file DummyOOTPileupCorrection.h.

Referenced by apply(), getScale(), isEqual(), and serialize().

mps_fire.i
i
Definition: mps_fire.py:355
DummyOOTPileupCorrection::descr_
std::string descr_
Definition: DummyOOTPileupCorrection.h:50
Scenarios_cff.scale
scale
Definition: Scenarios_cff.py:2186
DummyOOTPileupCorrection::scale_
double scale_
Definition: DummyOOTPileupCorrection.h:51
alignCSCRings.r
r
Definition: alignCSCRings.py:93
DummyOOTPileupCorrection
Definition: DummyOOTPileupCorrection.h:10
Exception
Definition: hltDiff.cc:246