CMS 3D CMS Logo

Functions

DeDxDiscriminatorTools Namespace Reference

Functions

double charge (const std::vector< uint8_t > &Ampls)
double charge (const vector< uint8_t > &Ampls)
bool IsFarFromBorder (TrajectoryStateOnSurface trajState, const GeomDetUnit *it)
bool IsSaturatingStrip (const vector< uint8_t > &Ampls)
bool IsSaturatingStrip (const std::vector< uint8_t > &Ampls)
bool IsSpanningOver2APV (unsigned int FirstStrip, unsigned int ClusterSize)
double path (double cosine, double thickness)

Function Documentation

double DeDxDiscriminatorTools::charge ( const std::vector< uint8_t > &  Ampls)

Referenced by Hector::add(), MuonTruth::addChannel(), CustomParticleFactory::addCustomParticle(), pat::GenPlusSimParticleProducer::addGenParticle(), CSCBaseElectronicsSim::addLinks(), DeDxDiscriminatorLearnerFromCalibTree::algoAnalyzeTheTree(), SiStripGainFromCalibTree::algoAnalyzeTheTree(), DTTrigTest::analyze(), ZMuMu_efficiencyAnalyzer::analyze(), IsolatedGenParticles::analyze(), PhotonValidator::analyze(), anlzrname::analyze(), SiPixelTrackResidualSource::analyze(), MBUEandQCDValidation::analyze(), HcalCorrPFCalculation::analyze(), PhysicsObjectsMonitor::analyze(), TauMVATrainer::analyze(), HiBasicGenTest::analyze(), ElectronSeedAnalyzer::analyze(), IsolatedParticlesGeneratedJets::analyze(), EwkMuDQM::analyze(), BasicHepMCValidation::analyze(), DiMuonHistograms::analyze(), ResolutionAnalyzer::analyze(), HeavyFlavorValidation::analyze(), TkConvValidator::analyze(), SiStripClusterToDigiProducer::applyGain(), ThreeThresholdAlgorithm::applyGains(), MuonSimHitProducer::applyMaterialEffects(), PhysicsObjectsMonitor::beginJob(), SiPixelTrackingRecHitsValid::beginJob(), HPSPFRecoTauAlgorithm::buildThreeProngs(), ConstrainedTreeBuilder::buildTree(), ConstrainedTreeBuilderT::buildTree(), CSCTFPtLUT::calcPt(), spr::cGenSimInfo(), charge(), SimpleCosmicBONSeeder::checkCharge(), DreamSD::cherenkovDeposit_(), L1MuonPixelTrackFitter::Circle::Circle(), ClusterProducerFP420::clusterizeDetUnit(), OldThreeThresholdAlgorithm::clusterizeDetUnit_(), ClusterProducerFP420::clusterizeDetUnitPixels(), PixelHitMatcher::compatibleHits(), PixelHitMatcher::compatibleSeeds(), APVShot::computeShot(), PFRootEventManager::countChargedAndPhotons(), MuonSeedCreator::createSeed(), CosmicMuonSeedGenerator::createSeed(), MuonSeedFromRecHits::createSeed(), OutInConversionSeedFinder::createSeedFTS(), CylindricalState::CylindricalState(), Histograms::declareHistograms(), GflashEMShowerModel::DoIt(), GflashHadronShowerModel::DoIt(), HistoData::Dump(), ZeeCalibration::duringLoop(), HICaloUtil::EcalPhi(), ECALPositionCalculator::ecalPhi(), SETSeedFinder::estimateMomentum(), L1GtMuonCondition::evaluateCondition(), AlignmentMonitorGeneric::event(), SiPixelClusterModule::fill(), TopDiLeptonOffline::MonitorEnsemble::fill(), SiPixelTrackResidualModule::fill(), SiPixelRecHitsValid::fillBarrel(), MuScleFit::fillComparisonHistograms(), SiPixelRecHitsValid::fillForward(), HLTOniaSource::fillInvariantMass(), SiStripMonitorTrack::fillMEs(), SiStripMonitorTrack::fillModMEs(), PlotMakerReco::fillPlots(), Histograms::fillRecHistograms(), recoBSVTagInfoValidationAnalyzer::fillRecoToSim(), SVTagInfoValidationAnalyzer::fillRecoToSim(), SVTagInfoValidationAnalyzer::fillSimToReco(), recoBSVTagInfoValidationAnalyzer::fillSimToReco(), EopVariables::fillVariables(), CSCEfficiency::filter(), WZInterestingEventSelector::filter(), HighMultiplicityGenFilter::filter(), GenLeadTrackFilter::filter(), Tau3MuReco::find3rdTrack(), SETFilter::findChi2(), Tau3MuReco::findCorrectPairing(), ConversionSeedFinder::findLayers(), V0Fitter::fitAll(), ResidualRefitting::freeTrajStateMuon(), cms::HICFTSfromL1orL2::FTSfromL1(), DeDxTools::genericAverage(), pat::PATObject< ObjectType >::genParticleById(), CaloSD::getAttenuation(), ECalSD::getBirkL3(), ConvertedPhotonProducer::getCircleCenter(), CastorSD::getEnergyDeposit(), ZdcSD::getEnergyDeposit(), IsolatedPixelTrackCandidateProducer::GetEtaPhiAtEcal(), PythiaFilterIsolatedTrack::GetEtaPhiAtEcal(), HTrackAssociator::getFreeTrajectoryState(), TrackDetectorAssociator::getFreeTrajectoryState(), HPDIonFeedbackSim::getIonFeedback(), DeDxDiscriminatorProducer::GetProbability(), CSCDriftSim::getWireHit(), HFGflash::gfParameterization(), RPCTrigger::giveFinallCandindates(), CalorimetryManager::HDShowerSimulation(), HLTPMMassFilter::hltFilter(), PFDisplacedVertexHelper::identifyVertex(), RoadSearchTrackCandidateMakerAlgorithm::initialTrajectoryFromTriplet(), GoodSeedProducer::IsIsolated(), AlignmentTrackSelector::isOkChargeStripHit(), PFTauQualityCutWrapper::isolationChargedObjects(), PFTauQualityCutWrapper::isolationGammaObjects(), PerigeeConversions::jacobianParameters2Cartesian(), PFDisplacedVertexHelper::lambdaCP(), DeDxDiscriminatorLearner::Learn(), SteppingHelixPropagator::loadState(), PFTauDiscriminants::PFTauDiscriminantManager::mainTrack(), pat::PATGenCandsFromSimTracksProducer::makeGenParticle_(), MuonErrorMatrixAdjuster::makeTrack(), PFB::match(), CalorimetryManager::MuonMipSimulation(), PathToPlane2Order::operator()(), TauTagTools::filterChargedAndNeutralsByPt::operator()(), reco::V0Filter::operator()(), reco::LeafRefCandidateT< T >::overlap(), spr::parentSimTrack(), pos::PixelFEDTestDAC::PixelFEDTestDAC(), SiPixelHistoricInfoReader::plot(), PFAlgo::postMuonCleaning(), PrintRecoObjects::print(), PFRootEventManagerColin::processHIGH_E_TAUS(), HFChamberSD::ProcessHits(), MuonAlignmentFromReference::processMuonResidualsFromTrack(), AlignmentMonitorMuonSystemMap1D::processMuonResidualsFromTrack(), ParticleReplacerParticleGun::produce(), DeDxEstimatorProducer::produce(), L2MuonSeedGenerator::produce(), SiClusterTranslator::produce(), GoodSeedProducer::produce(), PFElecTkProducer::produce(), TrajectorySeedFromMuonProducer::produce(), VZeroProducer::produce(), TrackCandidateProducer::produce(), ShallowTracksProducer::produce(), MCParticleReplacer::produce(), GenHIEventProducer::produce(), AlCaHOCalibProducer::produce(), prodname::produce(), TauGenJetProducer::produce(), TrackerToMuonPropagator::produce(), ShallowSimTracksProducer::produce(), IsolatedPixelTrackCandidateProducer::produce(), TrajectorySeedProducer::produce(), DeDxEstimatorProducerPixelTripplet::produce(), ShallowGainCalibration::produce(), ShallowClustersProducer::produce(), Geant4ePropagator::propagate(), cms::FastMuPropagator::propagate(), spr::propagateECAL(), spr::propagateHCAL(), spr::propagateTracker(), spr::propagateTrackerEnd(), spr::propagateTrackToECAL(), spr::propagateTrackToHCAL(), L1MuDTAssignmentUnit::PtAU(), ThirdHitPredictionFromInvParabola::rangeRPhi(), PFAlgo::reconstructCluster(), PFAlgo::reconstructTrack(), KalmanAlignmentTrackRefitter::refitSingleTracklet(), CosmicRegionalSeedGenerator::regions(), reco::TrackJet::resetCharge(), L1MuonPixelTrackFitter::run(), PixelFitterByConformalMappingAndLine::run(), SiStripDigitizerAlgorithm::run(), ConversionTrackPairFinder::run(), TrackFitter::run(), L1MuGMTEtaProjectionUnit::run(), L1MuGMTPhiProjectionUnit::run(), PixelFitterByHelixProjections::run(), KFBasedPixelFitter::run(), CustomPDGParser::s_charge(), AddFourMomenta::set(), PFElectronAlgo::SetCandidates(), CSCXonStrip_MatchGatti::setupMatrix(), PFTauQualityCutWrapper::signalChargedObjects(), PFTauQualityCutWrapper::signalGammaObjects(), L1DummyProducer::SimpleDigi(), L1MuGMTMIAUPhiPro2LUT::SpecificLookup(), L1MuGMTMIAUPhiPro1LUT::SpecificLookup(), L1MuGMTMIAUEtaProLUT::SpecificLookup(), L1MuGMTLFPhiProLUT::SpecificLookup(), L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_fine(), L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_ofs(), L1MuGMTLFPhiProLUT::SpecificLookup_dphi(), L1MuGMTMIAUEtaProLUT::SpecificLookup_eta_sel(), L1MuGMTMIAUPhiPro2LUT::SpecificLookup_phi_sel(), TauValidation::tauProngs(), reco::PFDisplacedVertex::totalCharge(), FastTSGFromPropagation::trackerSeeds(), TreatSecondary::tracks(), reco::Conversion::tracksSigned_d0(), CosmicSeedCreator::trajectorySeed(), StoreSecondary::update(), CheckSecondary::update(), MuonSeedCreator::weightedPt(), and reco::writeSpecific().

double DeDxDiscriminatorTools::charge ( const vector< uint8_t > &  Ampls)

Definition at line 43 of file DeDxDiscriminatorTools.cc.

References a, and charge().

{
   double charge = 0;
   for(unsigned int a=0;a<Ampls.size();a++){charge+=Ampls[a];}
   return charge;
}
bool DeDxDiscriminatorTools::IsFarFromBorder ( TrajectoryStateOnSurface  trajState,
const GeomDetUnit it 
)

Definition at line 57 of file DeDxDiscriminatorTools.cc.

References BoundSurface::bounds(), gather_cfg::cout, Bounds::length(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localPosition(), Parameters::parameters, LocalTrajectoryError::positionError(), GeomDet::surface(), PV3DBase< T, PVType, FrameType >::y(), and LocalError::yy().

Referenced by DeDxDiscriminatorLearner::Learn().

{
  if (dynamic_cast<const StripGeomDetUnit*>(it)==0 && dynamic_cast<const PixelGeomDetUnit*>(it)==0) {
     std::cout << "this detID doesn't seem to belong to the Tracker" << std::endl;
     return false;
  }

  LocalPoint  HitLocalPos   = trajState.localPosition();
  LocalError  HitLocalError = trajState.localError().positionError() ;

  const BoundPlane plane = it->surface();
  const TrapezoidalPlaneBounds* trapezoidalBounds( dynamic_cast<const TrapezoidalPlaneBounds*>(&(plane.bounds())));
  const RectangularPlaneBounds* rectangularBounds( dynamic_cast<const RectangularPlaneBounds*>(&(plane.bounds())));

  double DistFromBorder = 1.0;
  //double HalfWidth      = it->surface().bounds().width()  /2.0;
  double HalfLength     = it->surface().bounds().length() /2.0;

  if(trapezoidalBounds)
  {
     std::vector<float> const & parameters = (*trapezoidalBounds).parameters();
     HalfLength     = parameters[3];
     //double t       = (HalfLength + HitLocalPos.y()) / (2*HalfLength) ;
     //HalfWidth      = parameters[0] + (parameters[1]-parameters[0]) * t;
  }else if(rectangularBounds){
     //HalfWidth      = it->surface().bounds().width()  /2.0;
     HalfLength     = it->surface().bounds().length() /2.0;
  }else{return false;}

//  if (fabs(HitLocalPos.x())+HitLocalError.xx() >= (HalfWidth  - DistFromBorder) ) return false;//Don't think is really necessary
  if (fabs(HitLocalPos.y())+HitLocalError.yy() >= (HalfLength - DistFromBorder) ) return false;

  return true;
}
bool DeDxDiscriminatorTools::IsSaturatingStrip ( const vector< uint8_t > &  Ampls)

Definition at line 34 of file DeDxDiscriminatorTools.cc.

References i.

{
   for(unsigned int i=0;i<Ampls.size();i++){
      if(Ampls[i]>=254)return true;
   }return false;
}
bool DeDxDiscriminatorTools::IsSaturatingStrip ( const std::vector< uint8_t > &  Ampls)
bool DeDxDiscriminatorTools::IsSpanningOver2APV ( unsigned int  FirstStrip,
unsigned int  ClusterSize 
)

Definition at line 8 of file DeDxDiscriminatorTools.cc.

Referenced by DeDxDiscriminatorLearner::Learn().

{  
   if(FirstStrip==0                                ) return true;
   if(FirstStrip==128                              ) return true;
   if(FirstStrip==256                              ) return true;
   if(FirstStrip==384                              ) return true;
   if(FirstStrip==512                              ) return true;
   if(FirstStrip==640                              ) return true;

   if(FirstStrip<=127 && FirstStrip+ClusterSize>127) return true;
   if(FirstStrip<=255 && FirstStrip+ClusterSize>255) return true;
   if(FirstStrip<=383 && FirstStrip+ClusterSize>383) return true;
   if(FirstStrip<=511 && FirstStrip+ClusterSize>511) return true;
   if(FirstStrip<=639 && FirstStrip+ClusterSize>639) return true;
   
   if(FirstStrip+ClusterSize==127                  ) return true;
   if(FirstStrip+ClusterSize==255                  ) return true;
   if(FirstStrip+ClusterSize==383                  ) return true;
   if(FirstStrip+ClusterSize==511                  ) return true;
   if(FirstStrip+ClusterSize==639                  ) return true;
   if(FirstStrip+ClusterSize==767                  ) return true;
   
   return false;
}
double DeDxDiscriminatorTools::path ( double  cosine,
double  thickness 
)

Definition at line 51 of file DeDxDiscriminatorTools.cc.

{
   return (10.0*thickness)/fabs(cosine);
}