CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TrajectoryAtInvalidHit Class Reference

#include <TrajectoryAtInvalidHit.h>

Public Member Functions

double globalX () const
 
double globalY () const
 
double globalZ () const
 
bool isDoubleSided (unsigned int iidd, const TrackerTopology *tTopo) const
 
double localDxDz () const
 
double localDyDz () const
 
double localErrorX () const
 
double localErrorY () const
 
double localX () const
 
double localY () const
 
double localZ () const
 
unsigned int monodet_id () const
 
 TrajectoryAtInvalidHit (const TrajectoryMeasurement &, const TrackerTopology *tTopo, const TrackerGeometry *tracker, const Propagator &propagator, const unsigned int mono=0)
 
TrajectoryStateOnSurface tsos () const
 
bool validHit () const
 
bool withinAcceptance () const
 

Private Attributes

bool acceptance
 
float globX
 
float globY
 
float globZ
 
bool hasValidHit
 
unsigned int iidd
 
float locDxDz
 
float locDyDz
 
float locX
 
float locXError
 
float locY
 
float locYError
 
float locZ
 
TrajectoryStateOnSurface theCombinedPredictedState
 
TrackingRecHit::ConstRecHitPointer theHit
 

Detailed Description

Definition at line 21 of file TrajectoryAtInvalidHit.h.

Constructor & Destructor Documentation

◆ TrajectoryAtInvalidHit()

TrajectoryAtInvalidHit::TrajectoryAtInvalidHit ( const TrajectoryMeasurement tm,
const TrackerTopology tTopo,
const TrackerGeometry tracker,
const Propagator propagator,
const unsigned int  mono = 0 
)

Definition at line 18 of file TrajectoryAtInvalidHit.cc.

22  {
26  else
28 
30  return;
31  }
32  theHit = tm.recHit();
33  iidd = theHit->geographicalId().rawId();
35  unsigned int subid = strip.subdetId();
36  // xB and yB are for absolute borders on the trajectories included in the study, sigmaX sigmaY are
37  // significance cuts on the distance from the detector surface
38  float xB = 0.;
39  float sigmaX = 5.0;
40  float yB = 0.;
41  float sigmaY = 5.0;
42  float sigmaYBond = 0.;
43  //set bounds for point to be within to be counted in the study
44  if (subid == StripSubdetector::TOB) {
45  sigmaYBond = 5.0;
46  }
47  const GeomDetUnit* monodet;
48 
49  // if module is from a double sided layer, write out info for either the
50  // rphi surface (mono = 1) or the stereo surface (mono = 2)--not the matched hit surface
51  if ((mono > 0) && isDoubleSided(iidd, tTopo)) {
52  // find matched det id, that is the matched hit surface between the two sensors
53  unsigned int matched_iidd = iidd - (iidd & 0x3);
54  DetId matched_id(matched_iidd);
55 
56  const GluedGeomDet* gdet = static_cast<const GluedGeomDet*>(tracker->idToDet(matched_id));
57 
58  // get the sensor det indicated by mono
59  if (mono == 1)
60  monodet = gdet->stereoDet();
61  else
62  monodet = gdet->monoDet(); // this should only be mono == 2
63 
64  // set theCombinedPredictedState to be on the sensor surface, not the matched surface
65  DetId mono_id = monodet->geographicalId();
66  const Surface& surface = tracker->idToDet(mono_id)->surface();
68 
70  cout << "found invalid combinedpredictedstate after propagation" << endl;
71  return;
72  }
73 
74  //check if hit on trajectory is valid for this sensor
75  if ((iidd & 0x3) == 0) {
76  // passed id is on matched surface (ie neither rphi, nor stereo surface)
77  // so the rechits on both sensors should be invalid
78  hasValidHit = theHit->isValid();
79  //cout << "should always be invalid = " << theHit->isValid() << endl;
80  } else {
81  if (iidd == mono_id) {
82  //mono sensor for this TrajAtInvalidHit is same as originally passed in from trajectory
83  //normally should only happen for valid hits, but sometimes is invalid
84  hasValidHit = theHit->isValid();
85  //cout << "check always true = " << theHit->isValid() << endl;
86  } else {
87  // mono sensor for this TrajAtInvalidHit is not as originally passed in from trajectory
88  // so this is a partner missing from the trajectory and is thus invalid
89  hasValidHit = false;
90  //cout << "setting invalid by fiat" << endl;
91  }
92  }
93 
94  //set module id to be mono det
95  iidd = monodet->geographicalId().rawId();
96  } else {
97  monodet = theHit->det();
98  hasValidHit = theHit->isValid();
99  }
100 
111 
112  // this should never be a glued det, only rphi or stero
113  //cout << "From TrajAtValidHit module " << iidd << " matched/stereo/rphi = " << ((iidd & 0x3)==0) << "/" << ((iidd & 0x3)==1) << "/" << ((iidd & 0x3)==2) << endl;
114 
115  // Restrict the bound regions for better understanding of the modul assignment.
116 
117  LocalPoint BoundedPoint;
118  float xx, yy, zz;
119 
120  // Insert the bounded values
121  if (locX < 0.)
122  xx = min(locX - xB, locX - sigmaX * locXError);
123  else
124  xx = max(locX + xB, locX + sigmaX * locXError);
125 
126  if (locY < 0.)
127  yy = min(locY - yB, locY - sigmaY * locYError);
128  else
129  yy = max(locY + yB, locY + sigmaY * locYError);
130 
132 
133  BoundedPoint = LocalPoint(xx, yy, zz);
134 
135  if (monodet->surface().bounds().inside(BoundedPoint) && abs(locY) > sigmaYBond * locYError) {
136  acceptance = true;
137  } else {
138  // hit is within xB, yB from the edge of the detector, so throw it out
139  acceptance = false;
140  }
141 }

References funct::abs(), TrajectoryMeasurement::backwardPredictedState(), Surface::bounds(), TrajectoryStateCombiner::combine(), gather_cfg::cout, TrajectoryMeasurement::forwardPredictedState(), GeomDet::geographicalId(), Bounds::inside(), TrajectoryStateOnSurface::isValid(), SiStripPI::max, min(), GluedGeomDet::monoDet(), TrackCandidateProducer_cfi::propagator, DetId::rawId(), TrajectoryMeasurement::recHit(), fftjetvertexadder_cfi::sigmaX, fftjetvertexadder_cfi::sigmaY, mathSSE::sqrt(), GluedGeomDet::stereoDet(), digitizers_cfi::strip, GeomDet::surface(), StripSubdetector::TOB, PbPb_ZMuSkimMuonDPG_cff::tracker, geometryCSVtoXML::xx, geometryCSVtoXML::yy, and geometryCSVtoXML::zz.

Member Function Documentation

◆ globalX()

double TrajectoryAtInvalidHit::globalX ( ) const

Definition at line 150 of file TrajectoryAtInvalidHit.cc.

150 { return globX; }

◆ globalY()

double TrajectoryAtInvalidHit::globalY ( ) const

Definition at line 151 of file TrajectoryAtInvalidHit.cc.

151 { return globY; }

◆ globalZ()

double TrajectoryAtInvalidHit::globalZ ( ) const

Definition at line 152 of file TrajectoryAtInvalidHit.cc.

152 { return globZ; }

◆ isDoubleSided()

bool TrajectoryAtInvalidHit::isDoubleSided ( unsigned int  iidd,
const TrackerTopology tTopo 
) const

Definition at line 160 of file TrajectoryAtInvalidHit.cc.

160  {
162  unsigned int subid = strip.subdetId();
163  unsigned int layer = 0;
164  if (subid == StripSubdetector::TIB) {
165  layer = tTopo->tibLayer(iidd);
166  if (layer == 1 || layer == 2)
167  return true;
168  else
169  return false;
170  } else if (subid == StripSubdetector::TOB) {
171  layer = tTopo->tobLayer(iidd) + 4;
172  if (layer == 5 || layer == 6)
173  return true;
174  else
175  return false;
176  } else if (subid == StripSubdetector::TID) {
177  layer = tTopo->tidRing(iidd) + 10;
178  if (layer == 11 || layer == 12)
179  return true;
180  else
181  return false;
182  } else if (subid == StripSubdetector::TEC) {
183  layer = tTopo->tecRing(iidd) + 13;
184  if (layer == 14 || layer == 15 || layer == 18)
185  return true;
186  else
187  return false;
188  } else
189  return false;
190 }

References digitizers_cfi::strip, StripSubdetector::TEC, TrackerTopology::tecRing(), StripSubdetector::TIB, TrackerTopology::tibLayer(), StripSubdetector::TID, TrackerTopology::tidRing(), StripSubdetector::TOB, and TrackerTopology::tobLayer().

◆ localDxDz()

double TrajectoryAtInvalidHit::localDxDz ( ) const

Definition at line 148 of file TrajectoryAtInvalidHit.cc.

148 { return locDxDz; }

◆ localDyDz()

double TrajectoryAtInvalidHit::localDyDz ( ) const

Definition at line 149 of file TrajectoryAtInvalidHit.cc.

149 { return locDyDz; }

◆ localErrorX()

double TrajectoryAtInvalidHit::localErrorX ( ) const

Definition at line 146 of file TrajectoryAtInvalidHit.cc.

146 { return locXError; }

◆ localErrorY()

double TrajectoryAtInvalidHit::localErrorY ( ) const

Definition at line 147 of file TrajectoryAtInvalidHit.cc.

147 { return locYError; }

◆ localX()

double TrajectoryAtInvalidHit::localX ( ) const

Definition at line 143 of file TrajectoryAtInvalidHit.cc.

143 { return locX; }

◆ localY()

double TrajectoryAtInvalidHit::localY ( ) const

Definition at line 144 of file TrajectoryAtInvalidHit.cc.

144 { return locY; }

◆ localZ()

double TrajectoryAtInvalidHit::localZ ( ) const

Definition at line 145 of file TrajectoryAtInvalidHit.cc.

145 { return locZ; }

◆ monodet_id()

unsigned int TrajectoryAtInvalidHit::monodet_id ( ) const

Definition at line 154 of file TrajectoryAtInvalidHit.cc.

154 { return iidd; }

◆ tsos()

TrajectoryStateOnSurface TrajectoryAtInvalidHit::tsos ( ) const

Definition at line 192 of file TrajectoryAtInvalidHit.cc.

192 { return theCombinedPredictedState; }

◆ validHit()

bool TrajectoryAtInvalidHit::validHit ( ) const

Definition at line 158 of file TrajectoryAtInvalidHit.cc.

158 { return hasValidHit; }

◆ withinAcceptance()

bool TrajectoryAtInvalidHit::withinAcceptance ( ) const

Definition at line 156 of file TrajectoryAtInvalidHit.cc.

156 { return acceptance; }

Member Data Documentation

◆ acceptance

bool TrajectoryAtInvalidHit::acceptance
private

Definition at line 57 of file TrajectoryAtInvalidHit.h.

◆ globX

float TrajectoryAtInvalidHit::globX
private

Definition at line 55 of file TrajectoryAtInvalidHit.h.

◆ globY

float TrajectoryAtInvalidHit::globY
private

Definition at line 55 of file TrajectoryAtInvalidHit.h.

◆ globZ

float TrajectoryAtInvalidHit::globZ
private

Definition at line 55 of file TrajectoryAtInvalidHit.h.

◆ hasValidHit

bool TrajectoryAtInvalidHit::hasValidHit
private

Definition at line 58 of file TrajectoryAtInvalidHit.h.

◆ iidd

unsigned int TrajectoryAtInvalidHit::iidd
private

Definition at line 56 of file TrajectoryAtInvalidHit.h.

◆ locDxDz

float TrajectoryAtInvalidHit::locDxDz
private

Definition at line 54 of file TrajectoryAtInvalidHit.h.

◆ locDyDz

float TrajectoryAtInvalidHit::locDyDz
private

Definition at line 54 of file TrajectoryAtInvalidHit.h.

◆ locX

float TrajectoryAtInvalidHit::locX
private

Definition at line 52 of file TrajectoryAtInvalidHit.h.

◆ locXError

float TrajectoryAtInvalidHit::locXError
private

Definition at line 53 of file TrajectoryAtInvalidHit.h.

◆ locY

float TrajectoryAtInvalidHit::locY
private

Definition at line 52 of file TrajectoryAtInvalidHit.h.

◆ locYError

float TrajectoryAtInvalidHit::locYError
private

Definition at line 53 of file TrajectoryAtInvalidHit.h.

◆ locZ

float TrajectoryAtInvalidHit::locZ
private

Definition at line 52 of file TrajectoryAtInvalidHit.h.

◆ theCombinedPredictedState

TrajectoryStateOnSurface TrajectoryAtInvalidHit::theCombinedPredictedState
private

Definition at line 51 of file TrajectoryAtInvalidHit.h.

◆ theHit

TrackingRecHit::ConstRecHitPointer TrajectoryAtInvalidHit::theHit
private

Definition at line 60 of file TrajectoryAtInvalidHit.h.

TrajectoryAtInvalidHit::iidd
unsigned int iidd
Definition: TrajectoryAtInvalidHit.h:56
geometryCSVtoXML.zz
zz
Definition: geometryCSVtoXML.py:19
TrajectoryAtInvalidHit::locDxDz
float locDxDz
Definition: TrajectoryAtInvalidHit.h:54
GeomDet
Definition: GeomDet.h:27
LocalTrajectoryError::positionError
LocalError positionError() const
Definition: LocalTrajectoryError.h:81
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
min
T min(T a, T b)
Definition: MathUtil.h:58
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
gather_cfg.cout
cout
Definition: gather_cfg.py:144
StripSubdetector
Definition: StripSubdetector.h:12
TrajectoryAtInvalidHit::theHit
TrackingRecHit::ConstRecHitPointer theHit
Definition: TrajectoryAtInvalidHit.h:60
GluedGeomDet::monoDet
const GeomDetUnit * monoDet() const
Definition: GluedGeomDet.h:19
Surface
Definition: Surface.h:36
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
TrackerTopology::tidRing
unsigned int tidRing(const DetId &id) const
Definition: TrackerTopology.h:218
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
DetId
Definition: DetId.h:17
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
TrajectoryAtInvalidHit::isDoubleSided
bool isDoubleSided(unsigned int iidd, const TrackerTopology *tTopo) const
Definition: TrajectoryAtInvalidHit.cc:160
TrackCandidateProducer_cfi.propagator
propagator
Definition: TrackCandidateProducer_cfi.py:17
TrajectoryMeasurement::backwardPredictedState
TrajectoryStateOnSurface const & backwardPredictedState() const
Access to backward predicted state (from smoother)
Definition: TrajectoryMeasurement.h:179
Bounds::inside
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
LocalError::xx
float xx() const
Definition: LocalError.h:22
TrajectoryMeasurement::forwardPredictedState
TrajectoryStateOnSurface const & forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
Definition: TrajectoryMeasurement.h:177
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Surface::bounds
const Bounds & bounds() const
Definition: Surface.h:87
TrajectoryAtInvalidHit::theCombinedPredictedState
TrajectoryStateOnSurface theCombinedPredictedState
Definition: TrajectoryAtInvalidHit.h:51
StripSubdetector::TIB
static constexpr auto TIB
Definition: StripSubdetector.h:16
LocalTrajectoryParameters::vector
AlgebraicVector5 vector() const
Definition: LocalTrajectoryParameters.h:120
Point3DBase< float, LocalTag >
GluedGeomDet
Definition: GluedGeomDet.h:7
TrajectoryAtInvalidHit::locXError
float locXError
Definition: TrajectoryAtInvalidHit.h:53
TrajectoryStateOnSurface::localParameters
const LocalTrajectoryParameters & localParameters() const
Definition: TrajectoryStateOnSurface.h:73
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition: PbPb_ZMuSkimMuonDPG_cff.py:60
TrajectoryAtInvalidHit::hasValidHit
bool hasValidHit
Definition: TrajectoryAtInvalidHit.h:58
GeomDet::geographicalId
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
TrajectoryAtInvalidHit::locZ
float locZ
Definition: TrajectoryAtInvalidHit.h:52
TrajectoryStateCombiner
Definition: TrajectoryStateCombiner.h:13
TrajectoryStateOnSurface::localPosition
LocalPoint localPosition() const
Definition: TrajectoryStateOnSurface.h:74
TrajectoryAtInvalidHit::globY
float globY
Definition: TrajectoryAtInvalidHit.h:55
geometryCSVtoXML.yy
yy
Definition: geometryCSVtoXML.py:19
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
TrajectoryAtInvalidHit::locDyDz
float locDyDz
Definition: TrajectoryAtInvalidHit.h:54
TrajectoryAtInvalidHit::globX
float globX
Definition: TrajectoryAtInvalidHit.h:55
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
TrackerTopology::tecRing
unsigned int tecRing(const DetId &id) const
ring id
Definition: TrackerTopology.h:217
TrajectoryAtInvalidHit::locX
float locX
Definition: TrajectoryAtInvalidHit.h:52
TrajectoryAtInvalidHit::globZ
float globZ
Definition: TrajectoryAtInvalidHit.h:55
fftjetvertexadder_cfi.sigmaX
sigmaX
Definition: fftjetvertexadder_cfi.py:30
TrajectoryMeasurement::recHit
ConstRecHitPointer const & recHit() const
Definition: TrajectoryMeasurement.h:190
GluedGeomDet::stereoDet
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:20
TrajectoryAtInvalidHit::acceptance
bool acceptance
Definition: TrajectoryAtInvalidHit.h:57
TrajectoryAtInvalidHit::locYError
float locYError
Definition: TrajectoryAtInvalidHit.h:53
TrackerTopology::tobLayer
unsigned int tobLayer(const DetId &id) const
Definition: TrackerTopology.h:147
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
fftjetvertexadder_cfi.sigmaY
sigmaY
Definition: fftjetvertexadder_cfi.py:31
StripSubdetector::TEC
static constexpr auto TEC
Definition: StripSubdetector.h:19
TrajectoryStateCombiner::combine
TSOS combine(const TSOS &pTsos1, const TSOS &pTsos2) const
Definition: TrajectoryStateCombiner.cc:6
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TrajectoryStateOnSurface::localError
const LocalTrajectoryError & localError() const
Definition: TrajectoryStateOnSurface.h:77
LocalError::yy
float yy() const
Definition: LocalError.h:24
geometryCSVtoXML.xx
xx
Definition: geometryCSVtoXML.py:19
StripSubdetector::TID
static constexpr auto TID
Definition: StripSubdetector.h:17
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
TrajectoryAtInvalidHit::locY
float locY
Definition: TrajectoryAtInvalidHit.h:52
TrackerTopology::tibLayer
unsigned int tibLayer(const DetId &id) const
Definition: TrackerTopology.h:150