Added a custom magnetic field in the FMD Analysis Parameters
authorhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 23 Aug 2009 12:04:20 +0000 (12:04 +0000)
committerhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 23 Aug 2009 12:04:20 +0000 (12:04 +0000)
FMD/analysis/AliFMDAnaParameters.cxx
FMD/analysis/AliFMDAnaParameters.h

index 58279ad..2879243 100644 (file)
@@ -73,7 +73,8 @@ AliFMDAnaParameters::AliFMDAnaParameters() :
   fProcessPrimary(kFALSE),
   fProcessHits(kFALSE),
   fTrigger(kMB1),
-  fEnergy(k10000)
+  fEnergy(k10000),
+  fMagField(k5G)
 {
   
   
@@ -87,11 +88,11 @@ char* AliFMDAnaParameters::GetPath(const char* species) {
   char* path ;
   
   if(species == fgkBackgroundID)
-    path = Form("%s/%s_%d.root",fBackgroundPath.Data(),fgkBackgroundID,fEnergy);
+    path = Form("%s/%s_%d_%d_%d.root",fBackgroundPath.Data(),fgkBackgroundID,fEnergy,fTrigger,fMagField);
   if(species == fgkEnergyDistributionID)
-    path = Form("%s/%s_%d.root",fEnergyPath.Data(),fgkEnergyDistributionID,fEnergy);
+    path = Form("%s/%s_%d_%d_%d.root",fEnergyPath.Data(),fgkEnergyDistributionID,fEnergy,fTrigger,fMagField);
   if(species == fgkEventSelectionEffID)
-    path = Form("%s/%s_%d_%d.root",fEventSelectionEffPath.Data(),fgkEventSelectionEffID,fEnergy,fTrigger);
+    path = Form("%s/%s_%d_%d_%d.root",fEventSelectionEffPath.Data(),fgkEventSelectionEffID,fEnergy,fTrigger,fMagField);
 
   return path;
 }
index 4d8063e..759f93f 100644 (file)
@@ -61,6 +61,8 @@ public:
   
   enum Energy { k900 , k10000, k14000 };
   
+  enum MagField {k0G, k5G};
+  
   /** Singleton access
       @return  single to */
   static AliFMDAnaParameters* Instance();
@@ -102,6 +104,7 @@ public:
   Trigger  GetTriggerDefinition() {return fTrigger;}
   Bool_t   IsEventTriggered(AliESDEvent* esd);
   void     SetEnergy(Energy energy) {fEnergy = energy;}
+  void     SetMagField(MagField magfield) {fMagField = magfield;}
   char*    GetPath(const char* species);
 protected:
   
@@ -121,7 +124,8 @@ protected:
       fProcessPrimary(o.fProcessPrimary),
       fProcessHits(o.fProcessHits),
       fTrigger(o.fTrigger),
-      fEnergy(o.fEnergy)
+      fEnergy(o.fEnergy),
+      fMagField(o.fMagField)
   {}
   AliFMDAnaParameters& operator=(const AliFMDAnaParameters&) { return *this; }
   virtual ~AliFMDAnaParameters() {}
@@ -161,6 +165,7 @@ protected:
   Bool_t   fProcessHits; 
   Trigger  fTrigger;
   Energy   fEnergy;
+  MagField fMagField;
   
   ClassDef(AliFMDAnaParameters,0) // Manager of parameters
 };