Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ShieldGeom Class Reference

#include <ShieldGeom.h>

List of all members.

Public Member Functions

 ShieldGeom (const VldContext &vldc)
 ~ShieldGeom ()
Bool_t Reinitialize (const VldContext &vldc)
Double_t GetPlank_X (Int_t pl, Int_t pk)
Double_t GetPlank_Y (Int_t pl, Int_t pk)
Double_t GetPlank_Z (Int_t pl, Int_t pk)
Bool_t PlankExists (Int_t pl, Int_t pk)
Double_t GetPlankStrip0_X (Int_t pl, Int_t pk)
Double_t GetPlankStrip0_Y (Int_t pl, Int_t pk)
Double_t GetPlankStrip0_Z (Int_t pl, Int_t pk)
Int_t GetStripsInPlank (Int_t pl, Int_t pk)
Int_t GetListStripsInPlank (Int_t pl, Int_t pk, Int_t entry, Int_t plorst)
Int_t GetAssociatedPlank (Int_t pl, Int_t st, Int_t plorst)
Int_t GetChipIndex (Int_t pl, Int_t pk, Int_t noorso)
Int_t GetChipNumber (Int_t pl, Int_t pk, Int_t noorso)
Bool_t IsVertical (Int_t pl)
Bool_t IsLowerSide (Int_t pl)
Double_t GetPlane_X (Int_t pl)
Double_t GetPlane_Y (Int_t pl)
Double_t GetPlane_Z (Int_t pl)
Double_t GetPlaneClearFiber (Int_t pl, Int_t noorso)
Bool_t PlaneExistsInVeto (Int_t pl)
Int_t WhatSection (Int_t pl)
Bool_t IsPlaneActive (Int_t vpa)
Int_t ValidVetoPlanes ()
Double_t GetPlaneStrip19_X (Int_t pl)
Double_t GetPlaneStrip19_Y (Int_t pl)
Double_t GetPlaneStrip19_Z (Int_t pl)
Double_t GetStrip_X (Int_t pl, Int_t pk)
Double_t GetStrip_Y (Int_t pl, Int_t pk)
Double_t GetStrip_Z (Int_t pl, Int_t pk)
Double_t GetStripWls (Int_t pl, Int_t pk, Int_t noorso)
Int_t WhatSectionAbove (Double_t zpos, Int_t cont)
Int_t ClosestTwoSections (Double_t zpos, Int_t cont)

Private Member Functions

Int_t planeNumberFinder (Int_t pln)
Bool_t specialPlank (Int_t pl, Int_t pk)
void SetupShieldGeom (const VldContext &vldc)

Private Attributes

Double_t VetoGeom_x [168]
Double_t VetoGeom_y [168]
Double_t VetoGeom_z [168]
Double_t VetoGeomPlank_x [168][20]
Double_t VetoGeomPlank_y [168][20]
Double_t VetoGeomPlank_z [168][20]
Double_t VetoGeomPlank_exist [168][20]
Int_t VetoGeomPlank_strips [168][20]
Int_t AssociatedPlank [168][20][2]
Double_t VetoGeomPlank_x_s0 [168][20]
Double_t VetoGeomPlank_y_s0 [168][20]
Double_t VetoGeomPlank_z_s0 [168][20]
Double_t VetoGeom_x_s19 [168]
Double_t VetoGeom_y_s19 [168]
Double_t VetoGeom_z_s19 [168]
Int_t VetoGeomSection [168]
Double_t VetoStrip_x [168][20]
Double_t VetoStrip_y [168][20]
Double_t VetoStrip_z [168][20]
Double_t VetoStripWls [168][20][2]
Double_t VetoPlaneClearFiber [168][2]
Int_t ListStripsInPlank [168][20][8][2]
Int_t VetoChipIndex [168][20][2]
Int_t VetoChipNumber [168][20][2]
Bool_t AlreadyDidChipNumbers
Double_t VetoGeomAlreadyFilled [168][20]
Int_t PlaneArray [168]
Bool_t PlaneValidity [168]
Int_t valid_planes
VldRange fughVldRange
VldRange fphVldRange


Constructor & Destructor Documentation

ShieldGeom::ShieldGeom const VldContext vldc  ) 
 

Definition at line 23 of file ShieldGeom.cxx.

References VldContext::GetDetector(), MSG, PlaneArray, SetupShieldGeom(), VetoGeomAlreadyFilled, and VetoGeomPlank_exist.

00023                                             {
00024 
00025   // Plane Array
00026   
00027   for(int sec=0;sec<=3;sec++){  
00028     for(int ii=0;ii<=31;ii++){
00029       PlaneArray[ii+sec*42]=528+ii+sec*64;
00030     }
00031     for(int ii=0;ii<=5;ii++){
00032       PlaneArray[ii+32+sec*42]=563+ii+sec*64;
00033     }
00034     for(int ii=0;ii<=3;ii++){
00035       PlaneArray[ii+38+sec*42]=572+ii+sec*64;
00036     }
00037   }
00038 
00039   //Resetting the existence of planks
00040   for(int pl=0;pl<=167;pl++){
00041     for(int st=0;st<20;st++){
00042       VetoGeomPlank_exist[pl][st]=0;
00043       VetoGeomAlreadyFilled[pl][st]=0;
00044     }
00045   }
00046   
00047   if(vldc.GetDetector()==2){
00048     SetupShieldGeom(vldc);    
00049   } else{
00050     MSG("CandShield",Msg::kWarning) << "ShieldGeom only applies to the far detector; will not load shield geometry" << endl; 
00051   }
00052 
00053 }

ShieldGeom::~ShieldGeom  ) 
 

Definition at line 56 of file ShieldGeom.cxx.

00056 {}


Member Function Documentation

Int_t ShieldGeom::ClosestTwoSections Double_t  zpos,
Int_t  cont
 

Definition at line 825 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), and VetoGeom_z.

Referenced by ShieldRejVarAna::Analyze(), and NtpSRModule::FillNtpShieldStrip().

00825                                                              { 
00826   Int_t sectClosest[2]={0};
00827   sectClosest[0]=-1;
00828   sectClosest[1]=-1;
00829   Int_t contsect=0;
00830   for(int sect=0;sect<4;sect++){
00831     if(fabs(zpos-VetoGeom_z[planeNumberFinder(535+sect*64)])<8.&& contsect<2){
00832       sectClosest[contsect]=sect+1;
00833       ++contsect;
00834     }
00835   }
00836   if(cont==0 || cont==1){
00837     return sectClosest[cont];
00838   }else {        
00839     MSG("CandShield",Msg::kWarning) << "ClosestTwoSections:Value in second field must be 0 or 1." << endl;
00840     return -1;
00841   }
00842   
00843 }

Int_t ShieldGeom::GetAssociatedPlank Int_t  pl,
Int_t  st,
Int_t  plorst
 

Definition at line 443 of file ShieldGeom.cxx.

References AssociatedPlank, MSG, planeNumberFinder(), and PlaneValidity.

Referenced by NtpSRModule::FillNtpShieldStrip(), and AlgFarDetShieldPlank::RunAlg().

00443                                                                     {
00444   if(planeNumberFinder(pl)!=-1){
00445     if(plorst<2 && plorst>-1 && PlaneValidity[planeNumberFinder(pl)]==true && st<20 && st>-1){
00446       return AssociatedPlank[planeNumberFinder(pl)][st][plorst];
00447     }else {
00448       MSG("CandShield",Msg::kWarning) << "GetAssociatedPlank:Either second and/or third fields out of range, or supplied plane is not valid." << endl;
00449       return -1;
00450     }
00451   }else {
00452     MSG("CandShield",Msg::kWarning) << "GetAssociatedPlank:Plane " << pl << " does not exist in veto!" << endl;
00453     return -1;
00454   }
00455 
00456 }

Int_t ShieldGeom::GetChipIndex Int_t  pl,
Int_t  pk,
Int_t  noorso
 

Definition at line 459 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, VetoChipIndex, and VetoGeomPlank_exist.

00459                                                               {
00460   if(planeNumberFinder(pl)!=-1){
00461     if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1 && PlaneValidity[planeNumberFinder(pl)]==true){
00462       return VetoChipIndex[planeNumberFinder(pl)][pk][noorso];
00463     }
00464     else {
00465       MSG("CandShield",Msg::kWarning) << "GetChipIndex:Plank " << pl << "," << pk << " does not exist!" << endl;
00466       return -1;
00467     }
00468   }else {
00469     MSG("CandShield",Msg::kWarning) << "GetChipIndex:Plank " << pl << "," << pk << " does not exist!" << endl;
00470     return -1;
00471   }
00472   
00473 }

Int_t ShieldGeom::GetChipNumber Int_t  pl,
Int_t  pk,
Int_t  noorso
 

Definition at line 476 of file ShieldGeom.cxx.

References AlreadyDidChipNumbers, MSG, planeNumberFinder(), PlaneValidity, valid_planes, VetoChipIndex, VetoChipNumber, and VetoGeomPlank_exist.

00476                                                                {
00477    
00478   if(AlreadyDidChipNumbers==false){    
00479     
00480     Int_t AlreadyChip[100]={0};
00481     Int_t found_ll;
00482     Int_t main_cont=-1;
00483     
00484     for(int pln=0;pln<168;pln++){   
00485       for(int st=0;st<20;st++){
00486         if(VetoGeomPlank_exist[pln][st]==1){
00487           
00488           found_ll=-1;
00489           for(int ll=0;ll<64;ll++){
00490             if(AlreadyChip[ll]==VetoChipIndex[pln][st][1]){
00491               found_ll=ll;
00492             }
00493           }
00494           if(found_ll==-1){
00495             main_cont+=1;
00496             AlreadyChip[main_cont]=VetoChipIndex[pln][st][1];
00497             VetoChipNumber[pln][st][1]=main_cont;
00498           }
00499           else {
00500             VetoChipNumber[pln][st][1]=found_ll;
00501           }
00502           
00503           found_ll=-1;
00504           for(int ll=0;ll<64;ll++){
00505             if(AlreadyChip[ll]==VetoChipIndex[pln][st][0]){
00506               found_ll=ll;
00507             }
00508           }
00509           if(found_ll==-1){
00510             main_cont+=1;
00511             AlreadyChip[main_cont]=VetoChipIndex[pln][st][0];
00512             VetoChipNumber[pln][st][0]=main_cont;
00513           }
00514           else VetoChipNumber[pln][st][0]=found_ll;
00515         }
00516         else{
00517           VetoChipNumber[pln][st][0]=-1;
00518           VetoChipNumber[pln][st][1]=-1;
00519         }
00520       }
00521     } 
00522     if(valid_planes==168){
00523       AlreadyDidChipNumbers=true;
00524     }
00525   }
00526   if(planeNumberFinder(pl)!=-1){
00527     if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1 && PlaneValidity[planeNumberFinder(pl)]==true){
00528       return VetoChipNumber[planeNumberFinder(pl)][pk][noorso];
00529     }else {
00530       MSG("CandShield",Msg::kWarning) << "GetChipNumber:Plank " << pl << "," << pk << " does not exist!" << endl;
00531       return -1; 
00532     }  
00533   }else {
00534     MSG("CandShield",Msg::kWarning) << "GetChipNumber:Plank " << pl << "," << pk << " does not exist!" << endl;
00535     return -1;  
00536   }
00537 }

Int_t ShieldGeom::GetListStripsInPlank Int_t  pl,
Int_t  pk,
Int_t  entry,
Int_t  plorst
 

Definition at line 426 of file ShieldGeom.cxx.

References ListStripsInPlank, MSG, planeNumberFinder(), PlaneValidity, VetoGeomPlank_exist, and VetoGeomPlank_strips.

Referenced by CandShieldSR::CandShieldSR().

00426                                                                                    {
00427   if(planeNumberFinder(pl)!=-1){
00428     if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1 && plorst<2 && plorst>-1 && entry<VetoGeomPlank_strips[planeNumberFinder(pl)][pk] && PlaneValidity[planeNumberFinder(pl)]==true){        
00429       return ListStripsInPlank[planeNumberFinder(pl)][pk][entry][plorst];
00430     }
00431     else {
00432       MSG("CandShield",Msg::kWarning) << "GetListStripsInPlank:Either supplied plank does not exist, or third and/or fourth fields are out of range, or supplied plane is not valid"<< endl;
00433       return -1;
00434     }
00435   }else {
00436     MSG("CandShield",Msg::kWarning) << "GetListStripsInPlank:Plane " << pl << " does not exist!" << endl;
00437     return -1;
00438   }
00439 
00440 }

Double_t ShieldGeom::GetPlane_X Int_t  pl  ) 
 

Definition at line 592 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, and VetoGeom_x.

00592                                         {
00593   if(planeNumberFinder(pl)!=-1){
00594     if(PlaneValidity[planeNumberFinder(pl)]==true){
00595       return VetoGeom_x[planeNumberFinder(pl)];
00596     } else{
00597       MSG("CandShield",Msg::kWarning) << "GetPlane_X:Plane " << pl << " is not valid!" << endl;
00598       return -100;
00599     }
00600   }else {
00601     MSG("CandShield",Msg::kWarning) << "GetPlane_X:Plane " << pl << " does not exist in the shield!" << endl;
00602     return -100;
00603   }
00604 }

Double_t ShieldGeom::GetPlane_Y Int_t  pl  ) 
 

Definition at line 607 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, and VetoGeom_y.

00607                                         {
00608   if(planeNumberFinder(pl)!=-1){
00609     if(PlaneValidity[planeNumberFinder(pl)]==true){
00610       return VetoGeom_y[planeNumberFinder(pl)];
00611     } else{
00612       MSG("CandShield",Msg::kWarning) << "GetPlane_Y:Plane " << pl << " is not valid!" << endl;
00613       return -100;
00614     }
00615   }else {
00616     MSG("CandShield",Msg::kWarning) << "GetPlane_Y:Plane " << pl << " does not exist in the shield!" << endl;
00617       return -100;
00618   }
00619 }

Double_t ShieldGeom::GetPlane_Z Int_t  pl  ) 
 

Definition at line 622 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, and VetoGeom_z.

00622                                         {
00623   if(planeNumberFinder(pl)!=-1){
00624     if(PlaneValidity[planeNumberFinder(pl)]==true){
00625       return VetoGeom_z[planeNumberFinder(pl)];
00626     } else{
00627       MSG("CandShield",Msg::kWarning) << "GetPlane_Z:Plane " << pl << " is not valid!" << endl;
00628       return -100;
00629     }
00630   }else {
00631     MSG("CandShield",Msg::kWarning) << "GetPlane_Z:Plane " << pl << " does not exist in the shield!" << endl;
00632     return -100;
00633   }
00634 }

Double_t ShieldGeom::GetPlaneClearFiber Int_t  pl,
Int_t  noorso
 

Definition at line 637 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, and VetoPlaneClearFiber.

Referenced by NtpSRModule::FillNtpShieldStrip().

00637                                                              {
00638   if(planeNumberFinder(pl)!=-1){
00639     if(noorso<2 && noorso > -1 && PlaneValidity[planeNumberFinder(pl)]==true){
00640       return VetoPlaneClearFiber[planeNumberFinder(pl)][noorso];
00641     } else {
00642       MSG("CandShield",Msg::kWarning) << "GetPlaneClearFiber:Plane " << pl << " is not valid and/or value in 2nd field is out of bounds" << endl;
00643       return -100;
00644     }    
00645   }else {
00646     MSG("CandShield",Msg::kWarning) << "GetPlaneClearFiber:Plane " << pl << " does not exist in the shield!" << endl;
00647     return -100;
00648   }
00649 }

Double_t ShieldGeom::GetPlaneStrip19_X Int_t  pl  ) 
 

Definition at line 699 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, and VetoGeom_x_s19.

00699                                                {
00700   if(planeNumberFinder(pl)!=-1){
00701     if(PlaneValidity[planeNumberFinder(pl)]==true){
00702       return VetoGeom_x_s19[planeNumberFinder(pl)];
00703     } else{
00704       MSG("CandShield",Msg::kWarning) << "GetPlaneStrip19_X:Plane " << pl << " is not valid!" << endl;
00705       return -100;
00706     }
00707   }else {
00708     MSG("CandShield",Msg::kWarning) << "GetPlaneStrip19_X:Plane " << pl << " does not exist in the shield!" << endl;
00709     return -100;
00710   }
00711 }

Double_t ShieldGeom::GetPlaneStrip19_Y Int_t  pl  ) 
 

Definition at line 714 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, and VetoGeom_y_s19.

00714                                                {
00715   if(planeNumberFinder(pl)!=-1){
00716     if(PlaneValidity[planeNumberFinder(pl)]==true){
00717       return VetoGeom_y_s19[planeNumberFinder(pl)];
00718     } else{
00719       MSG("CandShield",Msg::kWarning) << "GetPlaneStrip19_Y:Plane " << pl << " is not valid!" << endl;
00720       return -100;
00721     }
00722   } else {
00723     MSG("CandShield",Msg::kWarning) << "GetPlaneStrip19_Y:Plane " << pl << " does not exist in the shield!" << endl;
00724     return -100;
00725   }
00726 }

Double_t ShieldGeom::GetPlaneStrip19_Z Int_t  pl  ) 
 

Definition at line 729 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, and VetoGeom_z_s19.

00729                                                {
00730   if(planeNumberFinder(pl)!=-1){
00731     if(PlaneValidity[planeNumberFinder(pl)]==true){
00732       return VetoGeom_z_s19[planeNumberFinder(pl)];
00733     } else{
00734       MSG("CandShield",Msg::kWarning) << "GetPlaneStrip19_Z:Plane " << pl << " is not valid!" << endl;
00735       return -100;
00736     }
00737   } else {
00738     MSG("CandShield",Msg::kWarning) << "GetPlaneStrip19_Z:Plane " << pl << " does not exist in the shield!" << endl;
00739     return -100;
00740   }
00741 }

Double_t ShieldGeom::GetPlank_X Int_t  pl,
Int_t  pk
 

Definition at line 306 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, VetoGeomPlank_exist, and VetoGeomPlank_x.

Referenced by NtpSRModule::FillNtpShieldStrip(), AtNuShieldEvent::FindExpectedPlanks(), AtNuShieldEvent::FindMatchedPlanksFromTruth(), AlgFarDetShieldPlank::RunAlg(), and ShieldProj::ShieldProj().

00306                                                  {
00307   if(planeNumberFinder(pl)!=-1){
00308     if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1 && PlaneValidity[planeNumberFinder(pl)]==true){
00309       return VetoGeomPlank_x[planeNumberFinder(pl)][pk];
00310     } else{
00311       MSG("CandShield",Msg::kWarning) << "GetPlank_X:Plank " << pl << "," << pk << " does not exist!" << endl; 
00312       return -100;
00313     }
00314   } else {
00315     MSG("CandShield",Msg::kWarning) << "GetPlank_X:Plank " << pl << "," << pk << " does not exist!" << endl;
00316     return -100;
00317   }
00318 }

Double_t ShieldGeom::GetPlank_Y Int_t  pl,
Int_t  pk
 

Definition at line 321 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, VetoGeomPlank_exist, and VetoGeomPlank_y.

Referenced by NtpSRModule::FillNtpShieldStrip(), AtNuShieldEvent::FindExpectedPlanks(), AtNuShieldEvent::FindMatchedPlanksFromTruth(), AlgFarDetShieldPlank::RunAlg(), and ShieldProj::ShieldProj().

00321                                                  {
00322   if(planeNumberFinder(pl)!=-1){
00323    if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1 && PlaneValidity[planeNumberFinder(pl)]==true){
00324      return VetoGeomPlank_y[planeNumberFinder(pl)][pk];
00325    } else{
00326      MSG("CandShield",Msg::kWarning) << "GetPlank_Y:Plank " << pl << "," << pk << " does not exist!" << endl;
00327      return -100;
00328    } 
00329   }else {
00330     MSG("CandShield",Msg::kWarning) << "GetPlank_Y:Plank " << pl << "," << pk << " does not exist!" << endl;
00331     return -100;
00332   }
00333 }

Double_t ShieldGeom::GetPlank_Z Int_t  pl,
Int_t  pk
 

Definition at line 336 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, VetoGeomPlank_exist, and VetoGeomPlank_z.

Referenced by NtpSRModule::FillNtpShieldStrip(), and ShieldProj::ShieldProj().

00336                                                  {
00337   if(planeNumberFinder(pl)!=-1){
00338     if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1 && PlaneValidity[planeNumberFinder(pl)]==true){
00339       return VetoGeomPlank_z[planeNumberFinder(pl)][pk];
00340     } else{
00341       MSG("CandShield",Msg::kWarning) << "GetPlank_Z:Plank " << pl << "," << pk << " does not exist!" << endl;
00342       return -100;
00343     }
00344   } else {
00345     MSG("CandShield",Msg::kWarning) << "GetPlank_Z:Plank " << pl << "," << pk << " does not exist!" << endl;
00346     return -100;
00347   }
00348   
00349 }

Double_t ShieldGeom::GetPlankStrip0_X Int_t  pl,
Int_t  pk
 

Definition at line 365 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, VetoGeomPlank_exist, and VetoGeomPlank_x_s0.

Referenced by ShieldProj::ShieldProj().

00365                                                        {
00366   if(planeNumberFinder(pl)!=-1){
00367     if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1 && PlaneValidity[planeNumberFinder(pl)]==true){
00368       return VetoGeomPlank_x_s0[planeNumberFinder(pl)][pk];
00369     } else{
00370       MSG("CandShield",Msg::kWarning) << "GetPlankStrip0_X:Plank " << pl << "," << pk << " does not exist!" << endl;
00371       return -100;
00372     }
00373   }else {
00374     MSG("CandShield",Msg::kWarning) << "GetPlankStrip0_X:Plank " << pl << "," << pk << " does not exist!" << endl;
00375     return -100;
00376   }
00377 }

Double_t ShieldGeom::GetPlankStrip0_Y Int_t  pl,
Int_t  pk
 

Definition at line 380 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, VetoGeomPlank_exist, and VetoGeomPlank_y_s0.

Referenced by ShieldProj::ShieldProj().

00380                                                        {
00381   if(planeNumberFinder(pl)!=-1){
00382    if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1 && PlaneValidity[planeNumberFinder(pl)]==true){
00383      return VetoGeomPlank_y_s0[planeNumberFinder(pl)][pk];
00384    } else{
00385      MSG("CandShield",Msg::kWarning) << "GetPlankStrip0_Y:Plank " << pl << "," << pk << " does not exist!" << endl;
00386      return -100;
00387    }   
00388   }else{
00389     MSG("CandShield",Msg::kWarning) << "GetPlankStrip0_Y:Plank " << pl << "," << pk << " does not exist!" << endl;
00390     return -100;
00391   }
00392 }

Double_t ShieldGeom::GetPlankStrip0_Z Int_t  pl,
Int_t  pk
 

Definition at line 395 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, VetoGeomPlank_exist, and VetoGeomPlank_z_s0.

Referenced by ShieldProj::ShieldProj().

00395                                                        {
00396   if(planeNumberFinder(pl)!=-1){
00397     if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1 && PlaneValidity[planeNumberFinder(pl)]==true){
00398       return VetoGeomPlank_z_s0[planeNumberFinder(pl)][pk];
00399     } else{
00400       MSG("CandShield",Msg::kWarning) << "GetPlankStrip0_Z:Plank " << pl << "," << pk << " does not exist!" << endl;
00401       return -100;
00402     }  
00403   } else{
00404     MSG("CandShield",Msg::kWarning) << "GetPlankStrip0_Z:Plank " << pl << "," << pk << " does not exist!" << endl;
00405     return -100; 
00406   }
00407 }

Double_t ShieldGeom::GetStrip_X Int_t  pl,
Int_t  pk
 

Definition at line 744 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, and VetoStrip_x.

Referenced by CandShieldSR::CandShieldSR().

00744                                                  {
00745   if(planeNumberFinder(pl)!=-1){
00746     if(PlaneValidity[planeNumberFinder(pl)]==true && pk<20 && pk>=0){
00747       return VetoStrip_x[planeNumberFinder(pl)][pk];
00748     } else {
00749       MSG("CandShield",Msg::kWarning) << "GetStrip_X:Plane " << pl << " is not valid and/or value in 2nd field is out of bounds" << endl;
00750       return -100;
00751     }  
00752   } else {
00753     MSG("CandShield",Msg::kWarning) << "GetStrip_X:Plane " << pl << " does not exist in the shield!" << endl;
00754     return -100;
00755   }
00756 }

Double_t ShieldGeom::GetStrip_Y Int_t  pl,
Int_t  pk
 

Definition at line 759 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, and VetoStrip_y.

Referenced by CandShieldSR::CandShieldSR().

00759                                                  {  
00760   if(planeNumberFinder(pl)!=-1){
00761     if(PlaneValidity[planeNumberFinder(pl)]==true && pk<20 && pk>=0){
00762       return VetoStrip_y[planeNumberFinder(pl)][pk];
00763     } else {
00764       MSG("CandShield",Msg::kWarning) << "GetStrip_Y:Plane " << pl << " is not valid and/or value in 2nd field is out of bounds" << endl;
00765       return -100;
00766     }    
00767   }else {
00768     MSG("CandShield",Msg::kWarning) << "GetStrip_Y:Plane " << pl << " does not exist in the shield!" << endl;
00769     return -100;
00770   }
00771 }

Double_t ShieldGeom::GetStrip_Z Int_t  pl,
Int_t  pk
 

Definition at line 774 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, and VetoStrip_z.

00774                                                  {
00775   if(planeNumberFinder(pl)!=-1){
00776     if(PlaneValidity[planeNumberFinder(pl)]==true && pk<20 && pk>=20){
00777       return VetoStrip_z[planeNumberFinder(pl)][pk];
00778     } else {
00779       MSG("CandShield",Msg::kWarning) << "GetStrip_Z:Plane " << pl << " is not valid and/or value in 2nd field is out of bounds" << endl;
00780       return -100;
00781     }    
00782   } else {
00783     MSG("CandShield",Msg::kWarning) << "GetStrip_Z:Plane " << pl << " does not exist in the shield!" << endl;
00784     return -100;
00785   }
00786 }

Int_t ShieldGeom::GetStripsInPlank Int_t  pl,
Int_t  pk
 

Definition at line 410 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, VetoGeomPlank_exist, and VetoGeomPlank_strips.

Referenced by CandShieldSR::CandShieldSR(), and ShieldProj::ShieldProj().

00410                                                     {
00411   if(planeNumberFinder(pl)!=-1){
00412     if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1 && PlaneValidity[planeNumberFinder(pl)]==true){
00413       return VetoGeomPlank_strips[planeNumberFinder(pl)][pk];
00414     }
00415     else{
00416       MSG("CandShield",Msg::kWarning) << "GetStripsInPlank:Plank " << pl << "," << pk << " does not exist!" << endl;
00417       return -1;
00418     }
00419   }else{
00420     MSG("CandShield",Msg::kWarning) << "GetStripsInPlank:Plank " << pl << "," << pk << " does not exist!" << endl;
00421     return -1;
00422   }
00423 }

Double_t ShieldGeom::GetStripWls Int_t  pl,
Int_t  pk,
Int_t  noorso
 

Definition at line 789 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, and VetoStripWls.

Referenced by NtpSRModule::FillNtpShieldStrip().

00789                                                                 {
00790   if(planeNumberFinder(pl)!=-1){
00791     if(noorso<2 && noorso > -1 && PlaneValidity[planeNumberFinder(pl)]==true && pk<20 && pk>=0){
00792       return VetoStripWls[planeNumberFinder(pl)][pk][noorso];
00793     } else {
00794       MSG("CandShield",Msg::kWarning) << "GetStripWls:Plane " << pl << " is not valid and/or value in 2nd/3rd fields is/are out of bounds" << endl;
00795       return -100;
00796     }    
00797   } else {
00798     MSG("CandShield",Msg::kWarning) << "GetStripWls:Plane " << pl << " does not exist in the shield!" << endl;
00799     return -100;
00800   }
00801 }

Bool_t ShieldGeom::IsLowerSide Int_t  pl  ) 
 

Definition at line 569 of file ShieldGeom.cxx.

00569                                       {
00570 
00571   Bool_t lsidity=false;
00572 
00573   Int_t LowerSideList[10]={0};
00574   LowerSideList[0]=558;
00575   LowerSideList[1]=559;
00576   LowerSideList[2]=567;
00577   LowerSideList[3]=568;
00578   
00579   for(int sect=0;sect<4;sect++){
00580     for(int ii=0;ii<10;ii++){
00581       if(LowerSideList[ii]+sect*64==pl){
00582         lsidity = true;
00583       }
00584     }
00585   }
00586 
00587   return lsidity;
00588 
00589 }

Bool_t ShieldGeom::IsPlaneActive Int_t  vpa  ) 
 

Definition at line 681 of file ShieldGeom.cxx.

References planeNumberFinder(), and PlaneValidity.

Referenced by CandShieldSR::CandShieldSR().

00681                                          {
00682   if(planeNumberFinder(pl)!=-1){
00683     return PlaneValidity[planeNumberFinder(pl)];
00684   }
00685   else {
00686     return false;
00687   }    
00688 }

Bool_t ShieldGeom::IsVertical Int_t  pl  ) 
 

Definition at line 540 of file ShieldGeom.cxx.

Referenced by NtpSRModule::FillNtpShieldStrip().

00540                                      {
00541   
00542   Bool_t verticality=false;
00543 
00544   Int_t VerticalList[10]={0};
00545   VerticalList[0]=558;
00546   VerticalList[1]=559;
00547   VerticalList[2]=563;
00548   VerticalList[3]=564;
00549   VerticalList[4]=565;
00550   VerticalList[5]=567;
00551   VerticalList[6]=568;
00552   VerticalList[7]=572;
00553   VerticalList[8]=573;
00554   VerticalList[9]=574;
00555   
00556   for(int sect=0;sect<4;sect++){
00557     for(int ii=0;ii<10;ii++){
00558       if(VerticalList[ii]+sect*64==pl){
00559         verticality = true;
00560       }
00561     }
00562   }
00563 
00564   return verticality;
00565 
00566 }

Bool_t ShieldGeom::PlaneExistsInVeto Int_t  pl  ) 
 

Definition at line 652 of file ShieldGeom.cxx.

References planeNumberFinder(), and PlaneValidity.

00652                                              {
00653   if(planeNumberFinder(pl)!=-1){
00654     if(PlaneValidity[planeNumberFinder(pl)]==true){
00655       return true;
00656     }
00657     else {
00658       return false;
00659     }
00660   }else {
00661     return false;
00662   }
00663 }

Int_t ShieldGeom::planeNumberFinder Int_t  pln  )  [private]
 

Definition at line 244 of file ShieldGeom.cxx.

References PlaneArray.

Referenced by ClosestTwoSections(), GetAssociatedPlank(), GetChipIndex(), GetChipNumber(), GetListStripsInPlank(), GetPlane_X(), GetPlane_Y(), GetPlane_Z(), GetPlaneClearFiber(), GetPlaneStrip19_X(), GetPlaneStrip19_Y(), GetPlaneStrip19_Z(), GetPlank_X(), GetPlank_Y(), GetPlank_Z(), GetPlankStrip0_X(), GetPlankStrip0_Y(), GetPlankStrip0_Z(), GetStrip_X(), GetStrip_Y(), GetStrip_Z(), GetStripsInPlank(), GetStripWls(), IsPlaneActive(), PlaneExistsInVeto(), PlankExists(), SetupShieldGeom(), WhatSection(), and WhatSectionAbove().

00245 {
00246   Int_t planeNum=-1;
00247   
00248   for(int ii=0;ii<168;ii++){
00249     if(PlaneArray[ii]==pln){
00250       planeNum = ii; 
00251       continue;
00252     }    
00253   }
00254   return planeNum;
00255   
00256 }

Bool_t ShieldGeom::PlankExists Int_t  pl,
Int_t  pk
 

Definition at line 351 of file ShieldGeom.cxx.

References planeNumberFinder(), PlaneValidity, and VetoGeomPlank_exist.

Referenced by CandShieldSR::CandShieldSR(), and ShieldProj::ShieldProj().

00351                                                  {
00352   if(planeNumberFinder(pl)!=-1){
00353     if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1 && PlaneValidity[planeNumberFinder(pl)]==true){
00354       return true;
00355     }
00356     else {return false;
00357     }
00358   }else{    
00359     return false;
00360   }
00361 
00362 }

Bool_t ShieldGeom::Reinitialize const VldContext vldc  ) 
 

Definition at line 286 of file ShieldGeom.cxx.

References fphVldRange, fughVldRange, VldRange::IsCompatible(), SetupShieldGeom(), VetoGeomAlreadyFilled, and VetoGeomPlank_exist.

Referenced by NtpSRModule::FillNtpShield(), AtNuShieldEvent::FindExpectedPlanks(), AtNuShieldEvent::FindMatchedPlanksFromTruth(), and AlgFarDetShieldPlank::RunAlg().

00286                                                      {
00287 
00288   if(fughVldRange.IsCompatible(vldc) && fphVldRange.IsCompatible(vldc)){
00289     return false;
00290   }
00291   else{
00292     //Resetting the existence of planks
00293     for(int pl=0;pl<=167;pl++){
00294       for(int st=0;st<20;st++){
00295         VetoGeomPlank_exist[pl][st]=0;
00296         VetoGeomAlreadyFilled[pl][st]=0;
00297       }
00298     }
00299     SetupShieldGeom(vldc);
00300     return true;
00301   }
00302 
00303 }

void ShieldGeom::SetupShieldGeom const VldContext vldc  )  [private]
 

Definition at line 62 of file ShieldGeom.cxx.

References AlreadyDidChipNumbers, AssociatedPlank, UgliStripHandle::ClearFiber(), fphVldRange, fughVldRange, RawChannelId::GetCrate(), PlexSEIdAltL::GetCurrentSEId(), PlexStripEndId::GetOppositeSEId(), PlexPlaneId::GetPlane(), PlexHandle::GetRawChannelId(), UgliGeomHandle::GetScintPlnHandle(), PlexHandle::GetSEIdAltL(), PlexSEIdAltL::GetSize(), PlexStripEndId::GetStrip(), UgliGeomHandle::GetStripHandle(), RawChannelId::GetVaAdcSel(), RawChannelId::GetVaChip(), RawChannelId::GetVarcId(), PlexPlaneId::GetVetoSection(), PlexHandle::GetVldRange(), UgliGeomHandle::GetVldRange(), RawChannelId::GetVmm(), UgliPlnHandle::GetX0(), UgliPlnHandle::GetY0(), UgliPlnHandle::GetZ0(), UgliStripHandle::GlobalPos(), PlexSEIdAltL::IsValid(), UgliPlnHandle::IsValid(), ListStripsInPlank, MSG, PlexSEIdAltL::Next(), PlaneArray, planeNumberFinder(), PlaneValidity, PlexSEIdAltL::SetFirst(), valid_planes, VetoChipIndex, VetoGeom_x, VetoGeom_x_s19, VetoGeom_y, VetoGeom_y_s19, VetoGeom_z, VetoGeom_z_s19, VetoGeomAlreadyFilled, VetoGeomPlank_exist, VetoGeomPlank_strips, VetoGeomPlank_x, VetoGeomPlank_x_s0, VetoGeomPlank_y, VetoGeomPlank_y_s0, VetoGeomPlank_z, VetoGeomPlank_z_s0, VetoGeomSection, VetoPlaneClearFiber, VetoStrip_x, VetoStrip_y, VetoStrip_z, VetoStripWls, and UgliStripHandle::WlsPigtail().

Referenced by Reinitialize(), and ShieldGeom().

00062                                                       {
00063 
00064   // Definitions
00065   Int_t vetoplane=0;
00066   TVector3 stripPos(0,0,0);
00067   Int_t ini_plank=0;
00068   Int_t ini_plane=0;  
00069   Int_t ini_plane_pnf=0;
00070   valid_planes=0;
00071 
00072   //Reading from database; Getting VldRanges
00073   UgliGeomHandle ugh(vldc);  
00074   fughVldRange=ugh.GetVldRange();
00075   PlexHandle ph(vldc);
00076   fphVldRange=ph.GetVldRange();
00077 
00078   //PlaneArray restructuration
00079   for(int pl=0;pl<=167;pl++){
00080     PlexPlaneId *planeid = new PlexPlaneId(Detector::kFar,PlaneArray[pl]);
00081     UgliPlnHandle ugp = ugh.GetScintPlnHandle(*planeid);
00082     delete planeid;
00083     if(ugp.IsValid()==true){
00084       PlaneValidity[pl]=true;
00085       valid_planes+=1;
00086     } 
00087     else {
00088       PlaneValidity[pl]=false;
00089     }
00090   }
00091     
00092   // 1) Planes
00093 
00094   MSG("CandShield",Msg::kDebug) << "Doing strips and planes in SetupShieldGeom" << endl; 
00095   for(int pl=0;pl<valid_planes;pl++){
00096     if(PlaneValidity[pl]==true){
00097     
00098       vetoplane=PlaneArray[pl];  
00099       PlexPlaneId *pid = new PlexPlaneId(Detector::kFar,vetoplane);    
00100       UgliPlnHandle ugp = ugh.GetScintPlnHandle(*pid);
00101       VetoGeom_x[pl]=ugp.GetX0();    
00102       VetoGeom_y[pl]=ugp.GetY0();
00103       VetoGeom_z[pl]=ugp.GetZ0();   
00104       VetoGeomSection[pl]=pid->GetVetoSection();
00105       delete pid;
00106       
00107       //get the position of the 19th strip of each plane
00108       PlexPlaneId plnid(Detector::kFar,vetoplane,false);
00109       PlexStripEndId *seid = new PlexStripEndId(plnid,19,StripEnd::kUnknown);
00110       UgliStripHandle ugs = ugh.GetStripHandle(*seid);
00111       delete seid;
00112       stripPos=ugs.GlobalPos(0);
00113       VetoGeom_x_s19[pl]=stripPos[0];
00114       VetoGeom_y_s19[pl]=stripPos[1];
00115       VetoGeom_z_s19[pl]=stripPos[2];        
00116     }
00117   }
00118   
00119   //Individual strip positions
00120   for(int pl=0;pl<valid_planes;pl++){
00121     if(PlaneValidity[pl]==true){
00122       vetoplane=PlaneArray[pl];
00123       PlexPlaneId pid(Detector::kFar,vetoplane);
00124       for(int st=0;st<20;st++){      
00125         PlexStripEndId *seid = new PlexStripEndId(pid,st,StripEnd::kUnknown);
00126         UgliStripHandle ugs = ugh.GetStripHandle(*seid);      
00127         delete seid;
00128         if(st==0){
00129           VetoPlaneClearFiber[pl][0]=ugs.ClearFiber(StripEnd::kSouth);
00130           VetoPlaneClearFiber[pl][1]=ugs.ClearFiber(StripEnd::kNorth);
00131         }
00132         stripPos=ugs.GlobalPos(0);
00133         VetoStrip_x[pl][st]=stripPos[0];
00134         VetoStrip_y[pl][st]=stripPos[1];
00135         VetoStrip_z[pl][st]=stripPos[2];
00136         VetoStripWls[pl][st][0]=ugs.WlsPigtail(StripEnd::kSouth);      
00137         VetoStripWls[pl][st][1]=ugs.WlsPigtail(StripEnd::kNorth);
00138       }    
00139     }
00140   }
00141   
00142   //2) Planks
00143   MSG("CandShield",Msg::kDebug) << "Doing planks in SetupShieldGeom" << endl;  
00144   for(int pl=0;pl<valid_planes;pl++){
00145     if(PlaneValidity[pl]==true){
00146       PlexPlaneId plnid(Detector::kFar,PlaneArray[pl],false);
00147       for(int st=0;st<=19;st++){
00148         PlexStripEndId pseid(plnid,st,StripEnd::kNorth);
00149         RawChannelId rcid = ph.GetRawChannelId(pseid);
00150         
00151         PlexStripEndId pseid_op = pseid.GetOppositeSEId();
00152         RawChannelId rcid_op = ph.GetRawChannelId(pseid_op);
00153         
00154         PlexSEIdAltL altlist = ph.GetSEIdAltL(rcid);
00155         
00156         //Iterate through the alt list to find the SEId with the smallest
00157         //plane/strip combo, and the average X, Y, and Z positions
00158         double MeanPlankXYZ[3] = {0.0};
00159         altlist.SetFirst();
00160         PlexStripEndId IndexSEId = altlist.GetCurrentSEId();
00161         while (altlist.IsValid()) {
00162           PlexStripEndId ThisSEId = altlist.GetCurrentSEId();
00163           if(ThisSEId.GetPlane() < IndexSEId.GetPlane() ||
00164              (ThisSEId.GetStrip() < IndexSEId.GetStrip() &&
00165               ThisSEId.GetPlane() == IndexSEId.GetPlane())) IndexSEId=ThisSEId;
00166 
00167           UgliStripHandle ugs = ugh.GetStripHandle(ThisSEId);
00168           stripPos = ugs.GlobalPos(0);
00169 
00170           MeanPlankXYZ[0] += stripPos[0];
00171           MeanPlankXYZ[1] += stripPos[1];
00172           MeanPlankXYZ[2] += stripPos[2];
00173 
00174           altlist.Next();
00175         }
00176 
00177         ini_plane = IndexSEId.GetPlane();
00178         ini_plank = IndexSEId.GetStrip();
00179 
00180         ini_plane_pnf = planeNumberFinder(ini_plane);
00181         if(ini_plane_pnf==-1){
00182           MSG("CandShield",Msg::kWarning) << "WARNING: Plane number returned by PlexSEIdAltL is not valid veto shield plane !! ---- Will not calculate variables for it" << endl;
00183           break;              
00184         }
00185             
00186         MeanPlankXYZ[0] = MeanPlankXYZ[0] / altlist.GetSize();
00187         MeanPlankXYZ[1] = MeanPlankXYZ[1] / altlist.GetSize();
00188         MeanPlankXYZ[2] = MeanPlankXYZ[2] / altlist.GetSize();
00189 
00190         VetoGeomPlank_x[ini_plane_pnf][ini_plank] = MeanPlankXYZ[0]; 
00191         VetoGeomPlank_y[ini_plane_pnf][ini_plank] = MeanPlankXYZ[1];
00192         VetoGeomPlank_z[ini_plane_pnf][ini_plank] = MeanPlankXYZ[2];
00193 
00194         VetoChipIndex[ini_plane_pnf][ini_plank][1]=rcid.GetCrate()*108 + rcid.GetVarcId()*36+rcid.GetVmm()*6 + rcid.GetVaAdcSel()*3+rcid.GetVaChip();
00195         VetoChipIndex[ini_plane_pnf][ini_plank][0]=rcid_op.GetCrate()*108 + rcid_op.GetVarcId()*36+rcid_op.GetVmm()*6 + rcid_op.GetVaAdcSel()*3+rcid_op.GetVaChip();
00196         VetoGeomPlank_exist[ini_plane_pnf][ini_plank]=1;
00197         VetoGeomPlank_strips[ini_plane_pnf][ini_plank]=altlist.GetSize();
00198             
00199         if(VetoGeomAlreadyFilled[ini_plane_pnf][ini_plank]!=1){
00200           PlexPlaneId plnid2(Detector::kFar,ini_plane,false);
00201           PlexStripEndId *pseid2 = new PlexStripEndId(plnid2,ini_plank,StripEnd::kUnknown);
00202           UgliStripHandle ugs = ugh.GetStripHandle(*pseid2);
00203           delete pseid2;
00204           stripPos=ugs.GlobalPos(0);
00205           VetoGeomPlank_x_s0[ini_plane_pnf][ini_plank]=stripPos[0];
00206           VetoGeomPlank_y_s0[ini_plane_pnf][ini_plank]=stripPos[1];
00207           VetoGeomPlank_z_s0[ini_plane_pnf][ini_plank]=stripPos[2];
00208         }
00209 
00210         altlist.SetFirst();
00211         Int_t contlist=0;
00212         while (altlist.IsValid()) {
00213           PlexStripEndId sebest = altlist.GetCurrentSEId();
00214           ListStripsInPlank[ini_plane_pnf][ini_plank][contlist][0] = sebest.GetPlane();
00215           ListStripsInPlank[ini_plane_pnf][ini_plank][contlist][1] = sebest.GetStrip(); 
00216           AssociatedPlank[planeNumberFinder(sebest.GetPlane())][sebest.GetStrip()][0]=ini_plane;
00217           AssociatedPlank[planeNumberFinder(sebest.GetPlane())][sebest.GetStrip()][1]=ini_plank;
00218           
00219           altlist.Next();
00220           contlist=contlist+1;
00221         }  
00222         VetoGeomAlreadyFilled[ini_plane_pnf][ini_plank]=1;
00223       }//end of strip loop
00224       
00225     }//plane validity check
00226     
00227   }//end of planes loop  
00228   
00229   //Other stuff
00230   AlreadyDidChipNumbers=false;
00231 
00232   //Planks that cease to exist and are replaced by others
00233   for(int sect=1;sect<5;sect++){
00234     VetoGeomPlank_x[8+42*(sect-1)][12]+=-0.492;
00235     VetoGeomPlank_x[8+42*(sect-1)][4]+=0.164;
00236     VetoGeomPlank_x[9+42*(sect-1)][0]+=0.492;
00237     VetoGeomPlank_x[9+42*(sect-1)][8]+=-0.164;  
00238   }
00239 }//end of SetupShieldGeom method

Bool_t ShieldGeom::specialPlank Int_t  pl,
Int_t  pk
[private]
 

Definition at line 263 of file ShieldGeom.cxx.

00263                                                 {
00264   
00265   Bool_t verdict;
00266   
00267   static Int_t specialList[8] = {
00268     565, 574,  /*Section 1*/
00269     629, 638,  /*Section 2*/
00270     693, 702,  /*Section 3*/
00271     757, 766}; /*Section 4*/
00272 
00273   verdict=false;
00274   for(int pi=0;pi<8;pi++){
00275     if(pl==specialList[pi] && pk == 16){
00276       verdict = true;
00277     }
00278   }
00279   return verdict;
00280   
00281 } 

Int_t ShieldGeom::ValidVetoPlanes  ) 
 

Definition at line 691 of file ShieldGeom.cxx.

00691                                   {
00692   
00693   return valid_planes;
00694   
00695 }

Int_t ShieldGeom::WhatSection Int_t  pl  ) 
 

Definition at line 666 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), PlaneValidity, and VetoGeomSection.

Referenced by ShieldRejVarAna::Analyze(), NtpSRModule::FillNtpShieldStrip(), AtNuShieldEvent::FindExpectedPlanks(), and AtNuShieldEvent::FindMatchedPlanksFromTruth().

00666                                      {
00667   if(planeNumberFinder(pl)!=-1){
00668     if(PlaneValidity[planeNumberFinder(pl)]==true){
00669       return VetoGeomSection[planeNumberFinder(pl)];
00670     } else{    
00671       MSG("CandShield",Msg::kWarning) << "WhatSection:Plane " << pl << " is not valid!" << endl;
00672       return -1;
00673     }
00674   }else {
00675     MSG("CandShield",Msg::kWarning) << "WhatSection:Plane " << pl << " does not exist in the shield!" << endl;
00676     return -1;
00677   }
00678 }

Int_t ShieldGeom::WhatSectionAbove Double_t  zpos,
Int_t  cont
 

Definition at line 804 of file ShieldGeom.cxx.

References MSG, planeNumberFinder(), and VetoGeom_z.

00804                                                            { 
00805   Int_t sectAbove[2]={0};
00806   sectAbove[0]=-1;
00807   sectAbove[1]=-1;
00808   Int_t contsect=0;
00809   for(int sect=0;sect<4;sect++){
00810     if(fabs(zpos-VetoGeom_z[planeNumberFinder(535+sect*64)])<4.){
00811       sectAbove[contsect]=sect+1;
00812       ++contsect;
00813     }
00814   }
00815   if(cont==0 || cont==1){
00816     return sectAbove[cont];
00817   }else {        
00818     MSG("CandShield",Msg::kWarning) << "WhatSectionAbove:Value in second field must be 0 or 1; Only 2 sections can overlap." << endl;
00819     return -1;
00820   }
00821   
00822 }


Member Data Documentation

Bool_t ShieldGeom::AlreadyDidChipNumbers [private]
 

Definition at line 70 of file ShieldGeom.h.

Referenced by GetChipNumber(), and SetupShieldGeom().

Int_t ShieldGeom::AssociatedPlank[168][20][2] [private]
 

Definition at line 54 of file ShieldGeom.h.

Referenced by GetAssociatedPlank(), and SetupShieldGeom().

VldRange ShieldGeom::fphVldRange [private]
 

Definition at line 79 of file ShieldGeom.h.

Referenced by Reinitialize(), and SetupShieldGeom().

VldRange ShieldGeom::fughVldRange [private]
 

Definition at line 78 of file ShieldGeom.h.

Referenced by Reinitialize(), and SetupShieldGeom().

Int_t ShieldGeom::ListStripsInPlank[168][20][8][2] [private]
 

Definition at line 67 of file ShieldGeom.h.

Referenced by GetListStripsInPlank(), and SetupShieldGeom().

Int_t ShieldGeom::PlaneArray[168] [private]
 

Definition at line 72 of file ShieldGeom.h.

Referenced by planeNumberFinder(), SetupShieldGeom(), and ShieldGeom().

Bool_t ShieldGeom::PlaneValidity[168] [private]
 

Definition at line 73 of file ShieldGeom.h.

Referenced by GetAssociatedPlank(), GetChipIndex(), GetChipNumber(), GetListStripsInPlank(), GetPlane_X(), GetPlane_Y(), GetPlane_Z(), GetPlaneClearFiber(), GetPlaneStrip19_X(), GetPlaneStrip19_Y(), GetPlaneStrip19_Z(), GetPlank_X(), GetPlank_Y(), GetPlank_Z(), GetPlankStrip0_X(), GetPlankStrip0_Y(), GetPlankStrip0_Z(), GetStrip_X(), GetStrip_Y(), GetStrip_Z(), GetStripsInPlank(), GetStripWls(), IsPlaneActive(), PlaneExistsInVeto(), PlankExists(), SetupShieldGeom(), and WhatSection().

Int_t ShieldGeom::valid_planes [private]
 

Definition at line 74 of file ShieldGeom.h.

Referenced by GetChipNumber(), and SetupShieldGeom().

Int_t ShieldGeom::VetoChipIndex[168][20][2] [private]
 

Definition at line 68 of file ShieldGeom.h.

Referenced by GetChipIndex(), GetChipNumber(), and SetupShieldGeom().

Int_t ShieldGeom::VetoChipNumber[168][20][2] [private]
 

Definition at line 69 of file ShieldGeom.h.

Referenced by GetChipNumber().

Double_t ShieldGeom::VetoGeom_x[168] [private]
 

Definition at line 46 of file ShieldGeom.h.

Referenced by GetPlane_X(), and SetupShieldGeom().

Double_t ShieldGeom::VetoGeom_x_s19[168] [private]
 

Definition at line 58 of file ShieldGeom.h.

Referenced by GetPlaneStrip19_X(), and SetupShieldGeom().

Double_t ShieldGeom::VetoGeom_y[168] [private]
 

Definition at line 47 of file ShieldGeom.h.

Referenced by GetPlane_Y(), and SetupShieldGeom().

Double_t ShieldGeom::VetoGeom_y_s19[168] [private]
 

Definition at line 59 of file ShieldGeom.h.

Referenced by GetPlaneStrip19_Y(), and SetupShieldGeom().

Double_t ShieldGeom::VetoGeom_z[168] [private]
 

Definition at line 48 of file ShieldGeom.h.

Referenced by ClosestTwoSections(), GetPlane_Z(), SetupShieldGeom(), and WhatSectionAbove().

Double_t ShieldGeom::VetoGeom_z_s19[168] [private]
 

Definition at line 60 of file ShieldGeom.h.

Referenced by GetPlaneStrip19_Z(), and SetupShieldGeom().

Double_t ShieldGeom::VetoGeomAlreadyFilled[168][20] [private]
 

Definition at line 71 of file ShieldGeom.h.

Referenced by Reinitialize(), SetupShieldGeom(), and ShieldGeom().

Double_t ShieldGeom::VetoGeomPlank_exist[168][20] [private]
 

Definition at line 52 of file ShieldGeom.h.

Referenced by GetChipIndex(), GetChipNumber(), GetListStripsInPlank(), GetPlank_X(), GetPlank_Y(), GetPlank_Z(), GetPlankStrip0_X(), GetPlankStrip0_Y(), GetPlankStrip0_Z(), GetStripsInPlank(), PlankExists(), Reinitialize(), SetupShieldGeom(), and ShieldGeom().

Int_t ShieldGeom::VetoGeomPlank_strips[168][20] [private]
 

Definition at line 53 of file ShieldGeom.h.

Referenced by GetListStripsInPlank(), GetStripsInPlank(), and SetupShieldGeom().

Double_t ShieldGeom::VetoGeomPlank_x[168][20] [private]
 

Definition at line 49 of file ShieldGeom.h.

Referenced by GetPlank_X(), and SetupShieldGeom().

Double_t ShieldGeom::VetoGeomPlank_x_s0[168][20] [private]
 

Definition at line 55 of file ShieldGeom.h.

Referenced by GetPlankStrip0_X(), and SetupShieldGeom().

Double_t ShieldGeom::VetoGeomPlank_y[168][20] [private]
 

Definition at line 50 of file ShieldGeom.h.

Referenced by GetPlank_Y(), and SetupShieldGeom().

Double_t ShieldGeom::VetoGeomPlank_y_s0[168][20] [private]
 

Definition at line 56 of file ShieldGeom.h.

Referenced by GetPlankStrip0_Y(), and SetupShieldGeom().

Double_t ShieldGeom::VetoGeomPlank_z[168][20] [private]
 

Definition at line 51 of file ShieldGeom.h.

Referenced by GetPlank_Z(), and SetupShieldGeom().

Double_t ShieldGeom::VetoGeomPlank_z_s0[168][20] [private]
 

Definition at line 57 of file ShieldGeom.h.

Referenced by GetPlankStrip0_Z(), and SetupShieldGeom().

Int_t ShieldGeom::VetoGeomSection[168] [private]
 

Definition at line 61 of file ShieldGeom.h.

Referenced by SetupShieldGeom(), and WhatSection().

Double_t ShieldGeom::VetoPlaneClearFiber[168][2] [private]
 

Definition at line 66 of file ShieldGeom.h.

Referenced by GetPlaneClearFiber(), and SetupShieldGeom().

Double_t ShieldGeom::VetoStrip_x[168][20] [private]
 

Definition at line 62 of file ShieldGeom.h.

Referenced by GetStrip_X(), and SetupShieldGeom().

Double_t ShieldGeom::VetoStrip_y[168][20] [private]
 

Definition at line 63 of file ShieldGeom.h.

Referenced by GetStrip_Y(), and SetupShieldGeom().

Double_t ShieldGeom::VetoStrip_z[168][20] [private]
 

Definition at line 64 of file ShieldGeom.h.

Referenced by GetStrip_Z(), and SetupShieldGeom().

Double_t ShieldGeom::VetoStripWls[168][20][2] [private]
 

Definition at line 65 of file ShieldGeom.h.

Referenced by GetStripWls(), and SetupShieldGeom().


The documentation for this class was generated from the following files:
Generated on Sat Nov 7 01:32:28 2009 for loon by  doxygen 1.3.9.1