CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
DTRecHitBaseAlgo Class Referenceabstract

#include <DTRecHitBaseAlgo.h>

Inheritance diagram for DTRecHitBaseAlgo:
DTLinearDriftAlgo DTLinearDriftFromDBAlgo DTNoDriftAlgo DTParametrizedDriftAlgo

Public Member Functions

virtual bool compute (const DTLayer *layer, const DTDigi &digi, LocalPoint &leftPoint, LocalPoint &rightPoint, LocalError &error) const =0
 
virtual bool compute (const DTLayer *layer, const DTRecHit1D &recHit1D, const float &angle, const GlobalPoint &globPos, DTRecHit1D &newHit1D) const =0
 
virtual bool compute (const DTLayer *layer, const DTRecHit1D &recHit1D, const float &angle, DTRecHit1D &newHit1D) const =0
 
 DTRecHitBaseAlgo (const edm::ParameterSet &config)
 Constructor. More...
 
virtual edm::OwnVector< DTRecHit1DPairreconstruct (const DTLayer *layer, const DTLayerId &layerId, const DTDigiCollection::Range &digiRange)
 Build all hits in the range associated to the layerId, at the 1st step. More...
 
virtual void setES (const edm::EventSetup &setup)=0
 Pass the Event Setup to the algo at each event. More...
 
virtual ~DTRecHitBaseAlgo ()
 Destructor. More...
 

Protected Attributes

std::unique_ptr< DTTTrigBaseSynctheSync
 

Detailed Description

Abstract algorithmic class to compute drift distance and error form a DT digi

Author
N. Amapane & G. Cerminara - INFN Torino

Definition at line 29 of file DTRecHitBaseAlgo.h.

Constructor & Destructor Documentation

◆ DTRecHitBaseAlgo()

DTRecHitBaseAlgo::DTRecHitBaseAlgo ( const edm::ParameterSet config)

Constructor.

Definition at line 17 of file DTRecHitBaseAlgo.cc.

18  : theSync{DTTTrigSyncFactory::get()->create(config.getParameter<string>("tTrigMode"),
19  config.getParameter<ParameterSet>("tTrigModeConfig"))} {}

References get.

◆ ~DTRecHitBaseAlgo()

DTRecHitBaseAlgo::~DTRecHitBaseAlgo ( )
virtual

Destructor.

Definition at line 21 of file DTRecHitBaseAlgo.cc.

21 {}

Member Function Documentation

◆ compute() [1/3]

virtual bool DTRecHitBaseAlgo::compute ( const DTLayer layer,
const DTDigi digi,
LocalPoint leftPoint,
LocalPoint rightPoint,
LocalError error 
) const
pure virtual

First step in computation of Left/Right hits from a Digi. The results are the local position (in MuBarLayer frame) of the Left and Right hit, and the error (which is common). Returns false on failure.

Implemented in DTNoDriftAlgo, DTLinearDriftFromDBAlgo, DTParametrizedDriftAlgo, and DTLinearDriftAlgo.

Referenced by reconstruct().

◆ compute() [2/3]

virtual bool DTRecHitBaseAlgo::compute ( const DTLayer layer,
const DTRecHit1D recHit1D,
const float &  angle,
const GlobalPoint globPos,
DTRecHit1D newHit1D 
) const
pure virtual

Third (and final) step in hits position computation, for algorithms which support it. In addition the the angle, also the global position of the hit is given as input. This allows to get the magnetic field at the hit position (and not only that at the center of the wire). Also the position along the wire is available and can be used to correct the drift time for particle TOF and propagation of signal along the wire.

Implemented in DTParametrizedDriftAlgo, DTNoDriftAlgo, DTLinearDriftFromDBAlgo, and DTLinearDriftAlgo.

◆ compute() [3/3]

virtual bool DTRecHitBaseAlgo::compute ( const DTLayer layer,
const DTRecHit1D recHit1D,
const float &  angle,
DTRecHit1D newHit1D 
) const
pure virtual

Second step in hit position computation, for algorithms which support it. The impact angle is given as input, and it's used to improve the hit position (and relative error). The angle is defined in radians, with respect to the perpendicular to the layer plane. Given the local direction, angle=atan(dir.x()/-dir.z()) . This can be used when a SL segment is built, so the impact angle is known but the position along wire is not.

Implemented in DTNoDriftAlgo, DTParametrizedDriftAlgo, DTLinearDriftFromDBAlgo, and DTLinearDriftAlgo.

◆ reconstruct()

OwnVector< DTRecHit1DPair > DTRecHitBaseAlgo::reconstruct ( const DTLayer layer,
const DTLayerId layerId,
const DTDigiCollection::Range digiRange 
)
virtual

Build all hits in the range associated to the layerId, at the 1st step.

Reimplemented in DTNoDriftAlgo.

Definition at line 24 of file DTRecHitBaseAlgo.cc.

26  {
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 }

References compute(), phase1PixelTopology::layer, DTEnums::Left, eostools::move(), mps_fire::result, and DTEnums::Right.

◆ setES()

virtual void DTRecHitBaseAlgo::setES ( const edm::EventSetup setup)
pure virtual

Pass the Event Setup to the algo at each event.

Implemented in DTLinearDriftFromDBAlgo, DTParametrizedDriftAlgo, DTNoDriftAlgo, and DTLinearDriftAlgo.

Member Data Documentation

◆ theSync

std::unique_ptr<DTTTrigBaseSync> DTRecHitBaseAlgo::theSync
protected
reco::OK
std::pair< int, edm::FunctionWithDict > OK
Definition: findMethod.cc:126
MuonDigiCollection::const_iterator
std::vector< DigiType >::const_iterator const_iterator
Definition: MuonDigiCollection.h:94
config
Definition: config.py:1
DTEnums::Left
Definition: DTEnums.h:15
DTRecHitBaseAlgo::theSync
std::unique_ptr< DTTTrigBaseSync > theSync
Definition: DTRecHitBaseAlgo.h:81
DTWireId
Definition: DTWireId.h:12
Point3DBase< float, LocalTag >
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
edm::ParameterSet
Definition: ParameterSet.h:47
LocalError
Definition: LocalError.h:12
get
#define get
DTEnums::Right
Definition: DTEnums.h:15
eostools.move
def move(src, dest)
Definition: eostools.py:511
mps_fire.result
result
Definition: mps_fire.py:311
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