1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#ifndef FastSimulation_CaloGeometryTools_CrystalWindowMap_h
#define FastSimulation_CaloGeometryTools_CrystalWindowMap_h
/**
* This class is used by EcalHitMaker to determine quickly in which Pad each
* spots falls.
* Each crystal is labelled by its number. Given a crystal number, several methods
* allow to get the ordered (by distance) list of the neighbouring crystals
*
* \author Florian Beaudette
* \date: 08-Jun-2004
* \date: 05-Oct-2006
*/
// FAMOS headers
#include "FastSimulation/CaloGeometryTools/interface/Crystal.h"
//C++ headers
#include <vector>
class CaloGeometryHelper;
class CrystalWindowMap {
public:
/// Constructor from vector of Crystal
CrystalWindowMap(const CaloGeometryHelper*, const std::vector<Crystal>& cw);
~CrystalWindowMap() { ; };
/// get the ordered list of the crystals around the crystal given as a first argument
bool getCrystalWindow(unsigned, std::vector<unsigned>&) const;
/// same thing but with a different interface
bool getCrystalWindow(unsigned iq, const std::vector<unsigned>* cw) const;
/// same thing but with a different interface
const std::vector<unsigned>& getCrystalWindow(unsigned, bool& status) const;
inline unsigned size() const { return size_; }
private:
const CaloGeometryHelper* myCalorimeter_;
unsigned size_;
const std::vector<Crystal>& originalVector_;
std::vector<std::vector<unsigned> > myNeighbours_;
};
#endif
|