CMS 3D CMS Logo

ME0DigiPreReco.cc
Go to the documentation of this file.
1 
11 #include <iostream>
12 
13 //ME0DigiPreReco::ME0DigiPreReco (float x, float y, float ex, float ey, float corr, float tof) :
14 ME0DigiPreReco::ME0DigiPreReco (float x, float y, float ex, float ey, float corr, float tof, int pdgid, int prompt) :
15  x_(x),
16  y_(y),
17  ex_(ex),
18  ey_(ey),
19  corr_(corr),
20  tof_(tof),
21  pdgid_(pdgid),
22  prompt_(prompt)
23 {}
24 
26  x_(0.),
27  y_(0.),
28  ex_(0.),
29  ey_(0.),
30  corr_(0.),
31  tof_(-1.),
32  pdgid_(0),
33  prompt_(0)
34 {}
35 
36 
37 // Comparison
39 {
40  return x_ == digi.x() and y_ == digi.y() and tof_ == digi.tof();
41 }
42 
43 
44 // Comparison
46 {
47  return x_ != digi.x() or y_ != digi.y() or tof_ != digi.tof();
48 }
49 
50 
53 {
54  if (digi.tof() == tof_){
55  if(digi.x() == x_)
56  return digi.y() < y_;
57  else
58  return digi.x() < x_;
59  } else {
60  return digi.tof() < tof_;
61  }
62 }
63 
64 
65 std::ostream & operator<<(std::ostream & o, const ME0DigiPreReco& digi)
66 {
67 // return o << "local x=" << digi.x() << " cm y=" << digi.y()<<" cm ex=" << digi.ex() << " cm ey=" << digi.ey()<< " cm tof="<<digi.tof()<<" ns";
68  return o << "local x=" << digi.x() << " cm y=" << digi.y()<<" cm ex=" << digi.ex() << " cm ey=" << digi.ey()<< " cm tof="<<digi.tof()<<" ns"<<" pdgID "<<digi.pdgid()<<" prompt? "<<digi.prompt();
69 }
70 
72 {
73 // std::cout << "local x=" << this->x() << " cm y=" << this->y() <<" cm tof="<<this->tof()<<" ns"<<std::endl;
74  std::cout << "local x=" << this->x() << " cm y=" << this->y() <<" cm tof="<<this->tof()<<" ns"<<" pdgID "<<this->pdgid()<<" prompt? "<<this->prompt()<<std::endl;
75 }
76 
float y() const
float tof() const
int pdgid() const
int prompt() const
float ey() const
T x() const
Cartesian x coordinate.
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)