beam species defined
authorbasanta <basanta@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 20 Dec 2010 05:18:17 +0000 (05:18 +0000)
committerbasanta <basanta@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 20 Dec 2010 05:18:17 +0000 (05:18 +0000)
PMD/AliPMDClusterFinder.cxx
PMD/AliPMDClusterFinder.h
PMD/AliPMDReconstructor.cxx

index d335338..de9a21b 100644 (file)
@@ -48,6 +48,7 @@
 #include "AliPMDNoiseCut.h"
 #include "AliPMDddlinfoData.h"
 #include "AliPMDRecoParam.h"
+#include "AliRecoParam.h"
 #include "AliPMDReconstructor.h"
 
 #include "AliDAQ.h"
@@ -154,7 +155,7 @@ AliPMDClusterFinder::~AliPMDClusterFinder()
 // ------------------------------------------------------------------------- //
 
 void AliPMDClusterFinder::Digits2RecPoints(TTree *digitsTree,
-                                          TTree *clustersTree)
+                                          TTree *clustersTree, Int_t gRecoMode)
 {
   // Converts digits to recpoints after running clustering
   // algorithm on CPV plane and PREshower plane
@@ -268,25 +269,31 @@ void AliPMDClusterFinder::Digits2RecPoints(TTree *digitsTree,
 
 
       // Int_t cluspar = fRecoParam->GetPbPbParam()->GetClusteringParam();
+
       Int_t cluspar = fRecoParam->GetPPParam()->GetClusteringParam();
+      
+
       // Int_t cluspar = fRecoParam->GetCosmicParam()->GetClusteringParam();
       
       //_______________________________________________________// 
       //Added to switch Refine and crude Clustering - satya//
       // temporary solution - will be sorted out later
-      cluspar = 1;
+      /*cluspar = 1;
       static AliPMDRecoParam *reconp = NULL;
       reconp = (AliPMDRecoParam*)AliPMDReconstructor::GetRecoParam();
       if(!reconp) {
        cluspar = 1;
       } 
       else { 
-
+       
       if( reconp->GetClusteringParam() == 1) 
        cluspar = 1;
       if( reconp->GetClusteringParam() == 2) 
        cluspar = 2;
-      }
+       }
+
+      */
+      cluspar = gRecoMode;
       //_______________________________________________________// 
       
       pmdclust->SetClusteringParam(cluspar);
@@ -344,7 +351,7 @@ void AliPMDClusterFinder::Digits2RecPoints(TTree *digitsTree,
 // ------------------------------------------------------------------------- //
 
 void AliPMDClusterFinder::Digits2RecPoints(AliRawReader *rawReader,
-                                          TTree *clustersTree)
+                                          TTree *clustersTree, Int_t gRecoMode)
 {
   // Converts RAW data to recpoints after running clustering
   // algorithm on CPV and PREshower plane
@@ -590,13 +597,13 @@ void AliPMDClusterFinder::Digits2RecPoints(AliRawReader *rawReader,
          Int_t imod = idet*24 + ismn;
 
          // Int_t cluspar = fRecoParam->GetPbPbParam()->GetClusteringParam();
-         Int_t cluspar = fRecoParam->GetPPParam()->GetClusteringParam();
+          Int_t cluspar = fRecoParam->GetPPParam()->GetClusteringParam();
          // Int_t cluspar = fRecoParam->GetCosmicParam()->GetClusteringParam();
 
          //_______________________________________________________// 
          //Added to switch Refine and crude Clustering - satya//
          // temporary solution - will be sorted out later
-         cluspar = 1;
+         /* cluspar = 1;
          static AliPMDRecoParam *reconp = NULL;
          reconp = (AliPMDRecoParam*)AliPMDReconstructor::GetRecoParam();
          if(!reconp) {
@@ -607,7 +614,11 @@ void AliPMDClusterFinder::Digits2RecPoints(AliRawReader *rawReader,
              cluspar = 1;
            if( reconp->GetClusteringParam() == 2) 
              cluspar = 2;
-         }
+         }*/
+
+
+         cluspar = gRecoMode; // permanent solution
+
          //_______________________________________________________// 
 
          pmdclust->SetClusteringParam(cluspar);
index 3778908..5c8b04b 100644 (file)
@@ -36,8 +36,8 @@ class AliPMDClusterFinder : public TObject
   AliPMDClusterFinder &operator=(const AliPMDClusterFinder &finder); // assignment op
   virtual ~AliPMDClusterFinder();
 
-  void Digits2RecPoints(TTree *digitsTree, TTree *clustersTree);
-  void Digits2RecPoints(AliRawReader *rawReader, TTree *clustersTree);
+  void Digits2RecPoints(TTree *digitsTree, TTree *clustersTree,Int_t gRecoMode);
+  void Digits2RecPoints(AliRawReader *rawReader, TTree *clustersTree,Int_t gRecoMode);
 
   void AddRecPoint(Int_t idet, Int_t ismn, Float_t * clusdata);
   void AddRecHit(Int_t celldataX, Int_t celldataY, Int_t celldataTr,
@@ -86,7 +86,7 @@ class AliPMDClusterFinder : public TObject
   Int_t    fCellTrack[fgkRow][fgkCol]; // Array containing individual cell tr
   Int_t    fCellPid[fgkRow][fgkCol]; // Array containing individual cell pid
 
-  ClassDef(AliPMDClusterFinder,18) // To run PMD clustering
+  ClassDef(AliPMDClusterFinder,19) // 19 by satyajit
 };
 #endif
 
index 3ee7cf7..20743bc 100644 (file)
@@ -28,6 +28,7 @@
 #include "AliESDPmdTrack.h"
 #include "AliESDEvent.h"
 #include "AliLog.h"
+#include "AliRunInfo.h"
 
 ClassImp(AliPMDReconstructor)
 
@@ -37,18 +38,51 @@ void AliPMDReconstructor::Reconstruct(AliRawReader *rawReader,
                                      TTree *clustersTree) const
 {
 // reconstruct clusters from Raw Data
+// Event Species Added By satyajit
+  Int_t gRecoMode = 1;
+  TString beamType = GetRunInfo()->GetBeamType();
+  
+  if (((beamType.CompareTo("pp"))==0) || 
+      ((beamType.CompareTo("p-p"))==0)||
+      ((beamType.CompareTo("PP"))==0) || 
+      ((beamType.CompareTo("P-P"))==0)) {
+    gRecoMode=1;
+  }
+  
+  else if ((beamType.CompareTo("A-A")) == 0 || 
+          (beamType.CompareTo("AA")) == 0) {
+    gRecoMode=2;
+  }
+
     static AliPMDClusterFinder pmdClus;
-    pmdClus.Digits2RecPoints(rawReader, clustersTree);
+    pmdClus.Digits2RecPoints(rawReader, clustersTree, gRecoMode);
 }
 
 // ------------------------------------------------------------------------ //
 void AliPMDReconstructor::Reconstruct(TTree *digitsTree,
                                      TTree *clustersTree) const
 {
-// reconstruct clusters from Raw Data
-
+  // reconstruct clusters from Digits
+  // Setting reconstruction mode
+  // Added to Have Sepatrate Event Spcies
+  Int_t gRecoMode = 1;
+  TString beamType = GetRunInfo()->GetBeamType();
+  if (((beamType.CompareTo("pp"))==0) || 
+     ((beamType.CompareTo("p-p"))==0)||
+     ((beamType.CompareTo("PP"))==0) || 
+     ((beamType.CompareTo("P-P"))==0)) {
+    gRecoMode=1;
+  }
+  
+  else if ((beamType.CompareTo("A-A")) == 0 || 
+          (beamType.CompareTo("AA")) == 0) {
+    gRecoMode=2;
+  }
+  
   static AliPMDClusterFinder pmdClus;
-  pmdClus.Digits2RecPoints(digitsTree, clustersTree);
+  pmdClus.Digits2RecPoints(digitsTree, clustersTree,gRecoMode);
 
 }