CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Friends
DTPattern Class Reference

#include <DTPattern.h>

Public Member Functions

void addHit (RefDTPatternHit hit)
 
int diff () const
 
 DTPattern ()
 
 DTPattern (int SL1, int SL2, int diff)
 
 DTPattern (RefDTPatternHit seedUp, RefDTPatternHit seedDown)
 
const std::vector< RefDTPatternHit > & genHits () const
 
DTPatternIdentifier id () const
 
int latHitIn (int slId, int chId, int allowedVariance) const
 
void setHitDown (int chIdDown)
 
void setHitUp (int chIdUp)
 
int sl1 () const
 
int sl2 () const
 
virtual ~DTPattern ()
 

Private Attributes

bool debug_ = false
 
std::vector< RefDTPatternHitgenHits_
 
DTPatternIdentifier id_
 
int recoseedDown_
 
int recoseedUp_
 
RefDTPatternHit seedDown_
 
RefDTPatternHit seedUp_
 

Friends

std::ostream & operator<< (std::ostream &out, DTPattern &p)
 

Detailed Description

Definition at line 15 of file DTPattern.h.

Constructor & Destructor Documentation

◆ DTPattern() [1/3]

DTPattern::DTPattern ( )

Definition at line 10 of file DTPattern.cc.

10 {}

◆ DTPattern() [2/3]

DTPattern::DTPattern ( RefDTPatternHit  seedUp,
RefDTPatternHit  seedDown 
)

Definition at line 12 of file DTPattern.cc.

12  : seedUp_(seedUp), seedDown_(seedDown) {
13  //On creation, pattern is based on seeds, with no hits. Due to traslational simmetry we only need the superlayer indexes as well as the cell index difference
14  id_ = std::make_tuple(std::get<0>(seedUp), std::get<0>(seedDown), std::get<1>(seedUp) - std::get<1>(seedDown));
15  if (debug_)
16  LogDebug("DTPattern") << "Pattern id: " << std::get<0>(id_) << " , " << std::get<1>(id_) << " , "
17  << std::get<2>(id_);
18 }

References debug_, id_, and LogDebug.

◆ DTPattern() [3/3]

DTPattern::DTPattern ( int  SL1,
int  SL2,
int  diff 
)

Definition at line 20 of file DTPattern.cc.

20  {
21  //On creation, pattern is based on seeds, with no hits. Due to traslational simmetry we only need the superlayer indexes as well as the cell index difference
22  seedUp_ = std::make_tuple(SL1, 0, 0);
23  seedDown_ = std::make_tuple(SL2, diff, 0);
24  id_ = std::make_tuple(SL1, SL2, diff);
25  if (debug_)
26  LogDebug("DTPattern") << "Pattern id: " << std::get<0>(id_) << " , " << std::get<1>(id_) << " , "
27  << std::get<2>(id_);
28 }

References debug_, diff(), id_, LogDebug, seedDown_, and seedUp_.

◆ ~DTPattern()

DTPattern::~DTPattern ( )
virtual

Definition at line 69 of file DTPattern.cc.

69 {}

Member Function Documentation

◆ addHit()

void DTPattern::addHit ( RefDTPatternHit  hit)

Definition at line 30 of file DTPattern.cc.

30  {
31  //Add additional gen level hits in the gen pattern coordinates (untranslated)
32  genHits_.push_back(hit);
33  if (debug_)
34  LogDebug("DTPattern") << "Added gen hit: " << std::get<0>(hit) << " , " << std::get<1>(hit) << " , "
35  << std::get<2>(hit);
36 }

References debug_, genHits_, and LogDebug.

◆ diff()

int DTPattern::diff ( ) const
inline

Definition at line 42 of file DTPattern.h.

42 { return std::get<2>(id_); }

References id_.

Referenced by DTPattern().

◆ genHits()

const std::vector<RefDTPatternHit>& DTPattern::genHits ( ) const
inline

Definition at line 43 of file DTPattern.h.

43 { return genHits_; }

References genHits_.

Referenced by dtbayesam::CandidateGroup::operator>().

◆ id()

DTPatternIdentifier DTPattern::id ( void  ) const
inline

Definition at line 39 of file DTPattern.h.

39 { return id_; }

References id_.

◆ latHitIn()

int DTPattern::latHitIn ( int  slId,
int  chId,
int  allowedVariance 
) const

Definition at line 38 of file DTPattern.cc.

38  {
39  //Check if a hit is inside of the pattern for a given pattern width
40  int temp = -999;
41  for (auto it = this->genHits_.begin(); it != this->genHits_.end(); ++it) {
42  if (slId == (std::get<0>(*it) - 1)) {
43  if (chId == (std::get<1>(*it) + recoseedDown_)) {
44  return std::get<2>(*it);
45  }
46  //This is equivalent to an allowed discrete width of the pattern (configured)
47  else if ((chId <= (std::get<1>(*it) + recoseedDown_ + allowedVariance)) &&
48  (chId >= (std::get<1>(*it) + recoseedDown_ - allowedVariance))) {
49  temp = -10;
50  }
51  }
52  }
53  return temp;
54 }

References PseudoBayesGrouping_cfi::allowedVariance, genHits_, recoseedDown_, and groupFilesInBlocks::temp.

Referenced by dtbayesam::CandidateGroup::removeHit().

◆ setHitDown()

void DTPattern::setHitDown ( int  chIdDown)
inline

Definition at line 36 of file DTPattern.h.

36 { recoseedDown_ = chIdDown; }

References recoseedDown_.

◆ setHitUp()

void DTPattern::setHitUp ( int  chIdUp)
inline

Definition at line 35 of file DTPattern.h.

35 { recoseedUp_ = chIdUp; }

References recoseedUp_.

◆ sl1()

int DTPattern::sl1 ( ) const
inline

Definition at line 40 of file DTPattern.h.

40 { return std::get<0>(id_); }

References id_.

◆ sl2()

int DTPattern::sl2 ( ) const
inline

Definition at line 41 of file DTPattern.h.

41 { return std::get<1>(id_); }

References id_.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
DTPattern p 
)
friend

Definition at line 56 of file DTPattern.cc.

56  {
57  //Friend for printing pattern information trough iostream
58  out << "Pattern id: " << std::get<0>(p.id()) << " , " << std::get<1>(p.id()) << " , " << std::get<2>(p.id())
59  << std::endl;
60  std::vector<RefDTPatternHit> thegenHits = p.genHits();
61  out << "Pattern hits: " << std::endl;
62 
63  for (std::vector<RefDTPatternHit>::iterator itHit = thegenHits.begin(); itHit != thegenHits.end(); itHit++) {
64  out << "[" << std::get<0>(*itHit) << " , " << std::get<1>(*itHit) << " , " << std::get<2>(*itHit) << "]";
65  }
66  return out;
67 }

Member Data Documentation

◆ debug_

bool DTPattern::debug_ = false
private

Definition at line 60 of file DTPattern.h.

Referenced by addHit(), and DTPattern().

◆ genHits_

std::vector<RefDTPatternHit> DTPattern::genHits_
private

Definition at line 53 of file DTPattern.h.

Referenced by addHit(), genHits(), and latHitIn().

◆ id_

DTPatternIdentifier DTPattern::id_
private

Definition at line 56 of file DTPattern.h.

Referenced by diff(), DTPattern(), id(), sl1(), and sl2().

◆ recoseedDown_

int DTPattern::recoseedDown_
private

Definition at line 59 of file DTPattern.h.

Referenced by latHitIn(), and setHitDown().

◆ recoseedUp_

int DTPattern::recoseedUp_
private

Definition at line 58 of file DTPattern.h.

Referenced by setHitUp().

◆ seedDown_

RefDTPatternHit DTPattern::seedDown_
private

Definition at line 51 of file DTPattern.h.

Referenced by DTPattern().

◆ seedUp_

RefDTPatternHit DTPattern::seedUp_
private

Definition at line 50 of file DTPattern.h.

Referenced by DTPattern().

DTPattern::diff
int diff() const
Definition: DTPattern.h:42
DTPattern::id_
DTPatternIdentifier id_
Definition: DTPattern.h:56
DTPattern::recoseedDown_
int recoseedDown_
Definition: DTPattern.h:59
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
DTPattern::seedDown_
RefDTPatternHit seedDown_
Definition: DTPattern.h:51
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
PseudoBayesGrouping_cfi.allowedVariance
allowedVariance
Definition: PseudoBayesGrouping_cfi.py:12
DTPattern::debug_
bool debug_
Definition: DTPattern.h:60
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
DTPattern::recoseedUp_
int recoseedUp_
Definition: DTPattern.h:58
DTPattern::genHits_
std::vector< RefDTPatternHit > genHits_
Definition: DTPattern.h:53
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
DTPattern::seedUp_
RefDTPatternHit seedUp_
Definition: DTPattern.h:50
hit
Definition: SiStripHitEffFromCalibTree.cc:88