CMS 3D CMS Logo

CSCPairResidualsConstraint.h
Go to the documentation of this file.
1 #ifndef Alignment_MuonAlignmentAlgorithms_CSCPairResidualsConstraint_H
2 #define Alignment_MuonAlignmentAlgorithms_CSCPairResidualsConstraint_H
3 
10 #include <fstream>
11 
12 #include "TH1F.h"
13 
24 
26 
28 public:
29  CSCPairResidualsConstraint(unsigned int identifier, int i, int j, CSCDetId id_i, CSCDetId id_j)
30  : CSCPairConstraint(i, j, 0., 0.),
31  m_identifier(identifier),
32  m_id_i(id_i),
33  m_id_j(id_j),
34  m_sum1(0.),
35  m_sumx(0.),
36  m_sumy(0.),
37  m_sumxx(0.),
38  m_sumyy(0.),
39  m_sumxy(0.),
40  m_sumN(0),
41  m_Zplane(1000.),
42  m_iZ1(1000.),
43  m_iZ6(1000.),
44  m_jZ1(1000.),
45  m_jZ6(1000.),
46  m_cscGeometry(nullptr),
47  m_propagator(nullptr){};
49 
51 
52  double value() const override;
53  double error() const override;
54  CSCDetId id_i() const { return m_id_i; };
55  CSCDetId id_j() const { return m_id_j; };
56  bool valid() const override;
57  double radius(bool is_i) const {
58  return m_cscGeometry->idToDet((is_i ? m_id_i : m_id_j))->surface().position().perp();
59  };
60 
62  void setZplane(const CSCGeometry *cscGeometry);
63  void setPropagator(const Propagator *propagator);
64  bool addTrack(const std::vector<TrajectoryMeasurement> &measurements,
66  const TrackTransformer *trackTransformer);
67 
68  void write(std::ofstream &output);
69  void read(std::vector<std::ifstream *> &input, std::vector<std::string> &filenames);
70 
71 protected:
72  void calculatePhi(
73  const TransientTrackingRecHit *hit, double &phi, double &phierr2, bool doRphi = false, bool globalPhi = false);
74  bool isFiducial(std::vector<const TransientTrackingRecHit *> &hits, bool is_i);
75  bool dphidzFromTrack(const std::vector<TrajectoryMeasurement> &measurements,
77  const TrackTransformer *trackTransformer,
78  double &drphidz);
79 
80  unsigned int m_identifier;
83  int m_sumN;
84 
86 
91 
94  TH1F *m_radial;
95 };
96 
97 #endif // Alignment_MuonAlignmentAlgorithms_CSCPairResidualsConstraint_H
Propagator.h
CSCPairResidualsConstraint::m_sumxy
double m_sumxy
Definition: CSCPairResidualsConstraint.h:82
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11779
input
static const std::string input
Definition: EdmProvDump.cc:48
CSCPairResidualsConstraint::setZplane
void setZplane(const CSCGeometry *cscGeometry)
Definition: CSCPairResidualsConstraint.cc:62
CSCPairResidualsConstraint::m_jZ6
double m_jZ6
Definition: CSCPairResidualsConstraint.h:87
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
CSCPairResidualsConstraint::m_propagator
const Propagator * m_propagator
Definition: CSCPairResidualsConstraint.h:89
CSCPairResidualsConstraint::m_sumx
double m_sumx
Definition: CSCPairResidualsConstraint.h:82
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
CSCGeometry::idToDet
const GeomDet * idToDet(DetId) const override
Definition: CSCGeometry.cc:91
CSCPairResidualsConstraint::read
void read(std::vector< std::ifstream * > &input, std::vector< std::string > &filenames)
Definition: CSCPairResidualsConstraint.cc:574
CSCPairResidualsConstraint::m_Zsurface
Plane::PlanePointer m_Zsurface
Definition: CSCPairResidualsConstraint.h:90
CSCPairResidualsConstraint::CSCPairResidualsConstraint
CSCPairResidualsConstraint(unsigned int identifier, int i, int j, CSCDetId id_i, CSCDetId id_j)
Definition: CSCPairResidualsConstraint.h:29
CSCPairResidualsConstraint::m_Zplane
double m_Zplane
Definition: CSCPairResidualsConstraint.h:87
CSCPairResidualsConstraint::m_iZ6
double m_iZ6
Definition: CSCPairResidualsConstraint.h:87
CSCPairResidualsConstraint::m_jZ1
double m_jZ1
Definition: CSCPairResidualsConstraint.h:87
TrajectoryMeasurement.h
ReferenceCountingPointer< Plane >
TransientTrack.h
CSCDetId.h
CSCPairResidualsConstraint::m_sumN
int m_sumN
Definition: CSCPairResidualsConstraint.h:83
CSCPairResidualsConstraint::m_cscGeometry
const CSCGeometry * m_cscGeometry
Definition: CSCPairResidualsConstraint.h:88
CSCGeometry
Definition: CSCGeometry.h:24
Propagator
Definition: Propagator.h:44
Plane.h
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
CSCPairResidualsConstraint::calculatePhi
void calculatePhi(const TransientTrackingRecHit *hit, double &phi, double &phierr2, bool doRphi=false, bool globalPhi=false)
Definition: CSCPairResidualsConstraint.cc:628
TrackCandidateProducer_cfi.propagator
propagator
Definition: TrackCandidateProducer_cfi.py:17
CSCPairResidualsConstraint::id_i
CSCDetId id_i() const
Definition: CSCPairResidualsConstraint.h:54
CSCPairResidualsConstraint::m_id_j
CSCDetId m_id_j
Definition: CSCPairResidualsConstraint.h:81
CSCPairResidualsConstraint::error
double error() const override
Definition: CSCPairResidualsConstraint.cc:20
CSCPairResidualsConstraint::kModePhiy
Definition: CSCPairResidualsConstraint.h:50
CSCPairResidualsConstraint::m_sum1
double m_sum1
Definition: CSCPairResidualsConstraint.h:82
CSCPairResidualsConstraint
Definition: CSCPairResidualsConstraint.h:27
CSCPairResidualsConstraint::write
void write(std::ofstream &output)
Definition: CSCPairResidualsConstraint.cc:567
CSCPairResidualsConstraint::m_sumyy
double m_sumyy
Definition: CSCPairResidualsConstraint.h:82
CSCPairResidualsConstraint::dphidzFromTrack
bool dphidzFromTrack(const std::vector< TrajectoryMeasurement > &measurements, const reco::TransientTrack &track, const TrackTransformer *trackTransformer, double &drphidz)
Definition: CSCPairResidualsConstraint.cc:461
CSCPairResidualsConstraint::id_j
CSCDetId id_j() const
Definition: CSCPairResidualsConstraint.h:55
CSCPairResidualsConstraint::m_identifier
unsigned int m_identifier
Definition: CSCPairResidualsConstraint.h:80
CSCPairResidualsConstraint::m_jZ
double m_jZ
Definition: CSCPairResidualsConstraint.h:87
CSCPairResidualsConstraint::kModeRadius
Definition: CSCPairResidualsConstraint.h:50
CSCPairResidualsConstraint::kModePhiz
Definition: CSCPairResidualsConstraint.h:50
CSCPairResidualsConstraint::configure
void configure(CSCOverlapsAlignmentAlgorithm *parent)
Definition: CSCPairResidualsConstraint.cc:38
CSCDetId
Definition: CSCDetId.h:26
CSCOverlapsAlignmentAlgorithm
Definition: CSCOverlapsAlignmentAlgorithm.h:61
CSCPairResidualsConstraint::kModePhiPos
Definition: CSCPairResidualsConstraint.h:50
CSCPairResidualsConstraint::m_averageRadius
double m_averageRadius
Definition: CSCPairResidualsConstraint.h:87
TrackTransformer.h
CSCPairResidualsConstraint::value
double value() const override
Definition: CSCPairResidualsConstraint.cc:9
CSCPairResidualsConstraint::valid
bool valid() const override
Definition: CSCPairResidualsConstraint.cc:36
TrackingRecHit
Definition: TrackingRecHit.h:21
CSCPairConstraint::i
virtual int i() const
Definition: CSCPairConstraint.h:19
DDAxes::phi
GloballyPositioned::position
const PositionType & position() const
Definition: GloballyPositioned.h:36
CSCPairResidualsConstraint::addTrack
bool addTrack(const std::vector< TrajectoryMeasurement > &measurements, const reco::TransientTrack &track, const TrackTransformer *trackTransformer)
Definition: CSCPairResidualsConstraint.cc:89
CSCPairResidualsConstraint::setPropagator
void setPropagator(const Propagator *propagator)
Definition: CSCPairResidualsConstraint.cc:87
reco::TransientTrack
Definition: TransientTrack.h:19
DetId.h
CSCPairResidualsConstraint::isFiducial
bool isFiducial(std::vector< const TransientTrackingRecHit * > &hits, bool is_i)
Definition: CSCPairResidualsConstraint.cc:694
CSCPairResidualsConstraint::m_id_i
CSCDetId m_id_i
Definition: CSCPairResidualsConstraint.h:81
CSCPairResidualsConstraint::m_sumy
double m_sumy
Definition: CSCPairResidualsConstraint.h:82
CSCPairResidualsConstraint::m_sumxx
double m_sumxx
Definition: CSCPairResidualsConstraint.h:82
CSCPairResidualsConstraint::radius
double radius(bool is_i) const
Definition: CSCPairResidualsConstraint.h:57
CSCPairResidualsConstraint::m_offsetResiduals
TH1F * m_offsetResiduals
Definition: CSCPairResidualsConstraint.h:93
CSCPairConstraint
Definition: CSCPairConstraint.h:14
CSCPairResidualsConstraint::~CSCPairResidualsConstraint
~CSCPairResidualsConstraint() override
Definition: CSCPairResidualsConstraint.h:48
CSCPairConstraint.h
CSCPairResidualsConstraint::m_slopeResiduals
TH1F * m_slopeResiduals
Definition: CSCPairResidualsConstraint.h:92
ParameterSet.h
CSCPairConstraint::j
virtual int j() const
Definition: CSCPairConstraint.h:20
CSCPairResidualsConstraint::m_radial
TH1F * m_radial
Definition: CSCPairResidualsConstraint.h:94
CSCPairResidualsConstraint::m_parent
CSCOverlapsAlignmentAlgorithm * m_parent
Definition: CSCPairResidualsConstraint.h:85
class-composition.parent
parent
Definition: class-composition.py:88
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
hit
Definition: SiStripHitEffFromCalibTree.cc:88
CSCGeometry.h
CSCPairResidualsConstraint::m_iZ
double m_iZ
Definition: CSCPairResidualsConstraint.h:87
CSCPairResidualsConstraint::m_iZ1
double m_iZ1
Definition: CSCPairResidualsConstraint.h:87
TrackTransformer
Definition: TrackTransformer.h:46