Classes | |
class | ADataRepr |
Functions | |
int | CalcEtaBin (int subdet, int ieta, int depth) |
int | CalcIeta (int subdet, int eta, int depth) |
int | CalcIeta (int eta, int depth) |
void | Fill (HcalDetId &id, double val, std::vector< TH2F > &depth) |
void | fillOneGain (std::vector< TH2F > &graphData, HcalGains::tAllContWithNames &allContainers, std::string name, int id, std::string units="") |
void | FillUnphysicalHEHFBins (std::vector< TH2F > &hh) |
void | FillUnphysicalHEHFBins (TH2F &hh) |
std::string | getBitsSummary (uint32_t bits, std::string statusBitArray[], short unsigned int bitMap[]) |
std::vector< std::string > | HcalEtaPhiHistNames () |
std::string | IntToBinary (unsigned int number) |
const bool | isBitSet (unsigned int bitnumber, unsigned int status) |
bool | isHB (int etabin, int depth) |
bool | isHE (int etabin, int depth) |
bool | isHF (int etabin, int depth) |
bool | isHO (int etabin, int depth) |
bool | isSiPM (int ieta, int iphi, int depth) |
void | Reset (std::vector< TH2F > &depth) |
void | setBinLabels (std::vector< TH2F > &depth) |
void | SetEtaPhiLabels (TH2F &h) |
void | setup (std::vector< TH2F > &depth, std::string name, std::string units="") |
bool | validDetId (HcalSubdetector sd, int ies, int ip, int dp) |
Variables | |
const int | binmapd2 [] |
const int | binmapd3 [] = {-28,-27,-9999,-16,-9999,16,-9999,27,28} |
int HcalObjRepresent::CalcEtaBin | ( | int | subdet, |
int | ieta, | ||
int | depth | ||
) | [inline] |
Definition at line 144 of file HcalObjRepresent.h.
References abs, HcalEndcap, HcalForward, and HcalOuter.
{ // This takes the eta value from a subdetector and return an eta counter value as used by eta-phi array // (ieta=-41 corresponds to bin 0, +41 to bin 85 -- there are two offsets to deal with the overlap at |ieta|=29). // For HO, ieta = -15 corresponds to bin 0, and ieta=15 is bin 30 // For HE depth 3, things are more complicated, but feeding the ieta value will give back the corresponding counter eta value // The CalcEtaBin value is the value as used within our array counters, and thus starts at 0. // If you are using it with getBinContent or setBinContent, you will need to add +1 to the result of this function int etabin=-9999; // default invalid value if (depth==1) { // Depth 1 is fairly straightforward -- just shift HF-, HF+ by -/+1 etabin=ieta+42; if (subdet==HcalForward) { ieta < 0 ? etabin-- : etabin++; } } else if (depth==2) { // Depth 2 is more complicated, given that there are no cells in the range |ieta|<15 if (ieta<-14) { etabin=ieta+42; if (subdet==HcalForward) etabin--; } else if (ieta>14) { etabin=ieta+14; if (subdet==HcalForward) etabin++; } } // HO is also straightforward; a simple offset to the ieta value is applied else if (subdet==HcalOuter && abs(ieta)<16) etabin=ieta+15; else if (subdet==HcalEndcap) { // HE depth 3 has spotty coverage; hard-code the bin response if (depth==3) { if (ieta==-28) etabin=0; else if (ieta==-27) etabin=1; else if (ieta==-16) etabin=3; else if (ieta==16) etabin=5; else if (ieta==27) etabin=7; else if (ieta==28) etabin=8; } } return etabin; }
int HcalObjRepresent::CalcIeta | ( | int | subdet, |
int | eta, | ||
int | depth | ||
) | [inline] |
Definition at line 200 of file HcalObjRepresent.h.
References abs, binmapd2, binmapd3, eta(), HcalBarrel, HcalEndcap, HcalForward, and HcalOuter.
Referenced by HcalRecHitClient::analyze(), HcalSummaryClient::analyze(), HcalRawDataMonitor::analyze(), HcalDeadCellClient::calculateProblems(), HcalCoarsePedestalClient::calculateProblems(), HcalDetDiagPedestalClient::calculateProblems(), HcalDigiClient::calculateProblems(), HcalRecHitClient::calculateProblems(), HcalDetDiagNoiseMonitorClient::calculateProblems(), HcalDetDiagTimingClient::calculateProblems(), HcalNZSClient::calculateProblems(), HcalDetDiagLaserClient::calculateProblems(), HcalHotCellClient::calculateProblems(), HcalRawDataClient::calculateProblems(), HcalRecHitMonitor::fill_Nevents(), HcalHotCellMonitor::fillNevents_energy(), HcalHotCellMonitor::fillNevents_neighbor(), HcalHotCellMonitor::fillNevents_persistentenergy(), HcalHotCellMonitor::fillNevents_problemCells(), HcalDeadCellMonitor::fillNevents_problemCells(), HcalDeadCellMonitor::fillNevents_recentdigis(), HcalDeadCellMonitor::fillNevents_recentrechits(), FillUnphysicalHEHFBins(), FillUnphysicalHEHFBins(), HcalDetDiagNoiseMonitorClient::hasErrors_Temp(), HcalTrigPrimClient::hasErrors_Temp(), HcalDeadCellClient::hasErrors_Temp(), HcalRawDataClient::hasErrors_Temp(), HcalDetDiagLaserClient::hasErrors_Temp(), HcalRecHitClient::hasErrors_Temp(), HcalDetDiagPedestalClient::hasErrors_Temp(), HcalDigiClient::hasErrors_Temp(), HcalNZSClient::hasErrors_Temp(), HcalBeamClient::hasErrors_Temp(), HcalCoarsePedestalClient::hasErrors_Temp(), HcalDetDiagTimingClient::hasErrors_Temp(), HcalHotCellClient::hasErrors_Temp(), ZDCMonitorClient::htmlOutput(), HcalDetDiagPedestalClient::htmlOutput(), isHB(), isHB(), isHE(), isHE(), isHF(), isHF(), isHO(), isHO(), HcalMonitorClient::PlotPedestalValues(), HcalHotCellClient::updateChannelStatus(), and HcalDeadCellClient::updateChannelStatus().
{ // This function returns the 'true' ieta value given subdet, eta, and depth // Here 'eta' is the index from our arrays (it starts at 0); // remember that histogram bins start with bin 1, so there's an offset of 1 // to consider if using getBinContent(eta,phi) // eta runs from 0...X (X depends on depth) int ieta=-9999; // default value is nonsensical if (subdet==HcalBarrel) { if (depth==1) { ieta=eta-42; if (ieta==0) return -9999; return ieta; } else if (depth==2) { ieta=binmapd2[eta]; if (ieta==0) return -9999; if (ieta==17 || ieta == -17) return -9999; // no depth 2 cells at |ieta| = 17 return ieta; } else return -9999; // non-physical value } else if (subdet==HcalForward) { if (depth==1) { ieta=eta-42; if (eta<13) ieta++; else if (eta>71) ieta--; else return -9999; // if outside forward range, return dummy return ieta; } else if (depth==2) { ieta=binmapd2[eta]; // special map for depth 2 if (ieta<=-30) ieta++; else if (ieta>=30) ieta--; else return -9999; return ieta; } else return -9999; } else if (subdet==HcalEndcap) { if (depth==1) ieta=eta-42; else if (depth==2) { ieta=binmapd2[eta]; if (abs(ieta)>29 || abs(ieta)<18) return -9999; // outside HE if (ieta==0) return -9999; return ieta; } else if (depth==3) { if (eta<0 || eta>8) return -9999; else ieta=binmapd3[eta]; // special map for depth 3 if (ieta==0) return -9999; return ieta; } else return -9999; } // HcalEndcap else if ( subdet==HcalOuter) { if (depth!=4) return -9999; else { ieta= eta-15; // bin 0 is ieta=-15, all bins increment normally from there if (abs(ieta)>15) return -9999; if (ieta==0) return -9999; return ieta; } } // HcalOuter if (ieta==0) return -9999; return ieta; }
int HcalObjRepresent::CalcIeta | ( | int | eta, |
int | depth | ||
) | [inline] |
Definition at line 286 of file HcalObjRepresent.h.
References abs, binmapd2, binmapd3, and eta().
{ // This version of CalcIeta does the same as the function above, // but does not require that 'subdet' be specified. // returns ieta value give an eta counter. // eta runs from 0...X (X depends on depth) int ieta=-9999; if (eta<0) return ieta; if (depth==1) { ieta=eta-42; // default shift: bin 0 corresponds to a histogram ieta of -42 (which is offset by 1 from true HF value of -41) if (eta<13) ieta++; else if (eta>71) ieta--; if (ieta==0) ieta=-9999; return ieta; } else if (depth==2) { if (eta>57) return -9999; else { ieta=binmapd2[eta]; if (ieta==-9999) return ieta; if (ieta==0) return -9999; if (ieta==17 || ieta == -17) return -9999; // no depth 2 cells at |ieta| = 17 else if (ieta<=-30) ieta++; else if (ieta>=30) ieta--; return ieta; } } else if (depth==3) { if (eta>8) return -9999; else ieta=binmapd3[eta]; if (ieta==0) return -9999; return ieta; } else if (depth==4) { ieta= eta-15; // bin 0 is ieta=-15, all bins increment normally from there if (abs(ieta)>15) return -9999; if (ieta==0) return -9999; return ieta; } return ieta; // avoids compilation warning }
void HcalObjRepresent::Fill | ( | HcalDetId & | id, |
double | val, | ||
std::vector< TH2F > & | depth | ||
) |
Definition at line 611 of file HcalObjRepresent.h.
References HcalForward.
Referenced by SiStripGainCosmicCalculator::algoAnalyze(), METTester::analyze(), MuonRecoAnalyzer::analyze(), SiPixelQualityHistory::analyze(), HFLightCalRand::analyze(), PhiSymmetryCalibration::analyze(), PhotonValidator::analyze(), GlobalDigisHistogrammer::analyze(), GsfElectronDataAnalyzer::analyze(), ZMuMuAnalyzer_cynematics::analyze(), DTPreCalibrationTask::analyze(), VertexMonitor::analyze(), HcalDetDiagLaserMonitor::analyze(), IsoTrig::analyze(), EcalEndcapRecHitsValidation::analyze(), PhotonIDSimpleAnalyzer::analyze(), PhotonsWithConversionsAnalyzer::analyze(), EERecoSummary::analyze(), SiPixelHLTSource::analyze(), L1TRCT::analyze(), EESelectiveReadoutTask::analyze(), DTTTrigOffsetCalibration::analyze(), SiStripDigiValid::analyze(), BeamHaloAnalyzer::analyze(), ESRecoSummary::analyze(), TrackingMonitor::analyze(), ResolutionCreator::analyze(), RPCFEDIntegrity::analyze(), ElectronCalibrationUniv::analyze(), EcalRecHitsValidation::analyze(), ZMuPtScaleAnalyzer::analyze(), SiPixelTrackResidualSource::analyze(), SiPixelMuonHLT::analyze(), ResidualRefitting::analyze(), PatPhotonSimpleAnalyzer::analyze(), TrackAnalyzer::analyze(), SiStripMonitorCluster::analyze(), RPCRecHitProbability::analyze(), L1TdeRCT::analyze(), HFLightCal::analyze(), PhotonAnalyzer::analyze(), ElectronMcSignalValidator::analyze(), APVCyclePhaseMonitor::analyze(), CaloTowersValidation::analyze(), ClusterAnalyzer::analyze(), GsfElectronMCFakeAnalyzer::analyze(), zPdfUnc::analyze(), EBRecoSummary::analyze(), SiStripMonitorDigi::analyze(), SiStripQualityHistory::analyze(), HLTJetMETValidation::analyze(), HcalRecHitsValidation::analyze(), EcalBarrelRecHitsValidation::analyze(), EcalBarrelSimHitsValidation::analyze(), EcalPreshowerNoiseDistrib::analyze(), ContainmentCorrectionAnalyzer::analyze(), ZToMuMuGammaAnalyzer::analyze(), L1TdeGCT::analyze(), SiPixelLorentzAngle::analyze(), SimpleConvertedPhotonAnalyzer::analyze(), ZLONLOHistogrammer::analyze(), EWKSystUnc::analyze(), L1TDEMON::analyze(), HLTMonHcalIsoTrack::analyze(), EcalPreshowerRecHitsValidation::analyze(), SimplePhotonAnalyzer::analyze(), GsfElectronMCAnalyzer::analyze(), HcalRecHitsAnalyzer::analyze(), HcalTimingMonitorModule::analyze(), EventTimeDistribution::analyze(), EcalTBValidation::analyze(), CaloTowersAnalyzer::analyze(), LogMessageMonitor::analyze(), EEClusterTask::analyze(), cms::Analyzer_minbias::analyze(), HLTMuonPlotter::analyze(), L1TCSCTF::analyze(), DTRunConditionVar::analyze(), HFPreLightCal::analyze(), ValidIsoTrkCalib::analyze(), TkConvValidator::analyze(), MuonDTDigis::analyze(), GsfElectronFakeAnalyzer::analyze(), SiStripMonitorPedestals::analyze(), DTChamberEfficiency::analyze(), ElectronCalibration::analyze(), TopValidation::analyze(), RecoTauPlotDiscriminator::analyze(), DQMDaqInfo::beginLuminosityBlock(), SiPixelHistoricInfoReader::beginRun(), DTNoiseComputation::beginRun(), EffPurFromHistos::compute(), CommissioningHistograms::copyCustomInformation(), SiStripCorrelateBadStripAndNoise::correlateWithNoise(), popcon::EcalChannelStatusHandler::cosmicsAnalysis(), SiStripCorrelateNoise::DoAnalysis(), SiStripPlotGain::DoAnalysis(), EcalEleCalibLooper::duringLoop(), InvRingCalib::duringLoop(), ZeeCalibration::duringLoop(), SiStripMonitorDigi::endLuminosityBlock(), ZeeCalibration::endOfLoop(), DTResolutionAnalysisTest::endRun(), DTRunConditionVarClient::endRun(), DTChamberEfficiencyClient::endRun(), SiPixelClusterModule::fill(), SiPixelDigiModule::fill(), Book::fill(), DigiVertexCorrHistogramMaker::fill(), DigiLumiCorrHistogramMaker::fill(), Histos::fill(), SiPixelRawDataErrorModule::fill(), DigiBXCorrHistogramMaker< T >::fill(), DigiInvestigatorHistogramMaker::fill(), SiPixelTrackResidualModule::fill(), XHistogram::fill(), MELaserPrim::fill(), CSCValHists::fill2DHistByEvent(), SiPixelRecHitsValid::fillBarrel(), SiStripMonitorPedestals::fillCondDBMEs(), SiPixelRawDataErrorModule::fillFED(), GlobalHitsProdHist::fillG4MC(), GlobalHitsAnalyzer::fillG4MC(), RPCNoisyStripTest::fillGlobalME(), RPCOccupancyTest::fillGlobalME(), HLXMonitor::FillHistograms(), LRHelpFunctions::fillLRBackgroundHist(), LRHelpFunctions::fillLRSignalHist(), SiStripMonitorCluster::fillModuleMEs(), METAnalyzer::fillMonitorElement(), CaloMETAnalyzer::fillMonitorElementTriggered(), GlobalDigisAnalyzer::fillMuon(), LRHelpFunctions::fillToBackgroundHists(), LRHelpFunctions::fillToSignalCorrelation(), LRHelpFunctions::fillToSignalHists(), SiStripGainCosmicCalculator::getNewObject(), HSCPValidator::makeSimDigiPlotsRPC(), CosmicGenFilterHelix::monitorEnd(), CosmicGenFilterHelix::monitorStart(), DTSegmentAnalysisTest::performClientDiagnostic(), RPCChamberQuality::performeClientOperation(), RPCMonitorDigi::performSourceOperation(), HcalRawDataMonitor::unpack(), PrimaryVertexMonitor::vertexPlots(), and HcalPedestalMCWidths::~HcalPedestalMCWidths().
{ // If in HF, need to shift by 1 bin (-1 bin lower in -HF, +1 bin higher in +HF) if (id.subdet()==HcalForward) depth[id.depth()-1].Fill(id.ieta()<0 ? id.ieta()-1 : id.ieta()+1, id.iphi(), val); else depth[id.depth()-1].Fill(id.ieta(),id.iphi(),val); }
void HcalObjRepresent::fillOneGain | ( | std::vector< TH2F > & | graphData, |
HcalGains::tAllContWithNames & | allContainers, | ||
std::string | name, | ||
int | id, | ||
std::string | units = "" |
||
) |
Definition at line 685 of file HcalObjRepresent.h.
References HcalDetId::depth(), HcalForward, i, HcalDetId::ieta(), HcalDetId::iphi(), setup(), HcalDetId::subdet(), and x.
Referenced by cond::PayLoadInspector< DataT >::plot().
{ setup(graphData, name); std::stringstream x; // Change the titles of each individual histogram for (unsigned int d=0;d < graphData.size();++d){ graphData[d].Reset(); x << "Gain "<< id << " for HCAL depth " << d+1; //BUG CAN BE HERE: //if (ChannelStatus->depth[d]) graphData[d].SetTitle(x.str().c_str()); // replace "setTitle" with "SetTitle", since you are using TH2F objects instead of MonitorElements x.str(""); } HcalDetId hcal_id; int ieta, depth, iphi; //main loop // get all containers with names //HcalGains::tAllContWithNames allContainers = object().getAllContainers(); //ITERATORS AND VALUES: HcalGains::tAllContWithNames::const_iterator iter; std::vector<HcalGain>::const_iterator contIter; float gain = 0.0; //Run trough given id gain: int i = id; //run trough all pair containers for (iter = allContainers.begin(); iter != allContainers.end(); ++iter){ //Run trough all values: for (contIter = (*iter).second.begin(); contIter != (*iter).second.end(); ++contIter){ hcal_id = HcalDetId((uint32_t)(*contIter).rawId()); depth = hcal_id.depth(); if (depth<1 || depth>4) continue; ieta=hcal_id.ieta(); iphi=hcal_id.iphi(); if (hcal_id.subdet() == HcalForward) ieta>0 ? ++ieta : --ieta; //GET VALUE: gain = (*contIter).getValue(i); //logstatus = log2(1.*channelBits)+1; //FILLING GOES HERE: graphData[depth-1].Fill(ieta,iphi, gain); //FOR DEBUGGING: //std::cout << "ieta: " << ieta << "; iphi: " << iphi << "; logstatus: " << logstatus << "; channelBits: " << channelBits<< std::endl; } } }
void HcalObjRepresent::FillUnphysicalHEHFBins | ( | std::vector< TH2F > & | hh | ) | [inline] |
Definition at line 528 of file HcalObjRepresent.h.
References abs, CalcIeta(), eta(), and phi.
Referenced by HcalRecHitClient::analyze(), HcalSummaryClient::analyze(), HcalDeadCellClient::calculateProblems(), HcalCoarsePedestalClient::calculateProblems(), HcalDetDiagPedestalClient::calculateProblems(), HcalDigiClient::calculateProblems(), HcalRecHitClient::calculateProblems(), HcalDetDiagNoiseMonitorClient::calculateProblems(), HcalTrigPrimClient::calculateProblems(), HcalDetDiagTimingClient::calculateProblems(), HcalNZSClient::calculateProblems(), HcalBeamClient::calculateProblems(), HcalDetDiagLaserClient::calculateProblems(), HcalHotCellClient::calculateProblems(), HcalRawDataClient::calculateProblems(), HcalRecHitMonitor::fill_Nevents(), HcalCoarsePedestalMonitor::fill_Nevents(), HcalDigiMonitor::fill_Nevents(), HcalHotCellMonitor::fillNevents_energy(), HcalHotCellMonitor::fillNevents_neighbor(), HcalHotCellMonitor::fillNevents_persistentenergy(), HcalDeadCellMonitor::fillNevents_recentdigis(), HcalDeadCellMonitor::fillNevents_recentrechits(), HcalObjRepresent::ADataRepr::fillOneGain(), cond::PayLoadInspector< DataT >::plot(), HcalMonitorClient::PlotPedestalValues(), HcalDeadCellMonitor::processEvent(), HcalDeadCellMonitor::reset(), and HcalDeadCellMonitor::setup().
{ int ieta=0; int iphi=0; // First 2 depths have 5-10-20 degree corrections for (unsigned int d=0;d<3;++d) { //BUG CAN BE HERE: //if (hh[d] != 0) continue; for (int eta=0;eta<hh[d].GetNbinsX();++eta) { ieta=CalcIeta(eta,d+1); if (ieta==-9999 || abs(ieta)<21) continue; for (int phi=0;phi <hh[d].GetNbinsY();++phi) { iphi=phi+1; if (iphi%2==1 && abs(ieta)<40 && iphi<73) { hh[d].SetBinContent(eta+1,iphi+1,hh[d].GetBinContent(eta+1,iphi)); } // last two eta strips span 20 degrees in phi // Fill the phi cell above iphi, and the 2 below it else if (abs(ieta)>39 && iphi%4==3 && iphi<73) { //ieta=40, iphi=3 covers iphi 3,4,5,6 hh[d].SetBinContent(eta+1,(iphi)%72+1, hh[d].GetBinContent(eta+1,iphi)); hh[d].SetBinContent(eta+1,(iphi+1)%72+1, hh[d].GetBinContent(eta+1,iphi)); hh[d].SetBinContent(eta+1,(iphi+2)%72+1, hh[d].GetBinContent(eta+1,iphi)); } } // for (int phi...) } // for (int eta...) } // for (int d=0;...) // no corrections needed for HO (depth 4) return; } // FillUnphysicalHEHFBins(MonitorElement* hh)
void HcalObjRepresent::FillUnphysicalHEHFBins | ( | TH2F & | hh | ) | [inline] |
Definition at line 567 of file HcalObjRepresent.h.
References abs, CalcIeta(), eta(), and phi.
{ // Fills unphysical HE/HF bins for Summary Histogram // Summary Histogram is binned with the same binning as the Depth 1 EtaPhiHists //CAN BE BUG HERE: //if (hh==0) return; int ieta=0; int iphi=0; int etabins = hh.GetNbinsX(); int phibins = hh.GetNbinsY(); float binval=0; for (int eta=0;eta<etabins;++eta) // loop over eta bins { ieta=CalcIeta(eta,1); if (ieta==-9999 || abs(ieta)<21) continue; // ignore etas that don't exist, or that have 5 degree phi binning for (int phi=0;phi<phibins;++phi) { iphi=phi+1; if (iphi%2==1 && abs(ieta)<40 && iphi<73) // 10 degree phi binning condition { binval=hh.GetBinContent(eta+1,iphi); hh.SetBinContent(eta+1,iphi+1,binval); } // if (iphi%2==1...) else if (abs(ieta)>39 && iphi%4==3 && iphi<73) // 20 degree phi binning condition { // Set last two eta strips where each cell spans 20 degrees in phi // Set next phi cell above iphi, and 2 cells below the actual cell hh.SetBinContent(eta+1, (iphi)%72+1, hh.GetBinContent(eta+1,iphi)); hh.SetBinContent(eta+1, (iphi+1)%72+1, hh.GetBinContent(eta+1,iphi)); hh.SetBinContent(eta+1, (iphi+2)%72+1, hh.GetBinContent(eta+1,iphi)); } // else if (abs(ieta)>39 ...) } // for (int phi=0;phi<72;++phi) } // for (int eta=0; eta< (etaBins_-2);++eta) return; } // FillUnphysicalHEHFBins(std::vector<MonitorElement*> &hh)
std::string HcalObjRepresent::getBitsSummary | ( | uint32_t | bits, |
std::string | statusBitArray[], | ||
short unsigned int | bitMap[] | ||
) |
Definition at line 50 of file HcalObjRepresent.h.
References i, and isBitSet().
Referenced by cond::PayLoadInspector< DataT >::summary().
std::vector<std::string> HcalObjRepresent::HcalEtaPhiHistNames | ( | ) | [inline] |
Definition at line 338 of file HcalObjRepresent.h.
References mergeVDriftHistosByStation::name.
std::string HcalObjRepresent::IntToBinary | ( | unsigned int | number | ) | [inline] |
Definition at line 27 of file HcalObjRepresent.h.
References i.
Referenced by cond::PayLoadInspector< DataT >::summary().
const bool HcalObjRepresent::isBitSet | ( | unsigned int | bitnumber, |
unsigned int | status | ||
) |
Definition at line 43 of file HcalObjRepresent.h.
Referenced by getBitsSummary().
{ unsigned int statadd = 0x1<<(bitnumber); return (status&statadd)?(true):(false); }
bool HcalObjRepresent::isHB | ( | int | etabin, |
int | depth | ||
) | [inline] |
Definition at line 349 of file HcalObjRepresent.h.
References abs, and CalcIeta().
{ if (depth>2) return false; else if (depth<1) return false; else { int ieta=CalcIeta(etabin,depth); if (ieta==-9999) return false; if (depth==1) { if (abs(ieta)<=16 ) return true; else return false; } else if (depth==2) { if (abs(ieta)==15 || abs(ieta)==16) return true; else return false; } } return false; }
bool HcalObjRepresent::isHE | ( | int | etabin, |
int | depth | ||
) | [inline] |
Definition at line 371 of file HcalObjRepresent.h.
References abs, and CalcIeta().
{ if (depth>3) return false; else if (depth<1) return false; else { int ieta=CalcIeta(etabin,depth); if (ieta==-9999) return false; if (depth==1) { if (abs(ieta)>=17 && abs(ieta)<=28 ) return true; if (ieta==-29 && etabin==13) return true; // HE -29 if (ieta==29 && etabin == 71) return true; // HE +29 } else if (depth==2) { if (abs(ieta)>=17 && abs(ieta)<=28 ) return true; if (ieta==-29 && etabin==13) return true; // HE -29 if (ieta==29 && etabin == 43) return true; // HE +29 } else if (depth==3) return true; } return false; }
bool HcalObjRepresent::isHF | ( | int | etabin, |
int | depth | ||
) | [inline] |
Definition at line 397 of file HcalObjRepresent.h.
References abs, and CalcIeta().
{ if (depth>2) return false; else if (depth<1) return false; else { int ieta=CalcIeta(etabin,depth); if (ieta==-9999) return false; if (depth==1) { if (ieta==-29 && etabin==13) return false; // HE -29 else if (ieta==29 && etabin == 71) return false; // HE +29 else if (abs(ieta)>=29 ) return true; } else if (depth==2) { if (ieta==-29 && etabin==13) return false; // HE -29 else if (ieta==29 && etabin==43) return false; // HE +29 else if (abs(ieta)>=29 ) return true; } } return false; }
bool HcalObjRepresent::isHO | ( | int | etabin, |
int | depth | ||
) | [inline] |
Definition at line 421 of file HcalObjRepresent.h.
References CalcIeta().
{ if (depth!=4) return false; int ieta=CalcIeta(etabin,depth); if (ieta!=-9999) return true; return false; }
bool HcalObjRepresent::isSiPM | ( | int | ieta, |
int | iphi, | ||
int | depth | ||
) | [inline] |
Definition at line 431 of file HcalObjRepresent.h.
{ if (depth!=4) return false; // HOP1 if (ieta>=5 && ieta <=10 && iphi>=47 && iphi<=58) return true; // HOP2 if (ieta>=11 && ieta<=15 && iphi>=59 && iphi<=70) return true; return false; } // bool isSiPM
void HcalObjRepresent::Reset | ( | std::vector< TH2F > & | depth | ) |
Definition at line 620 of file HcalObjRepresent.h.
Referenced by TrackingMonitor::beginLuminosityBlock(), TrackAnalyzer::doReset(), TH2Analyzer::Eval(), ResidualFitter::Fill(), RootSig2XTReqHandler::XTReqTimer::FireAway(), HcalRecHitMonitor::reset(), and ZeeCalibration::resetHistograms().
{ for (unsigned int d=0;d<depth.size();d++) //BUG CAN BE HERE: //if(depth[d]) depth[d].Reset(); } // void Reset(void)
void HcalObjRepresent::setBinLabels | ( | std::vector< TH2F > & | depth | ) |
Definition at line 63 of file HcalObjRepresent.h.
References i, and diffTwoXMLs::label.
Referenced by setup().
{ // Set labels for all depth histograms for (unsigned int i=0;i<depth.size();++i) { depth[i].SetXTitle("i#eta"); depth[i].SetYTitle("i#phi"); } std::stringstream label; // set label on every other bin for (int i=-41;i<=-29;i=i+2) { label<<i; depth[0].GetXaxis()->SetBinLabel(i+42,label.str().c_str()); depth[1].GetXaxis()->SetBinLabel(i+42,label.str().c_str()); label.str(""); } depth[0].GetXaxis()->SetBinLabel(14,"-29HE"); depth[1].GetXaxis()->SetBinLabel(14,"-29HE"); // offset by one for HE for (int i=-27;i<=27;i=i+2) { label<<i; depth[0].GetXaxis()->SetBinLabel(i+43,label.str().c_str()); label.str(""); } depth[0].GetXaxis()->SetBinLabel(72,"29HE"); for (int i=29;i<=41;i=i+2) { label<<i; depth[0].GetXaxis()->SetBinLabel(i+44,label.str().c_str()); label.str(""); } for (int i=16;i<=28;i=i+2) { label<<i-43; depth[1].GetXaxis()->SetBinLabel(i,label.str().c_str()); label.str(""); } depth[1].GetXaxis()->SetBinLabel(29,"NULL"); for (int i=15;i<=27;i=i+2) { label<<i; depth[1].GetXaxis()->SetBinLabel(i+15,label.str().c_str()); label.str(""); } depth[1].GetXaxis()->SetBinLabel(44,"29HE"); for (int i=29;i<=41;i=i+2) { label<<i; depth[1].GetXaxis()->SetBinLabel(i+16,label.str().c_str()); label.str(""); } // HE depth 3 labels; depth[2].GetXaxis()->SetBinLabel(1,"-28"); depth[2].GetXaxis()->SetBinLabel(2,"-27"); depth[2].GetXaxis()->SetBinLabel(3,"Null"); depth[2].GetXaxis()->SetBinLabel(4,"-16"); depth[2].GetXaxis()->SetBinLabel(5,"Null"); depth[2].GetXaxis()->SetBinLabel(6,"16"); depth[2].GetXaxis()->SetBinLabel(7,"Null"); depth[2].GetXaxis()->SetBinLabel(8,"27"); depth[2].GetXaxis()->SetBinLabel(9,"28"); }
void HcalObjRepresent::SetEtaPhiLabels | ( | TH2F & | h | ) | [inline] |
Definition at line 498 of file HcalObjRepresent.h.
References i, and diffTwoXMLs::label.
{ std::stringstream label; for (int i=-41;i<=-29;i=i+2) { label<<i; h.GetXaxis()->SetBinLabel(i+42,label.str().c_str()); label.str(""); } h.GetXaxis()->SetBinLabel(14,"-29HE"); // offset by one for HE for (int i=-27;i<=27;i=i+2) { label<<i; h.GetXaxis()->SetBinLabel(i+43,label.str().c_str()); label.str(""); } h.GetXaxis()->SetBinLabel(72,"29HE"); for (int i=29;i<=41;i=i+2) { label<<i; h.GetXaxis()->SetBinLabel(i+44,label.str().c_str()); label.str(""); } return; }
void HcalObjRepresent::setup | ( | std::vector< TH2F > & | depth, |
std::string | name, | ||
std::string | units = "" |
||
) |
Definition at line 628 of file HcalObjRepresent.h.
References i, setBinLabels(), AlCaHLTBitMon_QueryRunRegistry::string, create_public_lumi_plots::units, and fw3dlego::xbins.
Referenced by TtSemiLepSignalSelMVATrainer::analyze(), TtSemiLepJetCombMVATrainer::analyze(), EBClusterTaskExtras::analyze(), ESFEDIntegrityTask::analyze(), ESRawDataTask::analyze(), SiStripCommissioningSource::analyze(), EEClusterTaskExtras::analyze(), PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::analyze(), TtFullHadSignalSelMVATrainer::analyze(), ESTrendTask::analyze(), ESIntegrityTask::analyze(), PhotonConversionTrajectorySeedProducerFromSingleLegAlgo::analyze(), ESPedestalTask::analyze(), TrackAssociatorByChi2::associateGenToReco(), MuonAssociatorByHits::associateMuons(), TrackAssociatorByChi2::associateRecoToGen(), TrackAssociatorByChi2::associateRecoToSim(), TrackAssociatorByChi2::associateSimToReco(), GenericBenchmarkAnalyzer::beginJob(), ESSummaryClient::beginRun(), ESIntegrityClient::beginRun(), ESPedestalClient::beginRun(), ESIntegrityTask::beginRun(), PixelThresholdClusterizer::clusterizeDetUnit(), CandCombinerBase< OutputCollection, CandPtr >::combine(), SiStripCommissioningSource::createTasks(), SiStripLorentzAngleCalibration::derivatives(), CommissioningTask::eventSetup(), TCTauAlgorithm::eventSetup(), fillOneGain(), triggerExpression::get(), ConditionDumperInEdm::get(), TCTauAlgorithm::init(), cond::PayLoadInspector< DataT >::plot(), TtSemiLepSignalSelMVAComputer::produce(), TtSemiLepJetCombMVAComputer::produce(), TtFullHadSignalSelMVAComputer::produce(), ElectronSeedGenerator::run(), SiStripElectronSeedGenerator::run(), CosmicTrackingParticleSelector::select(), triggerExpression::Data::setEvent(), GEMSim::setGEMSimSetUp(), RPCSim::setRPCSimSetUp(), and TCTauAlgorithm::trackEcalHitPoint().
{ std::string unittitle, unitname; if (units.empty()) { unitname = units; unittitle = "No Units"; } else { unitname = " " + units; unittitle = units; } // Push back depth plots //1. create first plot depth.push_back(TH2F(("HB HE HF Depth 1 "+name+unitname).c_str(), (name+" Depth 1 -- HB HE HF ("+unittitle+")").c_str(), 85,-42.5,42.5, 72,0.5,72.5)); //2.1 prepare second plot float ybins[73]; for (int i=0;i<=72;i++) ybins[i]=(float)(i+0.5); float xbinsd2[]={-42.5,-41.5,-40.5,-39.5,-38.5,-37.5,-36.5,-35.5,-34.5,-33.5,-32.5,-31.5,-30.5,-29.5, -28.5,-27.5,-26.5,-25.5,-24.5,-23.5,-22.5,-21.5,-20.5,-19.5,-18.5,-17.5,-16.5, -15.5,-14.5, 14.5, 15.5, 16.5,17.5,18.5,19.5,20.5,21.5,22.5,23.5,24.5,25.5,26.5,27.5,28.5,29.5,30.5, 31.5,32.5,33.5,34.5,35.5,36.5,37.5,38.5,39.5,40.5,41.5,42.5}; //2.2 create second plot depth.push_back(TH2F(("HB HE HF Depth 2 "+name+unitname).c_str(), (name+" Depth 2 -- HB HE HF ("+unittitle+")").c_str(), 57, xbinsd2, 72, ybins)); //3.1 Set up variable-sized bins for HE depth 3 (MonitorElement also requires phi bins to be entered in array format) float xbins[]={-28.5,-27.5,-26.5,-16.5,-15.5, 15.5,16.5,26.5,27.5,28.5}; //3.2 depth.push_back(TH2F(("HE Depth 3 "+name+unitname).c_str(), (name+" Depth 3 -- HE ("+unittitle+")").c_str(), // Use variable-sized eta bins 9, xbins, 72, ybins)); //4.1 HO bins are fixed width, but cover a smaller eta range (-15 -> 15) depth.push_back(TH2F(("HO Depth 4 "+name+unitname).c_str(), (name+" Depth 4 -- HO ("+unittitle+")").c_str(), 31,-15.5,15.5, 72,0.5,72.5)); for (unsigned int i=0;i<depth.size();++i) depth[i].Draw("colz"); setBinLabels(depth); // set axis titles, special bins }
bool HcalObjRepresent::validDetId | ( | HcalSubdetector | sd, |
int | ies, | ||
int | ip, | ||
int | dp | ||
) | [inline] |
Definition at line 444 of file HcalObjRepresent.h.
References abs, HcalBarrel, HcalEndcap, HcalForward, and HcalOuter.
{ // inputs are (subdetector, ieta, iphi, depth) // stolen from latest version of DataFormats/HcalDetId/src/HcalDetId.cc (not yet available in CMSSW_2_1_9) const int ie ( abs( ies ) ) ; return ( ( ip >= 1 ) && ( ip <= 72 ) && ( dp >= 1 ) && ( ie >= 1 ) && ( ( ( sd == HcalBarrel ) && ( ( ( ie <= 14 ) && ( dp == 1 ) ) || ( ( ( ie == 15 ) || ( ie == 16 ) ) && ( dp <= 2 ) ) ) ) || ( ( sd == HcalEndcap ) && ( ( ( ie == 16 ) && ( dp == 3 ) ) || ( ( ie == 17 ) && ( dp == 1 ) ) || ( ( ie >= 18 ) && ( ie <= 20 ) && ( dp <= 2 ) ) || ( ( ie >= 21 ) && ( ie <= 26 ) && ( dp <= 2 ) && ( ip%2 == 1 ) ) || ( ( ie >= 27 ) && ( ie <= 28 ) && ( dp <= 3 ) && ( ip%2 == 1 ) ) || ( ( ie == 29 ) && ( dp <= 2 ) && ( ip%2 == 1 ) ) ) ) || ( ( sd == HcalOuter ) && ( ie <= 15 ) && ( dp == 4 ) ) || ( ( sd == HcalForward ) && ( dp <= 2 ) && ( ( ( ie >= 29 ) && ( ie <= 39 ) && ( ip%2 == 1 ) ) || ( ( ie >= 40 ) && ( ie <= 41 ) && ( ip%4 == 3 ) ) ) ) ) ) ; } // bool validDetId(HcalSubdetector sd, int ies, int ip, int dp)
const int HcalObjRepresent::binmapd2[] |
{-42,-41,-40,-39,-38,-37,-36,-35,-34,-33,-32,-31,-30, -29,-28,-27,-26,-25,-24,-23,-22,-21,-20,-19,-18,-17, -16,-15,-9999, 15,16,17,18,19,20,21,22,23,24,25,26,27,28,29, 30,31,32,33,34,35,36,37,38,39,40,41,42}
Definition at line 135 of file HcalObjRepresent.h.
Referenced by CalcIeta().
const int HcalObjRepresent::binmapd3[] = {-28,-27,-9999,-16,-9999,16,-9999,27,28} |
Definition at line 142 of file HcalObjRepresent.h.
Referenced by CalcIeta().