#include <PlexVetoShieldHack.h>
|
|
Definition at line 25 of file PlexVetoShieldHack.h. 00025 { ; }
|
|
|
Definition at line 26 of file PlexVetoShieldHack.h. 00026 { ; } // no owned data members
|
|
|
Definition at line 299 of file PlexVetoShieldHack.cxx. References VldRange::GetDetectorMask(), VldRange::GetSimMask(), and VldRange::GetTimeStart(). Referenced by UgliGeometry::GetScintPlnNode(), UgliScintPlnNode::GetStripNode(), and UgliGeometry::GetStripNode(). 00300 {
00301 Detector::Detector_t detector =
00302 (Detector::Detector_t)(vldr.GetDetectorMask());
00303 SimFlag::SimFlag_t simflag =
00304 (vldr.GetSimMask() & SimFlag::kData) ? SimFlag::kData : SimFlag::kMC;
00305 VldTimeStamp ts = vldr.GetTimeStart();
00306 return VldContext(detector,simflag,ts);
00307 }
|
|
|
Definition at line 54 of file PlexVetoShieldHack.h. Referenced by PlexPlaneId::DefaultPlaneCoverage(), PlexPlaneId::DefaultPlaneView(), and PlexPixelSpotToStripEnd::Fill(). 00054 { return fgDefaultContext; }
|
|
||||||||||||
|
Definition at line 325 of file PlexVetoShieldHack.cxx. References PlexVetoShieldMuxToMdl::GetMdlPln(), DbiResultPtr< T >::GetNumRows(), PlexPlaneId::GetPlaneCoverage(), DbiResultPtr< T >::GetRow(), and PlexVetoShieldMuxToMdl::GetSingleMdlPlaneId(). Referenced by PlexPlaneId::DefaultPlaneCoverage(). 00326 {
00327
00328 DbiResultPtr<PlexVetoShieldMuxToMdl> mapping(vldc);
00329 for (unsigned int i=0; i<mapping.GetNumRows(); ++i) {
00330 const PlexVetoShieldMuxToMdl *the_muxtomdl = mapping.GetRow(i);
00331 if (the_muxtomdl->GetMdlPln() == mdl_pln) {
00332 return the_muxtomdl->GetSingleMdlPlaneId().GetPlaneCoverage();
00333 }
00334 }
00335 return PlaneCoverage::kUnknown;
00336 }
|
|
||||||||||||
|
Definition at line 311 of file PlexVetoShieldHack.cxx. References PlexVetoShieldMuxToMdl::GetMdlPln(), DbiResultPtr< T >::GetNumRows(), PlexPlaneId::GetPlaneView(), DbiResultPtr< T >::GetRow(), and PlexVetoShieldMuxToMdl::GetSingleMdlPlaneId(). Referenced by PlexPlaneId::DefaultPlaneView(). 00312 {
00313 DbiResultPtr<PlexVetoShieldMuxToMdl> mapping(vldc);
00314 for (unsigned int i=0; i<mapping.GetNumRows(); ++i) {
00315 const PlexVetoShieldMuxToMdl *the_muxtomdl = mapping.GetRow(i);
00316 if (the_muxtomdl->GetMdlPln() == mdl_pln) {
00317 return the_muxtomdl->GetSingleMdlPlaneId().GetPlaneView();
00318 }
00319 }
00320 return PlaneView::kVSUnknown;
00321 }
|
|
|
Definition at line 286 of file PlexVetoShieldHack.cxx. Referenced by PlexPlaneId::DefaultPlaneCoverage(), PlexPlaneId::DefaultPlaneView(), RenumberMdlToMux(), and RenumberMuxToMdl(). 00287 {
00288 // mdl planes are:
00289 // [ 528 .. 575 ] for section 0 (48 module incl. phantoms)
00290 // [ 576 .. 607 ] (single layer) or [ 592 .. 639] (double layer) section 1
00291 // other sections are [ 528 .. 575 ] + isection*64.
00292 return ( ( 528 <= plane ) && ( plane <= 575 ) ) || // section 0
00293 ( ( 576 <= plane ) && ( plane <= 639 ) ) || // section 1
00294 ( ( 656 <= plane ) && ( plane <= 703 ) ) || // section 2
00295 ( ( 720 <= plane ) && ( plane <= 767 ) ) ; // section 3
00296 }
|
|
|
Definition at line 280 of file PlexVetoShieldHack.cxx. Referenced by PlexPlaneId::DefaultPlaneCoverage(), PlexPlaneId::DefaultPlaneView(), RenumberMdlToMux(), and RenumberMuxToMdl(). 00281 {
00282 // mux planes are [ 513 ... 524 ] (12 pseudo-planes in section 0)
00283 return ( ( 513 <= plane ) && ( plane <= 524 ) );
00284 }
|
|
||||||||||||||||
|
Definition at line 340 of file PlexVetoShieldHack.cxx. References PlexVetoShieldMuxToMdl::GetMuxMdl(), PlexVetoShieldMuxToMdl::GetMuxPln(), DbiResultPtr< T >::GetNumRows(), and DbiResultPtr< T >::GetRow(). Referenced by RenumberMuxToMdl(). 00342 {
00343
00344 DbiResultPtr<PlexVetoShieldMuxToMdl> mapping(vldc);
00345 for (unsigned int i=0; i<mapping.GetNumRows(); ++i) {
00346 const PlexVetoShieldMuxToMdl *the_muxtomdl = mapping.GetRow(i);
00347 if (the_muxtomdl->GetMuxPln() == mux_pln &&
00348 the_muxtomdl->GetMuxMdl() == mux_mdl ) {
00349 return the_muxtomdl;
00350 }
00351 }
00352 return 0; // found no match
00353 }
|
|
||||||||||||
|
Definition at line 357 of file PlexVetoShieldHack.cxx. References PlexVetoShieldMuxToMdl::GetMdlPln(), DbiResultPtr< T >::GetNumRows(), and DbiResultPtr< T >::GetRow(). Referenced by RenumberMdlToMux(). 00359 {
00360
00361 DbiResultPtr<PlexVetoShieldMuxToMdl> mapping(vldc);
00362 for (unsigned int i=0; i<mapping.GetNumRows(); ++i) {
00363 const PlexVetoShieldMuxToMdl *the_muxtomdl = mapping.GetRow(i);
00364 if (the_muxtomdl->GetMdlPln() == mdl_pln ) {
00365 return the_muxtomdl;
00366 }
00367 }
00368 return 0; // found no match
00369 }
|
|
||||||||||||
|
Definition at line 246 of file PlexVetoShieldHack.cxx. References PlexVetoShieldMuxToMdl::GetMdlPln(), PlexVetoShieldMuxToMdl::GetMuxPlaneId(), DbiResultPtr< T >::GetNumRows(), PlexPlaneId::GetPlane(), DbiResultPtr< T >::GetRow(), IsMdlPlnVetoShield(), IsMuxPlnVetoShield(), PlexPlaneId::IsVetoShield(), and MSG. 00248 {
00249 if (!plnid.IsVetoShield()) return plnid;
00250
00251 unsigned int mdl_pln = plnid.GetPlane();
00252
00253 if ( PlexVetoShieldHack::IsMuxPlnVetoShield(mdl_pln) ) {
00254 // already what we want, quietly do nothing
00255 return plnid;
00256 }
00257 else if ( ! PlexVetoShieldHack::IsMdlPlnVetoShield(mdl_pln) ) {
00258 // not something we know about, loudly do nothing
00259 MSG("Plex",Msg::kWarning)
00260 << " MdlToMux unknown plane= " << mdl_pln << endl;
00261 return plnid;
00262 }
00263
00264 DbiResultPtr<PlexVetoShieldMuxToMdl> mapping(vldc);
00265 for (unsigned int i=0; i<mapping.GetNumRows(); ++i) {
00266 const PlexVetoShieldMuxToMdl *the_muxtomdl = mapping.GetRow(i);
00267 if (the_muxtomdl->GetMdlPln() == mdl_pln) {
00268
00269 return the_muxtomdl->GetMuxPlaneId();
00270 }
00271 }
00272 MSG("Plex",Msg::kInfo)
00273 << "RenumberMdlToMux no match for Mdl #'ed plane= "
00274 << plnid.GetPlane() << endl;
00275 return plnid;
00276 }
|
|
||||||||||||
|
Definition at line 161 of file PlexVetoShieldHack.cxx. References PlexVetoShieldMuxToMdl::GetMdlPln(), PlexScintMdlId::GetModule(), PlexVetoShieldMuxToMdl::GetMuxScintMdlId(), DbiResultPtr< T >::GetNumRows(), PlexPlaneId::GetPlane(), DbiResultPtr< T >::GetRow(), IsMdlPlnVetoShield(), IsMuxPlnVetoShield(), PlexPlaneId::IsVetoShield(), and MSG. 00163 {
00164 if (!mdlid.IsVetoShield()) return mdlid;
00165
00166 unsigned int mdl_pln = mdlid.GetPlane();
00167
00168 if ( PlexVetoShieldHack::IsMuxPlnVetoShield(mdl_pln) ) {
00169 // already what we want, quietly do nothing
00170 return mdlid;
00171 }
00172 else if ( ! PlexVetoShieldHack::IsMdlPlnVetoShield(mdl_pln) ) {
00173 // not something we know about, loudly do nothing
00174 MSG("Plex",Msg::kWarning)
00175 << " MdlToMux unknown plane= " << mdl_pln << endl;
00176 return mdlid;
00177 }
00178
00179 unsigned int mdl_mdl = mdlid.GetModule();
00180
00181 DbiResultPtr<PlexVetoShieldMuxToMdl> mapping(vldc);
00182 for (unsigned int i=0; i<mapping.GetNumRows(); ++i) {
00183 const PlexVetoShieldMuxToMdl *the_muxtomdl = mapping.GetRow(i);
00184 if (the_muxtomdl->GetMdlPln() == mdl_pln) {
00185
00186 const unsigned int kMdlMdl = 0;
00187 if (mdl_mdl != kMdlMdl) {
00188 MSG("Plex",Msg::kInfo)
00189 << "RenumberMdlToMux no match for Mdl #'ed plane= "
00190 << mdlid.GetPlane()
00191 << " module=" << mdlid.GetModule()
00192 << " > 0 " << endl;
00193 }
00194
00195 return the_muxtomdl->GetMuxScintMdlId();
00196 }
00197 }
00198 MSG("Plex",Msg::kInfo)
00199 << "RenumberMdlToMux no match for Mdl #'ed plane= " << mdlid.GetPlane()
00200 << " module=" << mdlid.GetModule() << endl;
00201 return mdlid;
00202 }
|
|
||||||||||||
|
Definition at line 87 of file PlexVetoShieldHack.cxx. References PlexVetoShieldMuxToMdl::GetCountDir(), PlexStripEndId::GetEnd(), PlexVetoShieldMuxToMdl::GetMuxMdl(), PlexVetoShieldMuxToMdl::GetMuxPlaneId(), PlexPlaneId::GetPlane(), PlexStripEndId::GetStrip(), PlexStripEndId::GetSubPart(), IsMdlPlnVetoShield(), IsMuxPlnVetoShield(), PlexPlaneId::IsVetoShield(), LookForSingleMdl(), and MSG. 00089 {
00090
00091 if (!seid.IsVetoShield()) return seid;
00092
00093 unsigned int mdl_pln = seid.GetPlane();
00094
00095 if ( PlexVetoShieldHack::IsMuxPlnVetoShield(mdl_pln) ) {
00096 // already what we want, quietly do nothing
00097 return seid;
00098 }
00099 else if ( ! PlexVetoShieldHack::IsMdlPlnVetoShield(mdl_pln) ) {
00100 // not something we know about, loudly do nothing
00101 MSG("Plex",Msg::kWarning)
00102 << " MdlToMux unknown plane= " << mdl_pln << endl;
00103 return seid;
00104 }
00105
00106 const PlexVetoShieldMuxToMdl *the_muxtomdl = LookForSingleMdl(vldc,mdl_pln);
00107 if (!the_muxtomdl) {
00108 MSG("Plex",Msg::kInfo)
00109 << "RenumberMdlToMux no match for Mdl #'ed plane= "
00110 << seid.GetPlane() << " strip=" << setw(3) << seid.GetStrip() << endl;
00111 return seid;
00112 }
00113
00114 unsigned int mdl_strip = seid.GetStrip();
00115 unsigned int muxmdl = the_muxtomdl->GetMuxMdl();
00116 unsigned int mux_strip =
00117 (the_muxtomdl->GetCountDir() > 0) ?
00118 20*(muxmdl+0) + mdl_strip + 0:
00119 20*(muxmdl+1) - mdl_strip - 1;
00120
00121 PlexStripEndId new_seid(the_muxtomdl->GetMuxPlaneId(),
00122 mux_strip,
00123 seid.GetEnd(),seid.GetSubPart());
00124 return new_seid;
00125 }
|
|
||||||||||||
|
Definition at line 205 of file PlexVetoShieldHack.cxx. References PlexVetoShieldMuxToMdl::GetMuxMdl(), PlexVetoShieldMuxToMdl::GetMuxPln(), DbiResultPtr< T >::GetNumRows(), PlexPlaneId::GetPlane(), DbiResultPtr< T >::GetRow(), PlexVetoShieldMuxToMdl::GetSingleMdlPlaneId(), IsMdlPlnVetoShield(), IsMuxPlnVetoShield(), PlexPlaneId::IsVetoShield(), and MSG. 00207 {
00208 if (!plnid.IsVetoShield()) return plnid;
00209
00210 unsigned int mux_pln = plnid.GetPlane();
00211
00212 if ( PlexVetoShieldHack::IsMdlPlnVetoShield(mux_pln) ) {
00213 // already what we want, quietly do nothing
00214 return plnid;
00215 }
00216 else if ( ! PlexVetoShieldHack::IsMuxPlnVetoShield(mux_pln) ) {
00217 // not something we know about, loudly do nothing
00218 MSG("Plex",Msg::kWarning)
00219 << " MuxToMdl unknown plane= " << mux_pln << endl;
00220 return plnid;
00221 }
00222
00223 // arbitrarily take first module in mux numbering scheme
00224 unsigned int mux_mdl = 0;
00225
00226 DbiResultPtr<PlexVetoShieldMuxToMdl> mapping(vldc);
00227 for (unsigned int i=0; i<mapping.GetNumRows(); ++i) {
00228 const PlexVetoShieldMuxToMdl *the_muxtomdl = mapping.GetRow(i);
00229 if (the_muxtomdl->GetMuxPln() == mux_pln &&
00230 the_muxtomdl->GetMuxMdl() == mux_mdl ) {
00231
00232 MSG("Plex",Msg::kInfo)
00233 << " no unique match for mapping MuxToMdl for plane "
00234 << mux_pln << endl;
00235 return the_muxtomdl->GetSingleMdlPlaneId();
00236 }
00237 }
00238 MSG("Plex",Msg::kInfo)
00239 << "RenumberMuxToMdl no match for Mux #'ed plane= "
00240 << plnid.GetPlane() << endl;
00241 return plnid;
00242
00243 }
|
|
||||||||||||
|
Definition at line 128 of file PlexVetoShieldHack.cxx. References PlexScintMdlId::GetModule(), PlexPlaneId::GetPlane(), PlexVetoShieldMuxToMdl::GetSingleMdlScintMdlId(), IsMdlPlnVetoShield(), IsMuxPlnVetoShield(), PlexPlaneId::IsVetoShield(), LookForMuxMdl(), and MSG. 00130 {
00131 if (!mdlid.IsVetoShield()) return mdlid;
00132
00133 unsigned int mux_pln = mdlid.GetPlane();
00134
00135 if ( PlexVetoShieldHack::IsMdlPlnVetoShield(mux_pln) ) {
00136 // already what we want, quietly do nothing
00137 return mdlid;
00138 }
00139 else if ( ! PlexVetoShieldHack::IsMuxPlnVetoShield(mux_pln) ) {
00140 // not something we know about, loudly do nothing
00141 MSG("Plex",Msg::kWarning)
00142 << " MuxToMdl unknown plane= " << mux_pln << endl;
00143 return mdlid;
00144 }
00145
00146 unsigned int mux_mdl = mdlid.GetModule();
00147
00148 const PlexVetoShieldMuxToMdl *the_muxtomdl =
00149 LookForMuxMdl(vldc,mux_pln,mux_mdl);
00150 if (!the_muxtomdl) {
00151 MSG("Plex",Msg::kInfo)
00152 << "RenumberMuxToMdl no match for Mux #'ed plane= " << mdlid.GetPlane()
00153 << " module=" << mdlid.GetModule() << endl;
00154 return mdlid;
00155 }
00156
00157 return the_muxtomdl->GetSingleMdlScintMdlId();
00158 }
|
|
||||||||||||
|
Definition at line 45 of file PlexVetoShieldHack.cxx. References PlexVetoShieldMuxToMdl::GetCountDir(), PlexStripEndId::GetEnd(), PlexPlaneId::GetPlane(), PlexVetoShieldMuxToMdl::GetSingleMdlPlaneId(), PlexStripEndId::GetStrip(), PlexStripEndId::GetSubPart(), IsMdlPlnVetoShield(), IsMuxPlnVetoShield(), PlexPlaneId::IsVetoShield(), LookForMuxMdl(), and MSG. Referenced by GeoGeometry::BuildPlanePairVolumes(), PlexPixelSpotToStripEnd::Fill(), NtpSRModule::FillNtpShieldStrip(), UgliGeometry::GetScintPlnNode(), UgliScintPlnNode::GetStripNode(), UgliGeometry::GetStripNode(), and AlgFarDetShieldPlank::RunAlg(). 00047 {
00048
00049 if (!seid.IsVetoShield()) return seid;
00050
00051 unsigned int mux_pln = seid.GetPlane();
00052
00053 if ( PlexVetoShieldHack::IsMdlPlnVetoShield(mux_pln) ) {
00054 // already what we want, quietly do nothing
00055 return seid;
00056 }
00057 else if ( ! PlexVetoShieldHack::IsMuxPlnVetoShield(mux_pln) ) {
00058 // not something we know about, loudly do nothing
00059 MSG("Plex",Msg::kWarning)
00060 << " MuxToMdl unknown plane= " << mux_pln << endl;
00061 return seid;
00062 }
00063
00064 unsigned int mux_strip = seid.GetStrip();
00065 unsigned int mux_mdl = mux_strip/20; // all veto shield modules have 20
00066
00067 const PlexVetoShieldMuxToMdl *the_muxtomdl =
00068 LookForMuxMdl(vldc,mux_pln,mux_mdl);
00069 if (!the_muxtomdl) {
00070 MSG("Plex",Msg::kInfo)
00071 << "RenumberMuxToMdl no match for Mux #'ed plane= "
00072 << seid.GetPlane() << " strip=" << setw(3) << seid.GetStrip() << endl;
00073 return seid;
00074 }
00075
00076 unsigned int strip_in_mdl = mux_strip%20;
00077 // if reverse 0-->19 and 19-->0
00078 if (the_muxtomdl->GetCountDir() < 0) strip_in_mdl = 19 - strip_in_mdl;
00079
00080 PlexStripEndId new_seid(the_muxtomdl->GetSingleMdlPlaneId(),
00081 strip_in_mdl,
00082 seid.GetEnd(),seid.GetSubPart());
00083 return new_seid;
00084 }
|
|
|
Definition at line 32 of file PlexVetoShieldHack.cxx. References MSG. Referenced by PlexHandle::PlexHandle(), and UgliGeometry::UgliGeometry(). 00033 {
00034 // return old context, set default to passed value
00035
00036 MSG("Plex",Msg::kDebug)
00037 << "PlexVetoShieldHack::SetDefaultContext " << vldc << endl;
00038
00039 VldContext old = fgDefaultContext;
00040 fgDefaultContext = vldc;
00041 return old;
00042 }
|
|
|
Initial value: VldContext(Detector::kFar,SimFlag::kData,VldTimeStamp()) Definition at line 26 of file PlexVetoShieldHack.cxx. |
1.3.9.1