CMS 3D CMS Logo

Functions
FTLRecHit.cc File Reference
#include "DataFormats/FTLRecHit/interface/FTLRecHit.h"
#include "DataFormats/ForwardDetId/interface/FastTimeDetId.h"
#include <cassert>
#include <cmath>
#include <limits>

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &s, const FTLRecHit &hit)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const FTLRecHit hit 
)

Definition at line 50 of file FTLRecHit.cc.

References DetId::det(), FTLRecHit::detid(), FTLRecHit::energy(), FastTime, DetId::Forward, DetId::subdetId(), and FTLRecHit::time().

50  {
51  if (hit.detid().det() == DetId::Forward && hit.detid().subdetId() == FastTime)
52  return s << FastTimeDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
53  else
54  return s << "FTLRecHit undefined subdetector" ;
55 }
const DetId & detid() const
Definition: FTLRecHit.h:50
float energy() const
get the id
Definition: FTLRecHit.h:46
float time() const
Definition: FTLRecHit.h:57
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39