+Bool_t AliITSgeom::IsInside(Int_t module,Double_t point[3])const{
+ // Determins if the give point is inside of the module as defined
+ // by this set of coordinate transforms.
+ // Inputs:
+ // Int_t module The module to be checked
+ // Double_t point[3] A 3 vector global point
+ // Outputs:
+ // none.
+ // Return:
+ // kTRUE if point is inside of module, kFALSE otherwise.
+ Double_t l[3],dx,dy,dz;
+ AliITSDetector idet = (AliITSDetector)(this->GetGeomMatrix(module)->
+ GetDetectorIndex());
+
+ this->GtoL(module,point,l);
+ switch(idet){
+ case kSPD:{
+ AliITSgeomSPD *spd = (AliITSgeomSPD*)(fShape.At((Int_t)idet));
+ dx = spd->GetDx();
+ dy = spd->GetDy();
+ dz = spd->GetDz();}
+ break;
+ case kSDD: case kSDDp:{
+ AliITSgeomSDD *sdd = (AliITSgeomSDD*)(fShape.At((Int_t)idet));
+ dx = sdd->GetDx();
+ dy = sdd->GetDy();
+ dz = sdd->GetDz();}
+ break;
+ case kSSD: case kSSDp:{
+ AliITSgeomSSD *ssd = (AliITSgeomSSD*)(fShape.At((Int_t)idet));
+ dx = ssd->GetDx();
+ dy = ssd->GetDy();
+ dz = ssd->GetDz();}
+ break;
+ default: // Detector not defined.
+ return kFALSE;
+ break;
+ }// end switch
+ if(TMath::Abs(l[0])>dx) return kFALSE;
+ if(TMath::Abs(l[2])>dz) return kFALSE;
+ if(TMath::Abs(l[1])>dy) return kFALSE;
+ return kTRUE;
+}
+//______________________________________________________________________