#include <CandShieldSR.h>
Public Member Functions | |
| CandShieldSR (Double_t vtx0_in, Double_t vtx1_in, Double_t vtx2_in, Double_t vtxCos0_in, Double_t vtxCos1_in, Double_t vtxCos2_in, ShieldGeom *sg) | |
| ~CandShieldSR () | |
| Int_t | GetCandShieldPlane (Int_t id) const |
| Int_t | GetCandShieldStrip0 (Int_t id) const |
| Double_t | GetCandShieldInter_X (Int_t id) const |
| Double_t | GetCandShieldInter_Y (Int_t id) const |
| Double_t | GetCandShieldInter_Z (Int_t id) const |
| Double_t | GetInterCenterDis (Int_t id) const |
| Int_t | GetStripInPlank (Int_t id, Int_t plorst) const |
| Int_t | GetCandShieldPlane () const |
| Int_t | GetCandShieldStrip0 () const |
| Double_t | GetCandShieldInter_X () const |
| Double_t | GetCandShieldInter_Y () const |
| Double_t | GetCandShieldInter_Z () const |
| Double_t | GetInterCenterDis () const |
| Int_t | GetStripInPlank (Int_t plorst) const |
| Bool_t | IsVetoHit () const |
| Int_t | HitsInShield () const |
Private Member Functions | |
| Bool_t | specialPlank (Int_t pl, Int_t pk) |
Private Attributes | |
| Double_t | vtx0 |
| Double_t | vtx1 |
| Double_t | vtx2 |
| Double_t | vtxCos0 |
| Double_t | vtxCos1 |
| Double_t | vtxCos2 |
| Int_t | PlaneArray [168] |
| Double_t | min_dpv [5] |
| Double_t | inter0 |
| Double_t | inter1 |
| Double_t | inter2 |
| Double_t | inter0_chosen [5] |
| Double_t | inter1_chosen [5] |
| Double_t | inter2_chosen [5] |
| Int_t | proj_plane [5] |
| Int_t | proj_plank [5] |
| Int_t | st_strip_chosen [5] |
| Int_t | st_plane_chosen [5] |
| Int_t | hit_cont |
| Int_t | hit_closest |
|
||||||||||||||||||||||||||||||||
|
Definition at line 32 of file CandShieldSR.cxx. References ShieldGeom::GetListStripsInPlank(), ShieldProj::GetProjDis(), ShieldProj::GetProjInter_X(), ShieldProj::GetProjInter_Y(), ShieldProj::GetProjInter_Z(), ShieldGeom::GetStrip_X(), ShieldGeom::GetStrip_Y(), ShieldGeom::GetStripsInPlank(), hit_closest, hit_cont, inter0, inter0_chosen, inter1, inter1_chosen, inter2, inter2_chosen, min_dpv, PlaneArray, ShieldGeom::PlankExists(), proj_plane, proj_plank, ShieldProj::ProjHitPlank(), st_plane_chosen, st_strip_chosen, vtx0, vtx1, vtx2, vtxCos0, vtxCos1, and vtxCos2. 00032 {
00033 vtx0 = vtx0_in;
00034 vtx1 = vtx1_in;
00035 vtx2 = vtx2_in;
00036 vtxCos0 = vtxCos0_in;
00037 vtxCos1 = vtxCos1_in;
00038 vtxCos2 = vtxCos2_in;
00039
00040 //Plane Array
00041 for(int sec=0;sec<=3;sec++){
00042 for(int ii=0;ii<=31;ii++){
00043 PlaneArray[ii+sec*42]=528+ii+sec*64;
00044 }
00045 for(int ii=0;ii<=5;ii++){
00046 PlaneArray[ii+32+sec*42]=563+ii+sec*64;
00047 }
00048 for(int ii=0;ii<=3;ii++){
00049 PlaneArray[ii+38+sec*42]=572+ii+sec*64;
00050 }
00051 }
00052
00053 //What Plank?
00054
00055 //Initialising variables
00056 Int_t pln=0;
00057 Double_t dpv=0;
00058 Double_t dis_min=20000;
00059 hit_closest=0;
00060 Int_t list_plane=0;
00061 Int_t list_strip=0;
00062 Double_t list_dist=0;
00063 Double_t list_dist_max=1000;
00064 for(int ii=0;ii<5;ii++){
00065 min_dpv[ii]=10000; //has to be smaller than default value for dis_min
00066 proj_plane[ii]=-1;
00067 proj_plank[ii]=-1;
00068 inter0_chosen[ii]=-100;
00069 inter1_chosen[ii]=-100;
00070 inter2_chosen[ii]=-100;
00071 st_strip_chosen[ii]=-1;
00072 st_plane_chosen[ii]=-1;
00073 }
00074 hit_cont=0;
00075 for(int pl=0;pl<168;pl++){
00076 for(int st=0;st<20;st++){
00077 if(sg->PlankExists(PlaneArray[pl],st)==true){
00078 pln=PlaneArray[pl];
00079
00080 ShieldProj sp(vtx0,vtx1,vtx2,vtxCos0,vtxCos1,vtxCos2,pln,st,sg);
00081 dpv=sp.GetProjDis();
00082 inter0=sp.GetProjInter_X();
00083 inter1=sp.GetProjInter_Y();
00084 inter2=sp.GetProjInter_Z();
00085
00086 if(sp.ProjHitPlank()==true){
00087 hit_cont+=1;
00088 if(hit_cont<6){
00089 min_dpv[hit_cont-1] = dpv;
00090 proj_plane[hit_cont-1]=pl;
00091 proj_plank[hit_cont-1]=st;
00092 inter0_chosen[hit_cont-1]=inter0;
00093 inter1_chosen[hit_cont-1]=inter1;
00094 inter2_chosen[hit_cont-1]=inter2;
00095 }
00096 }
00097 }
00098 }
00099 }
00100
00101 //What strip
00102 for(int incr=0;incr<hit_cont;incr++){
00103 if(incr<5){
00104 list_dist_max=1000;
00105 for(int ls=0;ls<sg->GetStripsInPlank(PlaneArray[proj_plane[incr]],proj_plank[incr]);ls++){
00106 list_plane=sg->GetListStripsInPlank(PlaneArray[proj_plane[incr]],proj_plank[incr],ls,0);
00107 list_strip=sg->GetListStripsInPlank(PlaneArray[proj_plane[incr]],proj_plank[incr],ls,1);
00108 list_dist=sqrt(pow((sg->GetStrip_X(list_plane,list_strip)-inter0_chosen[incr]),2)+pow((sg->GetStrip_Y(list_plane,list_strip)-inter1_chosen[incr]),2));
00109 if(list_dist<list_dist_max){
00110 list_dist_max=list_dist;
00111 st_strip_chosen[incr]=list_strip;
00112 st_plane_chosen[incr]=list_plane;
00113 }
00114 }
00115 }
00116 }
00117
00118
00119 //Determining the closest to center hit
00120 for(int ii=0;ii<5;ii++){
00121 if(min_dpv[ii]<dis_min){
00122 dis_min=min_dpv[ii];
00123 hit_closest=ii;
00124 }
00125 }
00126
00127 }//end of constructor
|
|
|
Definition at line 129 of file CandShieldSR.cxx. 00129 {
00130
00131 }
|
|
|
Definition at line 244 of file CandShieldSR.cxx. References inter0_chosen. 00244 {
00245
00246 return inter0_chosen[hit_closest];
00247
00248 }
|
|
|
Definition at line 184 of file CandShieldSR.cxx. References inter0_chosen. 00184 {
00185
00186 return inter0_chosen[id-1];
00187
00188 }
|
|
|
Definition at line 251 of file CandShieldSR.cxx. References inter1_chosen. 00251 {
00252
00253 return inter1_chosen[hit_closest];
00254
00255 }
|
|
|
Definition at line 191 of file CandShieldSR.cxx. References inter1_chosen. 00191 {
00192
00193 return inter1_chosen[id-1];
00194
00195 }
|
|
|
Definition at line 258 of file CandShieldSR.cxx. References inter2_chosen. 00258 {
00259
00260 return inter2_chosen[hit_closest];
00261
00262 }
|
|
|
Definition at line 198 of file CandShieldSR.cxx. References inter2_chosen. 00198 {
00199
00200 return inter2_chosen[id-1];
00201
00202 }
|
|
|
Definition at line 226 of file CandShieldSR.cxx. References PlaneArray, and proj_plane. 00226 {
00227
00228 if(proj_plane[0]!=-1){
00229 return PlaneArray[proj_plane[hit_closest]];
00230 } else{
00231 return -1;
00232 }
00233
00234 }
|
|
|
Definition at line 166 of file CandShieldSR.cxx. References PlaneArray, and proj_plane. 00166 {
00167
00168 if(proj_plane[id-1]!=-1){
00169 return PlaneArray[proj_plane[id-1]];
00170 } else{
00171 return -1;
00172 }
00173
00174 }
|
|
|
Definition at line 237 of file CandShieldSR.cxx. References proj_plank. 00237 {
00238
00239 return proj_plank[hit_closest];
00240
00241 }
|
|
|
Definition at line 177 of file CandShieldSR.cxx. References proj_plank. 00177 {
00178
00179 return proj_plank[id-1];
00180
00181 }
|
|
|
Definition at line 265 of file CandShieldSR.cxx. References min_dpv. 00265 {
00266
00267 return min_dpv[hit_closest];
00268
00269 }
|
|
|
Definition at line 205 of file CandShieldSR.cxx. References min_dpv. 00205 {
00206
00207 return min_dpv[id-1];
00208
00209 }
|
|
|
Definition at line 272 of file CandShieldSR.cxx. References st_plane_chosen, and st_strip_chosen. 00272 {
00273
00274 if(plorst==0){
00275 return st_plane_chosen[hit_closest];
00276 }
00277 else if(plorst==1){
00278 return st_strip_chosen[hit_closest];
00279 }
00280 else{
00281 return -1;
00282 }
00283 }
|
|
||||||||||||
|
Definition at line 212 of file CandShieldSR.cxx. References st_plane_chosen, and st_strip_chosen. 00212 {
00213
00214 if(plorst==0){
00215 return st_plane_chosen[id-1];
00216 }
00217 else if(plorst==1){
00218 return st_strip_chosen[id-1];
00219 }
00220 else{
00221 return -1;
00222 }
00223 }
|
|
|
Definition at line 298 of file CandShieldSR.cxx. References hit_cont. 00298 {
00299
00300 if(hit_cont<=5){
00301 return hit_cont;
00302 }
00303 else return 5;
00304
00305 }
|
|
|
Definition at line 286 of file CandShieldSR.cxx. References hit_cont. 00286 {
00287
00288 if(hit_cont!=0){
00289 return true;
00290 }
00291 else {
00292 return false;
00293 }
00294
00295 }
|
|
||||||||||||
|
Definition at line 139 of file CandShieldSR.cxx. 00139 {
00140
00141 Bool_t verdict;
00142
00143 Int_t specialList[8];
00144 specialList[0]=566;
00145 specialList[1]=575;
00146 specialList[2]=630;
00147 specialList[3]=639;
00148 specialList[4]=694;
00149 specialList[5]=703;
00150 specialList[6]=758;
00151 specialList[7]=767;
00152
00153 verdict=false;
00154 for(int pi=0;pi<8;pi++){
00155 if(pl==specialList[pi] && pk == 3){
00156 verdict = true;
00157 }
00158 }
00159 return verdict;
00160
00161 }
|
|
|
Definition at line 49 of file CandShieldSR.h. Referenced by CandShieldSR(). |
|
|
Definition at line 48 of file CandShieldSR.h. Referenced by CandShieldSR(), HitsInShield(), and IsVetoHit(). |
|
|
Definition at line 38 of file CandShieldSR.h. Referenced by CandShieldSR(). |
|
|
Definition at line 41 of file CandShieldSR.h. Referenced by CandShieldSR(), and GetCandShieldInter_X(). |
|
|
Definition at line 39 of file CandShieldSR.h. Referenced by CandShieldSR(). |
|
|
Definition at line 42 of file CandShieldSR.h. Referenced by CandShieldSR(), and GetCandShieldInter_Y(). |
|
|
Definition at line 40 of file CandShieldSR.h. Referenced by CandShieldSR(). |
|
|
Definition at line 43 of file CandShieldSR.h. Referenced by CandShieldSR(), and GetCandShieldInter_Z(). |
|
|
Definition at line 37 of file CandShieldSR.h. Referenced by CandShieldSR(), and GetInterCenterDis(). |
|
|
Definition at line 36 of file CandShieldSR.h. Referenced by CandShieldSR(), and GetCandShieldPlane(). |
|
|
Definition at line 44 of file CandShieldSR.h. Referenced by CandShieldSR(), and GetCandShieldPlane(). |
|
|
Definition at line 45 of file CandShieldSR.h. Referenced by CandShieldSR(), and GetCandShieldStrip0(). |
|
|
Definition at line 47 of file CandShieldSR.h. Referenced by CandShieldSR(), and GetStripInPlank(). |
|
|
Definition at line 46 of file CandShieldSR.h. Referenced by CandShieldSR(), and GetStripInPlank(). |
|
|
Definition at line 30 of file CandShieldSR.h. Referenced by CandShieldSR(). |
|
|
Definition at line 31 of file CandShieldSR.h. Referenced by CandShieldSR(). |
|
|
Definition at line 32 of file CandShieldSR.h. Referenced by CandShieldSR(). |
|
|
Definition at line 33 of file CandShieldSR.h. Referenced by CandShieldSR(). |
|
|
Definition at line 34 of file CandShieldSR.h. Referenced by CandShieldSR(). |
|
|
Definition at line 35 of file CandShieldSR.h. Referenced by CandShieldSR(). |
1.3.9.1