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

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  }
virtual EcalRecHitSimpleAlgo::~EcalRecHitSimpleAlgo ( )
inlinevirtual

Definition at line 30 of file EcalRecHitSimpleAlgo.h.

30 { };

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 33 of file EcalRecHitSimpleAlgo.h.

References adcToGeVConstant_, adcToGeVConstantIsSet_, EcalUncalibratedRecHit::amplitude(), EcalUncalibratedRecHit::amplitudeError(), 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, EcalRecHit::setChi2(), and cond::rpcobgas::time.

Referenced by EcalRecHitWorkerSimple::run().

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

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 92 of file EcalRecHitSimpleAlgo.h.

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

bool EcalRecHitSimpleAlgo::adcToGeVConstantIsSet_
private

Definition at line 93 of file EcalRecHitSimpleAlgo.h.

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