CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
const std::string & description () const
 
 DummyOOTPileupCorrection (const std::string &itemDescription, const double scale)
 
 DummyOOTPileupCorrection ()
 
double getScale () const
 
bool inputIsEnergy () const
 
virtual ~DummyOOTPileupCorrection ()
 
- 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
 

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::DummyOOTPileupCorrection ( const std::string &  itemDescription,
const double  scale 
)
inline
virtual DummyOOTPileupCorrection::~DummyOOTPileupCorrection ( )
inlinevirtual

Definition at line 19 of file DummyOOTPileupCorrection.h.

19 {}
DummyOOTPileupCorrection::DummyOOTPileupCorrection ( )
inline

Definition at line 44 of file DummyOOTPileupCorrection.h.

44 {}

Member Function Documentation

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
virtual

Implements AbsOOTPileupCorrection.

Definition at line 7 of file DummyOOTPileupCorrection.cc.

References edm::hlt::Exception, i, and scale_.

Referenced by heavyIonTools.ConfigureHeavyIons::__call__(), editorTools.UserCodeTool::__call__(), HiCoreTools.RestrictInputToAOD::__call__(), coreTools.RunOnData::__call__(), trackTools.MakeAODTrackCandidates::__call__(), runJetUncertainties.RunJetUncertainties::__call__(), metTools.AddMETCollection::__call__(), heavyIonTools.ProductionDefaults::__call__(), editorTools.ChangeSource::__call__(), HiCoreTools.RemoveMCMatching::__call__(), cmsswVersionTools.PickRelValInputFiles::__call__(), coreTools.RemoveMCMatching::__call__(), trackTools.MakePATTrackCandidates::__call__(), jetTools.AddJetCollection::__call__(), trigTools.SwitchOnTrigger::__call__(), heavyIonTools.SelectionDefaults::__call__(), HiCoreTools.RemoveAllPATObjectsBut::__call__(), heavyIonTools.DisbaleMonteCarloDeps::__call__(), runType1CaloMEtUncertainties.RunType1CaloMEtUncertainties::__call__(), HiCoreTools.RemoveSpecificPATObjects::__call__(), trigTools.SwitchOnTriggerStandAlone::__call__(), trackTools.MakeTrackCandidates::__call__(), runMVAMEtUncertainties.RunMVAMEtUncertainties::__call__(), tauTools.AddTauCollection::__call__(), trigTools.SwitchOnTriggerMatching::__call__(), HiCoreTools.RemoveCleaning::__call__(), runType1PFMEtUncertainties.RunType1PFMEtUncertainties::__call__(), HiCoreTools.AddCleaning::__call__(), runNoPileUpMEtUncertainties.RunNoPileUpMEtUncertainties::__call__(), trigTools.SwitchOnTriggerMatchingStandAlone::__call__(), trigTools.SwitchOnTriggerMatchEmbedding::__call__(), jetTools.SwitchJetCollection::__call__(), jetTools.AddJetID::__call__(), and jetTools.SetTagInfos::__call__().

15 {
16  // Check the arguments
17  if (inputCharge == 0 || correctedCharge == 0 ||
18  lenCorrectedCharge < lenInputCharge ||
19  pulseShapeCorrApplied == 0 || leakCorrApplied == 0 ||
20  readjustTiming == 0)
21  throw cms::Exception(
22  "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 }
int i
Definition: DBlmapReader.cc:9
const std::string& DummyOOTPileupCorrection::description ( ) const
inline

Definition at line 22 of file DummyOOTPileupCorrection.h.

References descr_.

22 {return descr_;}
double DummyOOTPileupCorrection::getScale ( ) const
inline

Definition at line 23 of file DummyOOTPileupCorrection.h.

References scale_.

bool DummyOOTPileupCorrection::inputIsEnergy ( ) const
inlinevirtual

Implements AbsOOTPileupCorrection.

Definition at line 35 of file DummyOOTPileupCorrection.h.

35 {return false;}
bool DummyOOTPileupCorrection::isEqual ( const AbsOOTPileupCorrection otherBase) const
protectedvirtual

Implements AbsOOTPileupCorrection.

Definition at line 38 of file DummyOOTPileupCorrection.cc.

References descr_, alignCSCRings::r, and scale_.

39 {
40  // Note the use of static_cast rather than dynamic_cast below.
41  // static_cast works faster and it is guaranteed to succeed here.
42  const DummyOOTPileupCorrection& r =
43  static_cast<const DummyOOTPileupCorrection&>(otherBase);
44  return descr_ == r.descr_ && scale_ == r.scale_;
45 }
template<class Archive >
void DummyOOTPileupCorrection::serialize ( Archive &  ar,
unsigned   
)
inlineprivate

Definition at line 53 of file DummyOOTPileupCorrection.h.

References descr_, and scale_.

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

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 50 of file DummyOOTPileupCorrection.h.

Member Data Documentation

std::string DummyOOTPileupCorrection::descr_
private

Definition at line 47 of file DummyOOTPileupCorrection.h.

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

double DummyOOTPileupCorrection::scale_
private

Definition at line 48 of file DummyOOTPileupCorrection.h.

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