CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CSCLayerInfo< TYPE > Class Template Reference

#include <CSCLayerInfo.h>

Public Member Functions

void addComponent (const TYPE digi)
 
void addComponent (const PSimHit simHit)
 
void clear ()
 
 CSCLayerInfo ()
 
CSCDetId getId () const
 
std::vector< TYPE > getRecDigis () const
 
std::vector< PSimHitgetSimHits () const
 
void setId (const CSCDetId id)
 
 ~CSCLayerInfo ()
 

Private Attributes

std::vector< TYPE > RecDigis
 
std::vector< PSimHitSimHits
 
CSCDetId theLayerId
 

Detailed Description

template<class TYPE>
class CSCLayerInfo< TYPE >

Auxiliary class containing vectors of comparator or wire RecDigis and their matched SimHits for given Layer.

Author
Jason Mumford, Slava Valuev 21 August 2001 Porting from ORCA by S. Valuev in September 2006.

Definition at line 21 of file CSCLayerInfo.h.

Constructor & Destructor Documentation

template<class TYPE >
CSCLayerInfo< TYPE >::CSCLayerInfo ( )

default constructor

Definition at line 58 of file CSCLayerInfo.h.

References CSCLayerInfo< TYPE >::RecDigis, CSCLayerInfo< TYPE >::SimHits, CSCLayerInfo< TYPE >::theLayerId, and tmp.

58  {
59  CSCDetId tmp; // nullify theLayerId.
60  theLayerId = tmp;
61  RecDigis.reserve(3); // we may have up to three RecDigis per layer.
62  SimHits.reserve(3);
63 }
std::vector< TYPE > RecDigis
Definition: CSCLayerInfo.h:53
std::vector< PSimHit > SimHits
Definition: CSCLayerInfo.h:54
CSCDetId theLayerId
Definition: CSCLayerInfo.h:52
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
template<class TYPE >
CSCLayerInfo< TYPE >::~CSCLayerInfo ( )

destructor

Definition at line 65 of file CSCLayerInfo.h.

References CSCLayerInfo< TYPE >::clear().

65  {
66  clear();
67 }
void clear()
Definition: CSCLayerInfo.h:69

Member Function Documentation

template<class TYPE>
void CSCLayerInfo< TYPE >::addComponent ( const TYPE  digi)
inline
template<class TYPE>
void CSCLayerInfo< TYPE >::addComponent ( const PSimHit  simHit)
inline

fills SimHit

Definition at line 40 of file CSCLayerInfo.h.

References CSCLayerInfo< TYPE >::SimHits.

40 {SimHits.push_back(simHit);}
std::vector< PSimHit > SimHits
Definition: CSCLayerInfo.h:54
template<class TYPE >
void CSCLayerInfo< TYPE >::clear ( void  )

clears LayerInfo

Definition at line 69 of file CSCLayerInfo.h.

References CSCLayerInfo< TYPE >::RecDigis, CSCLayerInfo< TYPE >::SimHits, CSCLayerInfo< TYPE >::theLayerId, and tmp.

Referenced by CSCAnodeLCTAnalyzer::lctDigis(), CSCCathodeLCTAnalyzer::lctDigis(), and CSCLayerInfo< TYPE >::~CSCLayerInfo().

69  {
70  CSCDetId tmp; // nullify theLayerId.
71  theLayerId = tmp;
72  // Use the trick from ORCA-days "CommonDet/DetUtilities/interface/reset.h"
73  // to delete the capacity of the vectors.
74  std::vector<TYPE> temp_digis;
75  std::vector<PSimHit> temp_hits;
76  RecDigis.swap(temp_digis);
77  SimHits.swap(temp_hits);
78 }
std::vector< TYPE > RecDigis
Definition: CSCLayerInfo.h:53
std::vector< PSimHit > SimHits
Definition: CSCLayerInfo.h:54
CSCDetId theLayerId
Definition: CSCLayerInfo.h:52
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
template<class TYPE>
CSCDetId CSCLayerInfo< TYPE >::getId ( ) const
inline
template<class TYPE>
std::vector<TYPE> CSCLayerInfo< TYPE >::getRecDigis ( ) const
inline

returns the vector of RecDigis (comparator or wire)

Definition at line 46 of file CSCLayerInfo.h.

References CSCLayerInfo< TYPE >::RecDigis.

Referenced by CSCAnodeLCTAnalyzer::digiSimHitAssociator(), CSCCathodeLCTAnalyzer::digiSimHitAssociator(), and operator<<().

46 {return RecDigis;}
std::vector< TYPE > RecDigis
Definition: CSCLayerInfo.h:53
template<class TYPE>
std::vector<PSimHit> CSCLayerInfo< TYPE >::getSimHits ( ) const
inline

returns the vector of SimHits

Definition at line 49 of file CSCLayerInfo.h.

References CSCLayerInfo< TYPE >::SimHits.

Referenced by operator<<().

49 {return SimHits;}
std::vector< PSimHit > SimHits
Definition: CSCLayerInfo.h:54
template<class TYPE>
void CSCLayerInfo< TYPE >::setId ( const CSCDetId  id)
inline

Member Data Documentation

template<class TYPE>
std::vector<TYPE> CSCLayerInfo< TYPE >::RecDigis
private
template<class TYPE>
std::vector<PSimHit> CSCLayerInfo< TYPE >::SimHits
private
template<class TYPE>
CSCDetId CSCLayerInfo< TYPE >::theLayerId
private