Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
RecoCaloTools
MetaCollections
interface
CaloRecHitMetaCollections.h
Go to the documentation of this file.
1
#ifndef RECOCALOTOOLS_METACOLLECTIONS_CALORECHITMETACOLLECTIONS_H
2
#define RECOCALOTOOLS_METACOLLECTIONS_CALORECHITMETACOLLECTIONS_H 1
3
4
#include "
DataFormats/HcalRecHit/interface/HcalRecHitCollections.h
"
5
#include "
DataFormats/EcalRecHit/interface/EcalRecHitCollections.h
"
6
#include "
RecoCaloTools/MetaCollections/interface/CaloRecHitMetaCollectionV.h
"
7
8
template
<
class
C>
9
class
SimpleCaloRecHitMetaCollection
:
public
CaloRecHitMetaCollectionV
{
10
public
:
11
typedef
CaloRecHitMetaCollectionV::const_iterator
const_iterator
;
12
13
SimpleCaloRecHitMetaCollection
(
const
C
&
c
) :
coll_
(c) {
size_
=
coll_
.size(); }
14
SimpleCaloRecHitMetaCollection
(
const
C
*
c
) :
coll_
(*c) {
size_
=
coll_
.size(); }
15
virtual
const_iterator
find
(
const
DetId
&
id
)
const
{
16
const_iterator
i
=
end
();
17
typename
C::const_iterator
j
=
coll_
.find(
id
);
18
if
(j!=
coll_
.end()) {
19
int
delta
=j-
coll_
.begin();
20
i=
const_iterator
(
this
,delta);
21
}
22
return
i
;
23
}
24
virtual
const
CaloRecHit
*
at
(
const_iterator::offset_type
i
)
const
{
25
return
&(
coll_
[
i
]);
26
}
27
private
:
28
const
C
&
coll_
;
29
};
30
31
typedef
SimpleCaloRecHitMetaCollection<HBHERecHitCollection>
HBHERecHitMetaCollection
;
32
typedef
SimpleCaloRecHitMetaCollection<HFRecHitCollection>
HFRecHitMetaCollection
;
33
typedef
SimpleCaloRecHitMetaCollection<HORecHitCollection>
HORecHitMetaCollection
;
34
typedef
SimpleCaloRecHitMetaCollection<EcalRecHitCollection>
EcalRecHitMetaCollection
;
35
36
#endif
CaloRecHitMetaCollectionV
Definition:
CaloRecHitMetaCollectionV.h:18
delta
dbl * delta
Definition:
mlp_gen.cc:36
i
int i
Definition:
DBlmapReader.cc:9
HORecHitMetaCollection
SimpleCaloRecHitMetaCollection< HORecHitCollection > HORecHitMetaCollection
Definition:
CaloRecHitMetaCollections.h:33
SimpleCaloRecHitMetaCollection
Definition:
CaloRecHitMetaCollections.h:9
SimpleCaloRecHitMetaCollection::SimpleCaloRecHitMetaCollection
SimpleCaloRecHitMetaCollection(const C *c)
Definition:
CaloRecHitMetaCollections.h:14
SimpleCaloRecHitMetaCollection::SimpleCaloRecHitMetaCollection
SimpleCaloRecHitMetaCollection(const C &c)
Definition:
CaloRecHitMetaCollections.h:13
CaloRecHitMetaCollectionV::Iterator
Definition:
CaloRecHitMetaCollectionV.h:20
EcalRecHitCollections.h
SimpleCaloRecHitMetaCollection::find
virtual const_iterator find(const DetId &id) const
find by id (default version is very slow unsorted find)
Definition:
CaloRecHitMetaCollections.h:15
funct::C
C
Definition:
Factorize.h:141
CaloRecHit
Definition:
CaloRecHit.h:14
CaloRecHitMetaCollectionV::end
const_iterator end() const
get the ending iterator
Definition:
CaloRecHitMetaCollectionV.h:77
CaloRecHitMetaCollectionV.h
j
int j
Definition:
DBlmapReader.cc:9
HBHERecHitMetaCollection
SimpleCaloRecHitMetaCollection< HBHERecHitCollection > HBHERecHitMetaCollection
Definition:
CaloRecHitMetaCollections.h:31
DetId
Definition:
DetId.h:20
CaloRecHitMetaCollectionV::Iterator::offset_type
int offset_type
Definition:
CaloRecHitMetaCollectionV.h:27
trackerHits.c
tuple c
Definition:
trackerHits.py:26
HcalRecHitCollections.h
EcalRecHitMetaCollection
SimpleCaloRecHitMetaCollection< EcalRecHitCollection > EcalRecHitMetaCollection
Definition:
CaloRecHitMetaCollections.h:34
CaloRecHitMetaCollectionV::size_
unsigned int size_
Definition:
CaloRecHitMetaCollectionV.h:86
HFRecHitMetaCollection
SimpleCaloRecHitMetaCollection< HFRecHitCollection > HFRecHitMetaCollection
Definition:
CaloRecHitMetaCollections.h:32
SimpleCaloRecHitMetaCollection::const_iterator
CaloRecHitMetaCollectionV::const_iterator const_iterator
Definition:
CaloRecHitMetaCollections.h:11
SimpleCaloRecHitMetaCollection::coll_
const C & coll_
Definition:
CaloRecHitMetaCollections.h:28
SimpleCaloRecHitMetaCollection::at
virtual const CaloRecHit * at(const_iterator::offset_type i) const
get an item by index
Definition:
CaloRecHitMetaCollections.h:24
Generated for CMSSW Reference Manual by
1.8.5