CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
KalmanAlignmentUpdator.cc
Go to the documentation of this file.
1 
5 
6 
7 void KalmanAlignmentUpdator::updateUserVariables( const std::vector< Alignable* > & alignables ) const
8 {
9  std::vector< Alignable* > updated;
10  std::vector< Alignable* >::const_iterator itAlignable = alignables.begin();
11 
12  while ( itAlignable != alignables.end() )
13  {
14  AlignmentParameters* alignmentParameters = ( *itAlignable )->alignmentParameters();
15 
16  if ( std::find(updated.begin(),updated.end(),*itAlignable) == updated.end() && alignmentParameters != 0 )
17  {
18  KalmanAlignmentUserVariables* userVariables =
19  dynamic_cast< KalmanAlignmentUserVariables* >( alignmentParameters->userVariables() );
20 
21  if ( userVariables != 0 ) userVariables->update();
22 
23  updated.push_back( *itAlignable );
24  }
25 
26  ++itAlignable;
27  }
28 }
29 
30 
31 const std::vector< Alignable* >
32 KalmanAlignmentUpdator::alignablesFromAlignableDets( std::vector< AlignableDetOrUnitPtr >& alignableDets,
33  AlignmentParameterStore* store ) const
34 {
35  std::vector< Alignable* > alignables;
36 
37  std::vector< AlignableDetOrUnitPtr >::const_iterator itAD;
38  for ( itAD = alignableDets.begin(); itAD != alignableDets.end(); ++itAD )
39  {
40  Alignable* ali = store->alignableFromAlignableDet( *itAD );
41  alignables.push_back( ali );
42  }
43 
44  return alignables;
45 }
46 
47 
48 unsigned int
49 KalmanAlignmentUpdator::nDifferentAlignables( const std::vector<Alignable*>& ali ) const
50 {
51  std::set< Alignable* > list;
52  list.insert( ali.begin(), ali.end() );
53  unsigned int ndiff = list.size();
54  return ndiff;
55 }
virtual const std::vector< Alignable * > alignablesFromAlignableDets(std::vector< AlignableDetOrUnitPtr > &alignableDets, AlignmentParameterStore *store) const
void updateUserVariables(const std::vector< Alignable * > &alignables) const
Update the AlignmentUserVariables, given that the Alignables hold KalmanAlignmentUserVariables.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
void update(bool enforceUpdate=false)
Call this function in case the associated Alignable was updated by the alignment algorithm.
AlignmentUserVariables * userVariables(void) const
Get pointer to user variables.
unsigned int nDifferentAlignables(const std::vector< Alignable * > &ali) const
Alignable * alignableFromAlignableDet(AlignableDetOrUnitPtr alignableDet) const
Obsolete: Use AlignableNavigator::alignableDetFromGeomDet and alignableFromAlignableDet.
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run