149 double sCenergy = seedCluster->energy();
151 double scEta = seedCluster->eta();
153 double scz = sCposition.z();
154 double scr =
sqrt(
pow(sCposition.x(),2)+
pow(sCposition.y(),2));
156 double pT = sCenergy * seedCluster->position().rho()/
sqrt(seedCluster->x()*seedCluster->x()+seedCluster->y()*seedCluster->y()+seedCluster->z()*seedCluster->z());
158 double magneticField = 3.8;
161 double phiVsRSlope = -3.00e-3 * magneticField / pT / 2.;
166 GlobalPoint superCluster(sCposition.x(),sCposition.y(),sCposition.z());
175 int chargeHypothesis;
176 double chargeSelector = sCenergy - (int)sCenergy;
177 if(chargeSelector >= 0.5) chargeHypothesis = -1;
178 if(chargeSelector < 0.5) chargeHypothesis = 1;
182 double phiFake =
phiDiff(superCluster.phi(),chargeHypothesis * phiVsRSlope * (scr - rFake));
183 double zFake = (rFake*(scz-z0)-r0*scz+scr*z0)/(scr-r0);
184 double xFake = rFake *
cos(phiFake);
185 double yFake = rFake *
sin(phiFake);
201 std::vector<BarrelDetLayer*> tibLayers = gst->tibLayers();
205 std::vector<ForwardDetLayer*> tecLayers;
206 std::vector<ForwardDetLayer*> tidLayers;
208 tecLayers = gst->negTecLayers();
209 tidLayers = gst->negTidLayers();
212 tecLayers = gst->posTecLayers();
213 tidLayers = gst->posTidLayers();
242 bool hasLay1Hit =
false;
243 bool hasLay2Hit =
false;
244 bool hasBackupHit =
false;
248 std::vector<TrajectoryMeasurement> tib1measurements;
250 std::vector<TrajectoryMeasurement> tib2measurements;
257 for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tib1measurements.begin(); tmIter != tib1measurements.end(); ++ tmIter){
262 if(
preselection(position, superCluster, phiVsRSlope, 1)){
269 for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tib2measurements.begin(); tmIter != tib2measurements.end(); ++ tmIter){
274 if(
preselection(position, superCluster, phiVsRSlope, 1)){
281 if(!(hasLay1Hit && hasLay2Hit)) useTID =
true;
283 std::vector<TrajectoryMeasurement> tid1measurements;
284 if(useDL.at(2) && useTID) tid1measurements = layerMeasurements.measurements(*tid1,initialTSOS,*
thePropagator,*
theEstimator);
285 std::vector<TrajectoryMeasurement> tid2measurements;
286 if(useDL.at(3) && useTID) tid2measurements = layerMeasurements.measurements(*tid2,initialTSOS,*
thePropagator,*
theEstimator);
287 std::vector<TrajectoryMeasurement> tid3measurements;
288 if(useDL.at(4) && useTID) tid3measurements = layerMeasurements.measurements(*tid3,initialTSOS,*
thePropagator,*
theEstimator);
290 for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tid1measurements.begin(); tmIter != tid1measurements.end(); ++ tmIter){
296 if(
preselection(position, superCluster, phiVsRSlope, 2)){
307 if(
preselection(position, superCluster, phiVsRSlope, 4) && position.
perp() > 37.){
317 for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tid2measurements.begin(); tmIter != tid2measurements.end(); ++ tmIter){
323 if(
preselection(position, superCluster, phiVsRSlope, 2)){
334 if(
preselection(position, superCluster, phiVsRSlope, 4) && position.
perp() > 37.){
344 for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tid3measurements.begin(); tmIter != tid3measurements.end(); ++ tmIter){
350 if(
preselection(position, superCluster, phiVsRSlope, 2)){
361 if(
preselection(position, superCluster, phiVsRSlope, 4) && position.
perp() > 37.){
371 std::vector<TrajectoryMeasurement> tec1measurements;
373 std::vector<TrajectoryMeasurement> tec2measurements;
375 std::vector<TrajectoryMeasurement> tec3measurements;
378 for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tec1measurements.begin(); tmIter != tec1measurements.end(); ++ tmIter){
384 if(
preselection(position, superCluster, phiVsRSlope, 3)){
395 for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tec2measurements.begin(); tmIter != tec2measurements.end(); ++ tmIter){
401 if(
preselection(position, superCluster, phiVsRSlope, 3)){
412 for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tec3measurements.begin(); tmIter != tec3measurements.end(); ++ tmIter){
418 if(
preselection(position, superCluster, phiVsRSlope, 3)){
428 if( hasLay1Hit && hasLay2Hit ){
430 for (std::vector<const SiStripMatchedRecHit2D*>::const_iterator hit1 =
layer1Hits_.begin() ; hit1!=
layer1Hits_.end(); ++hit1) {
431 for (std::vector<const SiStripMatchedRecHit2D*>::const_iterator hit2 =
layer2Hits_.begin() ; hit2!=
layer2Hits_.end(); ++hit2) {
450 seed.setCaloCluster(caloCluster) ;
465 if(hasLay1Hit && hasBackupHit && seedCounter == 0){
467 for (std::vector<const SiStripMatchedRecHit2D*>::const_iterator hit1 =
layer1Hits_.begin() ; hit1!=
layer1Hits_.end(); ++hit1) {
482 outerHit=
new SiStripRecHit2D(*(dynamic_cast <const SiStripRecHit2D *> (*hit2) ) );
488 seed.setCaloCluster(caloCluster) ;
bool checkHitsAndTSOS(std::vector< const SiStripMatchedRecHit2D * >::const_iterator hit1, std::vector< const SiStripMatchedRecHit2D * >::const_iterator hit2, double scr, double scz, double pT, double scEta)
std::vector< bool > useDetLayer(double scEta)
Sin< T >::type sin(const T &t)
const MeasurementTracker * theMeasurementTracker
Chi2MeasurementEstimator * theEstimator
const SiStripMatchedRecHit2D * matchedHitConverter(ConstRecHitPointer crhp)
PRecHitContainer recHits_
Cos< T >::type cos(const T &t)
const edm::EventSetup * theSetup
edm::ESHandle< TrackerGeometry > trackerGeometryHandle
PropagatorWithMaterial * thePropagator
bool preselection(GlobalPoint position, GlobalPoint superCluster, double phiVsRSlope, int hitLayer)
virtual LocalPoint localPosition() const
const SiStripRecHit2D * backupHitConverter(ConstRecHitPointer crhp)
bool altCheckHitsAndTSOS(std::vector< const SiStripMatchedRecHit2D * >::const_iterator hit1, std::vector< const SiStripRecHit2D * >::const_iterator hit2, double scr, double scz, double pT, double scEta)
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< const SiStripMatchedRecHit2D * > layer2Hits_
double phiDiff(double phi1, double phi2)
PTrajectoryStateOnDet pts_
static int position[264][3]
std::vector< const SiStripRecHit2D * > backupLayer2Hits_
DetId geographicalId() const
std::vector< const SiStripMatchedRecHit2D * > layer1Hits_
Power< A, B >::type pow(const A &a, const B &b)