CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Rings.h
Go to the documentation of this file.
1 #ifndef RECOTRACKER_RINGS_H
2 #define RECOTRACKER_RINGS_H
3 
4 //
5 // Package: RecoTracker/RingRecord
6 // Class: Rings
7 //
8 // Description: The Rings object holds all Rings of
9 // the tracker mapped in z of their centers
10 //
11 // Original Author: Oliver Gutsche, gutsche@fnal.gov
12 // Created: Tue Oct 3 22:14:25 UTC 2006
13 //
14 // $Author: gutsche $
15 // $Date: 2007/02/05 19:10:03 $
16 // $Revision: 1.1 $
17 //
18 
19 #include <vector>
20 #include <map>
21 #include <utility>
22 #include <string>
23 #include <fstream>
24 
26 
27 class Rings {
28 
29  public:
30 
31  typedef std::multimap<double,Ring> RingMap;
32  typedef RingMap::iterator iterator;
33  typedef RingMap::const_iterator const_iterator;
34 
35  Rings();
36  Rings(std::string ascii_file);
37 
38  ~Rings();
39 
40  inline void insert(double z, Ring &ring) { ringMap_.insert(std::make_pair(z,ring)); }
41 
42  inline iterator begin() { return ringMap_.begin(); }
43  inline iterator end() { return ringMap_.end(); }
44  inline const_iterator begin() const { return ringMap_.begin(); }
45  inline const_iterator end() const { return ringMap_.end(); }
46  inline iterator lower_bound(double z) { return ringMap_.lower_bound(z); }
47  inline iterator upper_bound(double z) { return ringMap_.upper_bound(z); }
48  inline const_iterator lower_bound(double z) const { return ringMap_.lower_bound(z); }
49  inline const_iterator upper_bound(double z) const { return ringMap_.upper_bound(z); }
50 
51  void dump(std::string ascii_filename = "rings.dat") const;
52  void dumpHeader(std::ofstream &stream) const;
53 
54  void readInFromAsciiFile(std::string ascii_file);
55 
56  const Ring* getRing(DetId id, double phi = 999999., double z = 999999.) const;
57  const Ring* getRing(unsigned int ringIndex, double z = 999999.) const;
58  const Ring* getTIBRing(unsigned int layer,
59  unsigned int fw_bw,
60  unsigned int ext_int,
61  unsigned int detector) const;
62  const Ring* getTOBRing(unsigned int layer,
63  unsigned int rod_fw_bw,
64  unsigned int detector) const;
65  const Ring* getTIDRing(unsigned int fw_bw,
66  unsigned int wheel,
67  unsigned int ring) const;
68  const Ring* getTECRing(unsigned int fw_bw,
69  unsigned int wheel,
70  unsigned int ring) const;
71  const Ring* getPXBRing(unsigned int layer,
72  unsigned int detector) const;
73  const Ring* getPXFRing(unsigned int fw_bw,
74  unsigned int disk,
75  unsigned int panel,
76  unsigned int module) const;
77 
78  private:
79 
81 
82 };
83 
84 #endif
const Ring * getTOBRing(unsigned int layer, unsigned int rod_fw_bw, unsigned int detector) const
Definition: Rings.cc:291
const Ring * getRing(DetId id, double phi=999999., double z=999999.) const
Definition: Rings.cc:152
iterator upper_bound(double z)
Definition: Rings.h:47
const_iterator begin() const
Definition: Rings.h:44
RingMap::const_iterator const_iterator
Definition: Rings.h:33
std::multimap< double, Ring > RingMap
Definition: Rings.h:31
void dump(std::string ascii_filename="rings.dat") const
Definition: Rings.cc:105
iterator begin()
Definition: Rings.h:42
void dumpHeader(std::ofstream &stream) const
Definition: Rings.cc:122
Rings()
Definition: Rings.cc:36
RingMap::iterator iterator
Definition: Rings.h:32
const Ring * getPXFRing(unsigned int fw_bw, unsigned int disk, unsigned int panel, unsigned int module) const
Definition: Rings.cc:329
double double double z
const Ring * getTIDRing(unsigned int fw_bw, unsigned int wheel, unsigned int ring) const
Definition: Rings.cc:230
const Ring * getTIBRing(unsigned int layer, unsigned int fw_bw, unsigned int ext_int, unsigned int detector) const
Definition: Rings.cc:201
RingMap ringMap_
Definition: Rings.h:80
Definition: Ring.h:31
Definition: Rings.h:27
const_iterator lower_bound(double z) const
Definition: Rings.h:48
Definition: DetId.h:20
const Ring * getPXBRing(unsigned int layer, unsigned int detector) const
Definition: Rings.cc:317
void readInFromAsciiFile(std::string ascii_file)
Definition: Rings.cc:57
void insert(double z, Ring &ring)
Definition: Rings.h:40
iterator end()
Definition: Rings.h:43
~Rings()
Definition: Rings.cc:51
Definition: vlib.h:209
iterator lower_bound(double z)
Definition: Rings.h:46
const Ring * getTECRing(unsigned int fw_bw, unsigned int wheel, unsigned int ring) const
Definition: Rings.cc:257
const_iterator end() const
Definition: Rings.h:45
const_iterator upper_bound(double z) const
Definition: Rings.h:49
Definition: DDAxes.h:10