#include <StripCPE.h>
Classes | |
struct | Param |
Public Member Functions | |
void | clearCache () |
LocalVector | driftDirection (const StripGeomDetUnit *det) const |
StripClusterParameterEstimator::LocalValues | localParameters (const SiStripCluster &cl, const GeomDetUnit &) const |
StripClusterParameterEstimator::LocalValues | localParameters (const SiStripCluster &) const |
StripCPE (edm::ParameterSet &conf, const MagneticField &, const TrackerGeometry &, const SiStripLorentzAngle &, const SiStripConfObject &, const SiStripLatency &) | |
Protected Member Functions | |
Param const & | param (const uint32_t detid) 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 __gnu_cxx::hash_map < unsigned int, Param > | Params |
Private Member Functions | |
Param & | fillParam (Param &p, const GeomDetUnit *det) |
Private Attributes | |
Params | m_Params |
Definition at line 15 of file StripCPE.h.
typedef __gnu_cxx::hash_map< unsigned int, 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 10 of file StripCPE.cc.
References 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); } }
void StripCPE::clearCache | ( | ) | [inline] |
LocalVector StripCPE::driftDirection | ( | const StripGeomDetUnit * | det | ) | const [virtual] |
Implements StripClusterParameterEstimator.
Definition at line 81 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 fillParam().
{ 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); }
StripCPE::Param & StripCPE::fillParam | ( | StripCPE::Param & | p, |
const GeomDetUnit * | det | ||
) | [private] |
Definition at line 101 of file StripCPE.cc.
References RadialStripTopology::angularWidth(), BoundSurface::bounds(), StripCPE::Param::drift, driftDirection(), f, GeomDet::geographicalId(), Bounds::length(), RadialStripTopology::localPitch(), StripCPE::Param::maxLength, StripCPE::Param::moduleGeom, StripCPE::Param::nstrips, StripTopology::nstrips(), L1TEmulatorMonitor_cff::p, StripCPE::Param::pitch_rel_err2, funct::pow(), GeomDet::specificSurface(), StripGeomDetType::specificTopology(), StripGeomDetUnit::specificType(), mathSSE::sqrt(), RadialStripTopology::stripLength(), StripCPE::Param::thickness, Bounds::thickness(), StripGeomDetUnit::topology(), StripCPE::Param::topology, and Bounds::width().
Referenced by param().
{ const StripGeomDetUnit * stripdet=(const StripGeomDetUnit*)(det); 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; return p; }
StripClusterParameterEstimator::LocalValues StripCPE::localParameters | ( | const SiStripCluster & | cl, |
const GeomDetUnit & | |||
) | const [inline, virtual] |
Implements ClusterParameterEstimator< SiStripCluster >.
Definition at line 20 of file StripCPE.h.
References localParameters().
Referenced by localParameters().
{return localParameters(cl);}
StripClusterParameterEstimator::LocalValues StripCPE::localParameters | ( | const SiStripCluster & | cluster | ) | const |
Definition at line 63 of file StripCPE.cc.
References SiStripCluster::barycenter(), StripCPE::Param::coveredStrips(), StripCPE::Param::drift, f, SiStripCluster::geographicalId(), StripTopology::localError(), StripTopology::localPosition(), StripCPE::Param::moduleGeom, L1TEmulatorMonitor_cff::p, param(), shift, strip(), StripCPE::Param::thickness, and StripCPE::Param::topology.
{ StripCPE::Param const & p = param(cluster.geographicalId()); 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) ); }
StripCPE::Param const & StripCPE::param | ( | const uint32_t | detid | ) | const [protected] |
Definition at line 94 of file StripCPE.cc.
References fillParam(), geom_, TrackerGeometry::idToDetUnit(), m_Params, L1TEmulatorMonitor_cff::p, and StripCPE::Param::topology.
Referenced by StripCPEgeometric::localParameters(), localParameters(), and StripCPEfromTrackAngle::localParameters().
const TrackerGeometry& StripCPE::geom_ [protected] |
Definition at line 34 of file StripCPE.h.
Referenced by param().
const SiStripLorentzAngle& StripCPE::LorentzAngleMap_ [protected] |
Definition at line 36 of file StripCPE.h.
Referenced by driftDirection().
Params StripCPE::m_Params [private] |
Definition at line 56 of file StripCPE.h.
Referenced by clearCache(), and param().
const MagneticField& StripCPE::magfield_ [protected] |
Definition at line 35 of file StripCPE.h.
Referenced by driftDirection().
const bool StripCPE::peakMode_ [protected] |
Definition at line 33 of file StripCPE.h.
Referenced by StripCPE().
std::vector<double> StripCPE::shift [protected] |
Definition at line 37 of file StripCPE.h.
Referenced by StripCPEgeometric::localParameters(), localParameters(), StripCPEfromTrackAngle::localParameters(), and StripCPE().
std::vector<double> StripCPE::xtalk1 [protected] |
Definition at line 38 of file StripCPE.h.
Referenced by StripCPEgeometric::localParameters(), and StripCPE().
std::vector<double> StripCPE::xtalk2 [protected] |
Definition at line 39 of file StripCPE.h.
Referenced by StripCPE().