]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSPIDv1.cxx
the MIXT geometry (IHEP+GPS2) has been introduced
[u/mrichter/AliRoot.git] / PHOS / AliPHOSPIDv1.cxx
index 8d95e39d3c904dc4e7715aef2d88db476b53a5f6..30a71f4f8d86c2714a657de40b2382ce3ae109bd 100644 (file)
 
 ClassImp( AliPHOSPIDv1) 
 
+//____________________________________________________________________________
+AliPHOSPIDv1::AliPHOSPIDv1():AliPHOSPID()
+{ 
+  fCutOnDispersion = 2.0; 
+  fCutOnRelativeDistance = 3.0 ;
+}
+
 //____________________________________________________________________________
 Float_t  AliPHOSPIDv1::GetDistanceInPHOSPlane(AliPHOSEmcRecPoint * emcclu,AliPHOSPpsdRecPoint * PpsdClu, Bool_t &toofar, Option_t *  Axis)
 {
   // Calculates the distance between the EMC RecPoint and the PPSD RecPoint
  
-  Float_t r;
+  Float_t r = 1.e+10;
   TVector3 vecEmc ;
   TVector3 vecPpsd ;
   
@@ -71,9 +78,6 @@ Float_t  AliPHOSPIDv1::GetDistanceInPHOSPlane(AliPHOSEmcRecPoint * emcclu,AliPHO
   return r ;
 }
 
-
-
-
 //____________________________________________________________________________
 void  AliPHOSPIDv1::MakeParticles(AliPHOSTrackSegment::TrackSegmentsList * trsl, 
                                  AliPHOSRecParticle::RecParticlesList * rpl)
@@ -87,10 +91,13 @@ void  AliPHOSPIDv1::MakeParticles(AliPHOSTrackSegment::TrackSegmentsList * trsl,
   Bool_t tDistance;
   Int_t type ; 
   Int_t showerprofile;  // 0 narrow and 1 wide
-  Int_t cpvdetector;  // 1 hit and 0 no hit
-  Int_t pcdetector;  // 1 hit and 0 no hit
+  Int_t cpvdetector ;   // 1 hit and 0 no hit
+  Int_t pcdetector ;    // 1 hit and 0 no hit
 
   while ( (tracksegment = (AliPHOSTrackSegment *)next()) ) {
+    Int_t module = tracksegment->GetPHOSMod();
+    cout << "PHOS module: " << module << endl;
+    if ( module <= fGeom->GetNCPVModules()) continue;
     new( (*rpl)[index] ) AliPHOSRecParticle(tracksegment) ;
     rp = (AliPHOSRecParticle *)rpl->At(index) ; 
     AliPHOSEmcRecPoint * recp = tracksegment->GetEmcRecPoint() ;
@@ -114,17 +121,26 @@ void  AliPHOSPIDv1::MakeParticles(AliPHOSTrackSegment::TrackSegmentsList * trsl,
     else      
       showerprofile = 1 ;// WIDE PROFILE
   
+
     // Looking at the photon conversion detector
     if( tracksegment->GetPpsdLowRecPoint() == 0 )   
       pcdetector = 0 ;  // No hit
-    else      
-      if (GetDistanceInPHOSPlane(recp, rppc, tDistance, "R")< fCutOnRelativeDistance)  pcdetector = 1 ;  // hit
+    else{      
+      if (GetDistanceInPHOSPlane(recp, rppc, tDistance, "R")  < fCutOnRelativeDistance) 
+       pcdetector = 1 ;  // hit
+      else
+       pcdetector = 0 ;
+    }
   
     // Looking at the photon conversion detector
     if( tracksegment->GetPpsdUpRecPoint() == 0 )
       cpvdetector = 0 ;  // No hit
-    else  
-      if (GetDistanceInPHOSPlane(recp, rpcpv, tDistance, "R")< fCutOnRelativeDistance) cpvdetector = 1 ;  // Hit
+    else{  
+      if (GetDistanceInPHOSPlane(recp, rpcpv, tDistance, "R")< fCutOnRelativeDistance) 
+       cpvdetector = 1 ;  // Hit
+      else
+       cpvdetector = 0 ;
+    }
      
     type = showerprofile + 2 * pcdetector + 4 * cpvdetector ;
     rp->SetType(type) ;