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

ShieldGeom Class Reference

#include <ShieldGeom.h>

List of all members.

Public Member Functions

 ShieldGeom (const VldTimeStamp &time)
 ~ShieldGeom ()
Bool_t Reinitialize (const VldTimeStamp &time)
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 GetChipIndex (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)
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)

Private Member Functions

Int_t planeNumberFinder (Int_t pln)
Bool_t specialPlank (Int_t pl, Int_t pk)
void SetupShieldGeom (const VldTimeStamp &time)

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]
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]
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]
Double_t VetoGeomAlreadyFilled [168][20]
Int_t PlaneArray [168]
VldRange fughVldRange
VldRange fphVldRange


Constructor & Destructor Documentation

ShieldGeom::ShieldGeom const VldTimeStamp time  ) 
 

Definition at line 16 of file ShieldGeom.cxx.

References PlaneArray, and SetupShieldGeom().

00016                                               {
00017 
00018   // Plane Array
00019     
00020   for(int sec=0;sec<=3;sec++){  
00021     for(int ii=0;ii<=31;ii++){
00022       PlaneArray[ii+sec*42]=528+ii+sec*64;
00023     }
00024     for(int ii=0;ii<=5;ii++){
00025       PlaneArray[ii+32+sec*42]=563+ii+sec*64;
00026     }
00027     for(int ii=0;ii<=3;ii++){
00028       PlaneArray[ii+38+sec*42]=572+ii+sec*64;
00029     }
00030   }
00031 
00032   SetupShieldGeom(time);    
00033 
00034 }

ShieldGeom::~ShieldGeom  ) 
 

Definition at line 37 of file ShieldGeom.cxx.

00037 {}


Member Function Documentation

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

Definition at line 352 of file ShieldGeom.cxx.

References planeNumberFinder(), and VetoChipIndex.

00352                                                               {
00353  
00354   return VetoChipIndex[planeNumberFinder(pl)][pk][noorso];
00355 
00356 }

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

Definition at line 340 of file ShieldGeom.cxx.

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

Referenced by CandShieldSR::CandShieldSR().

00340                                                                                    {
00341   
00342   if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1 && plorst<2 && plorst>-1 && entry<VetoGeomPlank_strips[planeNumberFinder(pl)][pk]){        
00343     return ListStripsInPlank[planeNumberFinder(pl)][pk][entry][plorst];
00344   }
00345   else {
00346     return -1;
00347   }
00348 
00349 }

Double_t ShieldGeom::GetPlane_X Int_t  pl  ) 
 

Definition at line 411 of file ShieldGeom.cxx.

References planeNumberFinder(), and VetoGeom_x.

00411                                         {
00412   if(planeNumberFinder(pl)!=-1){
00413     return VetoGeom_x[planeNumberFinder(pl)];
00414   } else{
00415     cout << "No such plane exists in the veto shield!" << endl;
00416     return -100;
00417   }
00418 }

Double_t ShieldGeom::GetPlane_Y Int_t  pl  ) 
 

Definition at line 421 of file ShieldGeom.cxx.

References planeNumberFinder(), and VetoGeom_y.

00421                                         {
00422   if(planeNumberFinder(pl)!=-1){
00423     return VetoGeom_y[planeNumberFinder(pl)];
00424   } else{
00425     cout << "No such plane exists in the veto shield!" << endl;
00426     return -100;
00427   }
00428 }

Double_t ShieldGeom::GetPlane_Z Int_t  pl  ) 
 

Definition at line 431 of file ShieldGeom.cxx.

References planeNumberFinder(), and VetoGeom_z.

00431                                         {
00432   if(planeNumberFinder(pl)!=-1){
00433     return VetoGeom_z[planeNumberFinder(pl)];
00434   } else{
00435     cout << "No such plane exists in the veto shield!" << endl;
00436     return -100;
00437   }
00438 }

Double_t ShieldGeom::GetPlaneClearFiber Int_t  pl,
Int_t  noorso
 

Definition at line 441 of file ShieldGeom.cxx.

References planeNumberFinder(), and VetoPlaneClearFiber.

00441                                                              {
00442   if(planeNumberFinder(pl)!=-1 && noorso<2 && noorso > -1){
00443     return VetoPlaneClearFiber[planeNumberFinder(pl)][noorso];
00444   } else {
00445     return -100;
00446   }    
00447 }

Double_t ShieldGeom::GetPlaneStrip19_X Int_t  pl  ) 
 

Definition at line 460 of file ShieldGeom.cxx.

References planeNumberFinder(), and VetoGeom_x_s19.

00460                                                {
00461   if(planeNumberFinder(pl)!=-1){
00462     return VetoGeom_x_s19[planeNumberFinder(pl)];
00463   } else{
00464     cout << "No such plane exists in the veto shield!" << endl;
00465     return -100;
00466   }
00467 }

Double_t ShieldGeom::GetPlaneStrip19_Y Int_t  pl  ) 
 

Definition at line 470 of file ShieldGeom.cxx.

References planeNumberFinder(), and VetoGeom_y_s19.

00470                                                {
00471   if(planeNumberFinder(pl)!=-1){
00472     return VetoGeom_y_s19[planeNumberFinder(pl)];
00473   } else{
00474     cout << "No such plane exists in the veto shield!" << endl;
00475     return -100;
00476   }
00477 }

Double_t ShieldGeom::GetPlaneStrip19_Z Int_t  pl  ) 
 

Definition at line 480 of file ShieldGeom.cxx.

References planeNumberFinder(), and VetoGeom_z_s19.

00480                                                {
00481   if(planeNumberFinder(pl)!=-1){
00482     return VetoGeom_z_s19[planeNumberFinder(pl)];
00483   } else{
00484     cout << "No such plane exists in the veto shield!" << endl;
00485     return -100;
00486   }
00487 }

Double_t ShieldGeom::GetPlank_X Int_t  pl,
Int_t  pk
 

Definition at line 267 of file ShieldGeom.cxx.

References planeNumberFinder(), VetoGeomPlank_exist, and VetoGeomPlank_x.

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

00267                                                  {
00268   if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1){
00269     return VetoGeomPlank_x[planeNumberFinder(pl)][pk];
00270   } else{
00271     cout << "No such plank exists!" << endl;
00272     return -100;
00273   }
00274 }

Double_t ShieldGeom::GetPlank_Y Int_t  pl,
Int_t  pk
 

Definition at line 277 of file ShieldGeom.cxx.

References planeNumberFinder(), VetoGeomPlank_exist, and VetoGeomPlank_y.

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

00277                                                  {
00278    if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1){
00279      return VetoGeomPlank_y[planeNumberFinder(pl)][pk];
00280    } else{
00281      cout << "No such plank exists!" << endl;
00282      return -100;
00283    }   
00284 }

Double_t ShieldGeom::GetPlank_Z Int_t  pl,
Int_t  pk
 

Definition at line 287 of file ShieldGeom.cxx.

References planeNumberFinder(), VetoGeomPlank_exist, and VetoGeomPlank_z.

Referenced by ShieldProj::ShieldProj().

00287                                                  {
00288   if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1){
00289     return VetoGeomPlank_z[planeNumberFinder(pl)][pk];
00290   } else{
00291     cout << "No such plank exists!" << endl;
00292     return -100;
00293   }
00294   
00295 }

Double_t ShieldGeom::GetPlankStrip0_X Int_t  pl,
Int_t  pk
 

Definition at line 305 of file ShieldGeom.cxx.

References planeNumberFinder(), VetoGeomPlank_exist, and VetoGeomPlank_x_s0.

Referenced by ShieldProj::ShieldProj().

00305                                                        {
00306   if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1){
00307   return VetoGeomPlank_x_s0[planeNumberFinder(pl)][pk];
00308   } else{
00309     cout << "No such plank exists!" << endl;
00310     return -100;
00311   }
00312 }

Double_t ShieldGeom::GetPlankStrip0_Y Int_t  pl,
Int_t  pk
 

Definition at line 315 of file ShieldGeom.cxx.

References planeNumberFinder(), VetoGeomPlank_exist, and VetoGeomPlank_y_s0.

Referenced by ShieldProj::ShieldProj().

00315                                                        {
00316    if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1){
00317      return VetoGeomPlank_y_s0[planeNumberFinder(pl)][pk];
00318    } else{
00319      cout << "No such plank exists!" << endl;
00320      return -100;
00321    }   
00322 }

Double_t ShieldGeom::GetPlankStrip0_Z Int_t  pl,
Int_t  pk
 

Definition at line 325 of file ShieldGeom.cxx.

References planeNumberFinder(), VetoGeomPlank_exist, and VetoGeomPlank_z_s0.

Referenced by ShieldProj::ShieldProj().

00325                                                        {
00326   if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1){
00327     return VetoGeomPlank_z_s0[planeNumberFinder(pl)][pk];
00328   } else{
00329     cout << "No such plank exists!" << endl;
00330     return -100;
00331   }  
00332 }

Double_t ShieldGeom::GetStrip_X Int_t  pl,
Int_t  pk
 

Definition at line 490 of file ShieldGeom.cxx.

References planeNumberFinder(), and VetoStrip_x.

Referenced by CandShieldSR::CandShieldSR().

00490                                                  {
00491   if(planeNumberFinder(pl)!=-1){
00492     return VetoStrip_x[planeNumberFinder(pl)][pk];
00493   } else {
00494     return -100;
00495   }  
00496 }

Double_t ShieldGeom::GetStrip_Y Int_t  pl,
Int_t  pk
 

Definition at line 499 of file ShieldGeom.cxx.

References planeNumberFinder(), and VetoStrip_y.

Referenced by CandShieldSR::CandShieldSR().

00499                                                  {  
00500   if(planeNumberFinder(pl)!=-1){
00501     return VetoStrip_y[planeNumberFinder(pl)][pk];
00502   } else {
00503     return -100;
00504   }    
00505 }

Double_t ShieldGeom::GetStrip_Z Int_t  pl,
Int_t  pk
 

Definition at line 508 of file ShieldGeom.cxx.

References planeNumberFinder(), and VetoStrip_z.

00508                                                  {
00509   if(planeNumberFinder(pl)!=-1){
00510     return VetoStrip_z[planeNumberFinder(pl)][pk];
00511   } else {
00512     return -100;
00513   }    
00514 }

Int_t ShieldGeom::GetStripsInPlank Int_t  pl,
Int_t  pk
 

Definition at line 335 of file ShieldGeom.cxx.

References planeNumberFinder(), and VetoGeomPlank_strips.

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

00335                                                     {
00336   return VetoGeomPlank_strips[planeNumberFinder(pl)][pk];
00337 }

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

Definition at line 517 of file ShieldGeom.cxx.

References planeNumberFinder(), and VetoStripWls.

00517                                                                 {
00518   if(planeNumberFinder(pl)!=-1 && noorso<2 && noorso > -1){
00519     return VetoStripWls[planeNumberFinder(pl)][pk][noorso];
00520   } else {
00521     return -100;
00522   }    
00523 }

Bool_t ShieldGeom::IsLowerSide Int_t  pl  ) 
 

Definition at line 388 of file ShieldGeom.cxx.

00388                                       {
00389 
00390   Bool_t lsidity=false;
00391 
00392   Int_t LowerSideList[10]={0};
00393   LowerSideList[0]=558;
00394   LowerSideList[1]=559;
00395   LowerSideList[2]=567;
00396   LowerSideList[3]=568;
00397   
00398   for(int sect=0;sect<4;sect++){
00399     for(int ii=0;ii<10;ii++){
00400       if(LowerSideList[ii]+sect*64==pl){
00401         lsidity = true;
00402       }
00403     }
00404   }
00405 
00406   return lsidity;
00407 
00408 }

Bool_t ShieldGeom::IsVertical Int_t  pl  ) 
 

Definition at line 359 of file ShieldGeom.cxx.

Referenced by NtpSRModule::FillNtpShieldStrip().

00359                                      {
00360 
00361   Bool_t verticality=false;
00362 
00363   Int_t VerticalList[10]={0};
00364   VerticalList[0]=558;
00365   VerticalList[1]=559;
00366   VerticalList[2]=563;
00367   VerticalList[3]=564;
00368   VerticalList[4]=565;
00369   VerticalList[5]=567;
00370   VerticalList[6]=568;
00371   VerticalList[7]=572;
00372   VerticalList[8]=573;
00373   VerticalList[9]=574;
00374   
00375   for(int sect=0;sect<4;sect++){
00376     for(int ii=0;ii<10;ii++){
00377       if(VerticalList[ii]+sect*64==pl){
00378         verticality = true;
00379       }
00380     }
00381   }
00382 
00383   return verticality;
00384 
00385 }

Bool_t ShieldGeom::PlaneExistsInVeto Int_t  pl  ) 
 

Definition at line 450 of file ShieldGeom.cxx.

References planeNumberFinder().

00450                                              {
00451   if(planeNumberFinder(pl)!=-1){
00452     return true;
00453   }
00454   else {
00455     return false;
00456   }
00457 }

Int_t ShieldGeom::planeNumberFinder Int_t  pln  )  [private]
 

Definition at line 207 of file ShieldGeom.cxx.

References PlaneArray.

Referenced by GetChipIndex(), 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(), PlaneExistsInVeto(), PlankExists(), and SetupShieldGeom().

00208 {
00209   Int_t planeNum=-1;
00210   
00211   for(int ii=0;ii<168;ii++){
00212     if(PlaneArray[ii]==pln){
00213       planeNum = ii; 
00214       continue;
00215     }    
00216   }
00217   return planeNum;
00218   
00219 }

Bool_t ShieldGeom::PlankExists Int_t  pl,
Int_t  pk
 

Definition at line 297 of file ShieldGeom.cxx.

References planeNumberFinder(), and VetoGeomPlank_exist.

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

00297                                                  {
00298   if(VetoGeomPlank_exist[planeNumberFinder(pl)][pk]==1){
00299     return true;
00300   }
00301   else {return false;}
00302 }

Bool_t ShieldGeom::Reinitialize const VldTimeStamp time  ) 
 

Definition at line 253 of file ShieldGeom.cxx.

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

Referenced by NtpSRModule::FillNtpShield().

00253                                                        {
00254 
00255   VldContext vldc(DetectorType::kFar,SimFlag::kData,time);
00256   if(fughVldRange.IsCompatible(vldc) && fphVldRange.IsCompatible(vldc)){
00257     return false;
00258   }
00259   else{
00260     SetupShieldGeom(time);
00261     return true;
00262   }
00263 
00264 }

void ShieldGeom::SetupShieldGeom const VldTimeStamp time  )  [private]
 

Definition at line 43 of file ShieldGeom.cxx.

References 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(), PlexHandle::GetVldRange(), UgliGeomHandle::GetVldRange(), RawChannelId::GetVmm(), UgliPlnHandle::GetX0(), UgliPlnHandle::GetY0(), UgliPlnHandle::GetZ0(), UgliStripHandle::GlobalPos(), PlexSEIdAltL::IsValid(), ListStripsInPlank, PlexSEIdAltL::Next(), PlaneArray, planeNumberFinder(), specialPlank(), 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, VetoPlaneClearFiber, VetoStrip_x, VetoStrip_y, VetoStrip_z, VetoStripWls, and UgliStripHandle::WlsPigtail().

Referenced by Reinitialize(), and ShieldGeom().

00043                                                         {
00044 
00045   // Definitions
00046   Int_t vetoplane=0;
00047   TVector3 stripPos(0,0,0);
00048   Double_t pos0;
00049   Double_t pos1;
00050   Double_t pos2;
00051   Double_t tan_plane_angle=0;
00052   Int_t ini_plank=0;
00053   Int_t ini_plane=0;
00054 
00055   //Reading from database; Getting VldRanges
00056   VldContext vldc(DetectorType::kFar,SimFlag::kData,time);
00057   UgliGeomHandle ugh(vldc);  
00058   fughVldRange=ugh.GetVldRange();
00059   PlexHandle ph(vldc);
00060   fphVldRange=ph.GetVldRange();
00061 
00062   // 1) Planes
00063    
00064   for(int pl=0;pl<=167;pl++){
00065     
00066     vetoplane=PlaneArray[pl];
00067     PlexPlaneId *pid = new PlexPlaneId(DetectorType::kFar,vetoplane);
00068     UgliPlnHandle ugp = ugh.GetScintPlnHandle(*pid);
00069     delete pid;
00070     VetoGeom_x[pl]=ugp.GetX0();    
00071     VetoGeom_y[pl]=ugp.GetY0();
00072     VetoGeom_z[pl]=ugp.GetZ0();    
00073     
00074     //get the position of the 19th strip of each plane
00075     PlexPlaneId plnid(DetectorType::kFar,vetoplane,false);
00076     PlexStripEndId *seid = new PlexStripEndId(plnid,19,StripEnd::kUnknown);
00077     UgliStripHandle ugs = ugh.GetStripHandle(*seid);
00078     delete seid;
00079     stripPos=ugs.GlobalPos(0);
00080     VetoGeom_x_s19[pl]=stripPos[0];
00081     VetoGeom_y_s19[pl]=stripPos[1];
00082     VetoGeom_z_s19[pl]=stripPos[2];    
00083   }
00084   
00085   //Individual strip positions
00086   for(int pl=0;pl<=167;pl++){
00087      vetoplane=PlaneArray[pl];
00088      PlexPlaneId pid(DetectorType::kFar,vetoplane);
00089      for(int st=0;st<20;st++){      
00090        PlexStripEndId *seid = new PlexStripEndId(pid,st,StripEnd::kUnknown);
00091        UgliStripHandle ugs = ugh.GetStripHandle(*seid);
00092        delete seid;
00093        if(st==0){
00094          VetoPlaneClearFiber[pl][0]=ugs.ClearFiber(StripEnd::kSouth);
00095          VetoPlaneClearFiber[pl][1]=ugs.ClearFiber(StripEnd::kNorth);
00096        }
00097        stripPos=ugs.GlobalPos(0);
00098        VetoStrip_x[pl][st]=stripPos[0];
00099        VetoStrip_y[pl][st]=stripPos[1];
00100        VetoStrip_z[pl][st]=stripPos[2];
00101        VetoStripWls[pl][st][0]=ugs.WlsPigtail(StripEnd::kSouth);      
00102        VetoStripWls[pl][st][1]=ugs.WlsPigtail(StripEnd::kNorth);
00103      }    
00104   }
00105   
00106   //2) Planks
00107   
00108   for(int pl=0;pl<=167;pl++){
00109     PlexPlaneId plnid(DetectorType::kFar,PlaneArray[pl],false);
00110     for(int st=0;st<=19;st++){
00111       PlexStripEndId pseid(plnid,st,StripEnd::kNorth);
00112       RawChannelId rcid = ph.GetRawChannelId(pseid);
00113       
00114       PlexStripEndId pseid_op = pseid.GetOppositeSEId();
00115       RawChannelId rcid_op = ph.GetRawChannelId(pseid_op);
00116 
00117       PlexSEIdAltL altlist = ph.GetSEIdAltL(rcid);
00118       Int_t contlist=0;
00119       
00120       while (altlist.IsValid()) {
00121         
00122         if(contlist==0){
00123           PlexStripEndId sebest = altlist.GetCurrentSEId();
00124           ini_plane = sebest.GetPlane();
00125           ini_plank = sebest.GetStrip();        
00126         
00127           VetoChipIndex[planeNumberFinder(ini_plane)][ini_plank][1]=rcid.GetCrate()*108 + rcid.GetVarcId()*36+rcid.GetVmm()*6 + rcid.GetVaAdcSel()*3+rcid.GetVaChip();
00128           VetoChipIndex[planeNumberFinder(ini_plane)][ini_plank][0]=rcid_op.GetCrate()*108 + rcid_op.GetVarcId()*36+rcid_op.GetVmm()*6 + rcid_op.GetVaAdcSel()*3+rcid_op.GetVaChip();
00129           VetoGeomPlank_exist[planeNumberFinder(ini_plane)][ini_plank]=1;
00130           VetoGeomPlank_strips[planeNumberFinder(ini_plane)][ini_plank]=altlist.GetSize();
00131 
00132           if(VetoGeomAlreadyFilled[planeNumberFinder(ini_plane)][ini_plank]!=1){
00133             PlexPlaneId plnid2(DetectorType::kFar,ini_plane,false);
00134             PlexStripEndId *pseid2 = new PlexStripEndId(plnid2,ini_plank,StripEnd::kUnknown);
00135             UgliStripHandle ugs = ugh.GetStripHandle(*pseid2);
00136             delete pseid2;
00137             stripPos=ugs.GlobalPos(0);
00138             VetoGeomPlank_x_s0[planeNumberFinder(ini_plane)][ini_plank]=stripPos[0];
00139             VetoGeomPlank_y_s0[planeNumberFinder(ini_plane)][ini_plank]=stripPos[1];
00140             VetoGeomPlank_z_s0[planeNumberFinder(ini_plane)][ini_plank]=stripPos[2];
00141           }
00142         }
00143         
00144         PlexStripEndId sebest = altlist.GetCurrentSEId();
00145         ListStripsInPlank[planeNumberFinder(ini_plane)][ini_plank][contlist][0] = sebest.GetPlane();
00146         ListStripsInPlank[planeNumberFinder(ini_plane)][ini_plank][contlist][1] = sebest.GetStrip();    
00147         
00148         if(contlist==altlist.GetSize()/2-1&&VetoGeomAlreadyFilled[planeNumberFinder(ini_plane)][ini_plank]!=1){
00149           
00150           //Getting the position of the plank from the 2 middle strips
00151           PlexStripEndId sebest = altlist.GetCurrentSEId();
00152           Int_t mid_plane = sebest.GetPlane();
00153           Int_t mid_strip = sebest.GetStrip();
00154           
00155           PlexPlaneId plnid2(DetectorType::kFar,mid_plane,false);
00156           PlexStripEndId *pseid2 = new PlexStripEndId(plnid2,mid_strip,StripEnd::kUnknown);
00157           UgliStripHandle ugs = ugh.GetStripHandle(*pseid2);
00158           delete pseid2;
00159           stripPos=ugs.GlobalPos(0);
00160           pos0=stripPos[0];
00161           pos1=stripPos[1];
00162           pos2=stripPos[2];
00163           
00164           altlist.Next();
00165           
00166           PlexStripEndId sebest2 = altlist.GetCurrentSEId();
00167           
00168           mid_plane = sebest2.GetPlane();
00169           mid_strip = sebest2.GetStrip();
00170           
00171           PlexPlaneId plnid3(DetectorType::kFar,mid_plane,false);
00172           PlexStripEndId *pseid3 = new PlexStripEndId(plnid3,mid_strip,StripEnd::kUnknown);
00173           UgliStripHandle ugs2 = ugh.GetStripHandle(*pseid3);
00174           delete pseid3;
00175           stripPos=ugs2.GlobalPos(0);
00176           if(specialPlank(ini_plane,ini_plank)!=true){
00177             VetoGeomPlank_x[planeNumberFinder(ini_plane)][ini_plank] = pos0/2+stripPos[0]/2; 
00178             VetoGeomPlank_y[planeNumberFinder(ini_plane)][ini_plank] = pos1/2+stripPos[1]/2;
00179             VetoGeomPlank_z[planeNumberFinder(ini_plane)][ini_plank] = pos2/2+stripPos[2]/2;
00180           }
00181           else{
00182             tan_plane_angle =fabs(VetoGeomPlank_y_s0[planeNumberFinder(ini_plane)][ini_plank]-pos1)*1./fabs(VetoGeomPlank_x_s0[planeNumberFinder(ini_plane)][ini_plank]-pos0);     
00183             VetoGeomPlank_x[planeNumberFinder(ini_plane)][ini_plank] = stripPos[0]; 
00184             VetoGeomPlank_y[planeNumberFinder(ini_plane)][ini_plank] = pos1-fabs(tan_plane_angle*(pos0-stripPos[0]));
00185             VetoGeomPlank_z[planeNumberFinder(ini_plane)][ini_plank] = pos2/2+stripPos[2]/2;
00186           }
00187         }
00188         altlist.Next();
00189         contlist=contlist+1;
00190       }  
00191       VetoGeomAlreadyFilled[planeNumberFinder(ini_plane)][ini_plank]=1;
00192     }//end of strip loop
00193   }//end of planes loop  
00194 
00195   //Planks that cease to exist and are replaced by others
00196   for(int sect=1;sect<5;sect++){
00197     VetoGeomPlank_x[8+42*(sect-1)][12]+=-0.492;
00198     VetoGeomPlank_x[8+42*(sect-1)][4]+=0.164;
00199     VetoGeomPlank_x[9+42*(sect-1)][0]+=0.492;
00200     VetoGeomPlank_x[9+42*(sect-1)][8]+=-0.164;  
00201   }
00202 }//end of SetupShieldGeom method

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

Definition at line 226 of file ShieldGeom.cxx.

Referenced by SetupShieldGeom().

00226                                                 {
00227   
00228   Bool_t verdict;
00229   
00230   Int_t specialList[8];
00231   specialList[0]=566;
00232   specialList[1]=575;
00233   specialList[2]=630;
00234   specialList[3]=639;
00235   specialList[4]=694;
00236   specialList[5]=703;
00237   specialList[6]=758;
00238   specialList[7]=767;
00239 
00240   verdict=false;
00241   for(int pi=0;pi<8;pi++){
00242     if(pl==specialList[pi] && pk == 3){
00243       verdict = true;
00244     }
00245   }
00246   return verdict;
00247   
00248 } 


Member Data Documentation

VldRange ShieldGeom::fphVldRange [private]
 

Definition at line 66 of file ShieldGeom.h.

Referenced by Reinitialize(), and SetupShieldGeom().

VldRange ShieldGeom::fughVldRange [private]
 

Definition at line 65 of file ShieldGeom.h.

Referenced by Reinitialize(), and SetupShieldGeom().

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

Definition at line 58 of file ShieldGeom.h.

Referenced by GetListStripsInPlank(), and SetupShieldGeom().

Int_t ShieldGeom::PlaneArray[168] [private]
 

Definition at line 61 of file ShieldGeom.h.

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

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

Definition at line 59 of file ShieldGeom.h.

Referenced by GetChipIndex(), and SetupShieldGeom().

Double_t ShieldGeom::VetoGeom_x[168] [private]
 

Definition at line 39 of file ShieldGeom.h.

Referenced by GetPlane_X(), and SetupShieldGeom().

Double_t ShieldGeom::VetoGeom_x_s19[168] [private]
 

Definition at line 50 of file ShieldGeom.h.

Referenced by GetPlaneStrip19_X(), and SetupShieldGeom().

Double_t ShieldGeom::VetoGeom_y[168] [private]
 

Definition at line 40 of file ShieldGeom.h.

Referenced by GetPlane_Y(), and SetupShieldGeom().

Double_t ShieldGeom::VetoGeom_y_s19[168] [private]
 

Definition at line 51 of file ShieldGeom.h.

Referenced by GetPlaneStrip19_Y(), and SetupShieldGeom().

Double_t ShieldGeom::VetoGeom_z[168] [private]
 

Definition at line 41 of file ShieldGeom.h.

Referenced by GetPlane_Z(), and SetupShieldGeom().

Double_t ShieldGeom::VetoGeom_z_s19[168] [private]
 

Definition at line 52 of file ShieldGeom.h.

Referenced by GetPlaneStrip19_Z(), and SetupShieldGeom().

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

Definition at line 60 of file ShieldGeom.h.

Referenced by SetupShieldGeom().

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

Definition at line 45 of file ShieldGeom.h.

Referenced by GetListStripsInPlank(), GetPlank_X(), GetPlank_Y(), GetPlank_Z(), GetPlankStrip0_X(), GetPlankStrip0_Y(), GetPlankStrip0_Z(), PlankExists(), and SetupShieldGeom().

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

Definition at line 46 of file ShieldGeom.h.

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

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

Definition at line 42 of file ShieldGeom.h.

Referenced by GetPlank_X(), and SetupShieldGeom().

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

Definition at line 47 of file ShieldGeom.h.

Referenced by GetPlankStrip0_X(), and SetupShieldGeom().

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

Definition at line 43 of file ShieldGeom.h.

Referenced by GetPlank_Y(), and SetupShieldGeom().

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

Definition at line 48 of file ShieldGeom.h.

Referenced by GetPlankStrip0_Y(), and SetupShieldGeom().

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

Definition at line 44 of file ShieldGeom.h.

Referenced by GetPlank_Z(), and SetupShieldGeom().

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

Definition at line 49 of file ShieldGeom.h.

Referenced by GetPlankStrip0_Z(), and SetupShieldGeom().

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

Definition at line 57 of file ShieldGeom.h.

Referenced by GetPlaneClearFiber(), and SetupShieldGeom().

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

Definition at line 53 of file ShieldGeom.h.

Referenced by GetStrip_X(), and SetupShieldGeom().

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

Definition at line 54 of file ShieldGeom.h.

Referenced by GetStrip_Y(), and SetupShieldGeom().

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

Definition at line 55 of file ShieldGeom.h.

Referenced by GetStrip_Z(), and SetupShieldGeom().

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

Definition at line 56 of file ShieldGeom.h.

Referenced by GetStripWls(), and SetupShieldGeom().


The documentation for this class was generated from the following files:
Generated on Thu Nov 1 15:58:17 2007 for loon by  doxygen 1.3.9.1