#include <UgliScintPlnHandle.h>
Inheritance diagram for UgliScintPlnHandle:

Public Member Functions | |
| UgliScintPlnHandle (UgliScintPlnNode *scintNode) | |
| UgliScintPlnHandle (GeoScintPlnNode *scintNode) | |
| UgliScintPlnHandle (const UgliScintPlnHandle &that) | |
| UgliScintPlnHandle & | operator= (const UgliScintPlnHandle &that) |
| UgliScintPlnHandle () | |
| virtual | ~UgliScintPlnHandle () |
| virtual Bool_t | IsValid () const |
| virtual Bool_t | IsFrozen () const |
| virtual Int_t | NumberOfStrips () const |
| virtual UgliStripHandle | GetStripHandle (PlexStripEndId seid) |
| std::vector< UgliStripHandle > | GetStripHandleVector () |
| std::vector< UgliScintMdlHandle > | GetScintMdlHandleVector () |
| UgliStripHandle | GetClosestStrip (Float_t tpos, Float_t orthCoord=9999.) |
| virtual TVector3 | GlobalToLocal (const TVector3 &global, const Bool_t globalInXYZ=true) const |
| virtual TVector3 | LocalToGlobal (const TVector3 &local, const Bool_t globalInXYZ=true) const |
| Float_t | GetZRotRelSteelRad () const |
| Float_t | GetX0RelSteel () const |
| Float_t | GetY0RelSteel () const |
| Bool_t | AttemptSet (const char *what="?") const |
| void | SetZRotRelSteelRad (Float_t radians) |
| void | SetXY0RelSteel (Float_t x0, Float_t y0) |
| void | RotateRelSteelBy (Float_t deltaRadians) |
| void | ShiftXY0RelSteelBy (Float_t dx, Float_t dy) |
Protected Attributes | |
| UgliScintPlnNode * | fUgliScintPlnNode |
| GeoScintPlnNode * | fGeoScintPlnNode |
|
|
Definition at line 45 of file UgliScintPlnHandle.cxx. 00046 : UgliPlnHandle(node), fUgliScintPlnNode(node), fGeoScintPlnNode(0) 00047 { 00048 // ctor keeps reference count up-to-date 00049 // done by super-class UgliPlnHandle 00050 // don't do it here or we'll get two counts for every handle 00051 00052 // if (fUgliScintPlnNode) fUgliScintPlnNode->IncrementRef(); 00053 }
|
|
|
Definition at line 56 of file UgliScintPlnHandle.cxx. 00057 : UgliPlnHandle(node), fUgliScintPlnNode(0), fGeoScintPlnNode(node) 00058 { 00059 // ctor keeps reference count up-to-date 00060 // done by super-class UgliPlnHandle 00061 // don't do it here or we'll get two counts for every handle 00062 00063 // if (fGeoScintPlnNode) fGeoScintPlnNode->IncrementRef(); 00064 }
|
|
|
Definition at line 67 of file UgliScintPlnHandle.cxx. 00068 : UgliPlnHandle(that), 00069 UgliScintPlnABC(), 00070 fUgliScintPlnNode(that.fUgliScintPlnNode), 00071 fGeoScintPlnNode(that.fGeoScintPlnNode) 00072 { 00073 // copy constructor keeps reference counts up-to-date 00074 // done by super-class UgliPlnHandle 00075 // don't do it here or we'll get two counts for every handle 00076 00077 // if (fUgliScintPlnNode) fUgliScintPlnNode->IncrementRef(); 00078 // if (fGeoScintPlnNode) fGeoScintPlnNode->IncrementRef(); 00079 }
|
|
|
Definition at line 23 of file UgliScintPlnHandle.cxx. References MSG. 00024 : UgliPlnHandle((UgliPlnNode*)0), fUgliScintPlnNode(0), fGeoScintPlnNode(0) 00025 { 00026 // Default constructor 00027 00028 MSG("Ugli",Msg::kDebug) 00029 << "UgliScintPlnHandle created by default ctor" << endl; 00030 // assert(0); 00031 }
|
|
|
Definition at line 34 of file UgliScintPlnHandle.cxx. 00035 {
00036 // handle deletion updates reference count
00037 // done by super-class UgliPlnHandle
00038 // don't do it here or we'll get two counts for every handle
00039
00040 // if (fUgliScintPlnNode) fUgliScintPlnNode->DecrementRef();
00041 // if (fGeoScintPlnNode) fGeoScintPlnNode->DecrementRef();
00042 }
|
|
|
Definition at line 186 of file UgliScintPlnHandle.cxx. References UgliPlnHandle::GetPlexPlaneId(), IsFrozen(), and MSG. Referenced by SetXY0RelSteel(), and SetZRotRelSteelRad(). 00187 {
00188 if (!IsFrozen()) return true;
00189
00190 MSG("Ugli",Msg::kError)
00191 << "AttemptSet " << what << " on Frozen "
00192 << GetPlexPlaneId() << " twarted!" << endl;
00193 return false;
00194 }
|
|
||||||||||||
|
Definition at line 152 of file UgliScintPlnHandle.cxx. References fGeoScintPlnNode, fUgliScintPlnNode, UgliScintPlnNode::GetStripNodePtrVector(), and UgliPlnHandle::IsGeo(). Referenced by DmxShowerPlane::GetHypothesisLowerBound(), DmxMuonPlane::GetHypothesisLowerBound(), DmxShowerPlane::SetStrips(), DmxMuonPlane::SetStrips(), and GeoValidate::TestScintPln_GetClosestStrip(). 00153 {
00154 // return the handle to the strip in the plane with a position
00155 // closest to "tpos", orthCoord is position in orthogonal coordinate
00156
00157 if ( !IsGeo() ) {
00158 vector<UgliStripNode*> stripNodes =
00159 fUgliScintPlnNode->GetStripNodePtrVector();
00160
00161 UgliStripNode* closestNode = 0;
00162 Float_t closestDtpos = 999999.;
00163
00164 // very dumb approach ...
00165 // strips are ordered? when delta start getting larger we could possibly quit
00166 // (is this guaranteed in the vector?)
00167 // and/or a binary search might be better
00168 for (unsigned int i=0; i<stripNodes.size(); ++i) {
00169 Float_t strip_tpos = stripNodes[i]->GetTPos(orthCoord);
00170 Float_t dtpos = TMath::Abs(strip_tpos-tpos);
00171 if ( dtpos < closestDtpos ) {
00172 closestNode = stripNodes[i];
00173 closestDtpos = dtpos;
00174 }
00175 }
00176 return UgliStripHandle(closestNode);
00177 }
00178 else {
00179 return UgliStripHandle(fGeoScintPlnNode -> GetClosestStrip(
00180 tpos/Munits::cm,orthCoord/Munits::cm));
00181 }
00182
00183 }
|
|
|
Definition at line 131 of file UgliScintPlnHandle.cxx. References fGeoScintPlnNode, fUgliScintPlnNode, GeoScintPlnNode::GetScintMdlNodePtrVector(), UgliScintPlnNode::GetScintMdlNodePtrVector(), and UgliPlnHandle::IsGeo(). Referenced by GeoValidate::TestScintMdl(), and GeoValidate::TestScintPln_GetScintMdlHandleVector(). 00132 {
00133 //{ return fUgliScintPlnNode->GetScintMdlHandleVector(); }
00134 vector<UgliScintMdlHandle> scintMdlHandles;
00135 if ( !IsGeo() ) {
00136 vector<UgliScintMdlNode*> scintMdlNodes =
00137 fUgliScintPlnNode->GetScintMdlNodePtrVector();
00138 for (unsigned int i=0; i<scintMdlNodes.size(); ++i)
00139 scintMdlHandles.push_back(UgliScintMdlHandle(scintMdlNodes[i]));
00140 }
00141 else {
00142 vector<GeoScintMdlNode*> scintMdlNodes =
00143 fGeoScintPlnNode->GetScintMdlNodePtrVector();
00144 for (unsigned int i=0; i<scintMdlNodes.size(); ++i)
00145 scintMdlHandles.push_back(UgliScintMdlHandle(scintMdlNodes[i]));
00146 }
00147
00148 return scintMdlHandles;
00149 }
|
|
|
Definition at line 104 of file UgliScintPlnHandle.cxx. References fGeoScintPlnNode, fUgliScintPlnNode, GeoScintPlnNode::GetStripNode(), UgliScintPlnNode::GetStripNode(), and UgliPlnHandle::IsGeo(). Referenced by CandStripHandle::GetTPos(), ParticleTruthHelper::Process(), GeoValidate::TestScintPln_GetStripHandle(), and GeoValidate::TestStrip(). 00105 { if (!IsGeo()) return UgliStripHandle(fUgliScintPlnNode->GetStripNode(seid));
00106 else return UgliStripHandle(fGeoScintPlnNode->GetStripNode(seid));
00107 }
|
|
|
Definition at line 110 of file UgliScintPlnHandle.cxx. References fGeoScintPlnNode, fUgliScintPlnNode, GeoScintPlnNode::GetStripNodePtrVector(), UgliScintPlnNode::GetStripNodePtrVector(), and UgliPlnHandle::IsGeo(). Referenced by Anp::Draw::CreateTH2(), ToyMCModule::Get(), GeoValidate::TestGeom_GetStripHandle(), GeoValidate::TestScintPln_GetStripHandle(), GeoValidate::TestScintPln_GetStripHandleVector(), and GeoValidate::TestStrip(). 00111 {
00112 //{ return fUgliScintPlnNode->GetStripHandleVector(); }
00113 vector<UgliStripHandle> stripHandles;
00114 if ( !IsGeo() ) {
00115 vector<UgliStripNode*> stripNodes =
00116 fUgliScintPlnNode->GetStripNodePtrVector();
00117 for (unsigned int i=0; i<stripNodes.size(); ++i)
00118 stripHandles.push_back(UgliStripHandle(stripNodes[i]));
00119 }
00120 else {
00121 vector<GeoStripNode*> stripNodes =
00122 fGeoScintPlnNode->GetStripNodePtrVector();
00123 for (unsigned int i=0; i<stripNodes.size(); ++i)
00124 stripHandles.push_back(UgliStripHandle(stripNodes[i]));
00125 }
00126
00127 return stripHandles;
00128 }
|
|
|
Definition at line 113 of file UgliScintPlnHandle.h. References fGeoScintPlnNode, fUgliScintPlnNode, GeoScintPlnNode::GetX0RelSteel(), UgliScintPlnNode::GetX0RelSteel(), and UgliPlnHandle::IsGeo(). Referenced by ShiftXY0RelSteelBy(), and GeoValidate::TestScintPln_GetX0RelSteel(). 00114 { if ( !IsGeo() ) return fUgliScintPlnNode->GetX0RelSteel();
00115 else return (fGeoScintPlnNode->GetX0RelSteel())*Munits::cm; }
|
|
|
Definition at line 117 of file UgliScintPlnHandle.h. References fGeoScintPlnNode, fUgliScintPlnNode, GeoScintPlnNode::GetY0RelSteel(), UgliScintPlnNode::GetY0RelSteel(), and UgliPlnHandle::IsGeo(). Referenced by ShiftXY0RelSteelBy(), and GeoValidate::TestScintPln_GetY0RelSteel(). 00118 { if ( !IsGeo() ) return fUgliScintPlnNode->GetY0RelSteel();
00119 else return (fGeoScintPlnNode->GetY0RelSteel())*Munits::cm; }
|
|
|
Definition at line 109 of file UgliScintPlnHandle.h. References fGeoScintPlnNode, fUgliScintPlnNode, GeoScintPlnNode::GetZRotRelSteelRad(), UgliScintPlnNode::GetZRotRelSteelRad(), and UgliPlnHandle::IsGeo(). Referenced by RotateRelSteelBy(), and GeoValidate::TestScintPln_GetZRotRelSteelRad(). 00110 { if ( !IsGeo() ) return fUgliScintPlnNode->GetZRotRelSteelRad();
00111 else return fGeoScintPlnNode->GetZRotRelSteelRad(); }
|
|
||||||||||||
|
Definition at line 213 of file UgliScintPlnHandle.cxx. References fGeoScintPlnNode, fUgliScintPlnNode, DataUtil::GetDetector(), UgliPlnHandle::GetPlexPlaneId(), GeoNode::GlobalToLocal(), UgliScintPlnNode::GlobalToLocal(), UgliPlnHandle::IsGeo(), IsValid(), MSG, and Ugli::uvz2xyz(). Referenced by GeoValidate::TestScintPln_GlobalToLocal(). 00215 {
00216
00217 if ( !IsValid() ) {
00218 MSG("Ugli",Msg::kWarning) << "UgliScintPlnHandle::GlobalToLocal "
00219 << "called for InValid scint pln." << endl;
00220 TVector3 dummy;
00221 return dummy;
00222 }
00223
00224 // convert a global position into a local (volume) one
00225 // globalInXYZ determines whether result is in XYZ or UVZ
00226 TVector3 globalXYZ = (globalInXYZ) ?
00227 global : Ugli::uvz2xyz(GetPlexPlaneId().GetDetector(),global);
00228
00229 if ( !IsGeo() )
00230 return fUgliScintPlnNode->GlobalToLocal(global);
00231 else {
00232 TVector3 scaledglobal(global); scaledglobal *= 1./Munits::cm;
00233 return (fGeoScintPlnNode->GlobalToLocal(scaledglobal) *= Munits::cm);
00234 }
00235 }
|
|
|
Definition at line 101 of file UgliScintPlnHandle.h. References fGeoScintPlnNode, fUgliScintPlnNode, GeoNode::GetGeoGeometry(), UgliScintPlnNode::GetUgliGeometry(), GeoGeometry::IsFrozen(), UgliGeometry::IsFrozen(), and UgliPlnHandle::IsGeo(). Referenced by AttemptSet(). 00102 { if ( !IsGeo() ) return fUgliScintPlnNode->GetUgliGeometry()->IsFrozen();
00103 else return fGeoScintPlnNode->GetGeoGeometry()->IsFrozen(); }
|
|
|
Reimplemented from UgliPlnHandle. Definition at line 97 of file UgliScintPlnHandle.h. References UgliPlnHandle::IsGeo(). Referenced by CandTrackHandle::BelongsWithShower(), CandShowerHandle::BelongsWithShower(), CandTrackHandle::BelongsWithTrack(), CandShowerHandle::BelongsWithTrack(), TridUVPage::CreateSketches(), AlgTrackSRList::FindNumSkippedPlanes(), AlgFitTrackSR::FindNumSkippedPlanes(), ToyMCModule::Get(), GlobalToLocal(), AlgFitTrackMS::InitArrays(), CandTrackHandle::IsUnphysical(), LocalToGlobal(), AlgTrackSR::RunAlg(), AlgTrack::SetdS(), AlgFitTrackCam::SetRangeAnddS(), AlgFitTrackMS::SetupAlg(), AlgShowerSR::SetUV(), AlgTrack::SetUVZ(), and AlgFitTrackSR::SwimVertexAndEndPoints(). 00098 { if ( !IsGeo() ) return (fUgliScintPlnNode) ? kTRUE : kFALSE;
00099 else return (fGeoScintPlnNode) ? kTRUE : kFALSE; }
|
|
||||||||||||
|
Definition at line 238 of file UgliScintPlnHandle.cxx. References fGeoScintPlnNode, fUgliScintPlnNode, DataUtil::GetDetector(), UgliPlnHandle::GetPlexPlaneId(), UgliPlnHandle::IsGeo(), IsValid(), GeoNode::LocalToGlobal(), UgliScintPlnNode::LocalToGlobal(), MSG, and Ugli::xyz2uvz(). Referenced by GeoValidate::TestScintPln_GlobalToLocal(), and GeoValidate::TestScintPln_LocalToGlobal(). 00240 {
00241
00242 if ( !IsValid() ) {
00243 MSG("Ugli",Msg::kWarning) << "UgliScintPlnHandle::LocalToGlobal "
00244 << "called for InValid scint pln." << endl;
00245 TVector3 dummy;
00246 return dummy;
00247 }
00248
00249 // convert a global position into a local (volume) one
00250 // globalInXYZ determines whether result is in XYZ or UVZ
00251 TVector3 globalXYZ;
00252 if ( !IsGeo() )
00253 globalXYZ = fUgliScintPlnNode->LocalToGlobal(local);
00254 else {
00255 TVector3 scaledlocal(local); scaledlocal *= 1./Munits::cm;
00256 globalXYZ = (fGeoScintPlnNode->LocalToGlobal(scaledlocal) *= Munits::cm);
00257 }
00258
00259 if (globalInXYZ ) return globalXYZ;
00260 else return Ugli::xyz2uvz(GetPlexPlaneId().GetDetector(),
00261 globalXYZ);
00262 }
|
|
|
Implements UgliScintPlnABC. Definition at line 105 of file UgliScintPlnHandle.h. References fGeoScintPlnNode, fUgliScintPlnNode, UgliPlnHandle::IsGeo(), GeoScintPlnNode::NumberOfStrips(), and UgliScintPlnNode::NumberOfStrips(). Referenced by GeoValidate::TestScintPln_NumberOfStrips(), and TimeCalibratorSRModule::UpdateTable(). 00106 { if ( !IsGeo() ) return fUgliScintPlnNode->NumberOfStrips();
00107 else return fGeoScintPlnNode->NumberOfStrips(); }
|
|
|
Definition at line 82 of file UgliScintPlnHandle.cxx. References fGeoScintPlnNode, fUgliScintPlnNode, and UgliPlnHandle::operator=(). 00083 {
00084 // assignment keeps reference counts up-to-date
00085 // done by super-class UgliPlnHandle
00086 // don't do it here or we'll get two counts for every handle
00087
00088 // if (fUgliScintPlnNode) fUgliScintPlnNode->DecrementRef();
00089 // fUgliScintPlnNode = that.fUgliScintPlnNode;
00090 // if (fUgliScintPlnNode) fUgliScintPlnNode->IncrementRef();
00091
00092 if ( this != &that ) {
00093 UgliPlnHandle::operator=(that);
00094 fUgliScintPlnNode = that.fUgliScintPlnNode;
00095 fGeoScintPlnNode = that.fGeoScintPlnNode;
00096 }
00097 return *this;
00098 }
|
|
|
Definition at line 121 of file UgliScintPlnHandle.h. References GetZRotRelSteelRad(), and SetZRotRelSteelRad(). 00122 { SetZRotRelSteelRad(GetZRotRelSteelRad()+deltaRadians); }
|
|
||||||||||||
|
Definition at line 204 of file UgliScintPlnHandle.cxx. References AttemptSet(), fGeoScintPlnNode, fUgliScintPlnNode, UgliPlnHandle::IsGeo(), and GeoScintPlnNode::SetXY0RelSteel(). Referenced by ShiftXY0RelSteelBy(). 00205 {
00206 if (!AttemptSet("XY0RelPln")) return;
00207 if ( !IsGeo() ) fUgliScintPlnNode->SetPosition(x0,y0);
00208 else fGeoScintPlnNode->SetXY0RelSteel(x0/Munits::cm,y0/Munits::cm);
00209
00210 }
|
|
|
Definition at line 196 of file UgliScintPlnHandle.cxx. References AttemptSet(), fGeoScintPlnNode, fUgliScintPlnNode, UgliPlnHandle::IsGeo(), GeoScintPlnNode::SetZRotRelSteelRad(), and UgliScintPlnNode::SetZRotRelSteelRad(). Referenced by RotateRelSteelBy(). 00197 {
00198 if (!AttemptSet("ZRotRelSteelRad")) return;
00199 if ( !IsGeo() ) fUgliScintPlnNode->SetZRotRelSteelRad(radians);
00200 else fGeoScintPlnNode->SetZRotRelSteelRad(radians);
00201
00202 }
|
|
||||||||||||
|
Definition at line 124 of file UgliScintPlnHandle.h. References GetX0RelSteel(), GetY0RelSteel(), and SetXY0RelSteel(). 00125 { SetXY0RelSteel((GetX0RelSteel()+dx)/Munits::cm,
00126 (GetY0RelSteel()+dy)/Munits::cm); }
|
|
|
Definition at line 84 of file UgliScintPlnHandle.h. Referenced by GetClosestStrip(), GetScintMdlHandleVector(), GetStripHandle(), GetStripHandleVector(), GetX0RelSteel(), GetY0RelSteel(), GetZRotRelSteelRad(), GlobalToLocal(), IsFrozen(), LocalToGlobal(), NumberOfStrips(), operator=(), SetXY0RelSteel(), and SetZRotRelSteelRad(). |
|
|
Definition at line 83 of file UgliScintPlnHandle.h. Referenced by GetClosestStrip(), GetScintMdlHandleVector(), GetStripHandle(), GetStripHandleVector(), GetX0RelSteel(), GetY0RelSteel(), GetZRotRelSteelRad(), GlobalToLocal(), IsFrozen(), LocalToGlobal(), NumberOfStrips(), operator=(), SetXY0RelSteel(), and SetZRotRelSteelRad(). |
1.3.9.1