]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixes of coding violations
authorhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 16 Oct 2009 10:11:49 +0000 (10:11 +0000)
committerhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 16 Oct 2009 10:11:49 +0000 (10:11 +0000)
PWG2/FORWARD/analysis/AliFMDAnaParameters.cxx
PWG2/FORWARD/analysis/AliFMDAnaParameters.h
PWG2/FORWARD/analysis/AliFMDAnalysisTaskSharing.cxx

index a48c7097e74b2548bc4d33dcf79c6fe2c9ca1acd..83c7f3585a9ad8062ac4efb2f2c8790f3d09290e 100644 (file)
@@ -496,21 +496,20 @@ void AliFMDAnaParameters::GetVertex(AliESDEvent* esd, Double_t* vertexXYZ)
 {
   const AliESDVertex* vertex = 0;
   vertex = esd->GetPrimaryVertex();
-  if(!vertex || (vertexXYZ[0] == 0 && vertexXYZ[1] == 0 && vertexXYZ[2] == 0))        
+  if(!vertex || (vertex->GetXv() < 0.0001 && vertex->GetYv() < 0.0001 && vertex->GetZv() < 0.0001))        
     vertex = esd->GetPrimaryVertexSPD();
-  if(!vertex || (vertexXYZ[0] == 0 && vertexXYZ[1] == 0 && vertexXYZ[2] == 0))        
+  if(!vertex || (vertex->GetXv() < 0.0001 && vertex->GetYv() < 0.0001 && vertex->GetZv() < 0.0001))        
     vertex = esd->GetPrimaryVertexTPC();
-  if(!vertex || (vertexXYZ[0] == 0 && vertexXYZ[1] == 0 && vertexXYZ[2] == 0))    
+  if(!vertex || (vertex->GetXv() < 0.0001 && vertex->GetYv() < 0.0001 && vertex->GetZv() < 0.0001))    
     vertex = esd->GetVertex();
-  if (vertex && (vertexXYZ[0] != 0 || vertexXYZ[1] != 0 || vertexXYZ[2] != 0)) {
+  if (vertex && (vertex->GetXv() > 0.0001 || vertex->GetYv() > 0.0001 || vertex->GetZv() > 0.0010)) {
     vertex->GetXYZ(vertexXYZ);
-    //std::cout<<vertex->GetName()<<"   "<< vertex->GetTitle() <<"   "<< vertex->GetZv()<<std::endl;
     return;
   }
-  else if (esd->GetESDTZERO()) { 
+  else { //no valid vertex
     vertexXYZ[0] = 0;
     vertexXYZ[1] = 0;
-    vertexXYZ[2] = esd->GetT0zVertex();
+    vertexXYZ[2] = 0;
     
     return;
   }
@@ -520,7 +519,7 @@ void AliFMDAnaParameters::GetVertex(AliESDEvent* esd, Double_t* vertexXYZ)
 }
 
 //____________________________________________________________________
-Bool_t AliFMDAnaParameters::IsEventTriggered(AliESDEvent *esd) {
+Bool_t AliFMDAnaParameters::IsEventTriggered(AliESDEvent *esd) const {
   // check if the event was triggered
   ULong64_t triggerMask = esd->GetTriggerMask();
   
@@ -545,7 +544,7 @@ Bool_t AliFMDAnaParameters::IsEventTriggered(AliESDEvent *esd) {
       return kTRUE;
     break;
   }
-  case kTEST_NOCTP: {
+  case kNOCTP: {
     return kTRUE;
     break;
   }
index 3e9c91119c614c0e370fe3a38f03acf5f456777b..dea128c706e5b4ca8f614006723ff8e24a11d7e5 100644 (file)
@@ -59,7 +59,7 @@ public:
     kSharingEfficiency            = 0x8  // Sharing algorithm efficiency
   };
   
-  enum Trigger { kMB1 = 0, kMB2, kSPDFASTOR, kTEST_NOCTP };
+  enum Trigger { kMB1 = 0, kMB2, kSPDFASTOR, kNOCTP };
   
   enum Energy { k900 , k10000, k14000 };
   
@@ -105,12 +105,12 @@ public:
   void     SetSharingEfficiencyPath(const Char_t* sharpath) {fSharingEffPath.Form(sharpath);}
   void     SetProcessPrimary(Bool_t prim=kTRUE) {fProcessPrimary = prim;}
   void     SetProcessHits(Bool_t hits=kTRUE) {fProcessHits = hits;}
-  Bool_t   GetProcessPrimary() {return fProcessPrimary;}
-  Bool_t   GetProcessHits() {return fProcessHits;}
+  Bool_t   GetProcessPrimary() const {return fProcessPrimary;} 
+  Bool_t   GetProcessHits() const {return fProcessHits;}
   void     GetVertex(AliESDEvent* esd, Double_t* vertexXYZ);
   void     SetTriggerDefinition(Trigger trigger) {fTrigger = trigger;}
-  Trigger  GetTriggerDefinition() {return fTrigger;}
-  Bool_t   IsEventTriggered(AliESDEvent* esd);
+  Trigger  GetTriggerDefinition() const {return fTrigger;}
+  Bool_t   IsEventTriggered(AliESDEvent* esd) const;
   void     SetEnergy(Energy energy) {fEnergy = energy;}
   void     SetMagField(MagField magfield) {fMagField = magfield;}
   char*    GetPath(const char* species);
@@ -157,10 +157,10 @@ protected:
   TAxis* GetRefAxis();
   void SetCorners(Char_t ring) ;
   
-  Bool_t fIsInit;
+  Bool_t fIsInit;                      //Have we been init ?
   //TObjArray*  fBackgroundArray;
   // TObjArray*  fEdistArray;
-  AliFMDAnaCalibBackgroundCorrection*         fBackground;
+  AliFMDAnaCalibBackgroundCorrection*         fBackground;   
   AliFMDAnaCalibEnergyDistribution*           fEnergyDistribution;
   AliFMDAnaCalibEventSelectionEfficiency*     fEventSelectionEfficiency;
   AliFMDAnaCalibSharingEfficiency*            fSharingEfficiency;
@@ -171,18 +171,18 @@ protected:
   static const char* fgkEventSelectionEffID ;
   static const char* fgkSharingEffID ;
   
-  TVector2 fCorner1;
-  TVector2 fCorner2;
-  TString  fEnergyPath;
-  TString  fBackgroundPath;
-  TString  fEventSelectionEffPath;
-  TString  fSharingEffPath;
-  Bool_t   fProcessPrimary;
-  Bool_t   fProcessHits; 
-  Trigger  fTrigger;
-  Energy   fEnergy;
-  MagField fMagField;
-  Species  fSpecies;
+  TVector2 fCorner1;                  //First corner of hybrid
+  TVector2 fCorner2;                  //Second corner of hybrid
+  TString  fEnergyPath;               //Path of energy calib
+  TString  fBackgroundPath;           //Path of BG correction
+  TString  fEventSelectionEffPath;    //Path of event selection eff
+  TString  fSharingEffPath;           //Path of sharing eff
+  Bool_t   fProcessPrimary;           //Do we process primary ?
+  Bool_t   fProcessHits;              //Do we process hits ?
+  Trigger  fTrigger;                  //Which trigger are we using ?
+  Energy   fEnergy;                   // CM energy
+  MagField fMagField;                 //Magnetic field
+  Species  fSpecies;                  //PbPb or pp ?
   
   ClassDef(AliFMDAnaParameters,0) // Manager of parameters
 };
index cd238656ecc421fd1d0d79a76ea7b5f47d76b82b..15848a606348927442bb84c03595e78cba4dc5b5 100644 (file)
@@ -183,8 +183,7 @@ void AliFMDAnalysisTaskSharing::Exec(Option_t */*option*/)
    else
     fStatus = kTRUE;
   
-  if(vertex[0] == 0 && vertex[1] == 0 && vertex[2] == 0) {
-    
+  if(vertex[0] < 0.0001 && vertex[1] < 0.0001 && vertex[2] < 0.0001) {
     fStatus = kFALSE;
     return;
   }