File indexing completed on 2024-04-06 12:26:15
0001
0002
0003
0004
0005
0006
0007 #include "RPCRecHitBaseAlgo.h"
0008 #include "RPCClusterContainer.h"
0009 #include "RPCCluster.h"
0010 #include "RPCClusterizer.h"
0011 #include "RPCMaskReClusterizer.h"
0012
0013 RPCRecHitBaseAlgo::RPCRecHitBaseAlgo(const edm::ParameterSet& config) {
0014
0015
0016 }
0017
0018
0019 edm::OwnVector<RPCRecHit> RPCRecHitBaseAlgo::reconstruct(const RPCRoll& roll,
0020 const RPCDetId& rpcId,
0021 const RPCDigiCollection::Range& digiRange,
0022 const RollMask& mask) {
0023 edm::OwnVector<RPCRecHit> result;
0024
0025 RPCClusterizer clizer;
0026 RPCClusterContainer tcls = clizer.doAction(digiRange);
0027 RPCMaskReClusterizer mrclizer;
0028 RPCClusterContainer cls = mrclizer.doAction(rpcId, tcls, mask);
0029
0030 for (const auto& cl : cls) {
0031 LocalError tmpErr;
0032 LocalPoint point;
0033 float time = 0, timeErr = -1;
0034
0035
0036 const bool OK = this->compute(roll, cl, point, tmpErr, time, timeErr);
0037 if (!OK)
0038 continue;
0039
0040
0041 const int firstClustStrip = cl.firstStrip();
0042 const int clusterSize = cl.clusterSize();
0043 RPCRecHit* recHit = new RPCRecHit(rpcId, cl.bx(), firstClustStrip, clusterSize, point, tmpErr);
0044 recHit->setTimeAndError(time, timeErr);
0045
0046 result.push_back(recHit);
0047 }
0048
0049 return result;
0050 }