#include <StripCPE.h>
Classes | |
struct | Param |
Public Member Functions | |
LocalVector | driftDirection (const StripGeomDetUnit *det) const |
StripClusterParameterEstimator::LocalValues | localParameters (const SiStripCluster &cl, const GeomDetUnit &) const |
StripCPE (edm::ParameterSet &conf, const MagneticField &, const TrackerGeometry &, const SiStripLorentzAngle &, const SiStripConfObject &, const SiStripLatency &) | |
Protected Member Functions | |
Param const & | param (const GeomDetUnit &det) const |
Protected Attributes | |
const TrackerGeometry & | geom_ |
const SiStripLorentzAngle & | LorentzAngleMap_ |
const MagneticField & | magfield_ |
const bool | peakMode_ |
std::vector< double > | shift |
std::vector< double > | xtalk1 |
std::vector< double > | xtalk2 |
Private Types | |
typedef std::vector< Param > | Params |
Private Member Functions | |
void | fillParams () |
Private Attributes | |
unsigned int | m_off |
Params | m_Params |
Definition at line 15 of file StripCPE.h.
typedef std::vector<Param> StripCPE::Params [private] |
Definition at line 55 of file StripCPE.h.
StripCPE::StripCPE | ( | edm::ParameterSet & | conf, |
const MagneticField & | mag, | ||
const TrackerGeometry & | geom, | ||
const SiStripLorentzAngle & | LorentzAngle, | ||
const SiStripConfObject & | confObj, | ||
const SiStripLatency & | latency | ||
) |
Definition at line 11 of file StripCPE.cc.
References fillParams(), SiStripConfObject::get(), SiStripDetId::IB1, SiStripDetId::IB2, SiStripConfObject::isParameter(), SiStripDetId::OB1, SiStripDetId::OB2, peakMode_, edm::second(), shift, findQualityFiles::size, SiStripDetId::W1A, SiStripDetId::W1B, SiStripDetId::W2A, SiStripDetId::W2B, SiStripDetId::W3A, SiStripDetId::W3B, SiStripDetId::W4, SiStripDetId::W5, SiStripDetId::W6, SiStripDetId::W7, xtalk1, and xtalk2.
: peakMode_(latency.singleReadOutMode() == 1), geom_(geom), magfield_(mag), LorentzAngleMap_(LorentzAngle) { typedef std::map<std::string,SiStripDetId::ModuleGeometry> map_t; map_t modules; modules["IB1"]=SiStripDetId::IB1; modules["IB2"]=SiStripDetId::IB2; modules["OB1"]=SiStripDetId::OB1; modules["OB2"]=SiStripDetId::OB2; modules["W1A"]=SiStripDetId::W1A; modules["W2A"]=SiStripDetId::W2A; modules["W3A"]=SiStripDetId::W3A; modules["W1B"]=SiStripDetId::W1B; modules["W2B"]=SiStripDetId::W2B; modules["W3B"]=SiStripDetId::W3B; modules["W4"] =SiStripDetId::W4; modules["W5"] =SiStripDetId::W5; modules["W6"] =SiStripDetId::W6; modules["W7"] =SiStripDetId::W7; const unsigned size = max_element( modules.begin(),modules.end(), boost::bind(&map_t::value_type::second,boost::lambda::_1) < boost::bind(&map_t::value_type::second,boost::lambda::_2) )->second + 1; shift.resize(size); xtalk1.resize(size); xtalk2.resize(size); for(map_t::const_iterator it=modules.begin(); it!=modules.end(); it++) { const std::string modeS(peakMode_?"Peak":"Deco"), shiftS( "shift_" + it->first + modeS ), xtalk1S("xtalk1_" + it->first + modeS ), xtalk2S("xtalk2_" + it->first + modeS ); if(!confObj.isParameter(shiftS)) throw cms::Exception("SiStripConfObject does not contain: ") << shiftS; if(!confObj.isParameter(xtalk1S)) throw cms::Exception("SiStripConfObject does not contain: ") << xtalk1S; if(!confObj.isParameter(xtalk2S)) throw cms::Exception("SiStripConfObject does not contain: ") << xtalk2S; shift[it->second] = confObj.get<double>(shiftS); xtalk1[it->second] = confObj.get<double>(xtalk1S); xtalk2[it->second] = confObj.get<double>(xtalk2S); } fillParams(); }
LocalVector StripCPE::driftDirection | ( | const StripGeomDetUnit * | det | ) | const [virtual] |
Implements StripClusterParameterEstimator.
Definition at line 85 of file StripCPE.cc.
References GeomDet::geographicalId(), SiStripLorentzAngle::getLorentzAngle(), MagneticField::inTesla(), LorentzAngleMap_, magfield_, GloballyPositioned< T >::position(), DetId::rawId(), GeomDet::surface(), toLocal(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().
Referenced by fillParams().
{ LocalVector lbfield = (det->surface()).toLocal(magfield_.inTesla(det->surface().position())); float tanLorentzAnglePerTesla = LorentzAngleMap_.getLorentzAngle(det->geographicalId().rawId()); float dir_x = -tanLorentzAnglePerTesla * lbfield.y(); float dir_y = tanLorentzAnglePerTesla * lbfield.x(); float dir_z = 1.f; // E field always in z direction return LocalVector(dir_x,dir_y,dir_z); }
void StripCPE::fillParams | ( | ) | [private] |
Definition at line 99 of file StripCPE.cc.
References RadialStripTopology::angularWidth(), BoundSurface::bounds(), TrackerGeometry::detUnits(), driftDirection(), f, GeomDet::geographicalId(), geom_, i, GeomDet::index(), RadialStripTopology::localPitch(), m_off, m_Params, TrackerGeometry::offsetDU(), AlCaHLTBitMon_ParallelJobs::p, funct::pow(), GeomDet::specificSurface(), StripGeomDetType::specificTopology(), StripGeomDetUnit::specificType(), mathSSE::sqrt(), RadialStripTopology::stripLength(), DetId::subdetId(), GeomDetEnumerators::TIB, and StripGeomDetUnit::topology().
Referenced by StripCPE().
{ m_off = geom_.offsetDU(GeomDetEnumerators::TIB); // yes we know this auto const & dus = geom_.detUnits(); m_Params.resize(dus.size()-m_off); for (auto i=m_off; i!=dus.size();++i) { auto & p= m_Params[i-m_off]; const StripGeomDetUnit * stripdet=(const StripGeomDetUnit*)(dus[i]); assert(stripdet->index()==int(i)); assert(stripdet->geographicalId().subdetId()>1); // not pixel.. const Bounds& bounds = stripdet->specificSurface().bounds(); p.maxLength = std::sqrt( std::pow(bounds.length(),2.f)+std::pow(bounds.width(),2.f) ); p.thickness = bounds.thickness(); p.drift = driftDirection(stripdet) * p.thickness; p.topology=(StripTopology*)(&stripdet->topology()); p.nstrips = p.topology->nstrips(); p.moduleGeom = SiStripDetId(stripdet->geographicalId()).moduleGeometry(); const RadialStripTopology* rtop = dynamic_cast<const RadialStripTopology*>(&stripdet->specificType().specificTopology()); p.pitch_rel_err2 = (rtop) ? pow( 0.5f * rtop->angularWidth() * rtop->stripLength()/rtop->localPitch(LocalPoint(0,0,0)), 2.f) / 12.f : 0.f; } }
StripClusterParameterEstimator::LocalValues StripCPE::localParameters | ( | const SiStripCluster & | cl, |
const GeomDetUnit & | det | ||
) | const [virtual] |
Implements ClusterParameterEstimator< SiStripCluster >.
Definition at line 67 of file StripCPE.cc.
References SiStripCluster::barycenter(), StripCPE::Param::coveredStrips(), StripCPE::Param::drift, f, StripTopology::localError(), StripTopology::localPosition(), StripCPE::Param::moduleGeom, AlCaHLTBitMon_ParallelJobs::p, param(), shift, strip(), StripCPE::Param::thickness, and StripCPE::Param::topology.
{ StripCPE::Param const & p = param(det); const float barycenter = cluster.barycenter(); const float fullProjection = p.coveredStrips( p.drift + LocalVector(0,0,-p.thickness), LocalPoint(barycenter,0,0)); const float strip = barycenter - 0.5f * (1-shift[p.moduleGeom]) * fullProjection; return std::make_pair( p.topology->localPosition(strip), p.topology->localError(strip, 1.f/12.f) ); }
Param const& StripCPE::param | ( | const GeomDetUnit & | det | ) | const [inline, protected] |
Definition at line 48 of file StripCPE.h.
References GeomDet::index(), m_off, and m_Params.
Referenced by StripCPEgeometric::localParameters(), StripCPEfromTemplate::localParameters(), localParameters(), and StripCPEfromTrackAngle::localParameters().
const TrackerGeometry& StripCPE::geom_ [protected] |
Definition at line 32 of file StripCPE.h.
Referenced by fillParams().
const SiStripLorentzAngle& StripCPE::LorentzAngleMap_ [protected] |
Definition at line 34 of file StripCPE.h.
Referenced by driftDirection().
unsigned int StripCPE::m_off [private] |
Definition at line 57 of file StripCPE.h.
Referenced by fillParams(), and param().
Params StripCPE::m_Params [private] |
Definition at line 56 of file StripCPE.h.
Referenced by fillParams(), and param().
const MagneticField& StripCPE::magfield_ [protected] |
Definition at line 33 of file StripCPE.h.
Referenced by driftDirection(), and StripCPEfromTemplate::localParameters().
const bool StripCPE::peakMode_ [protected] |
Definition at line 31 of file StripCPE.h.
Referenced by StripCPE().
std::vector<double> StripCPE::shift [protected] |
Definition at line 35 of file StripCPE.h.
Referenced by StripCPEgeometric::localParameters(), StripCPEfromTemplate::localParameters(), localParameters(), StripCPEfromTrackAngle::localParameters(), and StripCPE().
std::vector<double> StripCPE::xtalk1 [protected] |
Definition at line 36 of file StripCPE.h.
Referenced by StripCPEgeometric::localParameters(), and StripCPE().
std::vector<double> StripCPE::xtalk2 [protected] |
Definition at line 37 of file StripCPE.h.
Referenced by StripCPE().