Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:26:12

0001 /*
0002  *  See header file for a description of this class.
0003  *
0004  *  \author M. Maggi -- INFN
0005  */
0006 #include "RecoLocalMuon/GEMRecHit/interface/GEMCluster.h"
0007 #include "RecoLocalMuon/GEMRecHit/plugins/GEMRecHitStandardAlgo.h"
0008 #include "DataFormats/MuonDetId/interface/GEMDetId.h"
0009 #include "Geometry/GEMGeometry/interface/GEMEtaPartition.h"
0010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0011 #include "FWCore/Framework/interface/EventSetup.h"
0012 #include "FWCore/Utilities/interface/Exception.h"
0013 
0014 GEMRecHitStandardAlgo::GEMRecHitStandardAlgo(const edm::ParameterSet& config) : GEMRecHitBaseAlgo(config) {}
0015 
0016 GEMRecHitStandardAlgo::~GEMRecHitStandardAlgo() {}
0017 
0018 void GEMRecHitStandardAlgo::setES(const edm::EventSetup& setup) {}
0019 
0020 // First Step
0021 bool GEMRecHitStandardAlgo::compute(const GEMEtaPartition& roll,
0022                                     const GEMCluster& cluster,
0023                                     LocalPoint& Point,
0024                                     LocalError& error) const {
0025   // Get Average Strip position
0026   float fstrip = (roll.centreOfStrip(cluster.firstStrip())).x();
0027   float lstrip = (roll.centreOfStrip(cluster.lastStrip())).x();
0028   float centreOfCluster = (fstrip + lstrip) / 2;
0029 
0030   LocalPoint loctemp2(centreOfCluster, 0., 0.);
0031 
0032   Point = loctemp2;
0033   error = roll.localError((cluster.firstStrip() + cluster.lastStrip()) / 2., cluster.clusterSize());
0034   return true;
0035 }
0036 
0037 bool GEMRecHitStandardAlgo::compute(const GEMEtaPartition& roll,
0038                                     const GEMCluster& cl,
0039                                     const float& angle,
0040                                     const GlobalPoint& globPos,
0041                                     LocalPoint& Point,
0042                                     LocalError& error) const {
0043   // Glob Pos and angle not used so far...
0044   if (globPos.z() < 0) {
0045   }  // Fake use to avoid warnings
0046   if (angle < 0.) {
0047   }  // Fake use to avoid warnings
0048   this->compute(roll, cl, Point, error);
0049   return true;
0050 }