CMS 3D CMS Logo

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

#include <HGCalCassette.h>

Public Member Functions

std::pair< double, double > getShift (int layer, int zside, int cassette)
 
 HGCalCassette (int cassette, const std::vector< double > &shifts)
 
 HGCalCassette ()
 
void setParameter (int cassette, const std::vector< double > &shifts)
 

Private Attributes

int cassette_
 
const std::vector< int > positEE_ = {2, 1, 0, 5, 4, 3}
 
const std::vector< int > positHE_ = {5, 4, 3, 2, 1, 0, 11, 10, 9, 8, 7, 6}
 
std::vector< double > shifts_
 
bool typeHE_
 

Detailed Description

Definition at line 8 of file HGCalCassette.h.

Constructor & Destructor Documentation

◆ HGCalCassette() [1/2]

HGCalCassette::HGCalCassette ( int  cassette,
const std::vector< double > &  shifts 
)
inline

Definition at line 10 of file HGCalCassette.h.

References setParameter().

10 { setParameter(cassette, shifts); }
void setParameter(int cassette, const std::vector< double > &shifts)
Definition: HGCalCassette.cc:7

◆ HGCalCassette() [2/2]

HGCalCassette::HGCalCassette ( )
inline

Definition at line 11 of file HGCalCassette.h.

11 {}

Member Function Documentation

◆ getShift()

std::pair< double, double > HGCalCassette::getShift ( int  layer,
int  zside,
int  cassette 
)

Definition at line 21 of file HGCalCassette.cc.

References cassette_, phase1PixelTopology::layer, positEE_, positHE_, shifts_, typeHE_, geometryCSVtoXML::xy, and ecaldqm::zside().

21  {
22  int locc = (zside < 0) ? (cassette - 1) : (typeHE_ ? positHE_[cassette - 1] : positEE_[cassette - 1]);
23  int loc = 2 * cassette_ * (layer - 1) + locc;
24  std::pair<double, double> xy = std::make_pair(shifts_[loc], shifts_[loc + 1]);
25 #ifdef EDM_ML_DEBUG
26  edm::LogVerbatim("HGCalGeom") << "HGCalCassette::getShift: Layer " << layer << " zside " << zside << " cassette "
27  << cassette << " Loc " << locc << ":" << loc << " shift " << xy.first << ":"
28  << xy.second;
29 #endif
30  return xy;
31 }
Log< level::Info, true > LogVerbatim
int zside(DetId const &)
const std::vector< int > positHE_
Definition: HGCalCassette.h:18
constexpr std::array< uint8_t, layerIndexSize > layer
const std::vector< int > positEE_
Definition: HGCalCassette.h:17
std::vector< double > shifts_
Definition: HGCalCassette.h:21

◆ setParameter()

void HGCalCassette::setParameter ( int  cassette,
const std::vector< double > &  shifts 
)

Definition at line 7 of file HGCalCassette.cc.

References cassette_, alignCSCRings::s, shifts_, and typeHE_.

Referenced by coreTools.RunOnData::__call__(), trackTools.MakeAODTrackCandidates::__call__(), runJetUncertainties.RunJetUncertainties::__call__(), metTools.AddMETCollection::__call__(), cmsswVersionTools.PickRelValInputFiles::__call__(), coreTools.RemoveMCMatching::__call__(), trackTools.MakePATTrackCandidates::__call__(), trigTools.SwitchOnTrigger::__call__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties::__call__(), trigTools.SwitchOnTriggerStandAlone::__call__(), tauTools.AddTauCollection::__call__(), trackTools.MakeTrackCandidates::__call__(), trigTools.SwitchOnTriggerMatching::__call__(), trigTools.SwitchOnTriggerMatchingStandAlone::__call__(), trigTools.SwitchOnTriggerMatchEmbedding::__call__(), jetTools.AddJetCollection::__call__(), jetTools.SwitchJetCollection::__call__(), jetTools.UpdateJetCollection::__call__(), jetTools.AddJetID::__call__(), jetTools.SetTagInfos::__call__(), HGCalCassette(), and runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties::jetConfiguration().

7  {
8  cassette_ = cassette;
9  typeHE_ = (cassette_ >= 12);
10  shifts_.insert(shifts_.end(), shifts.begin(), shifts.end());
11 #ifdef EDM_ML_DEBUG
12  edm::LogVerbatim("HGCalGeom") << "# of cassettes = " << cassette_ << " Type " << typeHE_;
13  std::ostringstream st1;
14  st1 << " Shifts:";
15  for (const auto& s : shifts_)
16  st1 << ":" << s;
17  edm::LogVerbatim("HGCalGeom") << st1.str();
18 #endif
19 }
Log< level::Info, true > LogVerbatim
std::vector< double > shifts_
Definition: HGCalCassette.h:21

Member Data Documentation

◆ cassette_

int HGCalCassette::cassette_
private

Definition at line 19 of file HGCalCassette.h.

Referenced by getShift(), and setParameter().

◆ positEE_

const std::vector<int> HGCalCassette::positEE_ = {2, 1, 0, 5, 4, 3}
private

Definition at line 17 of file HGCalCassette.h.

Referenced by getShift().

◆ positHE_

const std::vector<int> HGCalCassette::positHE_ = {5, 4, 3, 2, 1, 0, 11, 10, 9, 8, 7, 6}
private

Definition at line 18 of file HGCalCassette.h.

Referenced by getShift().

◆ shifts_

std::vector<double> HGCalCassette::shifts_
private

Definition at line 21 of file HGCalCassette.h.

Referenced by getShift(), and setParameter().

◆ typeHE_

bool HGCalCassette::typeHE_
private

Definition at line 20 of file HGCalCassette.h.

Referenced by getShift(), and setParameter().