#include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixStrip.h>
Definition at line 31 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_, fgvbEE_, filt_out_, format_out_, i, lin_out_, linearizer_, nbMaxXtals_, peak_finder_, peak_out_, and v.
00011 : theMapping_(theMapping), debug_(debug), famos_(famos), nbMaxXtals_(nbMaxXtals) 00012 { 00013 linearizer_.resize(nbMaxXtals_); 00014 for (int i=0;i<nbMaxXtals_;i++) linearizer_[i] = new EcalFenixLinearizer(famos_); 00015 adder_ = new EcalFenixEtStrip(); 00016 amplitude_filter_ = new EcalFenixAmplitudeFilter(); 00017 peak_finder_ = new EcalFenixPeakFinder(); 00018 fenixFormatterEB_ = new EcalFenixStripFormatEB(); 00019 fenixFormatterEE_ = new EcalFenixStripFormatEE(); 00020 fgvbEE_ = new EcalFenixStripFgvbEE(); 00021 00022 // prepare data storage for all events 00023 std::vector <int> v; 00024 v.resize(maxNrSamples); 00025 lin_out_.resize(nbMaxXtals_); 00026 for (int i=0;i<5;i++) lin_out_[i]=v; 00027 add_out_.resize(maxNrSamples); 00028 filt_out_.resize(maxNrSamples); 00029 peak_out_.resize(maxNrSamples); 00030 format_out_.resize(maxNrSamples); 00031 fgvb_out_.resize(maxNrSamples); 00032 }
EcalFenixStrip::~EcalFenixStrip | ( | ) | [virtual] |
Definition at line 35 of file EcalFenixStrip.cc.
References adder_, amplitude_filter_, fenixFormatterEB_, fenixFormatterEE_, fgvbEE_, i, linearizer_, nbMaxXtals_, and peak_finder_.
00035 { 00036 for (int i=0;i<nbMaxXtals_;i++) delete linearizer_[i]; 00037 delete adder_; 00038 delete amplitude_filter_; 00039 delete peak_finder_; 00040 delete fenixFormatterEB_; 00041 delete fenixFormatterEE_; 00042 delete fgvbEE_; 00043 }
EcalFenixEtStrip* EcalFenixStrip::getAdder | ( | ) | const [inline] |
Definition at line 106 of file EcalFenixStrip.h.
References adder_.
Referenced by process_part1().
00106 { return adder_;}
EcalFenixStripFgvbEE* EcalFenixStrip::getFGVB | ( | ) | const [inline] |
Definition at line 113 of file EcalFenixStrip.h.
References fgvbEE_.
Referenced by process_part2_endcap().
00113 { return fgvbEE_;}
EcalFenixAmplitudeFilter* EcalFenixStrip::getFilter | ( | ) | const [inline] |
Definition at line 107 of file EcalFenixStrip.h.
References amplitude_filter_.
Referenced by process_part1().
00107 { return amplitude_filter_;}
EcalFenixStripFormatEB* EcalFenixStrip::getFormatterEB | ( | ) | const [inline] |
Definition at line 110 of file EcalFenixStrip.h.
References fenixFormatterEB_.
Referenced by process_part2_barrel().
00110 { return fenixFormatterEB_;}
EcalFenixStripFormatEE* EcalFenixStrip::getFormatterEE | ( | ) | const [inline] |
Definition at line 111 of file EcalFenixStrip.h.
References fenixFormatterEE_.
Referenced by process_part2_endcap().
00111 { return fenixFormatterEE_;}
EcalFenixLinearizer* EcalFenixStrip::getLinearizer | ( | int | i | ) | const [inline] |
Definition at line 105 of file EcalFenixStrip.h.
References linearizer_.
Referenced by process_part1().
00105 { return linearizer_[i];}
EcalFenixPeakFinder* EcalFenixStrip::getPeakFinder | ( | ) | const [inline] |
Definition at line 108 of file EcalFenixStrip.h.
References peak_finder_.
Referenced by process_part1().
00108 { return peak_finder_;}
void EcalFenixStrip::process | ( | const edm::EventSetup & | setup, | |
std::vector< EEDataFrame > & | samples, | |||
int | nrXtals, | |||
std::vector< int > & | out | |||
) | [inline] |
Definition at line 131 of file EcalFenixStrip.h.
References GenMuonPlsPt100GeV_cfg::cout, ecaltpgFgStripEE_, ecaltpgSlidW_, ecaltpgWeightGroup_, ecaltpgWeightMap_, ecaltpLin_, ecaltpPed_, lat::endl(), format_out_, EcalElectronicsMapping::getTriggerElectronicsId(), process_part1(), process_part2_endcap(), EcalTriggerElectronicsId::rawId(), and theMapping_.
00131 { 00132 00133 // now call processing 00134 if (samples.size()==0) { 00135 std::cout<<" Warning: 0 size vector found in EcalFenixStripProcess!!!!!"<<std::endl; 00136 return; 00137 } 00138 const EcalTriggerElectronicsId elId = theMapping_->getTriggerElectronicsId(samples[0].id()); 00139 uint32_t stripid=elId.rawId() & 0xfffffff8; //from Pascal 00140 process_part1(samples,nrXtals,stripid,ecaltpPed_,ecaltpLin_,ecaltpgWeightMap_,ecaltpgWeightGroup_); //templated part 00141 process_part2_endcap(stripid,ecaltpgSlidW_,ecaltpgFgStripEE_); 00142 out=format_out_; //FIXME: timing 00143 return; 00144 }
void EcalFenixStrip::process | ( | const edm::EventSetup & | setup, | |
std::vector< EBDataFrame > & | samples, | |||
int | nrXtals, | |||
std::vector< int > & | out | |||
) | [inline] |
Definition at line 116 of file EcalFenixStrip.h.
References GenMuonPlsPt100GeV_cfg::cout, ecaltpgSlidW_, ecaltpgWeightGroup_, ecaltpgWeightMap_, ecaltpLin_, ecaltpPed_, lat::endl(), format_out_, EcalElectronicsMapping::getTriggerElectronicsId(), process_part1(), process_part2_barrel(), EcalTriggerElectronicsId::rawId(), and theMapping_.
00116 { 00117 00118 // now call processing 00119 if (samples.size()==0) { 00120 std::cout<<" Warning: 0 size vector found in EcalFenixStripProcess!!!!!"<<std::endl; 00121 return; 00122 00123 } 00124 const EcalTriggerElectronicsId elId = theMapping_->getTriggerElectronicsId(samples[0].id()); 00125 uint32_t stripid=elId.rawId() & 0xfffffff8; //from Pascal 00126 process_part1(samples,nrXtals,stripid,ecaltpPed_,ecaltpLin_,ecaltpgWeightMap_,ecaltpgWeightGroup_);//templated part 00127 process_part2_barrel(stripid,ecaltpgSlidW_);//part different for barrel/endcap 00128 out=format_out_; 00129 }
void EcalFenixStrip::process | ( | const edm::EventSetup & | , | |
std::vector< const T > & | , | |||
int | nrxtals, | |||
std::vector< int > & | out | |||
) | [inline] |
Referenced by EcalTrigPrimFunctionalAlgo::run_part2().
void EcalFenixStrip::process_part1 | ( | std::vector< T > & | df, | |
int | nrXtals, | |||
uint32_t | stripid, | |||
const EcalTPGPedestals * | ecaltpPed, | |||
const EcalTPGLinearizationConst * | ecaltpLin, | |||
const EcalTPGWeightIdMap * | ecaltpgWeightMap, | |||
const EcalTPGWeightGroup * | ecaltpgWeightGroup | |||
) | [inline] |
Definition at line 147 of file EcalFenixStrip.h.
References add_out_, GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), famos_, filt_out_, getAdder(), getFilter(), getLinearizer(), getPeakFinder(), i, lin_out_, peak_out_, EcalFenixLinearizer::process(), EcalFenixAmplitudeFilter::process(), EcalFenixEtStrip::process(), EcalFenixPeakFinder::process(), EcalFenixLinearizer::setParameters(), and EcalFenixAmplitudeFilter::setParameters().
Referenced by process().
00148 { 00149 00150 if(debug_) std::cout<<"\n\nEcalFenixStrip input is a vector of size: "<<nrXtals<< std::endl; 00151 00152 //loop over crystals 00153 for (int cryst=0;cryst<nrXtals;cryst++) { 00154 if(debug_){ 00155 std::cout<<std::endl; 00156 std::cout <<"cryst= "<<cryst<<" EBDataFrame/EEDataFrame is: "<<std::endl; 00157 for ( int i = 0; i<df[cryst].size();i++){ 00158 std::cout <<" "<<std::dec<<df[cryst][i].adc(); 00159 } 00160 std::cout<<std::endl; 00161 } 00162 // call linearizer 00163 this->getLinearizer(cryst)->setParameters(df[cryst].id().rawId(),ecaltpPed,ecaltpLin) ; 00164 this->getLinearizer(cryst)->process(df[cryst],lin_out_[cryst]); 00165 } 00166 00167 if(debug_){ 00168 std::cout<< "output of linearizer is a vector of size: " 00169 <<std::dec<<lin_out_.size()<<" of which used "<<nrXtals<<std::endl; 00170 for (int ix=0;ix<nrXtals;ix++){ 00171 std::cout<< "cryst: "<<ix<<" value : "<<std::dec<<std::endl; 00172 std::cout<<" lin_out[ix].size()= "<<std::dec<<lin_out_[ix].size()<<std::endl; 00173 for (unsigned int i =0; i<lin_out_[ix].size();i++){ 00174 std::cout <<" "<<std::dec<<(lin_out_[ix])[i]; 00175 } 00176 std::cout<<std::endl; 00177 } 00178 00179 std::cout<<std::endl; 00180 } 00181 00182 // call adder 00183 this->getAdder()->process(lin_out_,nrXtals,add_out_); //add_out is of size SIZEMAX=maxNrSamples 00184 00185 if(debug_){ 00186 std::cout<< "output of adder is a vector of size: "<<std::dec<<add_out_.size()<<std::endl; 00187 for (unsigned int ix=0;ix<add_out_.size();ix++){ 00188 std::cout<< "cryst: "<<ix<<" value : "<<std::dec<<add_out_[ix]<<std::endl; 00189 } 00190 std::cout<<std::endl; 00191 } 00192 00193 00194 if (famos_) { 00195 filt_out_[0]= add_out_[0]; 00196 peak_out_[0]= add_out_[0]; 00197 return; 00198 }else { 00199 // call amplitudefilter 00200 this->getFilter()->setParameters(stripid,ecaltpgWeightMap,ecaltpgWeightGroup); 00201 this->getFilter()->process(add_out_,filt_out_); 00202 00203 if(debug_){ 00204 std::cout<< "output of filter is a vector of size: "<<std::dec<<filt_out_.size()<<std::endl; 00205 for (unsigned int ix=0;ix<filt_out_.size();ix++){ 00206 std::cout<< "cryst: "<<ix<<" value : "<<std::dec<<filt_out_[ix]<<std::endl; 00207 } 00208 std::cout<<std::endl; 00209 } 00210 00211 // call peakfinder 00212 this->getPeakFinder()->process(filt_out_,peak_out_); 00213 if(debug_){ 00214 std::cout<< "output of peakfinder is a vector of size: "<<peak_out_.size()<<std::endl; 00215 for (unsigned int ix=0;ix<peak_out_.size();ix++){ 00216 std::cout<< "cryst: "<<ix<<" value : "<<peak_out_[ix]<<std::endl; 00217 } 00218 std::cout<<std::endl; 00219 } 00220 return; 00221 } 00222 }
void EcalFenixStrip::process_part2_barrel | ( | uint32_t | stripid, | |
const EcalTPGSlidingWindow * | ecaltpgSlidW | |||
) |
Definition at line 46 of file EcalFenixStrip.cc.
References GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), filt_out_, format_out_, getFormatterEB(), i, peak_out_, EcalFenixStripFormatEB::process(), and EcalFenixStripFormatEB::setParameters().
Referenced by process().
00046 { 00047 00048 // call formatter 00049 this->getFormatterEB()->setParameters(stripid,ecaltpgSlidW) ; 00050 this->getFormatterEB()->process(peak_out_,filt_out_,format_out_); 00051 //this is a test: 00052 if (debug_) { 00053 std::cout<< "output of formatter is a vector of size: "<<format_out_.size()<<std::endl; 00054 std::cout<< "value : "<<std::endl; 00055 for (unsigned int i =0; i<format_out_.size();i++){ 00056 std::cout <<" "<<format_out_[i]; 00057 } 00058 std::cout<<std::endl; 00059 00060 } 00061 return; 00062 00063 }
void EcalFenixStrip::process_part2_endcap | ( | uint32_t | stripid, | |
const EcalTPGSlidingWindow * | ecaltpgSlidW, | |||
const EcalTPGFineGrainStripEE * | ecaltpgFgStripEE | |||
) |
Definition at line 65 of file EcalFenixStrip.cc.
References GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), fgvb_out_, filt_out_, format_out_, getFGVB(), getFormatterEE(), i, lin_out_, peak_out_, EcalFenixStripFormatEE::process(), EcalFenixStripFgvbEE::process(), EcalFenixStripFormatEE::setParameters(), and EcalFenixStripFgvbEE::setParameters().
Referenced by process().
00065 { 00066 00067 // call Fgvb 00068 this->getFGVB()->setParameters(stripid,ecaltpgFgStripEE); 00069 this->getFGVB()->process(lin_out_,fgvb_out_); 00070 00071 // call formatter 00072 this->getFormatterEE()->setParameters(stripid,ecaltpgSlidW) ; 00073 00074 this->getFormatterEE()->process(fgvb_out_,peak_out_,filt_out_,format_out_); 00075 00076 //this is a test: 00077 if (debug_) { 00078 std::cout<< "output of formatter is a vector of size: "<<format_out_.size()<<std::endl; 00079 std::cout<< "value : "<<std::endl; 00080 for (unsigned int i =0; i<format_out_.size();i++){ 00081 std::cout <<" "<<std::dec<<format_out_[i]; 00082 } 00083 std::cout<<std::endl; 00084 } 00085 00086 return; 00087 }
void EcalFenixStrip::setPointers | ( | const EcalTPGPedestals * | ecaltpPed, | |
const EcalTPGLinearizationConst * | ecaltpLin, | |||
const EcalTPGWeightIdMap * | ecaltpgWeightMap, | |||
const EcalTPGWeightGroup * | ecaltpgWeightGroup, | |||
const EcalTPGSlidingWindow * | ecaltpgSlidW, | |||
const EcalTPGFineGrainStripEE * | ecaltpgFgStripEE | |||
) | [inline] |
Definition at line 77 of file EcalFenixStrip.h.
References ecaltpgFgStripEE_, ecaltpgSlidW_, ecaltpgWeightGroup_, ecaltpgWeightMap_, ecaltpLin_, and ecaltpPed_.
Referenced by EcalTrigPrimFunctionalAlgo::setPointers().
00083 { 00084 ecaltpPed_=ecaltpPed; 00085 ecaltpLin_=ecaltpLin; 00086 ecaltpgWeightMap_=ecaltpgWeightMap; 00087 ecaltpgWeightGroup_= ecaltpgWeightGroup; 00088 ecaltpgSlidW_=ecaltpgSlidW; 00089 ecaltpgFgStripEE_=ecaltpgFgStripEE; 00090 }
std::vector<int> EcalFenixStrip::add_out_ [private] |
Definition at line 62 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), and process_part1().
EcalFenixEtStrip* EcalFenixStrip::adder_ [private] |
Definition at line 56 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), getAdder(), and ~EcalFenixStrip().
Definition at line 47 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), getFilter(), and ~EcalFenixStrip().
bool EcalFenixStrip::debug_ [private] |
Definition at line 41 of file EcalFenixStrip.h.
Referenced by process_part1(), process_part2_barrel(), and process_part2_endcap().
const EcalTPGFineGrainStripEE* EcalFenixStrip::ecaltpgFgStripEE_ [private] |
const EcalTPGSlidingWindow* EcalFenixStrip::ecaltpgSlidW_ [private] |
const EcalTPGWeightGroup* EcalFenixStrip::ecaltpgWeightGroup_ [private] |
const EcalTPGWeightIdMap* EcalFenixStrip::ecaltpgWeightMap_ [private] |
const EcalTPGLinearizationConst* EcalFenixStrip::ecaltpLin_ [private] |
const EcalTPGPedestals* EcalFenixStrip::ecaltpPed_ [private] |
bool EcalFenixStrip::famos_ [private] |
Definition at line 42 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), and process_part1().
Definition at line 51 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), getFormatterEB(), and ~EcalFenixStrip().
Definition at line 53 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), getFormatterEE(), and ~EcalFenixStrip().
std::vector<int> EcalFenixStrip::fgvb_out_ [private] |
Definition at line 66 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), and process_part2_endcap().
EcalFenixStripFgvbEE* EcalFenixStrip::fgvbEE_ [private] |
Definition at line 58 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), getFGVB(), and ~EcalFenixStrip().
std::vector<int> EcalFenixStrip::filt_out_ [private] |
Definition at line 63 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 65 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), process(), process_part2_barrel(), and process_part2_endcap().
std::vector<std::vector<int> > EcalFenixStrip::lin_out_ [private] |
Definition at line 61 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), process_part1(), and process_part2_endcap().
std::vector<EcalFenixLinearizer *> EcalFenixStrip::linearizer_ [private] |
Definition at line 45 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), getLinearizer(), and ~EcalFenixStrip().
int EcalFenixStrip::nbMaxXtals_ [private] |
Definition at line 43 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), and ~EcalFenixStrip().
EcalFenixPeakFinder* EcalFenixStrip::peak_finder_ [private] |
Definition at line 49 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), getPeakFinder(), and ~EcalFenixStrip().
std::vector<int> EcalFenixStrip::peak_out_ [private] |
Definition at line 64 of file EcalFenixStrip.h.
Referenced by EcalFenixStrip(), process_part1(), process_part2_barrel(), and process_part2_endcap().
const EcalElectronicsMapping* EcalFenixStrip::theMapping_ [private] |