59 if (
zside_ ==
"+") zsign = 1;
60 if (
zside_ ==
"-") zsign = -1;
78 double emax_Sim = -9999.;
88 if ( subdet != 0 &&
noise_ == 0) {
90 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin (); simhits != simhitResult->end () ; ++simhits) {
93 double en = simhits->energy();
95 int ieta = cell.ieta();
97 int iphi = cell.iphi()-1;
100 if(en > emax_Sim && sub == subdet) {
105 if (
mode_ ==
"multi" &&
106 ((sub == 4 && en < 100. && en > 1.)
107 || ((sub !=4) && en < 1. && en > 0.02)))
118 if(
mode_ !=
"multi" && emax_Sim > 0.) seedSimHit = 1;
132 for (digiItr=digiCollection->begin();digiItr!=digiCollection->end();digiItr++) {
135 int depth = cell.depth();
136 int iphi = cell.iphi()-1;
137 int ieta = cell.ieta();
139 int sub = cell.subdet();
150 if ( ((
nevent1 == 1 && subdet == 1) ||
151 (
nevent2 == 1 && subdet == 2) ||
152 (
nevent3 == 1 && subdet == 3) ||
153 (
nevent4 == 1 && subdet == 4)) &&
noise_ == 1 && sub == subdet) {
163 double gainValue0 = gain->
getValue(0);
164 double gainValue1 = gain->
getValue(1);
165 double gainValue2 = gain->
getValue(2);
166 double gainValue3 = gain->
getValue(3);
168 double gainWidthValue0 = gainWidth->
getValue(0);
169 double gainWidthValue1 = gainWidth->
getValue(1);
170 double gainWidthValue2 = gainWidth->
getValue(2);
171 double gainWidthValue3 = gainWidth->
getValue(3);
184 double pedValue0 = pedestal->getValue(0);
185 double pedValue1 = pedestal->getValue(1);
186 double pedValue2 = pedestal->getValue(2);
187 double pedValue3 = pedestal->getValue(3);
189 double pedWidth0 = pedWidth->
getWidth(0);
190 double pedWidth1 = pedWidth->
getWidth(1);
191 double pedWidth2 = pedWidth->
getWidth(2);
192 double pedWidth3 = pedWidth->
getWidth(3);
312 if ( sub == subdet) Ndig++;
316 if ( sub == subdet &&
noise_ == 0 ) {
324 coder.
adc2fC(*digiItr,tool);
326 double noiseADC = (*digiItr)[0].adc();
327 double noisefC = tool[0];
348 double deta = double(ieta);
349 double dphi = double(iphi);
364 if(ieta == ieta_Sim && iphi == iphi_Sim ) closen = seedSimHit;
367 int capid = (*digiItr)[
ii].capid();
384 if( closen == 1 &&( ieta * zsign >= 0 )) {
390 if (subdet != 4 &&
ii>=4 &&
ii<=7) {
392 if(depth == 1) ampl1 +=
val;
393 if(depth == 2) ampl2 +=
val;
394 if(depth == 3) ampl3 +=
val;
395 if(depth == 4) ampl4 +=
val;
397 if( closen == 1 && ( ieta * zsign >= 0 )) {
399 if(depth == 1) ampl1_c +=
val;
400 if(depth == 2) ampl2_c +=
val;
401 if(depth == 3) ampl3_c +=
val;
402 if(depth == 4) ampl4_c +=
val;
408 if (subdet == 4 &&
ii==3 ) {
410 if(depth == 1) ampl1 +=
val;
411 if(depth == 2) ampl2 +=
val;
412 if(depth == 3) ampl3 +=
val;
413 if(depth == 4) ampl4 +=
val;
414 if( closen == 1 && ( ieta * zsign >= 0 )) {
416 if(depth == 1) ampl1_c +=
val;
417 if(depth == 2) ampl2_c +=
val;
418 if(depth == 3) ampl3_c +=
val;
419 if(depth == 4) ampl4_c +=
val;
433 if(ampl1 > 10. || ampl2 > 10. || ampl3 > 10. || ampl4 > 10. ) ndigis++;
436 if(ampl1 > 30. && depth == 1 && closen == 1 ) {
437 double fBin5 = tool[4] - calibrations.
pedestal((*digiItr)[4].capid());
438 double fBin67 = tool[5] + tool[6]
439 - calibrations.
pedestal((*digiItr)[5].capid())
440 - calibrations.
pedestal((*digiItr)[6].capid());
458 if ( subdet != 0 &&
noise_ == 0) {
474 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin (); simhits != simhitResult->end () ; ++simhits) {
477 int ieta = cell.
ieta();
479 int iphi = cell.iphi()-1;
480 int sub = cell.subdet();
483 if (sub == subdet && ieta == ieta_Sim && iphi == iphi_Sim){
484 int depth = cell.depth();
485 double en = simhits->energy();
488 if(depth == 1) ehits1 += en;
489 if(depth == 2) ehits2 += en;
490 if(depth == 3) ehits3 += en;
491 if(depth == 4) ehits4 += en;
522 inputTag_(iConfig.getParameter<
edm::InputTag>(
"digiLabel")),
526 mode_(iConfig.getUntrackedParameter<
std::
string>(
"mode",
"multi")),
527 mc_(iConfig.getUntrackedParameter<
std::
string>(
"mc",
"no")),
547 edm::LogInfo(
"OutputInfo") <<
" Hcal Digi Task histograms will NOT be saved";
556 std::map<std::string, HcalSubdetDigiMonitor*>::iterator itr =
monitors_.begin();
557 std::map<std::string, HcalSubdetDigiMonitor*>::iterator itrEnd =
monitors_.end();
559 while ( itr != itrEnd ) {
560 delete (*itr).second;
641 float sumphi_1, sumphi_2, sumphi_3, sumphi_4;
644 for (
int i = 1;
i <= nx;
i++) {
650 for (
int j = 1; j <= ny; j++) {
670 if(ieta >=0 ) ieta +=1;
672 if(ieta >= -20 && ieta <= 20 )
675 if(ieta >= 40 || ieta <= -40 ) {phi_factor = 18.;}
681 if(ieta >= 0) ieta -= 1;
682 double deta = double(ieta);
684 cnorm = sumphi_1 / phi_factor;
685 monitor() -> fillmeOccupancy_vs_ieta_depth1(deta, cnorm);
686 cnorm = sumphi_2 / phi_factor;
687 monitor() -> fillmeOccupancy_vs_ieta_depth2(deta, cnorm);
688 cnorm = sumphi_3 / phi_factor;
689 monitor() -> fillmeOccupancy_vs_ieta_depth3(deta, cnorm);
690 cnorm = sumphi_4 / phi_factor;
691 monitor() -> fillmeOccupancy_vs_ieta_depth4(deta, cnorm);
701 std::map<std::string, HcalSubdetDigiMonitor*>::iterator monitorItr
712 return monitorItr->second;
718 std::map<std::string, HcalSubdetDigiMonitor*>::iterator monitorItr
724 std::pair<std::string, HcalSubdetDigiMonitor*> mapElement(
726 monitorItr =
monitors_.insert(mapElement).first;
764 hcalselector_ =
"HO";
766 hcalselector_ =
"HF";
768 hcalselector_ =
"noise";
779 hcalselector_ =
"HO";
781 hcalselector_ =
"HF";
783 hcalselector_ =
"all";
791 double PI = 3.1415926535898;
792 double deltaphi= phi1 - phi2;
793 if( phi2 > phi1 ) { deltaphi= phi2 - phi1;}
794 if(deltaphi > PI) { deltaphi = 2.*PI - deltaphi;}
795 double deltaeta = eta2 - eta1;
796 double tmp =
sqrt(deltaeta* deltaeta + deltaphi*deltaphi);
void fillmePed0Depth1(double v1)
void fillmeGain0Depth4(double v1)
void fillmeGainWidth0Depth2(double v1)
const HcalGainWidth * getGainWidth(const HcalGenericDetId &fId) const
void setBinContent_depth2(int i, int j, double v)
void fillmePedWidth2Depth1(double v1)
void fillmeGain2Depth2(double v1)
void fillmeGain1Depth1(double v1)
void fillmePedWidth1Depth3(double v1)
void fillmeGainWidth2Depth1(double v1)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void fillmeAmplIetaIphi4(double v1, double v2, double v3)
void fillmeADC0_depth1(double v1)
void fillmeDigiSimhitProfile3(double v1, double v2)
std::vector< PCaloHit > PCaloHitContainer
edm::EDGetTokenT< edm::SortedCollection< HODataFrame > > tok_ho_
void fillmeGainWidth0Depth4(double v1)
HcalSubdetDigiMonitor * monitor()
void fillmePed2Depth4(double v1)
void fillmePedWidth1Depth1(double v1)
void fillmeNdigis(double v1)
void fillmeGainWidth2Depth4(double v1)
edm::EDGetTokenT< edm::SortedCollection< HBHEDataFrame > > tok_hbhe_
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
HcalSubdetector subdet() const
get the subdetector
void fillmenDigis(double v1)
void fillmeGainMap2(double v1, double v2, double v3)
void fillmePwidthMap3(double v1, double v2, double v3)
void fillmeDigiSimhit4(double v1, double v2)
void fillmePed1Depth4(double v1)
std::string hcalselector_
void fillmeOccupancy_map_depth2(double v1, double v2)
void fillmeGainWidth3Depth4(double v1)
void fillmeGain2Depth4(double v1)
void fillmeDigiSimhit3(double v1, double v2)
double getBinContent_depth4(int i, int j)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void reco(const edm::Event &, const edm::EventSetup &, const edm::EDGetTokenT< edm::SortedCollection< Digi > > &)
#define DEFINE_FWK_MODULE(type)
void fillmeADC0fC_depth2(double v1)
void fillmeGainWidth1Depth1(double v1)
void fillmeRatioDigiSimhit4(double v1)
edm::EDGetTokenT< edm::PCaloHitContainer > tok_mc_
void constructMonitor(DQMStore::IBooker &)
void fillmeDigiSimhit2(double v1, double v2)
void fillmeRatioDigiSimhit(double v1)
void fillmePedWidth1Depth4(double v1)
std::vector< T >::const_iterator const_iterator
void fillmeGainWidth1Depth4(double v1)
void setBinContent_depth3(int i, int j, double v)
void fillmeAll10slices1D_depth1(double v1, double v2)
void fillmeGain3Depth2(double v1)
void fillmePed1Depth2(double v1)
void fillmeAll10slices_depth2(double v1, double v2)
double pedestal(int fCapId) const
get pedestal for capid=0..3
void fillmeRatioDigiSimhit2(double v1)
void fillmeAmplIetaIphi2(double v1, double v2, double v3)
void fillmePwidthMap1(double v1, double v2, double v3)
HcalDigiTester(const edm::ParameterSet &)
std::map< std::string, HcalSubdetDigiMonitor * > monitors_
float getValue(int fCapId) const
get value for capId = 0..3
void fillmeGainWidth1Depth2(double v1)
double getBinContent_depth2(int i, int j)
void fillmeGainWidth2Depth2(double v1)
edm::ESHandle< HcalDbService > conditions
float getValue(int fCapId) const
get value for capId = 0..3
double dR(double eta1, double phi1, double eta2, double phi2)
void fillmeGainWidth3Depth2(double v1)
void fillmeBin67Frac(double v1)
void fillmeSumAmp(double v1)
void fillmeSignalAmp4(double v1)
void fillmeAll10slices1D_depth2(double v1, double v2)
void fillmeDigiSimhitProfile2(double v1, double v2)
void fillmePed0Depth4(double v1)
void fillmeGain3Depth3(double v1)
void fillmePed0Depth3(double v1)
void fillmeGainMap4(double v1, double v2, double v3)
void fillmePed3Depth3(double v1)
void fillmeDigiSimhit(double v1, double v2)
void fillmeRatioDigiSimhit1(double v1)
void fillmeOccupancy_map_depth1(double v1, double v2)
void fillmeGain1Depth2(double v1)
void fillmeGain1Depth3(double v1)
void fillmeGainWidth0Depth1(double v1)
void fillmeGainWidth2Depth3(double v1)
void fillmeSignalAmp1(double v1)
void fillmeGain3Depth4(double v1)
double getBinContent_depth1(int i, int j)
void fillmeADC0_depth2(double v1)
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const
void fillmeGain3Depth1(double v1)
void fillmeDigiSimhitProfile4(double v1, double v2)
void fillmeAmplIetaIphi3(double v1, double v2, double v3)
int ieta() const
get the cell ieta
void fillmeADC0_depth4(double v1)
void fillmePedWidth2Depth2(double v1)
void fillmeGainMap1(double v1, double v2, double v3)
void fillmeGainWidth0Depth3(double v1)
void fillmePedWidth2Depth4(double v1)
void fillmePedWidth1Depth2(double v1)
edm::EDGetTokenT< edm::SortedCollection< HFDataFrame > > tok_hf_
void fillmePedWidth2Depth3(double v1)
void fillmeSignalTimeSlice(double v1, double v2)
void fillmePedWidth0Depth1(double v1)
void fillmePedWidth3Depth2(double v1)
void setBinContent_depth4(int i, int j, double v)
void fillmePedWidth3Depth4(double v1)
void fillmeADC0fC_depth4(double v1)
void setBinContent_depth1(int i, int j, double v)
void fillmeSignalAmp(double v1)
T const * product() const
void fillmeGainMap3(double v1, double v2, double v3)
void fillmePedWidth3Depth1(double v1)
int size() const
get the size
void fillmeDigiSimhitProfile(double v1, double v2)
double getBinContent_depth3(int i, int j)
void fillmePed3Depth2(double v1)
const HcalGain * getGain(const HcalGenericDetId &fId) const
void fillmeGain2Depth1(double v1)
float getWidth(int fCapId) const
get width (sqrt(sigma_i_i)) for capId = 0..3
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
void fillmeOccupancy_map_depth4(double v1, double v2)
void fillmePed2Depth2(double v1)
void fillmePed3Depth4(double v1)
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
void fillmePedWidth0Depth4(double v1)
std::vector< std::vector< double > > tmp
void fillmeSignalAmp3(double v1)
void fillmePed0Depth2(double v1)
void fillmePwidthMap4(double v1, double v2, double v3)
void fillmeDigiSimhit1(double v1, double v2)
void fillmeADC0fC_depth1(double v1)
void fillmeGain0Depth2(double v1)
void fillmeADC0_depth3(double v1)
void fillmePed2Depth3(double v1)
void fillmeGainWidth3Depth1(double v1)
void fillmePed2Depth1(double v1)
void fillmeRatioDigiSimhit3(double v1)
void fillmeGain2Depth3(double v1)
void fillmePedWidth3Depth3(double v1)
void fillmeGain0Depth1(double v1)
void fillmeDigiSimhitProfile1(double v1, double v2)
void fillmeOccupancy_map_depth3(double v1, double v2)
void fillmePed1Depth1(double v1)
void fillmeBin5Frac(double v1)
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
void fillmePedWidth0Depth2(double v1)
void fillmeSignalAmp2(double v1)
void fillmeGainWidth1Depth3(double v1)
const HcalPedestal * getPedestal(const HcalGenericDetId &fId) const
void fillmePwidthMap2(double v1, double v2, double v3)
void fillmePedWidth0Depth3(double v1)
void fillmeAll10slices_depth1(double v1, double v2)
void fillmeADC0fC_depth3(double v1)
void fillmeGain1Depth4(double v1)
void fillmeAmplIetaIphi1(double v1, double v2, double v3)
void fillmePed3Depth1(double v1)
void fillmePed1Depth3(double v1)
void fillmeGain0Depth3(double v1)
void fillmeGainWidth3Depth3(double v1)