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 PSimHit simHit)
 
void addComponent (const TYPE digi)
 
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

◆ CSCLayerInfo()

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

default constructor

Definition at line 57 of file CSCLayerInfo.h.

57  {
58  CSCDetId tmp; // nullify theLayerId.
59  theLayerId = tmp;
60  RecDigis.reserve(3); // we may have up to three RecDigis per layer.
61  SimHits.reserve(3);
62 }

References createJobs::tmp.

◆ ~CSCLayerInfo()

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

destructor

Definition at line 65 of file CSCLayerInfo.h.

65  {
66  clear();
67 }

References clear().

Member Function Documentation

◆ addComponent() [1/2]

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

fills SimHit

Definition at line 39 of file CSCLayerInfo.h.

39 { SimHits.push_back(simHit); }

References rpcPointValidation_cfi::simHit, and CSCLayerInfo< TYPE >::SimHits.

◆ addComponent() [2/2]

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

fills RecDigi

Definition at line 36 of file CSCLayerInfo.h.

36 { RecDigis.push_back(digi); }

References CSCLayerInfo< TYPE >::RecDigis.

Referenced by CSCAnodeLCTAnalyzer::lctDigis(), and CSCCathodeLCTAnalyzer::lctDigis().

◆ clear()

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

clears LayerInfo

Definition at line 70 of file CSCLayerInfo.h.

70  {
71  CSCDetId tmp; // nullify theLayerId.
72  theLayerId = tmp;
73  // Use the trick from ORCA-days "CommonDet/DetUtilities/interface/reset.h"
74  // to delete the capacity of the vectors.
75  std::vector<TYPE> temp_digis;
76  std::vector<PSimHit> temp_hits;
77  RecDigis.swap(temp_digis);
78  SimHits.swap(temp_hits);
79 }

References createJobs::tmp.

Referenced by CSCAnodeLCTAnalyzer::lctDigis(), and CSCCathodeLCTAnalyzer::lctDigis().

◆ getId()

template<class TYPE>
CSCDetId CSCLayerInfo< TYPE >::getId ( ) const
inline

returns the layer

Definition at line 42 of file CSCLayerInfo.h.

42 { return theLayerId; }

References CSCLayerInfo< TYPE >::theLayerId.

Referenced by CSCAnodeLCTAnalyzer::lctDigis(), and CSCCathodeLCTAnalyzer::lctDigis().

◆ getRecDigis()

template<class TYPE>
std::vector<TYPE> CSCLayerInfo< TYPE >::getRecDigis ( ) const
inline

returns the vector of RecDigis (comparator or wire)

Definition at line 45 of file CSCLayerInfo.h.

45 { return RecDigis; }

References CSCLayerInfo< TYPE >::RecDigis.

◆ getSimHits()

template<class TYPE>
std::vector<PSimHit> CSCLayerInfo< TYPE >::getSimHits ( ) const
inline

returns the vector of SimHits

Definition at line 48 of file CSCLayerInfo.h.

48 { return SimHits; }

References CSCLayerInfo< TYPE >::SimHits.

◆ setId()

template<class TYPE>
void CSCLayerInfo< TYPE >::setId ( const CSCDetId  id)
inline

sets detId of this layer

Definition at line 33 of file CSCLayerInfo.h.

33 { theLayerId = id; }

References triggerObjects_cff::id, and CSCLayerInfo< TYPE >::theLayerId.

Referenced by CSCAnodeLCTAnalyzer::lctDigis(), and CSCCathodeLCTAnalyzer::lctDigis().

Member Data Documentation

◆ RecDigis

template<class TYPE>
std::vector<TYPE> CSCLayerInfo< TYPE >::RecDigis
private

◆ SimHits

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

◆ theLayerId

template<class TYPE>
CSCDetId CSCLayerInfo< TYPE >::theLayerId
private

Definition at line 51 of file CSCLayerInfo.h.

Referenced by CSCLayerInfo< TYPE >::getId(), and CSCLayerInfo< TYPE >::setId().

CSCLayerInfo::clear
void clear()
Definition: CSCLayerInfo.h:70
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
rpcPointValidation_cfi.simHit
simHit
Definition: rpcPointValidation_cfi.py:24
CSCLayerInfo::SimHits
std::vector< PSimHit > SimHits
Definition: CSCLayerInfo.h:53
CSCDetId
Definition: CSCDetId.h:26
CSCLayerInfo::RecDigis
std::vector< TYPE > RecDigis
Definition: CSCLayerInfo.h:52
CSCLayerInfo::theLayerId
CSCDetId theLayerId
Definition: CSCLayerInfo.h:51
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31