CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RoadSearchCloudMakerAlgorithm.h
Go to the documentation of this file.
1 #ifndef CloudMakerAlgorithm_h
2 #define CloudMakerAlgorithm_h
3 
4 //
5 // Package: RecoTracker/RoadSearchCloudMaker
6 // Class: RoadSearchCloudMakerAlgorithm
7 //
8 // Description:
9 // Road categories determined by outer Seed RecHit
10 // RPhi: outer Seed RecHit in the Barrel
11 // ZPhi: outer Seed RecHit in the Disks
12 // use inner and outer Seed RecHit and BeamSpot to calculate extrapolation
13 // RPhi: phi = phi0 + asin(k r)
14 // ZPhi: phi = phi0 + C z
15 // Loop over RoadSet, access Rings of Road
16 // get average radius of Ring
17 // use extrapolation to calculate phi_ref at average Ring radius
18 // determine window in phi for DetId lookup in the Ring
19 // phi_ref ± phi_window
20 // PARAMETER: phi_window = pi/24
21 // loop over DetId's in phi window in Ring
22 // two cases (problem of phi = 0/2pi):
23 // lower window border < upper window border
24 // upper window border < lower window border
25 // Loop over RecHits of DetId
26 // check compatibility of RecHit with extrapolation (delta phi cut)
27 // single layer sensor treatment
28 // RPhi:
29 // stereo and barrel single layer sensor
30 // calculate delta-phi
31 // disk single layer sensor (r coordinate not well defined)
32 // calculate delta phi between global positions of maximal strip extension and reference
33 // ZPhi:
34 // stereo sensor
35 // calculate delta-phi
36 // barrel single layer sensor (z coordinate not well defined)
37 // calculate delta phi between global positions of maximal strip extension and reference
38 // disk single layer sensor (tilted strips relative to local coordinate system of sensor
39 // calculate delta phi between global positions of maximal strip extension and reference
40 // Check delta phi cut
41 // cut value can be calculated based on extrapolation and Seed (pT dependent delta phi cut)
42 // currently: constant delta phi cut (PARAMETER)
43 // fill RecHit into Cloud
44 // do not fill more than 32 RecHits per DetID into cloud (PARAMETER)
45 // first stage of Cloud cleaning cuts:
46 // number of layers with hits in cloud (PARAMETER)
47 // number of layers with no hits in cloud (PARAMETER)
48 // number of consecutive layers with no hits in cloud (PARAMETER)
49 //
50 // Original Author: Oliver Gutsche, gutsche@fnal.gov
51 // Created: Sat Jan 14 22:00:00 UTC 2006
52 //
53 // $Author: burkett $
54 // $Date: 2007/08/30 14:59:11 $
55 // $Revision: 1.28 $
56 //
57 
58 #include <string>
59 #include <sstream>
60 
65 
71 
75 
77 
79 
81 
83 {
84  public:
85 
88 
91  const SiStripRecHit2DCollection* rphiRecHits,
92  const SiStripRecHit2DCollection* stereoRecHits,
93  const SiStripMatchedRecHit2DCollection* matchedRecHits,
94  const SiPixelRecHitCollection *pixRecHits,
95  const edm::EventSetup& es,
97 
98  unsigned int FillRecHitsIntoCloudGeneral(DetId id, double d0, double phi0, double k0, double phi1, double k1,
99  Roads::type roadType, double ringPhi,
100  const TrackerGeometry *tracker, const SiStripRecHitMatcher* theHitMatcher, RoadSearchCloud &cloud);
101 
102  unsigned int FillRecHitsIntoCloud(DetId id, const SiStripRecHit2DCollection* inputRecHits,
103  double d0, double phi0, double k0, Roads::type roadType, double ringPhi,
104  const TrackerGeometry *tracker, RoadSearchCloud &cloud);
105 
106 
107  unsigned int FillPixRecHitsIntoCloud(DetId id,
108  const SiPixelRecHitCollection *inputRecHits,
109  double d0, double phi0, double k0, Roads::type roadType, double ringPhi,
110  const TrackerGeometry *tracker, RoadSearchCloud &cloud);
111 
112  bool isSingleLayer(DetId id);
113 
114  bool isBarrelSensor(DetId id);
115 
116  double phiFromExtrapolation(double d0, double phi0, double k0, double ringRadius, Roads::type roadType);
117 
118  double phiMax(Roads::type roadType, double phi0, double k0);
119 
120  double map_phi(double phi);
121  double map_phi2(double phi);
122 
123  void makecircle(double x1_cs, double y1_cs,double x2_cs, double y2_cs,
124  double x3_cs, double y3_cs);
125 
126  double CheckXYIntersection(LocalPoint& ip1, LocalPoint& op1, LocalPoint& ip2, LocalPoint& op2);
127 
128  double CheckZPhiIntersection(double iPhi1, double iZ1, double oPhi1, double oZ1,
129  double iPhi2, double iZ2, double oPhi2, double oZ2);
130 
131  double ZPhiDeltaPhi(double phi1, double phi2, double phiExpect);
132 
134 
136  const GluedGeomDet* gluedDet,
137  const TrackerGeometry *tracker,
138  const SiStripRecHitMatcher* theHitMatcher,
139  double k0, double phi0);
140 
141  private:
142 
144  static double epsilon;
145  double d0h, phi0h, omegah;
146  double rphicsq;
149 
150  // general hit access for road search
152 
156  bool UsePixels;
164 
167  unsigned int maxRecHitsInCloud_;
168 
169  std::ostringstream output_;
171 
172  std::string roadsLabel_;
173 
174 };
175 
176 #endif
SiStripMatchedRecHit2D * CorrectMatchedHit(const TrackingRecHit *originalRH, const GluedGeomDet *gluedDet, const TrackerGeometry *tracker, const SiStripRecHitMatcher *theHitMatcher, double k0, double phi0)
unsigned int FillRecHitsIntoCloud(DetId id, const SiStripRecHit2DCollection *inputRecHits, double d0, double phi0, double k0, Roads::type roadType, double ringPhi, const TrackerGeometry *tracker, RoadSearchCloud &cloud)
double phiMax(Roads::type roadType, double phi0, double k0)
RoadSearchCloudCollection Clean(RoadSearchCloudCollection *rawColl)
void run(edm::Handle< RoadSearchSeedCollection > input, const SiStripRecHit2DCollection *rphiRecHits, const SiStripRecHit2DCollection *stereoRecHits, const SiStripMatchedRecHit2DCollection *matchedRecHits, const SiPixelRecHitCollection *pixRecHits, const edm::EventSetup &es, RoadSearchCloudCollection &output)
Runs the algorithm.
double CheckZPhiIntersection(double iPhi1, double iZ1, double oPhi1, double oZ1, double iPhi2, double iZ2, double oPhi2, double oZ2)
void makecircle(double x1_cs, double y1_cs, double x2_cs, double y2_cs, double x3_cs, double y3_cs)
double CheckXYIntersection(LocalPoint &ip1, LocalPoint &op1, LocalPoint &ip2, LocalPoint &op2)
double phiFromExtrapolation(double d0, double phi0, double k0, double ringRadius, Roads::type roadType)
double ZPhiDeltaPhi(double phi1, double phi2, double phiExpect)
tuple conf
Definition: dbtoconf.py:185
RoadSearchCloudMakerAlgorithm(const edm::ParameterSet &conf)
Definition: DetId.h:20
const SiPixelRecHitCollection thePixRecHits
type
Definition: Roads.h:45
unsigned int FillRecHitsIntoCloudGeneral(DetId id, double d0, double phi0, double k0, double phi1, double k1, Roads::type roadType, double ringPhi, const TrackerGeometry *tracker, const SiStripRecHitMatcher *theHitMatcher, RoadSearchCloud &cloud)
unsigned int FillPixRecHitsIntoCloud(DetId id, const SiPixelRecHitCollection *inputRecHits, double d0, double phi0, double k0, Roads::type roadType, double ringPhi, const TrackerGeometry *tracker, RoadSearchCloud &cloud)
std::vector< RoadSearchCloud > RoadSearchCloudCollection
Definition: DDAxes.h:10