class representing the Fenix chip, format strip More...
#include <EcalFenixStrip.h>
class representing the Fenix chip, format strip
Definition at line 32 of file EcalFenixStrip.h.
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 v.
: theMapping_(theMapping), debug_(debug), famos_(famos), nbMaxXtals_(nbMaxXtals) { linearizer_.resize(nbMaxXtals_); for (int i=0;i<nbMaxXtals_;i++) linearizer_[i] = new EcalFenixLinearizer(famos_); adder_ = new EcalFenixEtStrip(); amplitude_filter_ = new EcalFenixAmplitudeFilter(); peak_finder_ = new EcalFenixPeakFinder(); fenixFormatterEB_ = new EcalFenixStripFormatEB(); fenixFormatterEE_ = new EcalFenixStripFormatEE(); fgvbEE_ = new EcalFenixStripFgvbEE(); // prepare data storage for all events std::vector <int> v; v.resize(maxNrSamples); lin_out_.resize(nbMaxXtals_); for (int i=0;i<5;i++) lin_out_[i]=v; add_out_.resize(maxNrSamples); filt_out_.resize(maxNrSamples); peak_out_.resize(maxNrSamples); format_out_.resize(maxNrSamples); fgvb_out_.resize(maxNrSamples); fgvb_out_temp_.resize(maxNrSamples); }
EcalFenixStrip::~EcalFenixStrip | ( | ) | [virtual] |
Definition at line 36 of file EcalFenixStrip.cc.
References adder_, amplitude_filter_, fenixFormatterEB_, fenixFormatterEE_, fgvbEE_, i, linearizer_, nbMaxXtals_, and peak_finder_.
{ for (int i=0;i<nbMaxXtals_;i++) delete linearizer_[i]; delete adder_; delete amplitude_filter_; delete peak_finder_; delete fenixFormatterEB_; delete fenixFormatterEE_; delete fgvbEE_; }
EcalFenixEtStrip* EcalFenixStrip::getAdder | ( | ) | const [inline] |
Definition at line 116 of file EcalFenixStrip.h.
References adder_.
Referenced by process_part1().
{ return adder_;}
bool EcalFenixStrip::getbadStripMissing | ( | ) | const [inline] |
EcalFenixStripFgvbEE* EcalFenixStrip::getFGVB | ( | ) | const [inline] |
Definition at line 123 of file EcalFenixStrip.h.
References fgvbEE_.
Referenced by process(), process_part1(), and EcalTrigPrimFunctionalAlgo::run_part2().
{ return fgvbEE_;}
EcalFenixAmplitudeFilter* EcalFenixStrip::getFilter | ( | ) | const [inline] |
Definition at line 117 of file EcalFenixStrip.h.
References amplitude_filter_.
Referenced by process_part1().
{ return amplitude_filter_;}
EcalFenixStripFormatEB* EcalFenixStrip::getFormatterEB | ( | ) | const [inline] |
Definition at line 120 of file EcalFenixStrip.h.
References fenixFormatterEB_.
Referenced by process_part2_barrel().
{ return fenixFormatterEB_;}
EcalFenixStripFormatEE* EcalFenixStrip::getFormatterEE | ( | ) | const [inline] |
Definition at line 121 of file EcalFenixStrip.h.
References fenixFormatterEE_.
Referenced by process_part2_endcap().
{ return fenixFormatterEE_;}
EcalFenixLinearizer* EcalFenixStrip::getLinearizer | ( | int | i | ) | const [inline] |
Definition at line 115 of file EcalFenixStrip.h.
References i, and linearizer_.
Referenced by process_part1().
{ return linearizer_[i];}
EcalFenixPeakFinder* EcalFenixStrip::getPeakFinder | ( | ) | const [inline] |
Definition at line 118 of file EcalFenixStrip.h.
References peak_finder_.
Referenced by process_part1().
{ return peak_finder_;}
void EcalFenixStrip::process | ( | const edm::EventSetup & | , |
std::vector< const T > & | , | ||
int | nrxtals, | ||
std::vector< int > & | out | ||
) |
Referenced by EcalTrigPrimFunctionalAlgo::run_part2().
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.
References gather_cfg::cout, ecaltpgBadX_, ecaltpgFgStripEE_, ecaltpgSlidW_, ecaltpgStripStatus_, ecaltpgWeightGroup_, ecaltpgWeightMap_, ecaltpLin_, ecaltpPed_, format_out_, getFGVB(), EcalFenixStripFgvbEE::getMissedStripFlag(), EcalElectronicsMapping::getTriggerElectronicsId(), identif_, process_part1(), process_part2_endcap(), EcalTriggerElectronicsId::rawId(), and theMapping_.
{ // now call processing if (samples.size()==0) { std::cout<<" Warning: 0 size vector found in EcalFenixStripProcess!!!!!"<<std::endl; return; } const EcalTriggerElectronicsId elId = theMapping_->getTriggerElectronicsId(samples[0].id()); uint32_t stripid=elId.rawId() & 0xfffffff8; //from Pascal identif_ = getFGVB()->getMissedStripFlag(); process_part1(identif_,samples,nrXtals,stripid,ecaltpPed_,ecaltpLin_,ecaltpgWeightMap_,ecaltpgWeightGroup_,ecaltpgBadX_); //templated part process_part2_endcap(stripid,ecaltpgSlidW_,ecaltpgFgStripEE_,ecaltpgStripStatus_); out=format_out_; //FIXME: timing return; }
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.
References gather_cfg::cout, ecaltpgBadX_, ecaltpgFgStripEE_, ecaltpgSlidW_, ecaltpgWeightGroup_, ecaltpgWeightMap_, ecaltpLin_, ecaltpPed_, format_out_, getFGVB(), EcalFenixStripFgvbEE::getMissedStripFlag(), EcalElectronicsMapping::getTriggerElectronicsId(), identif_, process_part1(), process_part2_barrel(), EcalTriggerElectronicsId::rawId(), and theMapping_.
{ // now call processing if (samples.size()==0) { std::cout<<" Warning: 0 size vector found in EcalFenixStripProcess!!!!!"<<std::endl; return; } const EcalTriggerElectronicsId elId = theMapping_->getTriggerElectronicsId(samples[0].id()); uint32_t stripid=elId.rawId() & 0xfffffff8; //from Pascal identif_ = getFGVB()->getMissedStripFlag(); process_part1(identif_,samples,nrXtals,stripid,ecaltpPed_,ecaltpLin_,ecaltpgWeightMap_,ecaltpgWeightGroup_,ecaltpgBadX_);//templated part process_part2_barrel(stripid,ecaltpgSlidW_,ecaltpgFgStripEE_);//part different for barrel/endcap out=format_out_; }
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.
References add_out_, gather_cfg::cout, debug_, ecaltpgFgStripEE_, famos_, fgvb_out_, fgvb_out_temp_, filt_out_, getAdder(), getFGVB(), getFilter(), getLinearizer(), getPeakFinder(), i, lin_out_, peak_out_, EcalFenixLinearizer::process(), EcalFenixAmplitudeFilter::process(), EcalFenixEtStrip::process(), EcalFenixStripFgvbEE::process(), EcalFenixPeakFinder::process(), EcalFenixLinearizer::setParameters(), EcalFenixStripFgvbEE::setParameters(), and EcalFenixAmplitudeFilter::setParameters().
Referenced by process().
{ if(debug_) std::cout<<"\n\nEcalFenixStrip input is a vector of size: "<<nrXtals<< std::endl; //loop over crystals for (int cryst=0;cryst<nrXtals;cryst++) { if(debug_){ std::cout<<std::endl; std::cout <<"cryst= "<<cryst<<" EBDataFrame/EEDataFrame is: "<<std::endl; for ( int i = 0; i<df[cryst].size();i++){ std::cout <<" "<<std::dec<<df[cryst][i].adc(); } std::cout<<std::endl; } // call linearizer this->getLinearizer(cryst)->setParameters(df[cryst].id().rawId(),ecaltpPed,ecaltpLin,ecaltpBadX) ; this->getLinearizer(cryst)->process(df[cryst],lin_out_[cryst]); } if(debug_){ std::cout<< "output of linearizer is a vector of size: " <<std::dec<<lin_out_.size()<<" of which used "<<nrXtals<<std::endl; for (int ix=0;ix<nrXtals;ix++){ std::cout<< "cryst: "<<ix<<" value : "<<std::dec<<std::endl; std::cout<<" lin_out[ix].size()= "<<std::dec<<lin_out_[ix].size()<<std::endl; for (unsigned int i =0; i<lin_out_[ix].size();i++){ std::cout <<" "<<std::dec<<(lin_out_[ix])[i]; } std::cout<<std::endl; } std::cout<<std::endl; } // Now call the sFGVB - this is common between EB and EE! getFGVB()->setParameters(identif, stripid,ecaltpgFgStripEE_); getFGVB()->process(lin_out_,fgvb_out_temp_); if(debug_) { std::cout << "output of strip fgvb is a vector of size: " <<std::dec<<fgvb_out_temp_.size()<<std::endl; for (unsigned int i =0; i<fgvb_out_temp_.size();i++){ std::cout << " " << std::dec << (fgvb_out_temp_[i]); } std::cout<<std::endl; } // call adder this->getAdder()->process(lin_out_,nrXtals,add_out_); //add_out is of size SIZEMAX=maxNrSamples if(debug_){ std::cout<< "output of adder is a vector of size: "<<std::dec<<add_out_.size()<<std::endl; for (unsigned int ix=0;ix<add_out_.size();ix++){ std::cout<< "cryst: "<<ix<<" value : "<<std::dec<<add_out_[ix]<<std::endl; } std::cout<<std::endl; } if (famos_) { filt_out_[0]= add_out_[0]; peak_out_[0]= add_out_[0]; return; }else { // call amplitudefilter this->getFilter()->setParameters(stripid,ecaltpgWeightMap,ecaltpgWeightGroup); this->getFilter()->process(add_out_,filt_out_,fgvb_out_temp_,fgvb_out_); if(debug_){ std::cout<< "output of filter is a vector of size: "<<std::dec<<filt_out_.size()<<std::endl; for (unsigned int ix=0;ix<filt_out_.size();ix++){ std::cout<< "cryst: "<<ix<<" value : "<<std::dec<<filt_out_[ix]<<std::endl; } std::cout<<std::endl; std::cout<< "output of sfgvb after filter is a vector of size: "<<std::dec<<fgvb_out_.size()<<std::endl; for (unsigned int ix=0;ix<fgvb_out_.size();ix++){ std::cout<< "cryst: "<<ix<<" value : "<<std::dec<<fgvb_out_[ix]<<std::endl; } std::cout<<std::endl; } // call peakfinder this->getPeakFinder()->process(filt_out_,peak_out_); if(debug_){ std::cout<< "output of peakfinder is a vector of size: "<<peak_out_.size()<<std::endl; for (unsigned int ix=0;ix<peak_out_.size();ix++){ std::cout<< "cryst: "<<ix<<" value : "<<peak_out_[ix]<<std::endl; } std::cout<<std::endl; } return; } }
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().
Referenced by process().
{ // call Fgvb //this->getFGVB()->setParameters(stripid,ecaltpgFgStripEE); //this->getFGVB()->process(lin_out_,fgvb_out_); // call formatter this->getFormatterEB()->setParameters(stripid,ecaltpgSlidW) ; this->getFormatterEB()->process(fgvb_out_,peak_out_,filt_out_,format_out_); //this is a test: if (debug_) { std::cout<< "output of formatter is a vector of size: "<<format_out_.size()<<std::endl; std::cout<< "value : "<<std::endl; for (unsigned int i =0; i<format_out_.size();i++){ std::cout <<" "<<format_out_[i]; } std::cout<<std::endl; } return; }
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_, fgvb_out_, filt_out_, format_out_, getFormatterEE(), i, peak_out_, EcalFenixStripFormatEE::process(), and EcalFenixStripFormatEE::setParameters().
Referenced by process().
{ // call Fgvb //this->getFGVB()->setParameters(stripid,ecaltpgFgStripEE); //this->getFGVB()->process(lin_out_,fgvb_out_); // call formatter this->getFormatterEE()->setParameters(stripid,ecaltpgSlidW,ecaltpgStripStatus) ; this->getFormatterEE()->process(fgvb_out_,peak_out_,filt_out_,format_out_); //this is a test: if (debug_) { std::cout<< "output of formatter is a vector of size: "<<format_out_.size()<<std::endl; std::cout<< "value : "<<std::endl; for (unsigned int i =0; i<format_out_.size();i++){ std::cout <<" "<<std::dec<<format_out_[i]; } std::cout<<std::endl; } return; }
void EcalFenixStrip::setbadStripMissing | ( | bool | flag | ) | [inline] |
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.
References ecaltpgBadX_, ecaltpgFgStripEE_, ecaltpgSlidW_, ecaltpgStripStatus_, ecaltpgWeightGroup_, ecaltpgWeightMap_, ecaltpLin_, and ecaltpPed_.
Referenced by EcalTrigPrimFunctionalAlgo::setPointers().
{ ecaltpPed_=ecaltpPed; ecaltpLin_=ecaltpLin; ecaltpgWeightMap_=ecaltpgWeightMap; ecaltpgWeightGroup_= ecaltpgWeightGroup; ecaltpgSlidW_=ecaltpgSlidW; ecaltpgFgStripEE_=ecaltpgFgStripEE; ecaltpgBadX_=ecaltpgBadX; ecaltpgStripStatus_=ecaltpgStripStatus; }
std::vector<int> EcalFenixStrip::add_out_ [private] |
Definition at line 63 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), and process_part1().
EcalFenixEtStrip* EcalFenixStrip::adder_ [private] |
Definition at line 57 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), getAdder(), and ~EcalFenixStrip().
Definition at line 48 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), getFilter(), and ~EcalFenixStrip().
bool EcalFenixStrip::debug_ [private] |
Definition at line 42 of file EcalFenixStrip.h.
Referenced by process_part1(), process_part2_barrel(), and process_part2_endcap().
const EcalTPGCrystalStatus* EcalFenixStrip::ecaltpgBadX_ [private] |
Definition at line 76 of file EcalFenixStrip.h.
Referenced by process(), and setPointers().
const EcalTPGFineGrainStripEE* EcalFenixStrip::ecaltpgFgStripEE_ [private] |
Definition at line 75 of file EcalFenixStrip.h.
Referenced by process(), process_part1(), and setPointers().
const EcalTPGSlidingWindow* EcalFenixStrip::ecaltpgSlidW_ [private] |
Definition at line 74 of file EcalFenixStrip.h.
Referenced by process(), and setPointers().
const EcalTPGStripStatus* EcalFenixStrip::ecaltpgStripStatus_ [private] |
Definition at line 77 of file EcalFenixStrip.h.
Referenced by process(), and setPointers().
const EcalTPGWeightGroup* EcalFenixStrip::ecaltpgWeightGroup_ [private] |
Definition at line 73 of file EcalFenixStrip.h.
Referenced by process(), and setPointers().
const EcalTPGWeightIdMap* EcalFenixStrip::ecaltpgWeightMap_ [private] |
Definition at line 72 of file EcalFenixStrip.h.
Referenced by process(), and setPointers().
const EcalTPGLinearizationConst* EcalFenixStrip::ecaltpLin_ [private] |
Definition at line 71 of file EcalFenixStrip.h.
Referenced by process(), and setPointers().
const EcalTPGPedestals* EcalFenixStrip::ecaltpPed_ [private] |
Definition at line 70 of file EcalFenixStrip.h.
Referenced by process(), and setPointers().
bool EcalFenixStrip::famos_ [private] |
Definition at line 43 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), and process_part1().
Definition at line 52 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), getFormatterEB(), and ~EcalFenixStrip().
Definition at line 54 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), getFormatterEE(), and ~EcalFenixStrip().
std::vector<int> EcalFenixStrip::fgvb_out_ [private] |
Definition at line 67 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), process_part1(), 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(), and process_part1().
EcalFenixStripFgvbEE* EcalFenixStrip::fgvbEE_ [private] |
Definition at line 59 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), getFGVB(), and ~EcalFenixStrip().
std::vector<int> EcalFenixStrip::filt_out_ [private] |
Definition at line 64 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), process_part1(), 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(), process_part2_barrel(), and process_part2_endcap().
bool EcalFenixStrip::identif_ [private] |
Definition at line 79 of file EcalFenixStrip.h.
Referenced by getbadStripMissing(), process(), and setbadStripMissing().
std::vector<std::vector<int> > EcalFenixStrip::lin_out_ [private] |
Definition at line 62 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), and process_part1().
std::vector<EcalFenixLinearizer *> EcalFenixStrip::linearizer_ [private] |
Definition at line 46 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), getLinearizer(), 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(), getPeakFinder(), and ~EcalFenixStrip().
std::vector<int> EcalFenixStrip::peak_out_ [private] |
Definition at line 65 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), process_part1(), process_part2_barrel(), and process_part2_endcap().
const EcalElectronicsMapping* EcalFenixStrip::theMapping_ [private] |
Definition at line 40 of file EcalFenixStrip.h.
Referenced by process().