CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
ecalpyutils Namespace Reference

Functions

std::string arraystoXML (const std::vector< float > &eb, const std::vector< float > &ee)
 
int hashedIndex (int ieta, int iphi)
 
int hashedIndexEE (int ix, int iy, int iz)
 
std::vector< int > hashedIndexToEtaPhi (int hashedindex)
 
std::vector< int > hashedIndexToXY (int hashedindex)
 
int ism (int ieta, int iphi)
 

Function Documentation

std::string ecalpyutils::arraystoXML ( const std::vector< float > &  eb,
const std::vector< float > &  ee 
)

Definition at line 61 of file EcalPyUtils.cc.

References EcalFloatCondObjectContainerXMLTranslator::dumpXML(), and h.

Referenced by BOOST_PYTHON_MODULE().

61  {
64  }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
static std::string dumpXML(const EcalCondHeader &header, const EcalFloatCondObjectContainer &record)
int ecalpyutils::hashedIndex ( int  ieta,
int  iphi 
)
int ecalpyutils::hashedIndexEE ( int  ix,
int  iy,
int  iz 
)

Definition at line 47 of file EcalPyUtils.cc.

References ztail::d, EEDetId::hashedIndex(), and EEDetId::validDetId().

Referenced by BOOST_PYTHON_MODULE().

47  {
48 
49  if (EEDetId::validDetId(ix,iy,iz)) {
50  EEDetId d(ix,iy,iz);
51  return d.hashedIndex();
52  }
53  return 0;
54  }
tuple d
Definition: ztail.py:151
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
std::vector<int> ecalpyutils::hashedIndexToEtaPhi ( int  hashedindex)

Definition at line 21 of file EcalPyUtils.cc.

References EBDetId::ieta(), EBDetId::iphi(), runTheMatrix::ret, and EBDetId::unhashIndex().

Referenced by BOOST_PYTHON_MODULE(), and EcalPyUtils::unhashEBIndex().

21  {
22  int ieta= EBDetId::unhashIndex(hashedindex).ieta();
23  int iphi= EBDetId::unhashIndex(hashedindex).iphi();
24  std::vector<int> ret;
25  ret.push_back(ieta);
26  ret.push_back(iphi);
27  return ret;
28  }
tuple ret
prodAgent to be discontinued
int iphi() const
get the crystal iphi
Definition: EBDetId.h:53
int ieta() const
get the crystal ieta
Definition: EBDetId.h:51
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:114
std::vector<int> ecalpyutils::hashedIndexToXY ( int  hashedindex)

Definition at line 30 of file EcalPyUtils.cc.

References EEDetId::ix(), EEDetId::iy(), runTheMatrix::ret, EEDetId::unhashIndex(), EEDetId::zside(), and ecaldqm::zside().

Referenced by BOOST_PYTHON_MODULE(), and EcalPyUtils::unhashEEIndex().

30  {
31  int ix= EEDetId::unhashIndex(hashedindex).ix();
32  int iy= EEDetId::unhashIndex(hashedindex).iy();
33  int zside = EEDetId::unhashIndex(hashedindex).zside();
34  std::vector<int> ret;
35  ret.push_back(ix);
36  ret.push_back(iy);
37  ret.push_back(zside);
38  return ret;
39  }
tuple ret
prodAgent to be discontinued
int ix() const
Definition: EEDetId.h:76
int zside(DetId const &)
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:99
int zside() const
Definition: EEDetId.h:70
int iy() const
Definition: EEDetId.h:82
int ecalpyutils::ism ( int  ieta,
int  iphi 
)