CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
EcalRecHitSimpleAlgo Class Reference

#include <EcalRecHitSimpleAlgo.h>

Inheritance diagram for EcalRecHitSimpleAlgo:
EcalRecHitAbsAlgo

Public Member Functions

 EcalRecHitSimpleAlgo ()
 
EcalRecHit makeRecHit (const EcalUncalibratedRecHit &uncalibRH, const float &intercalibConstant, const float &timeIntercalib=0, const uint32_t &flags=0) const override
 Compute parameters. More...
 
void setADCToGeVConstant (const float &value) override
 make rechits from dataframes More...
 
 ~EcalRecHitSimpleAlgo () override
 
- Public Member Functions inherited from EcalRecHitAbsAlgo
virtual ~EcalRecHitAbsAlgo ()
 Constructor. More...
 

Private Attributes

float adcToGeVConstant_
 
bool adcToGeVConstantIsSet_
 

Detailed Description

Simple algoritm to make rechits from uncalibrated rechits

Author
Shahram Rahatlou, University of Rome & INFN, March 2006

Definition at line 15 of file EcalRecHitSimpleAlgo.h.

Constructor & Destructor Documentation

EcalRecHitSimpleAlgo::EcalRecHitSimpleAlgo ( )
inline

Definition at line 18 of file EcalRecHitSimpleAlgo.h.

References adcToGeVConstant_, and adcToGeVConstantIsSet_.

18  {
19  adcToGeVConstant_ = -1;
20  adcToGeVConstantIsSet_ = false;
21  }
EcalRecHitSimpleAlgo::~EcalRecHitSimpleAlgo ( )
inlineoverride

Definition at line 29 of file EcalRecHitSimpleAlgo.h.

29 {};

Member Function Documentation

EcalRecHit EcalRecHitSimpleAlgo::makeRecHit ( const EcalUncalibratedRecHit uncalibRH,
const float &  intercalibConstant,
const float &  timeIntercalib = 0,
const uint32_t &  flags = 0 
) const
inlineoverridevirtual

Compute parameters.

Implements EcalRecHitAbsAlgo.

Definition at line 32 of file EcalRecHitSimpleAlgo.h.

References adcToGeVConstant_, adcToGeVConstantIsSet_, EcalUncalibratedRecHit::amplitude(), EcalUncalibratedRecHit::amplitudeError(), EcalUncalibratedRecHit::checkFlag(), EcalUncalibratedRecHit::chi2(), gather_cfg::cout, relval_parameters_module::energy, good, EcalUncalibratedRecHit::id(), EcalUncalibratedRecHit::isSaturated(), EcalUncalibratedRecHit::jitter(), EcalUncalibratedRecHit::jitterErrorBits(), EcalRecHit::kGood, EcalUncalibratedRecHit::kHasSwitchToGain1, EcalRecHit::kHasSwitchToGain1, EcalUncalibratedRecHit::kHasSwitchToGain6, EcalRecHit::kHasSwitchToGain6, EcalUncalibratedRecHit::kLeadingEdgeRecovered, EcalRecHit::kLeadingEdgeRecovered, EcalUncalibratedRecHit::kOutOfTime, EcalRecHit::kOutOfTime, EcalUncalibratedRecHit::kPoorReco, EcalRecHit::kPoorReco, EcalUncalibratedRecHit::kSaturated, EcalRecHit::kSaturated, and EcalRecHit::setChi2().

Referenced by EcalRecHitWorkerSimple::run().

35  {
37  std::cout << "EcalRecHitSimpleAlgo::makeRecHit: adcToGeVConstant_ not set before calling this method!"
38  << " will use -1 and produce bogus rechits!" << std::endl;
39  }
40 
41  float clockToNsConstant = 25;
42  float energy = uncalibRH.amplitude() * adcToGeVConstant_ * intercalibConstant;
43  float time = uncalibRH.jitter() * clockToNsConstant + timeIntercalib;
44 
45  EcalRecHit rh(uncalibRH.id(), energy, time);
46  rh.setChi2(uncalibRH.chi2());
47  rh.setEnergyError(uncalibRH.amplitudeError() * adcToGeVConstant_ * intercalibConstant);
48  /* rh.setOutOfTimeEnergy( uncalibRH.outOfTimeEnergy() * adcToGeVConstant_ * intercalibConstant ); */
49  /* rh.setOutOfTimeChi2( uncalibRH.outOfTimeChi2() ); */
50  rh.setTimeError(uncalibRH.jitterErrorBits());
51 
52  // Now fill flags
53 
54  bool good = true;
55 
58  good = false;
59  }
61  // leading edge recovery failed - still keep the information
62  // about the saturation and do not flag as dead
63  rh.setFlag(EcalRecHit::kSaturated);
64  good = false;
65  }
66  if (uncalibRH.isSaturated()) {
67  rh.setFlag(EcalRecHit::kSaturated);
68  good = false;
69  }
71  rh.setFlag(EcalRecHit::kOutOfTime);
72  good = false;
73  }
75  rh.setFlag(EcalRecHit::kPoorReco);
76  good = false;
77  }
80  }
83  }
84 
85  if (good)
86  rh.setFlag(EcalRecHit::kGood);
87  return rh;
88  }
bool checkFlag(Flags flag) const
auto const good
min quality of good
void setChi2(float chi2)
Definition: EcalRecHit.h:125
tuple cout
Definition: gather_cfg.py:144
void EcalRecHitSimpleAlgo::setADCToGeVConstant ( const float &  value)
inlineoverridevirtual

make rechits from dataframes

Implements EcalRecHitAbsAlgo.

Definition at line 23 of file EcalRecHitSimpleAlgo.h.

References adcToGeVConstant_, adcToGeVConstantIsSet_, and relativeConstraints::value.

Referenced by EcalRecHitWorkerSimple::run().

Member Data Documentation

float EcalRecHitSimpleAlgo::adcToGeVConstant_
private

Definition at line 91 of file EcalRecHitSimpleAlgo.h.

Referenced by EcalRecHitSimpleAlgo(), makeRecHit(), and setADCToGeVConstant().

bool EcalRecHitSimpleAlgo::adcToGeVConstantIsSet_
private

Definition at line 92 of file EcalRecHitSimpleAlgo.h.

Referenced by EcalRecHitSimpleAlgo(), makeRecHit(), and setADCToGeVConstant().