CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 ()
 
virtual EcalRecHit makeRecHit (const EcalUncalibratedRecHit &uncalibRH, const float &intercalibConstant, const float &timeIntercalib=0, const uint32_t &flags=0) const
 Compute parameters. More...
 
virtual void setADCToGeVConstant (const float &value)
 make rechits from dataframes More...
 
virtual ~EcalRecHitSimpleAlgo ()
 
- 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

Id:
EcalRecHitSimpleAlgo.h,v 1.17 2012/02/17 21:28:12 franzoni Exp
Date:
2012/02/17 21:28:12
Revision:
1.17
Author
Shahram Rahatlou, University of Rome & INFN, March 2006

Simple algoritm to make rechits from uncalibrated rechits

Id:
EcalRecHitWorkerSimple.h,v 1.11 2012/02/17 15:08:08 argiro Exp
Date:
2012/02/17 15:08:08
Revision:
1.11
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_.

21  {
22  adcToGeVConstant_ = -1;
23  adcToGeVConstantIsSet_ = false;
24  }
virtual EcalRecHitSimpleAlgo::~EcalRecHitSimpleAlgo ( )
inlinevirtual

Definition at line 33 of file EcalRecHitSimpleAlgo.h.

33 { };

Member Function Documentation

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

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, EcalUncalibratedRecHit::kHasSwitchToGain1, EcalRecHit::kHasSwitchToGain1, EcalUncalibratedRecHit::kHasSwitchToGain6, EcalRecHit::kHasSwitchToGain6, EcalUncalibratedRecHit::kLeadingEdgeRecovered, EcalRecHit::kLeadingEdgeRecovered, EcalUncalibratedRecHit::kOutOfTime, EcalRecHit::kOutOfTime, EcalUncalibratedRecHit::kPoorReco, EcalRecHit::kPoorReco, EcalUncalibratedRecHit::kSaturated, EcalRecHit::kSaturated, EcalUncalibratedRecHit::outOfTimeChi2(), EcalUncalibratedRecHit::outOfTimeEnergy(), EcalRecHit::setChi2(), and cond::rpcobgas::time.

Referenced by EcalRecHitWorkerSimple::run().

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

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

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().