CMS 3D CMS Logo

CaloDetInfo.cc
Go to the documentation of this file.
2 
3 #include <iomanip>
4 
6  uint32_t id, uint32_t d, double r, const std::string& name, G4ThreeVector pos, const G4VSolid* solid, bool flag)
7  : id_(id), depth_(d), rho_(r), name_(name), pos_(pos), solid_(solid), flag_(flag) {}
8 
10  : id_(0), depth_(0), rho_(0), name_(""), pos_(G4ThreeVector(0, 0, 0)), solid_(nullptr), flag_(false) {}
11 
13  id_ = right.id_;
14  depth_ = right.depth_;
15  rho_ = right.rho_;
16  name_ = right.name_;
17  pos_ = right.pos_;
18  solid_ = right.solid_;
19  flag_ = right.flag_;
20 }
21 
23  if (id_ == info.id()) {
24  if (depth_ == info.depth()) {
25  return (rho_ > info.rho());
26  } else {
27  return (depth_ > info.depth());
28  }
29  } else {
30  return (id_ > info.id());
31  }
32 }
33 
34 std::ostream& operator<<(std::ostream& os, const CaloDetInfo& info) {
35  os << info.name() << " Id 0x" << std::hex << info.id() << std::dec << ":" << info.depth() << " R "
36  << std::setprecision(4) << info.rho() << " Position " << info.pos();
37  return os;
38 }
static const TGPicture * info(bool iBackgroundIsBlack)
uint32_t id_
Definition: CaloDetInfo.h:33
G4ThreeVector pos_
Definition: CaloDetInfo.h:37
std::ostream & operator<<(std::ostream &os, const CaloDetInfo &info)
Definition: CaloDetInfo.cc:34
uint32_t depth_
Definition: CaloDetInfo.h:34
d
Definition: ztail.py:151
bool operator<(const CaloDetInfo &info) const
Definition: CaloDetInfo.cc:22
double rho_
Definition: CaloDetInfo.h:35
std::string name_
Definition: CaloDetInfo.h:36
struct @718 flag_
const G4VSolid * solid_
Definition: CaloDetInfo.h:38