CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
TrajAnnealing Class Reference

#include <TrajAnnealing.h>

Public Member Functions

float getAnnealing () const
 
Trajectory getTraj () const
 
 TrajAnnealing ()
 
 TrajAnnealing (const Trajectory &, float)
 
std::vector< float > const & weights () const
 
std::vector< float > & weights ()
 
virtual ~TrajAnnealing ()
 

Private Member Functions

std::pair< float, std::vector
< float > > 
getAnnealingWeight (const TrackingRecHit &aRecHit) const
 

Private Attributes

float annealing_
 
TrackingRecHit::RecHitContainer theHits_
 
std::vector< float > theWeights
 
Trajectory traj_
 

Detailed Description

This class allow to save all the traj info for each annealing cycle suitable for algorithm like DAF (not used in default options)

Definition at line 12 of file TrajAnnealing.h.

Constructor & Destructor Documentation

TrajAnnealing::TrajAnnealing ( )
inline

Definition at line 15 of file TrajAnnealing.h.

15  :
16  traj_(),
17  annealing_(0),
18  theWeights(){}
Trajectory traj_
Definition: TrajAnnealing.h:32
std::vector< float > theWeights
Definition: TrajAnnealing.h:34
virtual TrajAnnealing::~TrajAnnealing ( )
inlinevirtual

Definition at line 19 of file TrajAnnealing.h.

19 {}
TrajAnnealing::TrajAnnealing ( const Trajectory traj,
float  ann 
)

Definition at line 6 of file TrajAnnealing.cc.

References alongMomentum, annealing_, makeMuonMisalignmentScenario::components, Trajectory::direction(), Trajectory::measurements(), SiTrackerMultiRecHit::recHits(), theHits_, theWeights, traj_, and SiTrackerMultiRecHit::weight().

6  {
7  traj_ = traj;
8  annealing_ = ann;
9 
10  const Trajectory::DataContainer& measurements = traj_.measurements();
11  if( measurements.size() > 2 ){
12  Trajectory::DataContainer::const_iterator ibegin,iend;
13  int increment(0);
14  if( traj.direction() == alongMomentum ){
15  ibegin = measurements.begin() + 1;
16  iend = measurements.end() - 1;
17  increment = 1;
18  } else {
19  ibegin = measurements.end() - 2;
20  iend = measurements.begin();
21  increment = -1;
22  }
23 
24  for( Trajectory::DataContainer::const_iterator imeas = ibegin; imeas != iend; imeas += increment ){
25 
26  theHits_.push_back(imeas->recHit());
27  if (imeas->recHit()->isValid()){
28  SiTrackerMultiRecHit const & mHit = dynamic_cast<SiTrackerMultiRecHit const &>(*imeas->recHit());
29  std::vector<const TrackingRecHit*> components = mHit.recHits();
30  int iComp = 0;
31  for(std::vector<const TrackingRecHit*>::const_iterator iter = components.begin();
32  iter != components.end(); iter++, iComp++){
33  theWeights.push_back(mHit.weight(iComp));
34  }
35  }
36  }
37 
38  }
39 
40 }
Trajectory traj_
Definition: TrajAnnealing.h:32
float weight(unsigned int i) const
PropagationDirection const & direction() const
Definition: Trajectory.cc:125
std::vector< float > theWeights
Definition: TrajAnnealing.h:34
DataContainer const & measurements() const
Definition: Trajectory.h:250
std::vector< TrajectoryMeasurement > DataContainer
Definition: Trajectory.h:44
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
TrackingRecHit::RecHitContainer theHits_
Definition: TrajAnnealing.h:35

Member Function Documentation

float TrajAnnealing::getAnnealing ( ) const
inline

Definition at line 23 of file TrajAnnealing.h.

References annealing_.

23 { return annealing_; }
std::pair< float, std::vector< float > > TrajAnnealing::getAnnealingWeight ( const TrackingRecHit aRecHit) const
private

Definition at line 42 of file TrajAnnealing.cc.

References SiTrackerMultiRecHit::getAnnealingFactor(), TrackingRecHit::isValid(), and SiTrackerMultiRecHit::weights().

42  {
43 
44  if (!aRecHit.isValid()) {
45  std::vector<float> dumpyVec = {0.0};
46  return make_pair(0.0,dumpyVec);
47  }
48 
49  SiTrackerMultiRecHit const & mHit = dynamic_cast<SiTrackerMultiRecHit const &>(aRecHit);
50  return make_pair(mHit.getAnnealingFactor(), mHit.weights());
51 
52 }
virtual double getAnnealingFactor() const
std::vector< float > const & weights() const
bool isValid() const
Trajectory TrajAnnealing::getTraj ( ) const
inline

Definition at line 24 of file TrajAnnealing.h.

References traj_.

24 { return traj_; }
Trajectory traj_
Definition: TrajAnnealing.h:32
std::vector<float> const& TrajAnnealing::weights ( ) const
inline

Definition at line 27 of file TrajAnnealing.h.

References theWeights.

27 {return theWeights;}
std::vector< float > theWeights
Definition: TrajAnnealing.h:34
std::vector<float>& TrajAnnealing::weights ( )
inline

Definition at line 28 of file TrajAnnealing.h.

References theWeights.

28 {return theWeights;}
std::vector< float > theWeights
Definition: TrajAnnealing.h:34

Member Data Documentation

float TrajAnnealing::annealing_
private

Definition at line 33 of file TrajAnnealing.h.

Referenced by getAnnealing(), and TrajAnnealing().

TrackingRecHit::RecHitContainer TrajAnnealing::theHits_
private

Definition at line 35 of file TrajAnnealing.h.

Referenced by TrajAnnealing().

std::vector<float> TrajAnnealing::theWeights
private

Definition at line 34 of file TrajAnnealing.h.

Referenced by TrajAnnealing(), and weights().

Trajectory TrajAnnealing::traj_
private

Definition at line 32 of file TrajAnnealing.h.

Referenced by getTraj(), and TrajAnnealing().