CMS 3D CMS Logo

DTRecHitBaseAlgo.cc
Go to the documentation of this file.
1 /*
2  * See header file for a description of this class.
3  *
4  * \author N. Amapane & G. Cerminara - INFN Torino
5  */
6 
8 
13 
14 using namespace std;
15 using namespace edm;
16 
18  : theSync{DTTTrigSyncFactory::get()->create(config.getParameter<string>("tTrigMode"),
19  config.getParameter<ParameterSet>("tTrigModeConfig"))} {}
20 
22 
23 // Build all hits in the range associated to the layerId, at the 1st step.
25  const DTLayerId& layerId,
26  const DTDigiCollection::Range& digiRange) {
28 
29  // Loop over all digis in the given range
30  for (DTDigiCollection::const_iterator digi = digiRange.first; digi != digiRange.second; digi++) {
31  // Get the wireId
32  DTWireId wireId(layerId, (*digi).wire());
33 
34  LocalError tmpErr;
35  LocalPoint lpoint, rpoint;
36  // Call the compute method
37  bool OK = compute(layer, *digi, lpoint, rpoint, tmpErr);
38  if (!OK)
39  continue;
40 
41  // Build a new pair of 1D rechit
42  auto recHitPair = std::make_unique<DTRecHit1DPair>(wireId, *digi);
43 
44  // Set the position and the error of the 1D rechits
45  recHitPair->setPositionAndError(DTEnums::Left, lpoint, tmpErr);
46  recHitPair->setPositionAndError(DTEnums::Right, rpoint, tmpErr);
47 
48  result.push_back(std::move(recHitPair));
49  }
50  return result;
51 }
edm
HLT enums.
Definition: AlignableModifier.h:19
DTRecHitBaseAlgo.h
reco::OK
std::pair< int, edm::FunctionWithDict > OK
Definition: findMethod.cc:126
DTRecHitBaseAlgo::reconstruct
virtual edm::OwnVector< DTRecHit1DPair > reconstruct(const DTLayer *layer, const DTLayerId &layerId, const DTDigiCollection::Range &digiRange)
Build all hits in the range associated to the layerId, at the 1st step.
Definition: DTRecHitBaseAlgo.cc:24
MuonDigiCollection::const_iterator
std::vector< DigiType >::const_iterator const_iterator
Definition: MuonDigiCollection.h:94
config
Definition: config.py:1
DTRecHitBaseAlgo::~DTRecHitBaseAlgo
virtual ~DTRecHitBaseAlgo()
Destructor.
Definition: DTRecHitBaseAlgo.cc:21
DTEnums::Left
Definition: DTEnums.h:15
DTWireId
Definition: DTWireId.h:12
Point3DBase< float, LocalTag >
DTLayerId
Definition: DTLayerId.h:12
DTLayer.h
edm::ParameterSet
Definition: ParameterSet.h:36
LocalError
Definition: LocalError.h:12
DTTTrigBaseSync.h
DTRecHitBaseAlgo::DTRecHitBaseAlgo
DTRecHitBaseAlgo(const edm::ParameterSet &config)
Constructor.
Definition: DTRecHitBaseAlgo.cc:17
get
#define get
DTLayer
Definition: DTLayer.h:25
DTEnums::Right
Definition: DTEnums.h:15
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
DTTTrigSyncFactory.h
MuonDigiCollection::Range
std::pair< const_iterator, const_iterator > Range
Definition: MuonDigiCollection.h:95
mps_fire.result
result
Definition: mps_fire.py:303
ParameterSet.h
DTRecHitBaseAlgo::compute
virtual bool compute(const DTLayer *layer, const DTDigi &digi, LocalPoint &leftPoint, LocalPoint &rightPoint, LocalError &error) const =0
edm::OwnVector
Definition: OwnVector.h:24