CMS 3D CMS Logo

ME0DigiPreReco.cc
Go to the documentation of this file.
1 
10 #include <iostream>
11 
12 //ME0DigiPreReco::ME0DigiPreReco (float x, float y, float ex, float ey, float corr, float tof) :
13 ME0DigiPreReco::ME0DigiPreReco(float x, float y, float ex, float ey, float corr, float tof, int pdgid, int prompt)
14  : x_(x), y_(y), ex_(ex), ey_(ey), corr_(corr), tof_(tof), pdgid_(pdgid), prompt_(prompt) {}
15 
16 ME0DigiPreReco::ME0DigiPreReco() : x_(0.), y_(0.), ex_(0.), ey_(0.), corr_(0.), tof_(-1.), pdgid_(0), prompt_(0) {}
17 
18 // Comparison
19 bool ME0DigiPreReco::operator==(const ME0DigiPreReco& digi) const {
20  return x_ == digi.x() and y_ == digi.y() and tof_ == digi.tof();
21 }
22 
23 // Comparison
24 bool ME0DigiPreReco::operator!=(const ME0DigiPreReco& digi) const {
25  return x_ != digi.x() or y_ != digi.y() or tof_ != digi.tof();
26 }
27 
29 bool ME0DigiPreReco::operator<(const ME0DigiPreReco& digi) const {
30  if (digi.tof() == tof_) {
31  if (digi.x() == x_)
32  return digi.y() < y_;
33  else
34  return digi.x() < x_;
35  } else {
36  return digi.tof() < tof_;
37  }
38 }
39 
40 std::ostream& operator<<(std::ostream& o, const ME0DigiPreReco& digi) {
41  // return o << "local x=" << digi.x() << " cm y=" << digi.y()<<" cm ex=" << digi.ex() << " cm ey=" << digi.ey()<< " cm tof="<<digi.tof()<<" ns";
42  return o << "local x=" << digi.x() << " cm y=" << digi.y() << " cm ex=" << digi.ex() << " cm ey=" << digi.ey()
43  << " cm tof=" << digi.tof() << " ns"
44  << " pdgID " << digi.pdgid() << " prompt? " << digi.prompt();
45 }
46 
47 void ME0DigiPreReco::print() const {
48  // std::cout << "local x=" << this->x() << " cm y=" << this->y() <<" cm tof="<<this->tof()<<" ns"<<std::endl;
49  std::cout << "local x=" << this->x() << " cm y=" << this->y() << " cm tof=" << this->tof() << " ns"
50  << " pdgID " << this->pdgid() << " prompt? " << this->prompt() << std::endl;
51 }
float y() const
float tof() const
int pdgid() const
int prompt() const
float ey() const
bool operator<(const ME0DigiPreReco &digi) const
Precedence operator.
void print() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
bool operator!=(const ME0DigiPreReco &digi) const
JetCorrectorParameters corr
Definition: classes.h:5
bool operator==(const ME0DigiPreReco &digi) const
float x() const
float ex() const
std::ostream & operator<<(std::ostream &o, const ME0DigiPreReco &digi)