00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef ROIDESCRIPTOR_ROIDESCRIPTOR_H
00015 #define ROIDESCRIPTOR_ROIDESCRIPTOR_H
00016
00017 #include <iostream>
00018
00019 #include "IRegionSelector/IRoiDescriptor.h"
00020
00021
00037 class RoiDescriptor : public IRoiDescriptor {
00038
00039 public:
00040
00045 RoiDescriptor(bool fullscan=false);
00046
00059 RoiDescriptor(double eta_, double etaMinus_, double etaPlus_,
00060 double phi_, double phiMinus_, double phiPlus_,
00061 double zed_=0, double zedMinus_=-zedWidthDefault, double zedPlus_=zedWidthDefault );
00069 RoiDescriptor(double etaMinus_, double etaPlus_,
00070 double phiMinus_, double phiPlus_ );
00071
00075 RoiDescriptor( const IRoiDescriptor& roi );
00076
00077 RoiDescriptor& operator=( const IRoiDescriptor& r );
00078
00079
00080 virtual ~RoiDescriptor();
00081
00082
00083
00084
00085 double phi() const { return m_phi; }
00086 double eta() const { return m_eta; }
00087 double zed() const { return m_zed; }
00088
00092
00093 virtual unsigned int roiId() const { return 0; }
00094 virtual unsigned int l1Id() const { return 0; }
00095 virtual unsigned int roiWord() const { return 0; }
00096
00097 double zedPlus() const { return m_zedPlus; }
00098 double zedMinus() const { return m_zedMinus; }
00099
00100 double etaPlus() const { return m_etaPlus; }
00101 double etaMinus() const { return m_etaMinus; }
00102
00103 double phiPlus() const { return m_phiPlus; }
00104 double phiMinus() const { return m_phiMinus; }
00105
00106
00108 int version() const { return m_version; }
00109 void version(int v) { m_version = v; }
00110
00111
00113 virtual operator std::string() const;
00114
00115
00117 bool isFullscan() const { return m_fullscan; }
00118
00120
00122 virtual bool composite() const { return m_composite; }
00123 virtual void setComposite(bool b=true) { m_composite=b; }
00124
00126 virtual bool manageConstituents() const { return m_manageConstituents; }
00127 virtual void manageConstituents(bool b) { m_manageConstituents=b; }
00128
00130 virtual unsigned size() const { return m_roiDescriptors.size(); }
00131
00133 virtual const IRoiDescriptor* at(int i) const { return m_roiDescriptors.at(i); }
00134
00136 void clear() { m_roiDescriptors.clear(); }
00137
00139 void push_back(const IRoiDescriptor* roi) { m_roiDescriptors.push_back(roi); setComposite(true); }
00140
00142
00143
00144 roi_iterator begin() const { return m_roiDescriptors.begin(); }
00145 roi_iterator end() const { return m_roiDescriptors.end(); }
00146
00147
00148
00150
00152 double dzdrMinus() const { return m_dzdrMinus; }
00153 double dzdrPlus() const { return m_dzdrPlus; }
00154
00155 double drdzMinus() const { return m_drdzMinus; }
00156 double drdzPlus() const { return m_drdzPlus; }
00157
00160 double zedMin(const double r) const;
00161 double zedMax(const double r) const;
00162
00163 double zedOuterPlus() const { return m_zedOuterPlus; }
00164 double zedOuterMinus() const { return m_zedOuterMinus; }
00165
00166 double rhoMin(const double z) const;
00167 double rhoMax(const double z) const;
00168
00169 protected:
00170
00171 friend class TrigRoiDescriptorCnv_p2;
00172 friend class TrigRoiDescriptorCnv_p3;
00173
00178 void construct(double eta, double etaMinus, double etaPlus,
00179 double phi, double phiMinus, double phiPlus,
00180 double zed, double zedMinus, double zedPlus);
00181
00182 void construct( const IRoiDescriptor& _roi );
00183
00184 protected:
00185
00187 static const double zedWidthDefault;
00188
00189 protected:
00190
00191 float m_phi;
00192 float m_eta;
00193 float m_zed;
00194
00195 float m_phiMinus;
00196 float m_phiPlus;
00197 float m_etaMinus;
00198 float m_etaPlus;
00199 float m_zedMinus;
00200 float m_zedPlus;
00201
00202 float m_dzdrMinus;
00203 float m_dzdrPlus;
00204
00205 float m_drdzMinus;
00206 float m_drdzPlus;
00207
00208 float m_zedOuterMinus;
00209 float m_zedOuterPlus;
00210
00211 bool m_fullscan;
00212 bool m_composite;
00213 bool m_manageConstituents;
00214
00215 int m_version;
00216
00217 std::vector<const IRoiDescriptor*> m_roiDescriptors;
00218
00219 };
00220
00221
00222 std::string str( const RoiDescriptor& d );
00223 std::ostream& operator<<( std::ostream& m, const RoiDescriptor& d );
00224
00225 #endif // ROIDESCRIPTOR_H
00226