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
EcalFenixStrip Class Reference

class representing the Fenix chip, format strip More...

#include <EcalFenixStrip.h>

Public Member Functions

 EcalFenixStrip (const edm::EventSetup &setup, const EcalElectronicsMapping *theMapping, bool debug, bool famos, int maxNrSamples, int nbMaxXtals)
 
EcalFenixEtStripgetAdder () const
 
bool getbadStripMissing () const
 
EcalFenixStripFgvbEEgetFGVB () const
 
EcalFenixAmplitudeFiltergetFilter () const
 
EcalFenixStripFormatEBgetFormatterEB () const
 
EcalFenixStripFormatEEgetFormatterEE () const
 
EcalFenixLinearizergetLinearizer (int i) const
 
EcalFenixPeakFindergetPeakFinder () const
 
template<class T >
void process (const edm::EventSetup &, std::vector< const T > &, int nrxtals, std::vector< int > &out)
 
void process (const edm::EventSetup &setup, std::vector< EBDataFrame > &samples, int nrXtals, std::vector< int > &out)
 
void process (const edm::EventSetup &setup, std::vector< EEDataFrame > &samples, int nrXtals, std::vector< int > &out)
 
template<class T >
void process_part1 (int identif, std::vector< T > &df, int nrXtals, uint32_t stripid, const EcalTPGPedestals *ecaltpPed, const EcalTPGLinearizationConst *ecaltpLin, const EcalTPGWeightIdMap *ecaltpgWeightMap, const EcalTPGWeightGroup *ecaltpgWeightGroup, const EcalTPGCrystalStatus *ecaltpBadX)
 
void process_part2_barrel (uint32_t stripid, const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGFineGrainStripEE *ecaltpgFgStripEE)
 
void process_part2_endcap (uint32_t stripid, const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGFineGrainStripEE *ecaltpgFgStripEE, const EcalTPGStripStatus *ecaltpgStripStatus)
 
void setbadStripMissing (bool flag)
 
void setPointers (const EcalTPGPedestals *ecaltpPed, const EcalTPGLinearizationConst *ecaltpLin, const EcalTPGWeightIdMap *ecaltpgWeightMap, const EcalTPGWeightGroup *ecaltpgWeightGroup, const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGFineGrainStripEE *ecaltpgFgStripEE, const EcalTPGCrystalStatus *ecaltpgBadX, const EcalTPGStripStatus *ecaltpgStripStatus)
 
virtual ~EcalFenixStrip ()
 

Private Attributes

std::vector< int > add_out_
 
EcalFenixEtStripadder_
 
EcalFenixAmplitudeFilteramplitude_filter_
 
bool debug_
 
const EcalTPGCrystalStatusecaltpgBadX_
 
const EcalTPGFineGrainStripEEecaltpgFgStripEE_
 
const EcalTPGSlidingWindowecaltpgSlidW_
 
const EcalTPGStripStatusecaltpgStripStatus_
 
const EcalTPGWeightGroupecaltpgWeightGroup_
 
const EcalTPGWeightIdMapecaltpgWeightMap_
 
const EcalTPGLinearizationConstecaltpLin_
 
const EcalTPGPedestalsecaltpPed_
 
bool famos_
 
EcalFenixStripFormatEBfenixFormatterEB_
 
EcalFenixStripFormatEEfenixFormatterEE_
 
std::vector< int > fgvb_out_
 
std::vector< int > fgvb_out_temp_
 
EcalFenixStripFgvbEEfgvbEE_
 
std::vector< int > filt_out_
 
std::vector< int > format_out_
 
bool identif_
 
std::vector< std::vector< int > > lin_out_
 
std::vector
< EcalFenixLinearizer * > 
linearizer_
 
int nbMaxXtals_
 
EcalFenixPeakFinderpeak_finder_
 
std::vector< int > peak_out_
 
const EcalElectronicsMappingtheMapping_
 

Detailed Description

class representing the Fenix chip, format strip

Definition at line 32 of file EcalFenixStrip.h.

Constructor & Destructor Documentation

EcalFenixStrip::EcalFenixStrip ( const edm::EventSetup setup,
const EcalElectronicsMapping theMapping,
bool  debug,
bool  famos,
int  maxNrSamples,
int  nbMaxXtals 
)

Definition at line 11 of file EcalFenixStrip.cc.

References add_out_, adder_, amplitude_filter_, famos_, fenixFormatterEB_, fenixFormatterEE_, fgvb_out_, fgvb_out_temp_, fgvbEE_, filt_out_, format_out_, i, lin_out_, linearizer_, nbMaxXtals_, peak_finder_, peak_out_, and findQualityFiles::v.

11  : theMapping_(theMapping), debug_(debug), famos_(famos), nbMaxXtals_(nbMaxXtals)
12 {
13  linearizer_.resize(nbMaxXtals_);
14  for (int i=0;i<nbMaxXtals_;i++) linearizer_[i] = new EcalFenixLinearizer(famos_);
15  adder_ = new EcalFenixEtStrip();
21 
22  // prepare data storage for all events
23  std::vector <int> v;
24  v.resize(maxNrSamples);
25  lin_out_.resize(nbMaxXtals_);
26  for (int i=0;i<5;i++) lin_out_[i]=v;
27  add_out_.resize(maxNrSamples);
28  filt_out_.resize(maxNrSamples);
29  peak_out_.resize(maxNrSamples);
30  format_out_.resize(maxNrSamples);
31  fgvb_out_.resize(maxNrSamples);
32  fgvb_out_temp_.resize(maxNrSamples);
33 }
EcalFenixStripFgvbEE * fgvbEE_
int i
Definition: DBlmapReader.cc:9
std::vector< std::vector< int > > lin_out_
std::vector< int > add_out_
std::vector< EcalFenixLinearizer * > linearizer_
EcalFenixStripFormatEB * fenixFormatterEB_
const EcalElectronicsMapping * theMapping_
calculates the peak for Fenix strip, barrel input : 18 bits output: boolean
calculation of Fgvb for the endcap in Fenix Strip calculates fgvb for the endcap in Fenix Strip ...
Formatting for Fenix strip input: 18 bits + 3x 1bit (fgvb, gapflagbit, output from peakfinder) output...
std::vector< int > filt_out_
Linearisation for Fenix strip input: 16 bits corresponding to input EBDataFrame output: 18 bits...
EcalFenixPeakFinder * peak_finder_
calculates .... for Fenix strip, barrel input: 18 bits output: 18 bits
#define debug
Definition: HDRShower.cc:19
Formatting for Fenix strip input: 18 bits + 3x 1bit (fgvb, gapflagbit, output from peakfinder) output...
std::vector< int > fgvb_out_
std::vector< int > format_out_
EcalFenixAmplitudeFilter * amplitude_filter_
EcalFenixStripFormatEE * fenixFormatterEE_
std::vector< int > peak_out_
EcalFenixEtStrip * adder_
std::vector< int > fgvb_out_temp_
EcalFenixStrip::~EcalFenixStrip ( )
virtual

Definition at line 36 of file EcalFenixStrip.cc.

References adder_, amplitude_filter_, fenixFormatterEB_, fenixFormatterEE_, fgvbEE_, i, linearizer_, nbMaxXtals_, and peak_finder_.

36  {
37  for (int i=0;i<nbMaxXtals_;i++) delete linearizer_[i];
38  delete adder_;
39  delete amplitude_filter_;
40  delete peak_finder_;
41  delete fenixFormatterEB_;
42  delete fenixFormatterEE_;
43  delete fgvbEE_;
44 }
EcalFenixStripFgvbEE * fgvbEE_
int i
Definition: DBlmapReader.cc:9
std::vector< EcalFenixLinearizer * > linearizer_
EcalFenixStripFormatEB * fenixFormatterEB_
EcalFenixPeakFinder * peak_finder_
EcalFenixAmplitudeFilter * amplitude_filter_
EcalFenixStripFormatEE * fenixFormatterEE_
EcalFenixEtStrip * adder_

Member Function Documentation

EcalFenixEtStrip* EcalFenixStrip::getAdder ( ) const
inline

Definition at line 116 of file EcalFenixStrip.h.

bool EcalFenixStrip::getbadStripMissing ( ) const
inline

Definition at line 126 of file EcalFenixStrip.h.

EcalFenixStripFgvbEE* EcalFenixStrip::getFGVB ( ) const
inline

Definition at line 123 of file EcalFenixStrip.h.

EcalFenixAmplitudeFilter* EcalFenixStrip::getFilter ( ) const
inline

Definition at line 117 of file EcalFenixStrip.h.

EcalFenixStripFormatEB* EcalFenixStrip::getFormatterEB ( ) const
inline

Definition at line 120 of file EcalFenixStrip.h.

Referenced by process_part2_barrel().

EcalFenixStripFormatEE* EcalFenixStrip::getFormatterEE ( ) const
inline

Definition at line 121 of file EcalFenixStrip.h.

Referenced by process_part2_endcap().

EcalFenixLinearizer* EcalFenixStrip::getLinearizer ( int  i) const
inline

Definition at line 115 of file EcalFenixStrip.h.

EcalFenixPeakFinder* EcalFenixStrip::getPeakFinder ( ) const
inline

Definition at line 118 of file EcalFenixStrip.h.

template<class T >
void EcalFenixStrip::process ( const edm::EventSetup ,
std::vector< const T > &  ,
int  nrxtals,
std::vector< int > &  out 
)
void EcalFenixStrip::process ( const edm::EventSetup setup,
std::vector< EBDataFrame > &  samples,
int  nrXtals,
std::vector< int > &  out 
)
inline

Definition at line 129 of file EcalFenixStrip.h.

void EcalFenixStrip::process ( const edm::EventSetup setup,
std::vector< EEDataFrame > &  samples,
int  nrXtals,
std::vector< int > &  out 
)
inline

Definition at line 147 of file EcalFenixStrip.h.

template<class T >
void EcalFenixStrip::process_part1 ( int  identif,
std::vector< T > &  df,
int  nrXtals,
uint32_t  stripid,
const EcalTPGPedestals ecaltpPed,
const EcalTPGLinearizationConst ecaltpLin,
const EcalTPGWeightIdMap ecaltpgWeightMap,
const EcalTPGWeightGroup ecaltpgWeightGroup,
const EcalTPGCrystalStatus ecaltpBadX 
)
inline

Definition at line 166 of file EcalFenixStrip.h.

void EcalFenixStrip::process_part2_barrel ( uint32_t  stripid,
const EcalTPGSlidingWindow ecaltpgSlidW,
const EcalTPGFineGrainStripEE ecaltpgFgStripEE 
)

Definition at line 47 of file EcalFenixStrip.cc.

References gather_cfg::cout, debug_, fgvb_out_, filt_out_, format_out_, getFormatterEB(), i, peak_out_, EcalFenixStripFormatEB::process(), and EcalFenixStripFormatEB::setParameters().

47  {
48 
49  // call Fgvb
50  //this->getFGVB()->setParameters(stripid,ecaltpgFgStripEE);
51  //this->getFGVB()->process(lin_out_,fgvb_out_);
52 
53  // call formatter
54  this->getFormatterEB()->setParameters(stripid,ecaltpgSlidW) ;
56  //this is a test:
57  if (debug_) {
58  std::cout<< "output of formatter is a vector of size: "<<format_out_.size()<<std::endl;
59  std::cout<< "value : "<<std::endl;
60  for (unsigned int i =0; i<format_out_.size();i++){
61  std::cout <<" "<<format_out_[i];
62  }
63  std::cout<<std::endl;
64 
65  }
66  return;
67 
68 }
int i
Definition: DBlmapReader.cc:9
std::vector< int > filt_out_
std::vector< int > fgvb_out_
EcalFenixStripFormatEB * getFormatterEB() const
void setParameters(uint32_t &, const EcalTPGSlidingWindow *&)
std::vector< int > format_out_
tuple cout
Definition: gather_cfg.py:145
std::vector< int > peak_out_
void EcalFenixStrip::process_part2_endcap ( uint32_t  stripid,
const EcalTPGSlidingWindow ecaltpgSlidW,
const EcalTPGFineGrainStripEE ecaltpgFgStripEE,
const EcalTPGStripStatus ecaltpgStripStatus 
)

Definition at line 70 of file EcalFenixStrip.cc.

References gather_cfg::cout, debug_, TauDecayModes::dec, fgvb_out_, filt_out_, format_out_, getFormatterEE(), i, peak_out_, EcalFenixStripFormatEE::process(), and EcalFenixStripFormatEE::setParameters().

70  {
71 
72  // call Fgvb
73  //this->getFGVB()->setParameters(stripid,ecaltpgFgStripEE);
74  //this->getFGVB()->process(lin_out_,fgvb_out_);
75 
76  // call formatter
77  this->getFormatterEE()->setParameters(stripid,ecaltpgSlidW,ecaltpgStripStatus) ;
78 
80 
81  //this is a test:
82  if (debug_) {
83  std::cout<< "output of formatter is a vector of size: "<<format_out_.size()<<std::endl;
84  std::cout<< "value : "<<std::endl;
85  for (unsigned int i =0; i<format_out_.size();i++){
87  }
88  std::cout<<std::endl;
89  }
90 
91  return;
92 }
int i
Definition: DBlmapReader.cc:9
void setParameters(uint32_t id, const EcalTPGSlidingWindow *&, const EcalTPGStripStatus *)
std::vector< int > filt_out_
std::vector< int > fgvb_out_
std::vector< int > format_out_
EcalFenixStripFormatEE * getFormatterEE() const
tuple cout
Definition: gather_cfg.py:145
std::vector< int > peak_out_
void EcalFenixStrip::setbadStripMissing ( bool  flag)
inline

Definition at line 125 of file EcalFenixStrip.h.

void EcalFenixStrip::setPointers ( const EcalTPGPedestals ecaltpPed,
const EcalTPGLinearizationConst ecaltpLin,
const EcalTPGWeightIdMap ecaltpgWeightMap,
const EcalTPGWeightGroup ecaltpgWeightGroup,
const EcalTPGSlidingWindow ecaltpgSlidW,
const EcalTPGFineGrainStripEE ecaltpgFgStripEE,
const EcalTPGCrystalStatus ecaltpgBadX,
const EcalTPGStripStatus ecaltpgStripStatus 
)
inline

Definition at line 83 of file EcalFenixStrip.h.

Member Data Documentation

std::vector<int> EcalFenixStrip::add_out_
private

Definition at line 63 of file EcalFenixStrip.h.

Referenced by EcalFenixStrip().

EcalFenixEtStrip* EcalFenixStrip::adder_
private

Definition at line 57 of file EcalFenixStrip.h.

Referenced by EcalFenixStrip(), and ~EcalFenixStrip().

EcalFenixAmplitudeFilter* EcalFenixStrip::amplitude_filter_
private

Definition at line 48 of file EcalFenixStrip.h.

Referenced by EcalFenixStrip(), and ~EcalFenixStrip().

bool EcalFenixStrip::debug_
private

Definition at line 42 of file EcalFenixStrip.h.

Referenced by process_part2_barrel(), and process_part2_endcap().

const EcalTPGCrystalStatus* EcalFenixStrip::ecaltpgBadX_
private

Definition at line 76 of file EcalFenixStrip.h.

const EcalTPGFineGrainStripEE* EcalFenixStrip::ecaltpgFgStripEE_
private

Definition at line 75 of file EcalFenixStrip.h.

const EcalTPGSlidingWindow* EcalFenixStrip::ecaltpgSlidW_
private

Definition at line 74 of file EcalFenixStrip.h.

const EcalTPGStripStatus* EcalFenixStrip::ecaltpgStripStatus_
private

Definition at line 77 of file EcalFenixStrip.h.

const EcalTPGWeightGroup* EcalFenixStrip::ecaltpgWeightGroup_
private

Definition at line 73 of file EcalFenixStrip.h.

const EcalTPGWeightIdMap* EcalFenixStrip::ecaltpgWeightMap_
private

Definition at line 72 of file EcalFenixStrip.h.

const EcalTPGLinearizationConst* EcalFenixStrip::ecaltpLin_
private

Definition at line 71 of file EcalFenixStrip.h.

const EcalTPGPedestals* EcalFenixStrip::ecaltpPed_
private

Definition at line 70 of file EcalFenixStrip.h.

bool EcalFenixStrip::famos_
private

Definition at line 43 of file EcalFenixStrip.h.

Referenced by EcalFenixStrip().

EcalFenixStripFormatEB* EcalFenixStrip::fenixFormatterEB_
private

Definition at line 52 of file EcalFenixStrip.h.

Referenced by EcalFenixStrip(), and ~EcalFenixStrip().

EcalFenixStripFormatEE* EcalFenixStrip::fenixFormatterEE_
private

Definition at line 54 of file EcalFenixStrip.h.

Referenced by EcalFenixStrip(), and ~EcalFenixStrip().

std::vector<int> EcalFenixStrip::fgvb_out_
private

Definition at line 67 of file EcalFenixStrip.h.

Referenced by EcalFenixStrip(), process_part2_barrel(), and process_part2_endcap().

std::vector<int> EcalFenixStrip::fgvb_out_temp_
private

Definition at line 68 of file EcalFenixStrip.h.

Referenced by EcalFenixStrip().

EcalFenixStripFgvbEE* EcalFenixStrip::fgvbEE_
private

Definition at line 59 of file EcalFenixStrip.h.

Referenced by EcalFenixStrip(), and ~EcalFenixStrip().

std::vector<int> EcalFenixStrip::filt_out_
private

Definition at line 64 of file EcalFenixStrip.h.

Referenced by EcalFenixStrip(), process_part2_barrel(), and process_part2_endcap().

std::vector<int> EcalFenixStrip::format_out_
private

Definition at line 66 of file EcalFenixStrip.h.

Referenced by EcalFenixStrip(), process_part2_barrel(), and process_part2_endcap().

bool EcalFenixStrip::identif_
private

Definition at line 79 of file EcalFenixStrip.h.

std::vector<std::vector<int> > EcalFenixStrip::lin_out_
private

Definition at line 62 of file EcalFenixStrip.h.

Referenced by EcalFenixStrip().

std::vector<EcalFenixLinearizer *> EcalFenixStrip::linearizer_
private

Definition at line 46 of file EcalFenixStrip.h.

Referenced by EcalFenixStrip(), and ~EcalFenixStrip().

int EcalFenixStrip::nbMaxXtals_
private

Definition at line 44 of file EcalFenixStrip.h.

Referenced by EcalFenixStrip(), and ~EcalFenixStrip().

EcalFenixPeakFinder* EcalFenixStrip::peak_finder_
private

Definition at line 50 of file EcalFenixStrip.h.

Referenced by EcalFenixStrip(), and ~EcalFenixStrip().

std::vector<int> EcalFenixStrip::peak_out_
private

Definition at line 65 of file EcalFenixStrip.h.

Referenced by EcalFenixStrip(), process_part2_barrel(), and process_part2_endcap().

const EcalElectronicsMapping* EcalFenixStrip::theMapping_
private

Definition at line 40 of file EcalFenixStrip.h.