test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
DataFormats
EcalRecHit
src
EcalRecHit.cc
Go to the documentation of this file.
1
#include "
DataFormats/EcalRecHit/interface/EcalRecHit.h
"
2
#include "
DataFormats/EcalDetId/interface/EBDetId.h
"
3
#include "
DataFormats/EcalDetId/interface/EEDetId.h
"
4
#include "
DataFormats/EcalDetId/interface/ESDetId.h
"
5
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
6
#include <cassert>
7
#include <
math.h
>
8
9
10
std::ostream&
operator<<
(std::ostream&
s
,
const
EcalRecHit
&
hit
) {
11
if
(hit.
detid
().
det
() ==
DetId::Ecal
&& hit.
detid
().
subdetId
() ==
EcalBarrel
)
12
return
s <<
EBDetId
(hit.
detid
()) <<
": "
<< hit.
energy
() <<
" GeV, "
<< hit.
time
() <<
" ns"
;
13
else
if
(hit.
detid
().
det
() ==
DetId::Ecal
&& hit.
detid
().
subdetId
() ==
EcalEndcap
)
14
return
s <<
EEDetId
(hit.
detid
()) <<
": "
<< hit.
energy
() <<
" GeV, "
<< hit.
time
() <<
" ns"
;
15
else
if
(hit.
detid
().
det
() ==
DetId::Ecal
&& hit.
detid
().
subdetId
() ==
EcalPreshower
)
16
return
s <<
ESDetId
(hit.
detid
()) <<
": "
<< hit.
energy
() <<
" GeV, "
<< hit.
time
() <<
" ns"
;
17
else
18
return
s <<
"EcalRecHit undefined subdetector"
;
19
}
20
21
math.h
MessageLogger.h
EBDetId
Definition:
EBDetId.h:19
EcalRecHit
Definition:
EcalRecHit.h:15
EcalRecHit::detid
const DetId & detid() const
Definition:
EcalRecHit.h:71
EcalRecHit.h
EcalRecHit::time
float time() const
Definition:
EcalRecHit.h:70
operator<<
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition:
ALILine.cc:188
EcalPreshower
Definition:
EcalSubdetector.h:11
DetId::Ecal
Definition:
DetId.h:24
EEDetId
Definition:
EEDetId.h:15
EcalRecHit::energy
float energy() const
Definition:
EcalRecHit.h:68
DetId::subdetId
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Definition:
DetId.h:37
alignCSCRings.s
list s
Definition:
alignCSCRings.py:91
ESDetId
Definition:
ESDetId.h:14
hit
Definition:
SiStripHitEffFromCalibTree.cc:87
EcalBarrel
Definition:
EcalSubdetector.h:11
EBDetId.h
EEDetId.h
EcalEndcap
Definition:
EcalSubdetector.h:11
DetId::det
Detector det() const
get the detector field from this detid
Definition:
DetId.h:35
ESDetId.h
Generated for CMSSW Reference Manual by
1.8.5