Classes | |
struct | RawHits |
Functions | |
Measurement1D | beta (const reco::TrackDeDxHits &trackWithHits) |
Default implementation simply returns the beta obtained inverting bethe bloch for the energy obtained with dedx(). | |
float | betaFromInvertedBetheBloch (float dedx) |
double | genericAverage (const reco::DeDxHitCollection &, float expo=1.) |
float | massFromBeta (float beta, const reco::Track &) |
void | trajectoryRawHits (const edm::Ref< std::vector< Trajectory > > &trajectory, vector< RawHits > &hits, bool usePixel, bool useStrip) |
void | trajectoryRawHits (const edm::Ref< std::vector< Trajectory > > &trajectory, std::vector< RawHits > &hits, bool usePixel, bool useStrip) |
Measurement1D DeDxTools::beta | ( | const reco::TrackDeDxHits & | trackWithHits | ) |
Default implementation simply returns the beta obtained inverting bethe bloch for the energy obtained with dedx().
The error is computed from bethe-bloch first derivative and ...? (Landau width)/sqrt(n) ??????
Referenced by SiStripRandomLorentzAngle::algoBeginJob(), PxCPEdbReader::beginJob(), DreamSD::cherenkovDeposit_(), MultipleScatteringUpdator::compute(), VolumeEnergyLossEstimator::computeBetheBloch(), EnergyLossUpdator::computeBetheBloch(), SiStripGainFromData::ComputeChargeOverPath(), HouseholderDecomposition::decompose(), GenericHouseholder::decompose(), DTSurveyConvert::endJob(), VolumeMultipleScatteringEstimator::estimate(), DDEcalBarrelAlgo::execute(), DTSurvey::FillWheelInfo(), PairProductionSimulator::gbteth(), BremsstrahlungSimulator::gbteth(), CastorSD::getEnergyDeposit(), ZdcSD::getEnergyDeposit(), NtupleManager::GetGlobalAngles(), HCalSD::getHitPMT(), TangentCircle::getPosition(), TopologyWorker::ludbrb(), main(), HcalRecHitsMaker::noiseInfCfromDB(), GflashEMShowerProfile::parameterization(), SiStripLAFakeESSource::produce(), SiPixelGaussianSmearingRecHitConverterAlgorithm::smearHit(), DDI::Polyhedra::volume(), DDEcalBarrelAlgo::web(), LMFLaserBluePrimDat::writeArrayDB(), and LMFLaserPrimDat::writeArrayDB().
float DeDxTools::betaFromInvertedBetheBloch | ( | float | dedx | ) |
double DeDxTools::genericAverage | ( | const reco::DeDxHitCollection & | hits, | |
float | expo = 1. | |||
) |
Definition at line 100 of file DeDxTools.cc.
References i, n, funct::pow(), and HLT_VtxMuL3::result.
Referenced by GenericAverageDeDxEstimator::dedx().
00101 { 00102 double result=0; 00103 size_t n = hits.size(); 00104 for(size_t i = 0; i< n; i ++) 00105 { 00106 result+=pow(hits[i].charge(),expo); 00107 } 00108 return (n>0)?pow(result/n,1./expo):0.; 00109 }
float DeDxTools::massFromBeta | ( | float | beta, | |
const reco::Track & | ||||
) |
void DeDxTools::trajectoryRawHits | ( | const edm::Ref< std::vector< Trajectory > > & | trajectory, | |
vector< RawHits > & | hits, | |||
bool | usePixel, | |||
bool | useStrip | |||
) |
Definition at line 16 of file DeDxTools.cc.
References DeDxTools::RawHits::angleCosine, DeDxTools::RawHits::charge, SiStripRecHit2D::cluster(), DeDxTools::RawHits::detId, TrackingRecHit::geographicalId(), TrajectoryStateOnSurface::isValid(), it, TrajectoryStateOnSurface::localDirection(), PV3DBase< T, PVType, FrameType >::mag(), DeDxTools::RawHits::trajectoryMeasurement, and PV3DBase< T, PVType, FrameType >::z().
00017 { 00018 00019 // vector<RawHits> hits; 00020 00021 const vector<TrajectoryMeasurement> & measurements = trajectory->measurements(); 00022 for(vector<TrajectoryMeasurement>::const_iterator it = measurements.begin(); it!=measurements.end(); it++){ 00023 00024 //FIXME: check that "updated" State is the best one (wrt state in the middle) 00025 TrajectoryStateOnSurface trajState=it->updatedState(); 00026 if( !trajState.isValid()) continue; 00027 00028 const TrackingRecHit * recHit=(*it->recHit()).hit(); 00029 00030 LocalVector trackDirection = trajState.localDirection(); 00031 double cosine = trackDirection.z()/trackDirection.mag(); 00032 00033 if(const SiStripMatchedRecHit2D* matchedHit=dynamic_cast<const SiStripMatchedRecHit2D*>(recHit)){ 00034 if(!useStrip) continue; 00035 00036 RawHits mono,stereo; 00037 mono.trajectoryMeasurement = &(*it); 00038 stereo.trajectoryMeasurement = &(*it); 00039 mono.angleCosine = cosine; 00040 stereo.angleCosine = cosine; 00041 const std::vector<uint8_t> & amplitudes = matchedHit->monoHit()->cluster()->amplitudes(); 00042 mono.charge = accumulate(amplitudes.begin(), amplitudes.end(), 0); 00043 00044 const std::vector<uint8_t> & amplitudesSt = matchedHit->stereoHit()->cluster()->amplitudes(); 00045 stereo.charge = accumulate(amplitudesSt.begin(), amplitudesSt.end(), 0); 00046 00047 mono.detId= matchedHit->monoHit()->geographicalId(); 00048 stereo.detId= matchedHit->stereoHit()->geographicalId(); 00049 00050 hits.push_back(mono); 00051 hits.push_back(stereo); 00052 00053 }else if(const ProjectedSiStripRecHit2D* projectedHit=dynamic_cast<const ProjectedSiStripRecHit2D*>(recHit)) { 00054 if(!useStrip) continue; 00055 00056 const SiStripRecHit2D* singleHit=&(projectedHit->originalHit()); 00057 RawHits mono; 00058 00059 mono.trajectoryMeasurement = &(*it); 00060 00061 mono.angleCosine = cosine; 00062 const std::vector<uint8_t> & amplitudes = singleHit->cluster()->amplitudes(); 00063 mono.charge = accumulate(amplitudes.begin(), amplitudes.end(), 0); 00064 mono.detId= singleHit->geographicalId(); 00065 hits.push_back(mono); 00066 00067 }else if(const SiStripRecHit2D* singleHit=dynamic_cast<const SiStripRecHit2D*>(recHit)){ 00068 if(!useStrip) continue; 00069 00070 RawHits mono; 00071 00072 mono.trajectoryMeasurement = &(*it); 00073 00074 mono.angleCosine = cosine; 00075 const std::vector<uint8_t> & amplitudes = singleHit->cluster()->amplitudes(); 00076 mono.charge = accumulate(amplitudes.begin(), amplitudes.end(), 0); 00077 mono.detId= singleHit->geographicalId(); 00078 hits.push_back(mono); 00079 00080 }else if(const SiPixelRecHit* pixelHit=dynamic_cast<const SiPixelRecHit*>(recHit)){ 00081 if(!usePixel) continue; 00082 00083 RawHits pixel; 00084 00085 pixel.trajectoryMeasurement = &(*it); 00086 00087 pixel.angleCosine = cosine; 00088 pixel.charge = pixelHit->cluster()->charge();; 00089 pixel.detId= pixelHit->geographicalId(); 00090 hits.push_back(pixel); 00091 } 00092 00093 } 00094 // return hits; 00095 }
void DeDxTools::trajectoryRawHits | ( | const edm::Ref< std::vector< Trajectory > > & | trajectory, | |
std::vector< RawHits > & | hits, | |||
bool | usePixel, | |||
bool | useStrip | |||
) |
Referenced by DeDxEstimatorProducer::produce().