CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
14 
15 using namespace std;
16 using namespace edm;
17 
18 
20  theSync = DTTTrigSyncFactory::get()->create(config.getParameter<string>("tTrigMode"),
21  config.getParameter<ParameterSet>("tTrigModeConfig"));
22 }
23 
25 
26 
27 // Build all hits in the range associated to the layerId, at the 1st step.
29  const DTLayerId& layerId,
30  const DTDigiCollection::Range& digiRange) {
32 
33  // Loop over all digis in the given range
34  for (DTDigiCollection::const_iterator digi = digiRange.first;
35  digi != digiRange.second;
36  digi++) {
37  // Get the wireId
38  DTWireId wireId(layerId, (*digi).wire());
39 
40  LocalError tmpErr;
41  LocalPoint lpoint, rpoint;
42  // Call the compute method
43  bool OK = compute(layer, *digi, lpoint, rpoint, tmpErr);
44  if (!OK) continue;
45 
46  // Build a new pair of 1D rechit
47  DTRecHit1DPair* recHitPair = new DTRecHit1DPair(wireId, *digi);
48 
49  // Set the position and the error of the 1D rechits
50  recHitPair->setPositionAndError(DTEnums::Left, lpoint, tmpErr);
51  recHitPair->setPositionAndError(DTEnums::Right, rpoint, tmpErr);
52 
53  result.push_back(recHitPair);
54  }
55  return result;
56 }
57 
58 
59 
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.
pair< int, edm::FunctionWithDict > OK
Definition: findMethod.cc:70
void push_back(D *&d)
Definition: OwnVector.h:273
void setPositionAndError(DTEnums::DTCellSide lrside, const LocalPoint &point, const LocalError &err)
DTRecHitBaseAlgo(const edm::ParameterSet &config)
Constructor.
tuple result
Definition: query.py:137
std::vector< DTDigi >::const_iterator const_iterator
std::pair< const_iterator, const_iterator > Range
T get(const Candidate &c)
Definition: component.h:55