CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 
8 
14 
15 using namespace std;
16 using namespace edm;
17 
19  : theSync{DTTTrigSyncFactory::get()->create(
20  config.getParameter<string>("tTrigMode"), config.getParameter<ParameterSet>("tTrigModeConfig"), cc)} {}
21 
23 
24 // Build all hits in the range associated to the layerId, at the 1st step.
26  const DTLayerId& layerId,
27  const DTDigiCollection::Range& digiRange) {
29 
30  // Loop over all digis in the given range
31  for (DTDigiCollection::const_iterator digi = digiRange.first; digi != digiRange.second; digi++) {
32  // Get the wireId
33  DTWireId wireId(layerId, (*digi).wire());
34 
35  LocalError tmpErr;
36  LocalPoint lpoint, rpoint;
37  // Call the compute method
38  bool OK = compute(layer, *digi, lpoint, rpoint, tmpErr);
39  if (!OK)
40  continue;
41 
42  // Build a new pair of 1D rechit
43  auto recHitPair = std::make_unique<DTRecHit1DPair>(wireId, *digi);
44 
45  // Set the position and the error of the 1D rechits
46  recHitPair->setPositionAndError(DTEnums::Left, lpoint, tmpErr);
47  recHitPair->setPositionAndError(DTEnums::Right, rpoint, tmpErr);
48 
49  result.push_back(std::move(recHitPair));
50  }
51  return result;
52 }
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.
constexpr std::array< uint8_t, layerIndexSize > layer
tuple result
Definition: mps_fire.py:311
DTRecHitBaseAlgo(const edm::ParameterSet &config, edm::ConsumesCollector)
Constructor.
void push_back(D *&d)
Definition: OwnVector.h:326
def move
Definition: eostools.py:511
virtual bool compute(const DTLayer *layer, const DTDigi &digi, LocalPoint &leftPoint, LocalPoint &rightPoint, LocalError &error) const =0
std::pair< int, edm::FunctionWithDict > OK
Definition: findMethod.cc:126
std::pair< const_iterator, const_iterator > Range
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::vector< DigiType >::const_iterator const_iterator
tuple config
parse the configuration file
#define get