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 
7 
8 
10 
15 
16 using namespace std;
17 using namespace edm;
18 
19 
21  theSync{DTTTrigSyncFactory::get()->create(config.getParameter<string>("tTrigMode"),
22  config.getParameter<ParameterSet>("tTrigModeConfig"))}
23 {}
24 
26 
27 
28 // Build all hits in the range associated to the layerId, at the 1st step.
30  const DTLayerId& layerId,
31  const DTDigiCollection::Range& digiRange) {
33 
34  // Loop over all digis in the given range
35  for (DTDigiCollection::const_iterator digi = digiRange.first;
36  digi != digiRange.second;
37  digi++) {
38  // Get the wireId
39  DTWireId wireId(layerId, (*digi).wire());
40 
41  LocalError tmpErr;
42  LocalPoint lpoint, rpoint;
43  // Call the compute method
44  bool OK = compute(layer, *digi, lpoint, rpoint, tmpErr);
45  if (!OK) continue;
46 
47  // Build a new pair of 1D rechit
48  auto recHitPair = std::make_unique<DTRecHit1DPair>(wireId, *digi);
49 
50  // Set the position and the error of the 1D rechits
51  recHitPair->setPositionAndError(DTEnums::Left, lpoint, tmpErr);
52  recHitPair->setPositionAndError(DTEnums::Right, rpoint, tmpErr);
53 
54  result.push_back(std::move(recHitPair));
55  }
56  return result;
57 }
58 
59 
60 
T getParameter(std::string const &) const
virtual ~DTRecHitBaseAlgo()
Destructor.
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: config.py:1
void push_back(D *&d)
Definition: OwnVector.h:290
DTRecHitBaseAlgo(const edm::ParameterSet &config)
Constructor.
std::pair< int, edm::FunctionWithDict > OK
Definition: findMethod.cc:136
std::vector< DigiType >::const_iterator const_iterator
virtual bool compute(const DTLayer *layer, const DTDigi &digi, LocalPoint &leftPoint, LocalPoint &rightPoint, LocalError &error) const =0
HLT enums.
std::pair< const_iterator, const_iterator > Range
def move(src, dest)
Definition: eostools.py:511
T get(const Candidate &c)
Definition: component.h:55