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 }
ME0DigiPreReco::print
void print() const
Definition: ME0DigiPreReco.cc:47
ME0DigiPreReco::prompt
int prompt() const
Definition: ME0DigiPreReco.h:33
ME0DigiPreReco.h
ME0DigiPreReco::operator<
bool operator<(const ME0DigiPreReco &digi) const
Precedence operator.
Definition: ME0DigiPreReco.cc:29
gather_cfg.cout
cout
Definition: gather_cfg.py:144
ME0DigiPreReco::tof_
float tof_
Definition: ME0DigiPreReco.h:42
ME0DigiPreReco::ey
float ey() const
Definition: ME0DigiPreReco.h:28
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
ME0DigiPreReco::y
float y() const
Definition: ME0DigiPreReco.h:26
alignCSCRings.corr
dictionary corr
Definition: alignCSCRings.py:124
vertices_cff.x
x
Definition: vertices_cff.py:29
operator<<
std::ostream & operator<<(std::ostream &o, const ME0DigiPreReco &digi)
Definition: ME0DigiPreReco.cc:40
ME0DigiPreReco::operator!=
bool operator!=(const ME0DigiPreReco &digi) const
Definition: ME0DigiPreReco.cc:24
ME0DigiPreReco::pdgid
int pdgid() const
Definition: ME0DigiPreReco.h:32
ME0DigiPreReco::ME0DigiPreReco
ME0DigiPreReco()
Definition: ME0DigiPreReco.cc:16
ME0DigiPreReco::ex
float ex() const
Definition: ME0DigiPreReco.h:27
ME0DigiPreReco
Definition: ME0DigiPreReco.h:15
detailsBasic3DVector::y
float float y
Definition: extBasic3DVector.h:14
or
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
ME0DigiPreReco::y_
float y_
Definition: ME0DigiPreReco.h:38
ME0DigiPreReco::operator==
bool operator==(const ME0DigiPreReco &digi) const
Definition: ME0DigiPreReco.cc:19
ME0DigiPreReco::x_
float x_
Definition: ME0DigiPreReco.h:37
ME0DigiPreReco::tof
float tof() const
Definition: ME0DigiPreReco.h:30
ME0DigiPreReco::x
float x() const
Definition: ME0DigiPreReco.h:25
EgammaValidation_cff.pdgid
pdgid
Definition: EgammaValidation_cff.py:30