CMS 3D CMS Logo

Public Member Functions | Private Attributes

EcalRecHitSimpleAlgo Class Reference

#include <EcalRecHitSimpleAlgo.h>

Inheritance diagram for EcalRecHitSimpleAlgo:
EcalRecHitAbsAlgo

List of all members.

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)
 Constructor.
virtual ~EcalRecHitSimpleAlgo ()

Private Attributes

float adcToGeVConstant_
bool adcToGeVConstantIsSet_

Detailed Description

Simple algoritm to make rechits from uncalibrated rechits

Id:
EcalRecHitSimpleAlgo.h,v 1.12 2010/09/10 13:57:06 theofil Exp
Date:
2010/09/10 13:57:06
Revision:
1.12
Author:
Shahram Rahatlou, University of Rome & INFN, March 2006

Simple algoritm to make rechits from uncalibrated rechits

Id:
EcalRecHitWorkerSimple.h,v 1.5 2009/10/12 13:10:46 ferriff Exp
Date:
2009/10/12 13:10:46
Revision:
1.5
Author:
Shahram Rahatlou, University of Rome & INFN, March 2006

Definition at line 18 of file EcalRecHitSimpleAlgo.h.


Constructor & Destructor Documentation

EcalRecHitSimpleAlgo::EcalRecHitSimpleAlgo ( ) [inline]

Definition at line 21 of file EcalRecHitSimpleAlgo.h.

References adcToGeVConstant_, and adcToGeVConstantIsSet_.

virtual EcalRecHitSimpleAlgo::~EcalRecHitSimpleAlgo ( ) [inline, virtual]

Definition at line 33 of file EcalRecHitSimpleAlgo.h.

{ };

Member Function Documentation

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::chi2(), gather_cfg::cout, relval_parameters_module::energy, flags, EcalUncalibratedRecHit::id(), EcalUncalibratedRecHit::isSaturated(), EcalUncalibratedRecHit::jitter(), EcalUncalibratedRecHit::jitterErrorBits(), EcalUncalibratedRecHit::kFake, EcalRecHit::kFake, EcalRecHit::kLeadingEdgeRecovered, EcalUncalibratedRecHit::kLeadingEdgeRecovered, EcalRecHit::kOutOfTime, EcalUncalibratedRecHit::kOutOfTime, EcalUncalibratedRecHit::kPoorReco, EcalRecHit::kPoorReco, EcalRecHit::kSaturated, EcalUncalibratedRecHit::kSaturated, EcalUncalibratedRecHit::outOfTimeChi2(), EcalUncalibratedRecHit::outOfTimeEnergy(), EcalUncalibratedRecHit::recoFlag(), 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 both recoFlag and the new flagBits
    uint32_t flagbits(0);
    uint32_t recoFlag = flags; // so far contains only v_DB_reco_flags_[ statusCode ] from the worker
                               // for the time being ignore them in flagBits

    if ( uncalibRH.recoFlag() == EcalUncalibratedRecHit::kLeadingEdgeRecovered ) { 
            recoFlag = EcalRecHit::kLeadingEdgeRecovered; 
            flagbits |=  (0x1 << EcalRecHit::kLeadingEdgeRecovered); 

    } else if ( uncalibRH.recoFlag() == EcalUncalibratedRecHit::kSaturated ) { 
            // leading edge recovery failed - still keep the information 
            // about the saturation and do not flag as dead 
            recoFlag = EcalRecHit::kSaturated; 
            // and at some point may try the recovery with the neighbours 
            flagbits |=  (0x1 << EcalRecHit::kSaturated); 

    } else if( uncalibRH.isSaturated() ) {
            recoFlag = EcalRecHit::kSaturated;
            flagbits |=  (0x1 << EcalRecHit::kSaturated); 

    } else if ( uncalibRH.recoFlag() == EcalUncalibratedRecHit::kOutOfTime ) {
            recoFlag =  EcalRecHit::kOutOfTime;
            flagbits |=  (0x1 << EcalRecHit::kOutOfTime); 

    } else if ( uncalibRH.recoFlag() == EcalUncalibratedRecHit::kFake ) {
            recoFlag =  EcalRecHit::kFake;
            flagbits |=  (0x1 << EcalRecHit::kFake); 
    }
    else if ( uncalibRH.recoFlag() == EcalUncalibratedRecHit::kPoorReco ) {
            recoFlag =  EcalRecHit::kPoorReco;
            flagbits |=  (0x1 << EcalRecHit::kPoorReco); 
    }

    // now set both the reco flag and the new flagBits_
    rh.setRecoFlag( recoFlag );
    rh.setFlagBits( flagbits );

    return rh;
  }
virtual void EcalRecHitSimpleAlgo::setADCToGeVConstant ( const float &  value) [inline, virtual]

Constructor.

Destructor make rechits from dataframes

Implements EcalRecHitAbsAlgo.

Definition at line 26 of file EcalRecHitSimpleAlgo.h.

References adcToGeVConstant_, adcToGeVConstantIsSet_, and relativeConstraints::value.

Referenced by EcalRecHitWorkerSimple::run().


Member Data Documentation

Definition at line 97 of file EcalRecHitSimpleAlgo.h.

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

Definition at line 98 of file EcalRecHitSimpleAlgo.h.

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