CMS 3D CMS Logo

ConversionProducer.h
Go to the documentation of this file.
1 #ifndef RecoEgamma_EgammaPhotonProducers_ConversionProducer_h
2 #define RecoEgamma_EgammaPhotonProducers_ConversionProducer_h
3 
10 // user include files
13 
16 
20 
22 
23 //ECAL clusters
36 
45 
46 //Tracker tracks
50 
51 //photon data format
58 
63 
66 
68 public:
69  explicit ConversionProducer(const edm::ParameterSet&);
70  ~ConversionProducer() override;
71 
72 private:
73  void produce(edm::Event&, const edm::EventSetup&) override;
74 
76  std::multimap<double, reco::CaloClusterPtr>& basicClusterPtrs,
77  std::multimap<double, reco::CaloClusterPtr>& superClusterPtrs);
78 
79  // ----------member data ---------------------------
81 
83  typedef std::vector<Point> PointCollection;
84 
86 
92 
96 
98 
100 
101  bool usePvtx_; //if use primary vertices
104 
106 
107  double deltaEta_;
108 
109  double halfWayEta_, halfWayPhi_; //halfway open angle to search in basic clusters
110  unsigned int maxNumOfTrackInPU_;
111  double maxTrackZ_;
112  double maxTrackRho_;
113  double minSCEt_;
116  double energyBC_; //1.5GeV for track BC selection
117  double energyTotalBC_; //5GeV for track pair BC selection
118  double d0Cut_; //0 for d0*charge cut
119  double dzCut_; //innerposition of z diff cut
120  double dEtaTkBC_, dPhiTkBC_; //0.06 0.6 for track and BC matching
121 
122  double maxChi2Left_, maxChi2Right_; //5. 5. for track chi2 quality
123  double minHitsLeft_, minHitsRight_; //5 2 for track hits quality
124 
126  minApproachHigh_; //0.02 0.2 for track pair open angle and > -0.1 cm
127 
128  double r_cut; //cross_r cut
129  double vtxChi2_; //vertex chi2 probablity cut
130 
131  bool allowSingleLeg_; //if single track conversion ?
132  bool rightBC_; //if right leg requires matching BC?
133 
135  const edm::EventSetup& iSetup,
136  const std::multimap<float, edm::Ptr<reco::ConversionTrack> >& allTracks,
137  const std::multimap<double, reco::CaloClusterPtr>& superClusterPtrs,
138  const std::multimap<double, reco::CaloClusterPtr>& basicClusterPtrs,
139  const reco::Vertex& the_pvtx,
140  reco::ConversionCollection& outputConvPhotonCollection);
141 
142  //track quality cut, returns pass or no
143  inline bool trackQualityFilter(const edm::RefToBase<reco::Track>& ref, bool isLeft);
144  inline bool trackD0Cut(const edm::RefToBase<reco::Track>& ref);
145  inline bool trackD0Cut(const edm::RefToBase<reco::Track>& ref, const reco::Vertex& the_pvtx);
146 
147  //track impact point at ECAL wall, returns validity to access position ew
148  bool getTrackImpactPosition(const reco::Track* tk_ref,
149  const TrackerGeometry* trackerGeom,
150  const MagneticField* magField,
151  math::XYZPointF& ew);
152 
153  //distance at min approaching point, returns distance
154  // double getMinApproach(const edm::RefToBase<reco::Track>& ll, const edm::RefToBase<reco::Track>& rr,
155  // const MagneticField* magField);
156 
157  bool preselectTrackPair(const reco::TransientTrack& ttk_l, const reco::TransientTrack& ttk_r, double& appDist);
158 
159  //cut-based selection, TODO remove global cut variables
162 
163  //kinematic vertex fitting, return true for valid vertex
164  bool checkVertex(const reco::TransientTrack& ttk_l,
165  const reco::TransientTrack& ttk_r,
166  const MagneticField* magField,
167  reco::Vertex& the_vertex);
168  bool checkPhi(const edm::RefToBase<reco::Track>& tk_l,
169  const edm::RefToBase<reco::Track>& tk_r,
170  const TrackerGeometry* trackerGeom,
171  const MagneticField* magField,
172  const reco::Vertex& the_vertex);
173 
174  //check the closest BC, returns true for found a BC
175  bool getMatchedBC(const std::multimap<double, reco::CaloClusterPtr>& bcMap,
176  const math::XYZPointF& trackImpactPosition,
177  reco::CaloClusterPtr& closestBC);
178 
179  // finds the super cluster matching with at least one track in the pair
180  bool matchingSC(const std::multimap<double, reco::CaloClusterPtr>& scMap,
183 
184  double etaTransformation(float EtaParticle, float Zvertex);
185 
187 
189 };
190 
191 inline const GeomDet* recHitDet(const TrackingRecHit& hit, const TrackingGeometry* geom) {
192  return geom->idToDet(hit.geographicalId());
193 }
194 
196  return recHitDet(hit, geom)->surface();
197 }
198 
200  return s.toLocal(GlobalVector(v.x(), v.y(), v.z()));
201 }
202 
203 #endif
Vector3DBase< float, LocalTag >
ConversionProducer::deltaCotTheta_
double deltaCotTheta_
Definition: ConversionProducer.h:125
ConversionProducer::halfWayEta_
double halfWayEta_
Definition: ConversionProducer.h:109
reco::Conversion
Definition: Conversion.h:23
recHitDet
const GeomDet * recHitDet(const TrackingRecHit &hit, const TrackingGeometry *geom)
Definition: ConversionProducer.h:191
ConversionProducer::bypassPreselEcal_
bool bypassPreselEcal_
Definition: ConversionProducer.h:99
ConversionProducer::energyBC_
double energyBC_
Definition: ConversionProducer.h:116
ConversionProducer::d0Cut_
double d0Cut_
Definition: ConversionProducer.h:118
ConversionProducer::getMatchedBC
bool getMatchedBC(const std::multimap< double, reco::CaloClusterPtr > &bcMap, const math::XYZPointF &trackImpactPosition, reco::CaloClusterPtr &closestBC)
Definition: ConversionProducer.cc:667
MessageLogger.h
TrackerGeometry.h
TrackingGeometry
Definition: TrackingGeometry.h:26
ConversionProducer::transientTrackBuilder_
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transientTrackBuilder_
Definition: ConversionProducer.h:93
GeomDet
Definition: GeomDet.h:27
ConversionProducer::dzCut_
double dzCut_
Definition: ConversionProducer.h:119
ConversionProducer::minHitsLeft_
double minHitsLeft_
Definition: ConversionProducer.h:123
ConversionProducer::allowD0_
bool allowD0_
Definition: ConversionProducer.h:97
ESHandle.h
ConversionProducer::trackQualityFilter
bool trackQualityFilter(const edm::RefToBase< reco::Track > &ref, bool isLeft)
Definition: ConversionProducer.cc:573
BoundDisk.h
conv
static HepMC::IO_HEPEVT conv
Definition: BeamHaloProducer.cc:48
ConversionProducer::allowOppCharge_
bool allowOppCharge_
Definition: ConversionProducer.h:97
BasicCluster.h
edm::EDGetTokenT
Definition: EDGetToken.h:33
findQualityFiles.rr
string rr
Definition: findQualityFiles.py:185
ConversionProducer::buildCollection
void buildCollection(edm::Event &iEvent, const edm::EventSetup &iSetup, const std::multimap< float, edm::Ptr< reco::ConversionTrack > > &allTracks, const std::multimap< double, reco::CaloClusterPtr > &superClusterPtrs, const std::multimap< double, reco::CaloClusterPtr > &basicClusterPtrs, const reco::Vertex &the_pvtx, reco::ConversionCollection &outputConvPhotonCollection)
Definition: ConversionProducer.cc:275
ConversionProducer::checkTrackPair
bool checkTrackPair(const std::pair< edm::RefToBase< reco::Track >, reco::CaloClusterPtr > &ll, const std::pair< edm::RefToBase< reco::Track >, reco::CaloClusterPtr > &rr)
Definition: ConversionProducer.cc:807
KinematicParticle.h
SimpleCylinderBounds.h
ConversionProducer::allowSingleLeg_
bool allowSingleLeg_
Definition: ConversionProducer.h:131
ConversionProducer::bypassPreselEcalEcal_
bool bypassPreselEcalEcal_
Definition: ConversionProducer.h:99
muonTagProbeFilters_cff.allTracks
allTracks
Definition: muonTagProbeFilters_cff.py:22
recHitSurface
const BoundPlane & recHitSurface(const TrackingRecHit &hit, const TrackingGeometry *geom)
Definition: ConversionProducer.h:195
EDProducer.h
Surface
Definition: Surface.h:36
ConversionProducer::buildSuperAndBasicClusterGeoMap
void buildSuperAndBasicClusterGeoMap(const edm::Event &, std::multimap< double, reco::CaloClusterPtr > &basicClusterPtrs, std::multimap< double, reco::CaloClusterPtr > &superClusterPtrs)
Definition: ConversionProducer.cc:226
ConversionProducer::minHitsRight_
double minHitsRight_
Definition: ConversionProducer.h:123
ConversionProducer::matchingSC
bool matchingSC(const std::multimap< double, reco::CaloClusterPtr > &scMap, reco::Conversion &conv, reco::CaloClusterPtrVector &mSC)
Definition: ConversionProducer.cc:638
PhotonFwd.h
ConversionProducer::PointCollection
std::vector< Point > PointCollection
Definition: ConversionProducer.h:83
ConversionProducer::maxChi2Left_
double maxChi2Left_
Definition: ConversionProducer.h:122
ConversionProducer::trackD0Cut
bool trackD0Cut(const edm::RefToBase< reco::Track > &ref)
Definition: ConversionProducer.cc:584
ConversionProducer::thettbuilder_
const TransientTrackBuilder * thettbuilder_
Definition: ConversionProducer.h:105
BoundCylinder.h
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
ConversionProducer::deltaEta_
double deltaEta_
Definition: ConversionProducer.h:107
TransientTrack.h
findQualityFiles.v
v
Definition: findQualityFiles.py:179
ConversionFwd.h
ConversionProducer::dEtaTkBC_
double dEtaTkBC_
Definition: ConversionProducer.h:120
ConversionProducer::maxTrackZ_
double maxTrackZ_
Definition: ConversionProducer.h:111
ESGetToken.h
KinematicParticleVertexFitter.h
ConversionProducer::minApproachLow_
double minApproachLow_
Definition: ConversionProducer.h:125
ConversionProducer::preselectTrackPair
bool preselectTrackPair(const reco::TransientTrack &ttk_l, const reco::TransientTrack &ttk_r, double &appDist)
Definition: ConversionProducer.cc:752
BasicClusterFwd.h
reco::ConversionCollection
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
Definition: ConversionFwd.h:9
ConversionVertexFinder
Definition: ConversionVertexFinder.h:29
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
MakerMacros.h
Photon.h
ConversionProducer::usePvtx_
bool usePvtx_
Definition: ConversionProducer.h:101
alignCSCRings.s
s
Definition: alignCSCRings.py:92
ConversionProducer::allowDeltaPhi_
bool allowDeltaPhi_
Definition: ConversionProducer.h:97
Track.h
TrackFwd.h
ConversionProducer::energyTotalBC_
double energyTotalBC_
Definition: ConversionProducer.h:117
edm::PtrVector< CaloCluster >
ConversionProducer::toFConverterV
math::XYZVectorF toFConverterV(const math::XYZVector &val)
Definition: ConversionProducer.h:188
ConversionProducer::allowTrackBC_
bool allowTrackBC_
Definition: ConversionProducer.h:97
ConversionProducer::checkPhi
bool checkPhi(const edm::RefToBase< reco::Track > &tk_l, const edm::RefToBase< reco::Track > &tk_r, const TrackerGeometry *trackerGeom, const MagneticField *magField, const reco::Vertex &the_vertex)
Definition: ConversionProducer.cc:699
reco::Track
Definition: Track.h:27
IdealMagneticFieldRecord.h
ConversionProducer::toFConverterP
math::XYZPointF toFConverterP(const math::XYZPoint &val)
Definition: ConversionProducer.h:186
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
ConversionProducer::deltaPhi_
double deltaPhi_
Definition: ConversionProducer.h:125
ConversionProducer::r_cut
double r_cut
Definition: ConversionProducer.h:128
KinematicVertex.h
ConversionProducer::dEtacutForSCmatching_
double dEtacutForSCmatching_
Definition: ConversionProducer.h:114
VertexState.h
ConversionProducer::vtxChi2_
double vtxChi2_
Definition: ConversionProducer.h:129
ConversionProducer::ConversionProducer
ConversionProducer(const edm::ParameterSet &)
Definition: ConversionProducer.cc:65
ConversionTrackFwd.h
ConversionProducer
Definition: ConversionProducer.h:67
KinematicTree.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Vertex.h
ConversionProducer::theVertexFinder_
ConversionVertexFinder * theVertexFinder_
Definition: ConversionProducer.h:103
ConversionProducer::scEndcapProducer_
edm::EDGetTokenT< edm::View< reco::CaloCluster > > scEndcapProducer_
Definition: ConversionProducer.h:88
TrackerDigiGeometryRecord.h
TransientTrackBuilder.h
edm::ParameterSet
Definition: ParameterSet.h:47
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
Event.h
ConversionProducer::bcBarrelCollection_
edm::EDGetTokenT< edm::View< reco::CaloCluster > > bcBarrelCollection_
Definition: ConversionProducer.h:89
ConversionProducer::vertexProducer_
edm::EDGetTokenT< reco::VertexCollection > vertexProducer_
Definition: ConversionProducer.h:102
ConversionProducer::allowMinApproach_
bool allowMinApproach_
Definition: ConversionProducer.h:97
ConversionProducer::getTrackImpactPosition
bool getTrackImpactPosition(const reco::Track *tk_ref, const TrackerGeometry *trackerGeom, const MagneticField *magField, math::XYZPointF &ew)
Definition: ConversionProducer.cc:594
ConversionProducer::bypassPreselGsf_
bool bypassPreselGsf_
Definition: ConversionProducer.h:99
ConversionProducer::maxNumOfTrackInPU_
unsigned int maxNumOfTrackInPU_
Definition: ConversionProducer.h:110
ConversionProducer::rightBC_
bool rightBC_
Definition: ConversionProducer.h:132
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
ConversionProducer::minSCEt_
double minSCEt_
Definition: ConversionProducer.h:113
ConversionProducer::src_
edm::EDGetTokenT< edm::View< reco::ConversionTrack > > src_
Definition: ConversionProducer.h:85
ConversionProducer::~ConversionProducer
~ConversionProducer() override
Definition: ConversionProducer.cc:158
iEvent
int iEvent
Definition: GenABIO.cc:224
ConversionProducer::checkVertex
bool checkVertex(const reco::TransientTrack &ttk_l, const reco::TransientTrack &ttk_r, const MagneticField *magField, reco::Vertex &the_vertex)
Definition: ConversionProducer.cc:830
edm::stream::EDProducer
Definition: EDProducer.h:38
TransientTrackBuilder
Definition: TransientTrackBuilder.h:16
ConversionProducer::minApproachHigh_
double minApproachHigh_
Definition: ConversionProducer.h:125
MagneticField.h
edm::EventSetup
Definition: EventSetup.h:57
ConversionProducer::dPhiTkBC_
double dPhiTkBC_
Definition: ConversionProducer.h:120
TransientTrackRecord.h
ConversionProducer::dPhicutForSCmatching_
double dPhicutForSCmatching_
Definition: ConversionProducer.h:115
ConversionProducer::allowDeltaCot_
bool allowDeltaCot_
Definition: ConversionProducer.h:97
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord >
ConversionProducer::trackerGeometry_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometry_
Definition: ConversionProducer.h:94
edm::Ptr
Definition: AssociationVector.h:31
ConversionProducer::maxTrackRho_
double maxTrackRho_
Definition: ConversionProducer.h:112
TrackingRecHit
Definition: TrackingRecHit.h:21
ConversionProducer::Point
math::XYZPointF Point
Definition: ConversionProducer.h:82
ConversionProducer::allowVertex_
bool allowVertex_
Definition: ConversionProducer.h:97
VertexFwd.h
ConversionProducer::algoName_
std::string algoName_
Definition: ConversionProducer.h:80
ConversionProducer::halfWayPhi_
double halfWayPhi_
Definition: ConversionProducer.h:109
GeomDet.h
ReferenceCounted.h
heppy_batch.val
val
Definition: heppy_batch.py:351
ConversionProducer::bcEndcapCollection_
edm::EDGetTokenT< edm::View< reco::CaloCluster > > bcEndcapCollection_
Definition: ConversionProducer.h:90
ConversionProducer::ConvertedPhotonCollection_
std::string ConvertedPhotonCollection_
Definition: ConversionProducer.h:91
reco::TransientTrack
Definition: TransientTrack.h:19
SuperClusterFwd.h
ConversionProducer::maxChi2Right_
double maxChi2Right_
Definition: ConversionProducer.h:122
Frameworkfwd.h
ConversionProducer::magneticField_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticField_
Definition: ConversionProducer.h:95
SuperCluster.h
BoundPlane
toLocal
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
Definition: ConversionProducer.h:199
math::XYZVectorF
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float > > XYZVectorF
spatial vector with cartesian internal representation
Definition: Vector3D.h:16
ConversionProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: ConversionProducer.cc:165
edm::RefToBase< reco::Track >
TransientTrackKinematicParticle.h
SimpleDiskBounds.h
ParameterSet.h
ConversionProducer::etaTransformation
double etaTransformation(float EtaParticle, float Zvertex)
Definition: ConversionProducer.cc:845
math::XYZPointF
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
Definition: Point3D.h:10
edm::Event
Definition: Event.h:73
MagneticField
Definition: MagneticField.h:19
ConversionProducer::scBarrelProducer_
edm::EDGetTokenT< edm::View< reco::CaloCluster > > scBarrelProducer_
Definition: ConversionProducer.h:87
reco::Vertex
Definition: Vertex.h:35
hit
Definition: SiStripHitEffFromCalibTree.cc:88
reco::TrackBase::Vector
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:77
CaloCluster.h
TrackerGeometry
Definition: TrackerGeometry.h:14
Conversion.h