File indexing completed on 2024-04-06 12:26:12
0001
0002
0003
0004
0005
0006 #include "RecoLocalMuon/GEMRecHit/interface/GEMRecHitBaseAlgo.h"
0007 #include "RecoLocalMuon/GEMRecHit/interface/GEMClusterizer.h"
0008 #include "RecoLocalMuon/GEMRecHit/interface/GEMMaskReClusterizer.h"
0009
0010 #include "Geometry/GEMGeometry/interface/GEMEtaPartition.h"
0011 #include "DataFormats/GEMDigi/interface/GEMDigiCollection.h"
0012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0013
0014 GEMRecHitBaseAlgo::GEMRecHitBaseAlgo(const edm::ParameterSet& config) {}
0015
0016 GEMRecHitBaseAlgo::~GEMRecHitBaseAlgo() {}
0017
0018
0019 edm::OwnVector<GEMRecHit> GEMRecHitBaseAlgo::reconstruct(const GEMEtaPartition& roll,
0020 const GEMDetId& gemId,
0021 const GEMDigiCollection::Range& digiRange,
0022 const EtaPartitionMask& mask) {
0023 edm::OwnVector<GEMRecHit> result;
0024
0025 GEMClusterizer clizer;
0026 GEMClusterContainer tcls = clizer.doAction(digiRange, mask);
0027 GEMMaskReClusterizer mrclizer;
0028 GEMClusterContainer cls = mrclizer.doAction(gemId, tcls, mask);
0029
0030 for (GEMClusterContainer::const_iterator cl = cls.begin(); cl != cls.end(); cl++) {
0031 LocalError tmpErr;
0032 LocalPoint point;
0033
0034 bool OK = this->compute(roll, *cl, point, tmpErr);
0035 if (!OK)
0036 continue;
0037
0038
0039 int firstClustStrip = cl->firstStrip();
0040 int clusterSize = cl->clusterSize();
0041 GEMRecHit* recHit = new GEMRecHit(gemId, cl->bx(), firstClustStrip, clusterSize, point, tmpErr);
0042
0043 result.push_back(recHit);
0044 }
0045 return result;
0046 }