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  * $Date: 2007/02/19 11:43:57 $
5  * $Revision: 1.5 $
6  * \author N. Amapane & G. Cerminara - INFN Torino
7  */
8 
9 
10 
12 
16 
17 using namespace std;
18 using namespace edm;
19 
20 
22  theSync = DTTTrigSyncFactory::get()->create(config.getParameter<string>("tTrigMode"),
23  config.getParameter<ParameterSet>("tTrigModeConfig"));
24 }
25 
27 
28 
29 // Build all hits in the range associated to the layerId, at the 1st step.
31  const DTLayerId& layerId,
32  const DTDigiCollection::Range& digiRange) {
34 
35  // Loop over all digis in the given range
36  for (DTDigiCollection::const_iterator digi = digiRange.first;
37  digi != digiRange.second;
38  digi++) {
39  // Get the wireId
40  DTWireId wireId(layerId, (*digi).wire());
41 
42  LocalError tmpErr;
43  LocalPoint lpoint, rpoint;
44  // Call the compute method
45  bool OK = compute(layer, *digi, lpoint, rpoint, tmpErr);
46  if (!OK) continue;
47 
48  // Build a new pair of 1D rechit
49  DTRecHit1DPair* recHitPair = new DTRecHit1DPair(wireId, *digi);
50 
51  // Set the position and the error of the 1D rechits
52  recHitPair->setPositionAndError(DTEnums::Left, lpoint, tmpErr);
53  recHitPair->setPositionAndError(DTEnums::Right, rpoint, tmpErr);
54 
55  result.push_back(recHitPair);
56  }
57  return result;
58 }
59 
60 
61 
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.
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< DigiType >::const_iterator const_iterator
std::pair< const_iterator, const_iterator > Range
T get(const Candidate &c)
Definition: component.h:56