CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
reco::ElectronSeed Class Reference

#include <ElectronSeed.h>

Inheritance diagram for reco::ElectronSeed:
TrajectorySeed

Classes

struct  PMVars
 

Public Types

typedef edm::RefToBase< CaloClusterCaloClusterRef
 
typedef edm::Ref< TrackCollectionCtfTrackRef
 
typedef edm::OwnVector< TrackingRecHitRecHitContainer
 
- Public Types inherited from TrajectorySeed
typedef recHitContainer::const_iterator const_iterator
 
typedef std::pair< const_iterator, const_iteratorrange
 
typedef edm::OwnVector< TrackingRecHitrecHitContainer
 

Public Member Functions

void addHitInfo (const PMVars &hitVars)
 
const CaloClusterRefcaloCluster () const
 
ElectronSeedclone () const override
 
const CtfTrackRefctfTrack () const
 Accessors. More...
 
int detId (size_t hitNr) const
 
float dPhi1 () const
 
float dPhi1Pos () const
 
float dPhi2 () const
 
float dPhi2Pos () const
 
float dPhiBest (size_t hitNr) const
 
float dPhiNeg (size_t hitNr) const
 
float dPhiPos (size_t hitNr) const
 
float dRz1 () const
 
float dRz1Pos () const
 
float dRz2 () const
 
float dRz2Pos () const
 
float dRZBest (size_t hitNr) const
 
float dRZNeg (size_t hitNr) const
 
float dRZPos (size_t hitNr) const
 
 ElectronSeed ()
 Construction of base attributes. More...
 
 ElectronSeed (const TrajectorySeed &)
 
 ElectronSeed (PTrajectoryStateOnDet &pts, RecHitContainer &rh, PropagationDirection &dir)
 
TrackCharge getCharge () const
 Utility. More...
 
const std::vector< PMVars > & hitInfo () const
 
unsigned int hitsMask () const
 
void initTwoHitSeed (const unsigned char hitMask)
 
bool isEcalDriven () const
 
bool isTrackerDriven () const
 
int layerOrDiskNr (size_t hitNr) const
 
int nrLayersAlongTraj () const
 
void setCaloCluster (const CaloClusterRef &clus)
 
void setCtfTrack (const CtfTrackRef &)
 Set additional info. More...
 
void setNegAttributes (const float dRZ2=std::numeric_limits< float >::infinity(), const float dPhi2=std::numeric_limits< float >::infinity(), const float dRZ1=std::numeric_limits< float >::infinity(), const float dPhi1=std::numeric_limits< float >::infinity())
 
void setNrLayersAlongTraj (int val)
 
void setPosAttributes (const float dRZ2=std::numeric_limits< float >::infinity(), const float dPhi2=std::numeric_limits< float >::infinity(), const float dRZ1=std::numeric_limits< float >::infinity(), const float dPhi1=std::numeric_limits< float >::infinity())
 
int subDet (size_t hitNr) const
 
int subDet1 () const
 
int subDet2 () const
 
 ~ElectronSeed () override
 
- Public Member Functions inherited from TrajectorySeed
PropagationDirection direction () const
 
unsigned int nHits () const
 
TrajectorySeedoperator= (TrajectorySeed const &o)
 
TrajectorySeedoperator= (TrajectorySeed &&o)
 
range recHits () const
 
PTrajectoryStateOnDet const & startingState () const
 
void swap (PTrajectoryStateOnDet &ptsos, recHitContainer &rh, PropagationDirection &dir)
 
void swap (TrajectorySeed &rh)
 
 TrajectorySeed ()
 
 TrajectorySeed (PTrajectoryStateOnDet const &ptsos, recHitContainer const &rh, PropagationDirection dir)
 
 TrajectorySeed (PTrajectoryStateOnDet const &ptsos, recHitContainer &&rh, PropagationDirection dir)
 
 TrajectorySeed (TrajectorySeed const &o)
 
 TrajectorySeed (TrajectorySeed &&o)
 
virtual ~TrajectorySeed ()
 

Static Public Member Functions

static std::vector< PMVarscreateHitInfo (const float dPhi1Pos, const float dPhi1Neg, const float dRZ1Pos, const float dRZ1Neg, const float dPhi2Pos, const float dPhi2Neg, const float dRZ2Pos, const float dRZ2Neg, const char hitMask, const TrajectorySeed::range recHits)
 
static std::string const & name ()
 

Private Member Functions

template<typename T >
T getVal (unsigned int hitNr, T PMVars::*val) const
 

Static Private Member Functions

static float bestVal (float val1, float val2)
 
static std::vector< unsigned int > hitNrsFromMask (unsigned int hitMask)
 

Private Attributes

CaloClusterRef caloCluster_
 
CtfTrackRef ctfTrack_
 
std::vector< PMVarshitInfo_
 
bool isEcalDriven_
 
bool isTrackerDriven_
 
int nrLayersAlongTraj_
 

Detailed Description

Definition at line 52 of file ElectronSeed.h.

Member Typedef Documentation

Definition at line 71 of file ElectronSeed.h.

Definition at line 72 of file ElectronSeed.h.

Definition at line 70 of file ElectronSeed.h.

Constructor & Destructor Documentation

ElectronSeed::ElectronSeed ( )

Construction of base attributes.

Definition at line 9 of file ElectronSeed.cc.

Referenced by clone(), ElectronSeed(), and name().

12  isEcalDriven_(false), isTrackerDriven_(false)
13 
14 {}
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:161
CaloClusterRef caloCluster_
Definition: ElectronSeed.h:160
CtfTrackRef ctfTrack_
Definition: ElectronSeed.h:159
ElectronSeed::ElectronSeed ( const TrajectorySeed seed)

Definition at line 17 of file ElectronSeed.cc.

References ElectronSeed().

18  : TrajectorySeed(seed),
21  isEcalDriven_(false), isTrackerDriven_(false)
22 {}
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:161
CaloClusterRef caloCluster_
Definition: ElectronSeed.h:160
CtfTrackRef ctfTrack_
Definition: ElectronSeed.h:159
ElectronSeed::ElectronSeed ( PTrajectoryStateOnDet pts,
RecHitContainer rh,
PropagationDirection dir 
)

Definition at line 25 of file ElectronSeed.cc.

References setCtfTrack(), and ~ElectronSeed().

26  : TrajectorySeed(pts,rh,dir),
29  isEcalDriven_(false), isTrackerDriven_(false)
30 {}
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:161
CaloClusterRef caloCluster_
Definition: ElectronSeed.h:160
dbl *** dir
Definition: mlp_gen.cc:35
CtfTrackRef ctfTrack_
Definition: ElectronSeed.h:159
ElectronSeed::~ElectronSeed ( )
overridedefault

Referenced by clone(), and ElectronSeed().

Member Function Documentation

void reco::ElectronSeed::addHitInfo ( const PMVars hitVars)
inline

Definition at line 90 of file ElectronSeed.h.

References hitInfo_.

90 {hitInfo_.push_back(hitVars);}
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:161
static float reco::ElectronSeed::bestVal ( float  val1,
float  val2 
)
inlinestaticprivate

Definition at line 151 of file ElectronSeed.h.

References funct::abs().

Referenced by dPhiBest(), and dRZBest().

151 {return std::abs(val1)<std::abs(val2) ? val1 : val2;}
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const CaloClusterRef& reco::ElectronSeed::caloCluster ( ) const
inline
ElectronSeed* reco::ElectronSeed::clone ( void  ) const
inlineoverridevirtual

Reimplemented from TrajectorySeed.

Definition at line 84 of file ElectronSeed.h.

References ElectronSeed(), setCtfTrack(), and ~ElectronSeed().

84 { return new ElectronSeed(*this) ; }
ElectronSeed()
Construction of base attributes.
Definition: ElectronSeed.cc:9
std::vector< ElectronSeed::PMVars > ElectronSeed::createHitInfo ( const float  dPhi1Pos,
const float  dPhi1Neg,
const float  dRZ1Pos,
const float  dRZ1Neg,
const float  dPhi2Pos,
const float  dPhi2Neg,
const float  dRZ2Pos,
const float  dRZ2Neg,
const char  hitMask,
const TrajectorySeed::range  recHits 
)
static

Definition at line 122 of file ElectronSeed.cc.

References SoftLeptonByDistance_cfi::distance, Exception, hitInfo(), and hitNrsFromMask().

Referenced by subDet2().

127 {
128  if(hitMask==0) return std::vector<ElectronSeed::PMVars>(); //was trackerDriven so no matched hits
129 
130  size_t nrRecHits = std::distance(recHits.first,recHits.second);
131  std::vector<unsigned int> hitNrs = hitNrsFromMask(hitMask);
132 
133  if(hitNrs.size()!=2){
134  throw cms::Exception("LogicError")
135  <<"in ElectronSeed::"<<__FUNCTION__<<","<<__LINE__
136  <<": number of hits in hit mask is "<<nrRecHits<<"\n"
137  <<"pre-2017 pixel upgrade ecalDriven ElectronSeeds should have exactly 2 hits\n"
138  <<"mask "<<static_cast<unsigned int>(hitMask)<<std::endl;
139  }
140  if(hitNrs[0]>=nrRecHits || hitNrs[1]>=nrRecHits){
141  throw cms::Exception("LogicError")
142  <<"in ElectronSeed::"<<__FUNCTION__<<","<<__LINE__
143  <<": hits are "<<hitNrs[0]<<" and "<<hitNrs[1]
144  <<" while number of hits are "<<nrRecHits<<"\n"
145  <<"this means there was a bug in storing or creating the electron seeds "
146  <<"mask "<<static_cast<unsigned int>(hitMask)<<std::endl;
147  }
148 
149  std::vector<PMVars> hitInfo(2);
150  hitInfo[0].setDPhi(dPhi1Pos,dPhi1Neg);
151  hitInfo[0].setDRZ(dRZ1Pos,dRZ1Neg);
152  hitInfo[0].setDet((recHits.first+hitNrs[0])->geographicalId(),-1); //getting the layer information needs tracker topo, hence why its stored in the first as its a pain to access
153  hitInfo[1].setDPhi(dPhi2Pos,dPhi2Neg);
154  hitInfo[1].setDRZ(dRZ2Pos,dRZ2Neg);
155  hitInfo[1].setDet((recHits.first+hitNrs[1])->geographicalId(),-1); //getting the layer information needs tracker topo, hence why its stored in the first as its a pain to access
156  return hitInfo;
157 
158 }
float dPhi1Pos() const
Definition: ElectronSeed.h:121
float dPhi2Pos() const
Definition: ElectronSeed.h:123
const std::vector< PMVars > & hitInfo() const
Definition: ElectronSeed.h:102
range recHits() const
static std::vector< unsigned int > hitNrsFromMask(unsigned int hitMask)
const CtfTrackRef& reco::ElectronSeed::ctfTrack ( ) const
inline

Accessors.

Definition at line 93 of file ElectronSeed.h.

References ctfTrack_.

Referenced by setCtfTrack().

93 { return ctfTrack_ ; }
CtfTrackRef ctfTrack_
Definition: ElectronSeed.h:159
int reco::ElectronSeed::detId ( size_t  hitNr) const
inline

Definition at line 109 of file ElectronSeed.h.

References hitInfo_.

109 {return hitNr<hitInfo_.size() ? hitInfo_[hitNr].detId : 0;}
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:161
float reco::ElectronSeed::dPhi1 ( ) const
inline

Definition at line 120 of file ElectronSeed.h.

References reco::ElectronSeed::PMVars::dPhiNeg.

Referenced by setNegAttributes(), setPosAttributes(), and subDet2().

120 {return dPhiNeg(0);}
float dPhiNeg(size_t hitNr) const
Definition: ElectronSeed.h:103
float reco::ElectronSeed::dPhi1Pos ( ) const
inline

Definition at line 121 of file ElectronSeed.h.

References reco::ElectronSeed::PMVars::dPhiPos.

Referenced by subDet2().

121 {return dPhiPos(0);}
float dPhiPos(size_t hitNr) const
Definition: ElectronSeed.h:104
float reco::ElectronSeed::dPhi2 ( ) const
inline

Definition at line 122 of file ElectronSeed.h.

References reco::ElectronSeed::PMVars::dPhiNeg.

Referenced by ElectronSeedGenerator::addSeed(), display_seed(), setNegAttributes(), setPosAttributes(), and subDet2().

122 {return dPhiNeg(1);}
float dPhiNeg(size_t hitNr) const
Definition: ElectronSeed.h:103
float reco::ElectronSeed::dPhi2Pos ( ) const
inline

Definition at line 123 of file ElectronSeed.h.

References reco::ElectronSeed::PMVars::dPhiPos.

Referenced by ElectronSeedGenerator::addSeed(), and subDet2().

123 {return dPhiPos(1);}
float dPhiPos(size_t hitNr) const
Definition: ElectronSeed.h:104
float reco::ElectronSeed::dPhiBest ( size_t  hitNr) const
inline

Definition at line 105 of file ElectronSeed.h.

References bestVal(), reco::ElectronSeed::PMVars::dPhiNeg, and reco::ElectronSeed::PMVars::dPhiPos.

Referenced by EgammaHLTPixelMatchVarProducer::produce().

105 {return bestVal(dPhiNeg(hitNr),dPhiPos(hitNr));}
static float bestVal(float val1, float val2)
Definition: ElectronSeed.h:151
float dPhiNeg(size_t hitNr) const
Definition: ElectronSeed.h:103
float dPhiPos(size_t hitNr) const
Definition: ElectronSeed.h:104
float reco::ElectronSeed::dPhiNeg ( size_t  hitNr) const
inline

Definition at line 103 of file ElectronSeed.h.

References reco::ElectronSeed::PMVars::dPhiNeg, and getVal().

Referenced by EgammaHLTPixelMatchVarProducer::calS2().

103 {return getVal(hitNr,&PMVars::dPhiNeg);}
T getVal(unsigned int hitNr, T PMVars::*val) const
Definition: ElectronSeed.h:153
float reco::ElectronSeed::dPhiPos ( size_t  hitNr) const
inline

Definition at line 104 of file ElectronSeed.h.

References reco::ElectronSeed::PMVars::dPhiPos, and getVal().

Referenced by EgammaHLTPixelMatchVarProducer::calS2().

104 {return getVal(hitNr,&PMVars::dPhiPos);}
T getVal(unsigned int hitNr, T PMVars::*val) const
Definition: ElectronSeed.h:153
float reco::ElectronSeed::dRz1 ( ) const
inline

Definition at line 124 of file ElectronSeed.h.

References reco::ElectronSeed::PMVars::dRZNeg.

124 {return dRZNeg(0);}
float dRZNeg(size_t hitNr) const
Definition: ElectronSeed.h:107
float reco::ElectronSeed::dRz1Pos ( ) const
inline

Definition at line 125 of file ElectronSeed.h.

References reco::ElectronSeed::PMVars::dRZPos.

125 {return dRZPos(0);}
float dRZPos(size_t hitNr) const
Definition: ElectronSeed.h:106
float reco::ElectronSeed::dRz2 ( ) const
inline

Definition at line 126 of file ElectronSeed.h.

References reco::ElectronSeed::PMVars::dRZNeg.

Referenced by ElectronSeedGenerator::addSeed(), and display_seed().

126 {return dRZNeg(1);}
float dRZNeg(size_t hitNr) const
Definition: ElectronSeed.h:107
float reco::ElectronSeed::dRz2Pos ( ) const
inline

Definition at line 127 of file ElectronSeed.h.

References reco::ElectronSeed::PMVars::dRZPos.

Referenced by ElectronSeedGenerator::addSeed().

127 {return dRZPos(1);}
float dRZPos(size_t hitNr) const
Definition: ElectronSeed.h:106
float reco::ElectronSeed::dRZBest ( size_t  hitNr) const
inline

Definition at line 108 of file ElectronSeed.h.

References bestVal(), reco::ElectronSeed::PMVars::dRZNeg, and reco::ElectronSeed::PMVars::dRZPos.

Referenced by EgammaHLTPixelMatchVarProducer::produce().

108 {return bestVal(dRZNeg(hitNr),dRZPos(hitNr));}
float dRZPos(size_t hitNr) const
Definition: ElectronSeed.h:106
static float bestVal(float val1, float val2)
Definition: ElectronSeed.h:151
float dRZNeg(size_t hitNr) const
Definition: ElectronSeed.h:107
float reco::ElectronSeed::dRZNeg ( size_t  hitNr) const
inline

Definition at line 107 of file ElectronSeed.h.

References reco::ElectronSeed::PMVars::dRZNeg, and getVal().

Referenced by EgammaHLTPixelMatchVarProducer::calS2().

107 {return getVal(hitNr,&PMVars::dRZNeg);}
T getVal(unsigned int hitNr, T PMVars::*val) const
Definition: ElectronSeed.h:153
float reco::ElectronSeed::dRZPos ( size_t  hitNr) const
inline

Definition at line 106 of file ElectronSeed.h.

References reco::ElectronSeed::PMVars::dRZPos, and getVal().

Referenced by EgammaHLTPixelMatchVarProducer::calS2().

106 {return getVal(hitNr,&PMVars::dRZPos);}
T getVal(unsigned int hitNr, T PMVars::*val) const
Definition: ElectronSeed.h:153
TrackCharge reco::ElectronSeed::getCharge ( ) const
inline

Utility.

Definition at line 97 of file ElectronSeed.h.

References LocalTrajectoryParameters::charge(), PTrajectoryStateOnDet::parameters(), and TrajectorySeed::startingState().

97 { return startingState().parameters().charge() ; }
PTrajectoryStateOnDet const & startingState() const
TrackCharge charge() const
Charge (-1, 0 or 1)
const LocalTrajectoryParameters & parameters() const
template<typename T >
T reco::ElectronSeed::getVal ( unsigned int  hitNr,
T PMVars::*  val 
) const
inlineprivate

Definition at line 153 of file ElectronSeed.h.

References hitInfo_, hitNrsFromMask(), and infinity.

Referenced by dPhiNeg(), dPhiPos(), dRZNeg(), dRZPos(), and layerOrDiskNr().

153  {
154  return hitNr<hitInfo_.size() ? hitInfo_[hitNr].*val : std::numeric_limits<T>::infinity();
155  }
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:161
const double infinity
const std::vector<PMVars>& reco::ElectronSeed::hitInfo ( ) const
inline

Definition at line 102 of file ElectronSeed.h.

References hitInfo_.

Referenced by createHitInfo(), and PixelData::fill().

102 {return hitInfo_;}
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:161
std::vector< unsigned int > ElectronSeed::hitNrsFromMask ( unsigned int  hitMask)
staticprivate

Definition at line 111 of file ElectronSeed.cc.

Referenced by createHitInfo(), getVal(), and initTwoHitSeed().

112 {
113  std::vector<unsigned int> hitNrs;
114  for(size_t bitNr=0; bitNr<sizeof(hitMask)*CHAR_BIT ; bitNr++){
115  char bit = 0x1 << bitNr;
116  if((hitMask&bit)!=0) hitNrs.push_back(bitNr);
117  }
118  return hitNrs;
119 }
unsigned int ElectronSeed::hitsMask ( ) const

Definition at line 44 of file ElectronSeed.cc.

References hitInfo_, RecoTauDiscriminantConfiguration::mask, TrajectorySeed::nHits(), TrajectorySeed::recHits(), and JetChargeProducer_cfi::var.

Referenced by ElectronSeedGenerator::addSeed(), and subDet2().

45 {
46  int mask=0;
47  for(size_t hitNr=0;hitNr<nHits();hitNr++){
48  int bitNr = 0x1 << hitNr;
49  int hitDetId = (recHits().first+hitNr)->geographicalId().rawId();
50  auto detIdMatcher = [hitDetId](const ElectronSeed::PMVars& var){return hitDetId==var.detId;};
51  if(std::find_if(hitInfo_.begin(),hitInfo_.end(),detIdMatcher)!=hitInfo_.end()){
52  mask|=bitNr;
53  }
54  }
55  return mask;
56 }
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:161
range recHits() const
unsigned int nHits() const
void ElectronSeed::initTwoHitSeed ( const unsigned char  hitMask)

Definition at line 58 of file ElectronSeed.cc.

References Exception, plotBeamSpotDB::first, hitInfo_, hitNrsFromMask(), infinity, info(), TrajectorySeed::nHits(), and TrajectorySeed::recHits().

Referenced by subDet2().

59 {
60  hitInfo_.resize(2);
61 
62  std::vector<unsigned int> hitNrs = hitNrsFromMask(hitMask);
63  if(hitNrs.size()!=2){
64  throw cms::Exception("LogicError")
65  <<"in ElectronSeed::"<<__FUNCTION__<<","<<__LINE__
66  <<": number of hits in hit mask is "<<hitNrs.size()<<"\n"
67  <<"pre-2017 pixel upgrade ecalDriven ElectronSeeds should have exactly 2 hits\n "
68  <<"mask "<<static_cast<unsigned int>(hitMask)<<std::endl;
69  }
70  if(hitNrs[0]>=nHits() || hitNrs[1]>=nHits()){
71  throw cms::Exception("LogicError")
72  <<"in ElectronSeed::"<<__FUNCTION__<<","<<__LINE__
73  <<": hits are "<<hitNrs[0]<<" and "<<hitNrs[1]
74  <<" while number of hits are "<<nHits()<<"\n"
75  <<"this means there was a bug in storing or creating the electron seeds "
76  <<"mask "<<static_cast<unsigned int>(hitMask)<<std::endl;
77  }
78  for(size_t hitNr=0;hitNr<hitInfo_.size();hitNr++){
79  auto& info = hitInfo_[hitNr];
82  info.setDet((recHits().first+hitNrs[hitNr])->geographicalId(),-1);
83  }
84 
85 }
static const TGPicture * info(bool iBackgroundIsBlack)
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:161
const double infinity
range recHits() const
unsigned int nHits() const
static std::vector< unsigned int > hitNrsFromMask(unsigned int hitMask)
bool reco::ElectronSeed::isEcalDriven ( ) const
inline

Definition at line 99 of file ElectronSeed.h.

References isEcalDriven_.

99 { return isEcalDriven_ ; }
bool reco::ElectronSeed::isTrackerDriven ( ) const
inline

Definition at line 100 of file ElectronSeed.h.

References isTrackerDriven_.

100 { return isTrackerDriven_ ; }
int reco::ElectronSeed::layerOrDiskNr ( size_t  hitNr) const
inline

Definition at line 111 of file ElectronSeed.h.

References getVal(), and reco::ElectronSeed::PMVars::layerOrDiskNr.

111 {return getVal(hitNr,&PMVars::layerOrDiskNr);}
T getVal(unsigned int hitNr, T PMVars::*val) const
Definition: ElectronSeed.h:153
static std::string const& reco::ElectronSeed::name ( )
inlinestatic
int reco::ElectronSeed::nrLayersAlongTraj ( ) const
inline

Definition at line 112 of file ElectronSeed.h.

References nrLayersAlongTraj_.

112 {return nrLayersAlongTraj_;}
void reco::ElectronSeed::setCaloCluster ( const CaloClusterRef clus)
inline
void ElectronSeed::setCtfTrack ( const CtfTrackRef ctfTrack)

Set additional info.

Definition at line 35 of file ElectronSeed.cc.

References ctfTrack(), ctfTrack_, isTrackerDriven_, and funct::true.

Referenced by clone(), ElectronSeed(), ElectronSeedMerger::produce(), and GoodSeedProducer::produce().

36 {
39 }
CtfTrackRef ctfTrack_
Definition: ElectronSeed.h:159
const CtfTrackRef & ctfTrack() const
Accessors.
Definition: ElectronSeed.h:93
void ElectronSeed::setNegAttributes ( const float  dRZ2 = std::numeric_limits<float>::infinity(),
const float  dPhi2 = std::numeric_limits<float>::infinity(),
const float  dRZ1 = std::numeric_limits<float>::infinity(),
const float  dPhi1 = std::numeric_limits<float>::infinity() 
)

Definition at line 87 of file ElectronSeed.cc.

References dPhi1(), dPhi2(), Exception, and hitInfo_.

Referenced by ElectronSeedGenerator::addSeed(), and subDet2().

88 {
89  if(hitInfo_.size()!=2){
90  throw cms::Exception("LogicError") <<"ElectronSeed::setNegAttributes should only operate on seeds with exactly two hits. This is because it is a legacy function to preverse backwards compatiblity and should not be used on new code which matches variable number of hits";
91  }
92  hitInfo_[0].dRZNeg = dRZ1;
93  hitInfo_[1].dRZNeg = dRZ2;
94  hitInfo_[0].dPhiNeg = dPhi1;
95  hitInfo_[1].dPhiNeg = dPhi2;
96 
97 }
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:161
float dPhi1() const
Definition: ElectronSeed.h:120
float dPhi2() const
Definition: ElectronSeed.h:122
void reco::ElectronSeed::setNrLayersAlongTraj ( int  val)
inline

Definition at line 91 of file ElectronSeed.h.

References nrLayersAlongTraj_, and heppy_batch::val.

void ElectronSeed::setPosAttributes ( const float  dRZ2 = std::numeric_limits<float>::infinity(),
const float  dPhi2 = std::numeric_limits<float>::infinity(),
const float  dRZ1 = std::numeric_limits<float>::infinity(),
const float  dPhi1 = std::numeric_limits<float>::infinity() 
)

Definition at line 99 of file ElectronSeed.cc.

References dPhi1(), dPhi2(), Exception, and hitInfo_.

Referenced by ElectronSeedGenerator::addSeed(), and subDet2().

100 {
101  if(hitInfo_.size()!=2){
102  throw cms::Exception("LogicError") <<"ElectronSeed::setPosAttributes should only operate on seeds with exactly two hits. This is because it is a legacy function to preverse backwards compatiblity and should not be used on new code which matches variable number of hits";
103  }
104  hitInfo_[0].dRZPos = dRZ1;
105  hitInfo_[1].dRZPos = dRZ2;
106  hitInfo_[0].dPhiPos = dPhi1;
107  hitInfo_[1].dPhiPos = dPhi2;
108 }
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:161
float dPhi1() const
Definition: ElectronSeed.h:120
float dPhi2() const
Definition: ElectronSeed.h:122
int reco::ElectronSeed::subDet ( size_t  hitNr) const
inline

Definition at line 110 of file ElectronSeed.h.

References reco::ElectronSeed::PMVars::detId, and DetId::subdetId().

Referenced by subDet1(), and subDet2().

110 {return DetId(detId(hitNr)).subdetId();}
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:38
Definition: DetId.h:18
int detId(size_t hitNr) const
Definition: ElectronSeed.h:109
int reco::ElectronSeed::subDet1 ( ) const
inline

Definition at line 128 of file ElectronSeed.h.

References subDet().

128 {return subDet(0);}
int subDet(size_t hitNr) const
Definition: ElectronSeed.h:110
int reco::ElectronSeed::subDet2 ( ) const
inline

Member Data Documentation

CaloClusterRef reco::ElectronSeed::caloCluster_
private

Definition at line 160 of file ElectronSeed.h.

Referenced by caloCluster(), and setCaloCluster().

CtfTrackRef reco::ElectronSeed::ctfTrack_
private

Definition at line 159 of file ElectronSeed.h.

Referenced by ctfTrack(), and setCtfTrack().

std::vector<PMVars> reco::ElectronSeed::hitInfo_
private
bool reco::ElectronSeed::isEcalDriven_
private

Definition at line 164 of file ElectronSeed.h.

Referenced by isEcalDriven(), and setCaloCluster().

bool reco::ElectronSeed::isTrackerDriven_
private

Definition at line 165 of file ElectronSeed.h.

Referenced by isTrackerDriven(), and setCtfTrack().

int reco::ElectronSeed::nrLayersAlongTraj_
private

Definition at line 162 of file ElectronSeed.h.

Referenced by nrLayersAlongTraj(), and setNrLayersAlongTraj().