CMS 3D CMS Logo

HcalSimpleRecAlgoImpl Namespace Reference


Functions

template<class Digi, class RecHit>
RecHit reco (const Digi &digi, const HcalCoder &coder, const HcalCalibrations &calibs, int ifirst, int n, bool slewCorrect, const HcalPulseContainmentCorrection *corr, HcalTimeSlew::BiasSetting slewFlavor)


Function Documentation

template<class Digi, class RecHit>
RecHit HcalSimpleRecAlgoImpl::reco ( const Digi &  digi,
const HcalCoder coder,
const HcalCalibrations calibs,
int  ifirst,
int  n,
bool  slewCorrect,
const HcalPulseContainmentCorrection corr,
HcalTimeSlew::BiasSetting  slewFlavor 
) [inline]

Definition at line 36 of file HcalSimpleRecAlgo.cc.

References HcalCoder::adc2fC(), HcalTimeSlew::delay(), lat::endl(), HcalPulseContainmentCorrection::getCorrection(), i, LogDebug, max, HcalCalibrations::pedestal(), HcalCalibrations::respcorrgain(), CaloSamples::size(), and timeshift_ns_hbheho().

Referenced by helper::CandDecayStoreManager::add(), PFTrackTransformer::addPoints(), HLTAnalFilt::analyze(), L2TauAnalyzer::analyze(), MultiTrackValidator::analyze(), MuonIdVal::analyze(), cms::DiJetAnalyzer::analyze(), TauMVATrainer::analyze(), PFTauTagVal::analyze(), TauTagVal::analyze(), TriggerSummaryAnalyzerAOD::analyze(), cms::GammaJetAnalysis::analyze(), GlobalMuonMatchAnalyzer::analyze(), HLTTauCaloDQMOfflineSource::analyze(), ImpactParameterCalibration::analyze(), HLTTauValidation::analyze(), TriggerSummaryAnalyzerRAW::analyze(), MuonIdDQM::analyze(), HLTTauTrkDQMOfflineSource::analyze(), HLTEventAnalyzerAOD::analyzeTrigger(), HLTEventAnalyzerRAW::analyzeTrigger(), V0Fitter::applyPostFitCuts(), helper::TrackCollectionStoreManager::cloneAndStore(), helper::MuonCollectionStoreManager::cloneAndStore(), helper::PhotonCollectionStoreManager::cloneAndStore(), helper::CandDecayStoreManager::cloneAndStore(), helper::GsfElectronCollectionStoreManager::cloneAndStore(), GlobalMuonMatchAnalyzer::computeEfficiencyEta(), GlobalMuonMatchAnalyzer::computeEfficiencyPt(), DummyPrimaryVertexProducer::DummyPrimaryVertexProducer(), TriggerSummaryProducerAOD::fillFilterObjects(), MuonTrackAnalyzer::fillPlots(), TriggerSummaryProducerAOD::fillTriggerObjects(), HLTHcalNoiseFilter::filter(), HLTGlobalSums< T, Tid >::filter(), HLTAcoFilter::filter(), HLTMuonIsoFilter::filter(), HLTFiltCand::filter(), HLTPMMassFilter::filter(), HLTPixlMBForAlignmentFilter::filter(), HLTMhtHtFilter::filter(), HFFilter::filter(), HLTPhi2METFilter::filter(), HLTDoublet< T1, Tid1, T2, Tid2 >::filter(), HLT1CaloJetEnergy::filter(), HLTRapGapFilter::filter(), HLTSmartSinglet< T, Tid >::filter(), HLTSinglet< T, Tid >::filter(), HLTJetTag::filter(), HLTPixlMBFilt::filter(), HLTDiJetAveFilter::filter(), HLTNVFilter::filter(), EcalTangentFilter::filter(), HLTPMDocaFilter::filter(), V0Fitter::fitAll(), L1TauAnalyzer::getPFTauObjects(), CandMatcherBase< C1, C2 >::initMaps(), FastCandMatcher< C >::operator()(), ZMuMuOverlap::operator()(), CandMatcherBase< C1, C2 >::operator()(), reco::utilsNew::CandMatcher< C >::operator[](), EMIsolatedTauJetsSelector::produce(), JetCrystalsAssociator::produce(), TauMVADiscriminator::produce(), EcalIsolation::produce(), L1HLTJetsMatching::produce(), TriggerSummaryProducerRAW::produce(), reco::modules::TrackMultiSelector::produce(), InvariantMass< T1, T2 >::produce(), reco::modules::AnalyticalTrackSelector::produce(), L2TauJetsMerger::produce(), TriggerSummaryProducerAOD::produce(), reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init >::produce(), HLTTauProducer::produce(), L1ExtraParticleMapProd::produce(), MassKinFitterCandProducer::produce(), L2TauJetsProvider::produce(), HLTProdCand::produce(), TruthTauDecayModeProducer::produce(), prodname::produce(), IsolatedTauJetsSelector::produce(), EvtPlaneProducer::produce(), CentralityProducer::produce(), GetJetsFromHLTobject::produce(), ConstrainedFitCandProducer< Fitter, InputCollection, OutputCollection, Init >::produce(), reco::modules::CaloRecHitCandidateProducer< HitCollection >::produce(), MCTruthCompositeMatcher< C1, C2 >::produce(), reco::modules::NamedCandCombiner< Selector, PairSelector, Cloner, Setup, Init >::produce(), L1ExtraFromMCTruthProd::produce(), ImpactParameter::produce(), reco::modules::TrackMultiSelector::selectVertices(), reco::modules::AnalyticalTrackSelector::selectVertices(), and evf::FUShmBuffer::writeErrorEventData().

00037                                                                                                                                           {
00038     CaloSamples tool;
00039     coder.adc2fC(digi,tool);
00040 
00041     double ampl=0; int maxI = -1; double maxA = -1e10; float ta=0;
00042     double fc_ampl=0;
00043     for (int i=ifirst; i<tool.size() && i<n+ifirst; i++) {
00044       int capid=digi[i].capid();
00045       ta = (tool[i]-calibs.pedestal(capid)); // pedestal subtraction
00046       fc_ampl+=ta; 
00047       ta*= calibs.respcorrgain(capid) ; // fC --> GeV
00048       ampl+=ta;
00049       if(ta>maxA){
00050         maxA=ta;
00051         maxI=i;
00052       }
00053     }
00054 
00055     float time=-9999;
00057     if(maxI==0 || maxI==(tool.size()-1)) {      
00058       LogDebug("HCAL Pulse") << "HcalSimpleRecAlgo::reconstruct :" 
00059                                                << " Invalid max amplitude position, " 
00060                                                << " max Amplitude: "<< maxI
00061                                                << " first: "<<ifirst
00062                                                << " last: "<<(tool.size()-1)
00063                                                << std::endl;
00064     } else {
00065       maxA=fabs(maxA);
00066       int capid=digi[maxI-1].capid();
00067       float t0 = fabs((tool[maxI-1]-calibs.pedestal(capid))*calibs.respcorrgain(capid) );
00068       capid=digi[maxI+1].capid();
00069       float t2 = fabs((tool[maxI+1]-calibs.pedestal(capid))*calibs.respcorrgain(capid) );    
00070       float wpksamp = (t0 + maxA + t2);
00071       if (wpksamp!=0) wpksamp=(maxA + 2.0*t2) / wpksamp; 
00072       time = (maxI - digi.presamples())*25.0 + timeshift_ns_hbheho(wpksamp);
00073 
00074       if (corr!=0) {
00075         // Apply phase-based amplitude correction:
00076         ampl *= corr->getCorrection(fc_ampl);
00077         //      std::cout << fc_ampl << " --> " << corr->getCorrection(fc_ampl) << std::endl;
00078       }
00079 
00080     
00081       if (slewCorrect) time-=HcalTimeSlew::delay(std::max(1.0,fc_ampl),slewFlavor);
00082     }
00083     return RecHit(digi.id(),ampl,time);    
00084   }


Generated on Tue Jun 9 18:47:25 2009 for CMSSW by  doxygen 1.5.4