#include <EcalRecHitSimpleAlgo.h>
Public Member Functions | |
EcalRecHitSimpleAlgo () | |
virtual EcalRecHit | makeRecHit (const EcalUncalibratedRecHit &uncalibRH, const float &intercalibConstant, const float &timeIntercalib=0, const uint32_t &flags=0) const |
Compute parameters. | |
virtual void | setADCToGeVConstant (const float &value) |
make rechits from dataframes | |
virtual | ~EcalRecHitSimpleAlgo () |
Private Attributes | |
float | adcToGeVConstant_ |
bool | adcToGeVConstantIsSet_ |
Simple algoritm to make rechits from uncalibrated rechits
Simple algoritm to make rechits from uncalibrated rechits
Definition at line 18 of file EcalRecHitSimpleAlgo.h.
EcalRecHitSimpleAlgo::EcalRecHitSimpleAlgo | ( | ) | [inline] |
Definition at line 21 of file EcalRecHitSimpleAlgo.h.
References adcToGeVConstant_, and adcToGeVConstantIsSet_.
{ adcToGeVConstant_ = -1; adcToGeVConstantIsSet_ = false; }
virtual EcalRecHitSimpleAlgo::~EcalRecHitSimpleAlgo | ( | ) | [inline, virtual] |
Definition at line 33 of file EcalRecHitSimpleAlgo.h.
{ };
virtual EcalRecHit EcalRecHitSimpleAlgo::makeRecHit | ( | const EcalUncalibratedRecHit & | uncalibRH, |
const float & | intercalibConstant, | ||
const float & | timeIntercalib = 0 , |
||
const uint32_t & | flags = 0 |
||
) | const [inline, virtual] |
Compute parameters.
Implements EcalRecHitAbsAlgo.
Definition at line 36 of file EcalRecHitSimpleAlgo.h.
References adcToGeVConstant_, adcToGeVConstantIsSet_, EcalUncalibratedRecHit::amplitude(), EcalUncalibratedRecHit::checkFlag(), EcalUncalibratedRecHit::chi2(), gather_cfg::cout, relval_parameters_module::energy, EcalUncalibratedRecHit::id(), EcalUncalibratedRecHit::isSaturated(), EcalUncalibratedRecHit::jitter(), EcalUncalibratedRecHit::jitterErrorBits(), EcalRecHit::kGood, EcalRecHit::kHasSwitchToGain1, EcalUncalibratedRecHit::kHasSwitchToGain1, EcalUncalibratedRecHit::kHasSwitchToGain6, EcalRecHit::kHasSwitchToGain6, EcalRecHit::kLeadingEdgeRecovered, EcalUncalibratedRecHit::kLeadingEdgeRecovered, EcalRecHit::kOutOfTime, EcalUncalibratedRecHit::kOutOfTime, EcalUncalibratedRecHit::kPoorReco, EcalRecHit::kPoorReco, EcalRecHit::kSaturated, EcalUncalibratedRecHit::kSaturated, EcalUncalibratedRecHit::outOfTimeChi2(), EcalUncalibratedRecHit::outOfTimeEnergy(), EcalRecHit::setChi2(), and cond::rpcobgas::time.
Referenced by EcalRecHitWorkerSimple::run().
{ if(!adcToGeVConstantIsSet_) { std::cout << "EcalRecHitSimpleAlgo::makeRecHit: adcToGeVConstant_ not set before calling this method!" << " will use -1 and produce bogus rechits!" << std::endl; } float clockToNsConstant = 25; float energy = uncalibRH.amplitude()*adcToGeVConstant_*intercalibConstant; float time = uncalibRH.jitter() * clockToNsConstant + timeIntercalib; EcalRecHit rh( uncalibRH.id(), energy, time ); rh.setChi2( uncalibRH.chi2() ); rh.setOutOfTimeEnergy( uncalibRH.outOfTimeEnergy() * adcToGeVConstant_ * intercalibConstant ); rh.setOutOfTimeChi2( uncalibRH.outOfTimeChi2() ); rh.setTimeError(uncalibRH.jitterErrorBits()); // Now fill flags bool good=true; if ( uncalibRH.checkFlag(EcalUncalibratedRecHit::kLeadingEdgeRecovered) ){ rh.setFlag(EcalRecHit::kLeadingEdgeRecovered); good=false; } if ( uncalibRH.checkFlag(EcalUncalibratedRecHit::kSaturated) ) { // leading edge recovery failed - still keep the information // about the saturation and do not flag as dead rh.setFlag(EcalRecHit::kSaturated); good=false; } if( uncalibRH.isSaturated() ) { rh.setFlag(EcalRecHit::kSaturated); good=false; } if ( uncalibRH.checkFlag(EcalUncalibratedRecHit::kOutOfTime) ) { rh.setFlag(EcalRecHit::kOutOfTime) ; good=false; } if ( uncalibRH.checkFlag(EcalUncalibratedRecHit::kPoorReco) ) { rh.setFlag(EcalRecHit::kPoorReco); good=false; } if ( uncalibRH.checkFlag( EcalUncalibratedRecHit::kHasSwitchToGain6 ) ) { rh.setFlag(EcalRecHit::kHasSwitchToGain6); } if (uncalibRH.checkFlag( EcalUncalibratedRecHit::kHasSwitchToGain1 ) ) { rh.setFlag(EcalRecHit::kHasSwitchToGain1); } if (good) rh.setFlag(EcalRecHit::kGood); return rh; }
virtual void EcalRecHitSimpleAlgo::setADCToGeVConstant | ( | const float & | value | ) | [inline, virtual] |
make rechits from dataframes
Implements EcalRecHitAbsAlgo.
Definition at line 26 of file EcalRecHitSimpleAlgo.h.
References adcToGeVConstant_, adcToGeVConstantIsSet_, and relativeConstraints::value.
Referenced by EcalRecHitWorkerSimple::run().
{ adcToGeVConstant_ = value; adcToGeVConstantIsSet_ = true; }
float EcalRecHitSimpleAlgo::adcToGeVConstant_ [private] |
Definition at line 94 of file EcalRecHitSimpleAlgo.h.
Referenced by EcalRecHitSimpleAlgo(), makeRecHit(), and setADCToGeVConstant().
bool EcalRecHitSimpleAlgo::adcToGeVConstantIsSet_ [private] |
Definition at line 95 of file EcalRecHitSimpleAlgo.h.
Referenced by EcalRecHitSimpleAlgo(), makeRecHit(), and setADCToGeVConstant().