changes to make Et code run over EMCal on grid
authorcnattras <cnattras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 22 Dec 2012 17:13:58 +0000 (17:13 +0000)
committercnattras <cnattras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 22 Dec 2012 17:13:58 +0000 (17:13 +0000)
PWGLF/totEt/AliAnalysisEtMonteCarlo.cxx
PWGLF/totEt/AliAnalysisEtSelector.cxx
PWGLF/totEt/AliAnalysisEtSelector.h
PWGLF/totEt/AliAnalysisEtSelectorEmcal.cxx
PWGLF/totEt/AliAnalysisEtSelectorEmcal.h
PWGLF/totEt/AliAnalysisEtSelectorPhos.cxx
PWGLF/totEt/AliAnalysisEtSelectorPhos.h
PWGLF/totEt/AliAnalysisTaskTotEt.cxx
PWGLF/totEt/macros/ConfigEtMonteCarlo.C
PWGLF/totEt/macros/CreateAlienHandlerCaloEtSim.C

index e09975b..f250c1a 100644 (file)
@@ -945,9 +945,9 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
                const UInt_t myPart = (UInt_t)TMath::Abs(caloCluster->GetLabel());
                for(int j=0;j<6;j++){
                  if( myPart==((UInt_t) gammaDaughterIDs[j]) ){
-                   cout<<"Found a matching cluster!";//<<endl;
+                   //cout<<"Found a matching cluster!";//<<endl;
                    Double_t clEt = CalculateTransverseEnergy(*caloCluster);
-                   cout<<" it has energy "<<clEt<<endl;
+                   //cout<<" it has energy "<<clEt<<endl;
                    for(int l=0;l<nEtCuts;l++){//loop over cut values
                      if(clEt>=etCuts[l]){
                        totalClusterEts[l] += clEt;//if cluster et is above the cut off energy add it
index eb4a97d..c9c45e5 100644 (file)
@@ -25,6 +25,15 @@ AliAnalysisEtSelector::AliAnalysisEtSelector(AliAnalysisEtCuts *cuts) : AliAnaly
 ,fInitialized(kFALSE)
 {
 }
+AliAnalysisEtSelector::AliAnalysisEtSelector() : AliAnalysisEtCommon()
+,fEvent(0)
+,fClusterArray(0)
+,fCuts(0)
+,fRunNumber(0)
+,fInitialized(kFALSE)
+{
+  fCuts = new AliAnalysisEtCuts();
+}
 
 AliAnalysisEtSelector::~AliAnalysisEtSelector()
 { // dtor
index 0878aa3..2dc2f39 100644 (file)
@@ -26,6 +26,7 @@ public:
   
     // Constructor takes cuts object
     AliAnalysisEtSelector(AliAnalysisEtCuts *cuts);
+    AliAnalysisEtSelector();
     
     // Destructor 
     virtual ~AliAnalysisEtSelector();
@@ -94,7 +95,7 @@ protected:
     
 private:
 
-    AliAnalysisEtSelector(); // Prohibited
+    //AliAnalysisEtSelector(); // Prohibited
     AliAnalysisEtSelector(const AliAnalysisEtSelector& other);// Prohibited
     AliAnalysisEtSelector& operator=(const AliAnalysisEtSelector& other);// Prohibited
     bool operator==(const AliAnalysisEtSelector& other) const;// Prohibited
index be6f966..2989e29 100644 (file)
@@ -15,6 +15,9 @@ AliAnalysisEtSelectorEmcal::AliAnalysisEtSelectorEmcal(AliAnalysisEtCuts* cuts):
 {
 
 }
+AliAnalysisEtSelectorEmcal::AliAnalysisEtSelectorEmcal():AliAnalysisEtSelector()
+{
+}
 
 AliAnalysisEtSelectorEmcal::~AliAnalysisEtSelectorEmcal()
 {
index fe309bf..bbd0b18 100644 (file)
@@ -18,6 +18,7 @@ class AliAnalysisEtSelectorEmcal : public AliAnalysisEtSelector
 public:
 
     AliAnalysisEtSelectorEmcal(AliAnalysisEtCuts* cuts);
+    AliAnalysisEtSelectorEmcal();
     
     virtual ~AliAnalysisEtSelectorEmcal();
     
@@ -38,7 +39,7 @@ private:
     
     Double_t CalcTrackClusterDistance(const Float_t clsPos[3], Int_t* trkMatchId) const;
     
-    AliAnalysisEtSelectorEmcal(); // Prohibited
+    //AliAnalysisEtSelectorEmcal(); // Prohibited
     AliAnalysisEtSelectorEmcal(const AliAnalysisEtSelectorEmcal& other); // Prohibited
     AliAnalysisEtSelectorEmcal& operator=(const AliAnalysisEtSelectorEmcal& other); // Prohibited
     bool operator==(const AliAnalysisEtSelectorEmcal& other) const; // Prohibited
index 71b33f9..9b5e97e 100644 (file)
@@ -31,6 +31,16 @@ AliAnalysisEtSelectorPhos::AliAnalysisEtSelectorPhos(AliAnalysisEtCuts* cuts): A
   
 }
 
+AliAnalysisEtSelectorPhos::AliAnalysisEtSelectorPhos(): AliAnalysisEtSelector()
+,fGeoUtils(0)
+,fBadMapM2(0)
+,fBadMapM3(0)
+,fBadMapM4(0)
+,fMatrixInitialized(kFALSE)
+{
+  
+}
+
 AliAnalysisEtSelectorPhos::~AliAnalysisEtSelectorPhos()
 {
 
index d68b2f4..6456004 100644 (file)
@@ -20,6 +20,7 @@ class AliAnalysisEtSelectorPhos : public AliAnalysisEtSelector
 public:
 
     AliAnalysisEtSelectorPhos(AliAnalysisEtCuts *cuts);
+    AliAnalysisEtSelectorPhos();
     virtual ~AliAnalysisEtSelectorPhos();
     
     virtual TRefArray* GetClusters();
@@ -48,7 +49,7 @@ private:
 
     Bool_t fMatrixInitialized; // matrix initialized
     
-    AliAnalysisEtSelectorPhos();
+    //AliAnalysisEtSelectorPhos();
     AliAnalysisEtSelectorPhos(const AliAnalysisEtSelectorPhos& other); // Prohibited
     AliAnalysisEtSelectorPhos& operator=(const AliAnalysisEtSelectorPhos& other); // Prohibited
     bool operator==(const AliAnalysisEtSelectorPhos& other) const; // Prohibited
index 195f571..892e198 100644 (file)
@@ -48,38 +48,45 @@ ClassImp(AliAnalysisTaskTotEt)
   // select if we should use EMCal or PHOS class
   // PHOS by default, EMCal if name string contains EMC
   TString t(name);
+  gROOT->LoadMacro(fMCConfigFile);
+  gROOT->LoadMacro(fRecoConfigFile);
+  //There is a weird problem where the name reverts to a default using the plugin
+  //these lines solve it - there is a function written into ConfigEtMonteCarlo.C which solves this
+  Bool_t isEMCal = t.Contains("EMC");
+  if (!(t.Contains("EMC")) && !(t.Contains("PHOS"))) {//the name does not contain either EMCal or PHOS
+    cout<<"Default arguments called.  Reading config file."<<endl;
+      isEMCal = (Bool_t) gInterpreter->ProcessLine("GetIsEMCAL()");
+      isMc =  (Bool_t) gInterpreter->ProcessLine("GetIsMC()");
+
+  }
+  //cout<<__FILE__<<" My name is "<<name<<endl;
   //t.ToUpper();
-  if (t.Contains("EMC")) {
+  if (isEMCal) {
     if (t.Contains("Detail")) {
 
       cout<<"Rereading AliAnalysisEtMonteCarlo configuration file..."<<endl;
-      gROOT->LoadMacro(fMCConfigFile);
       fMCAnalysis = (AliAnalysisEmEtMonteCarlo *) gInterpreter->ProcessLine("ConfigEtMonteCarlo(true,true)");
                        
       cout << "Instantiating AliAnalysisEmEtMonteCarlo class..."<< endl;
     }
     else if (fMCConfigFile.Length()) {
       cout<<"Rereading AliAnalysisEtMonteCarloEmcal configuration file..."<<endl;
-      gROOT->LoadMacro(fMCConfigFile);
       fMCAnalysis = (AliAnalysisEtMonteCarloEmcal *) gInterpreter->ProcessLine("ConfigEtMonteCarlo()");
     }
                
     if (t.Contains("Detail")) {
       cout<<"Rereading AliAnalysisEmEtReconstructed configuration file..."<<endl;
-      gROOT->LoadMacro(fRecoConfigFile);
       fRecAnalysis = (AliAnalysisEmEtReconstructed *) gInterpreter->ProcessLine("ConfigEtReconstructed(true,true)");
 
     }
     else if (fRecoConfigFile.Length()) {
       cout<<"Rereading AliAnalysisEtReconstructedEmcal configuration file..."<<endl;
-      gROOT->LoadMacro(fRecoConfigFile);
       fRecAnalysis = (AliAnalysisEtReconstructedEmcal *) gInterpreter->ProcessLine("ConfigEtReconstructed()");
     }
   }
   else {
     if (fMCConfigFile.Length()) {
       cout<<"Rereading AliAnalysisEtMonteCarloPhos configuration file..."<<endl;
-      gROOT->LoadMacro(fMCConfigFile);
                        
       fMCAnalysis = (AliAnalysisEtMonteCarloPhos *) gInterpreter->ProcessLine("ConfigEtMonteCarlo(false)");
       cout << fMCAnalysis << endl;
@@ -87,7 +94,6 @@ ClassImp(AliAnalysisTaskTotEt)
                
     if (fRecoConfigFile.Length()) {
       cout<<"Rereading AliAnalysisEtReconstructedPhos configuration file..."<<endl;
-      gROOT->LoadMacro(fRecoConfigFile);
       fRecAnalysis = (AliAnalysisEtReconstructedPhos *) gInterpreter->ProcessLine("ConfigEtReconstructed(false)");
     }
   }
index 97da132..b6d8f04 100644 (file)
@@ -1,3 +1,12 @@
+//These functions are needed for the plugin to work.  Values have to be set by hand.
+Bool_t GetIsEMCAL(){
+  return kTRUE;
+}
+
+Bool_t GetIsMC(){
+  return kTRUE;
+}
+
 
 AliAnalysisEtMonteCarlo * ConfigEtMonteCarlo(Bool_t EMCAL = true, Bool_t DETAIL = false){
   //Bool_t EMCAL = true;
index 9089eb5..21a1d76 100644 (file)
@@ -16,8 +16,8 @@ AliAnalysisGrid* CreateAlienHandlerCaloEtSim(TString outputDir, TString outputNa
 
   // Set versions of used packages
    plugin->SetAPIVersion("V1.1x");
-   plugin->SetROOTVersion("v5-28-00a");
-   plugin->SetAliROOTVersion("v4-21-17b-AN");
+   plugin->SetROOTVersion("v5-34-02-1");
+   plugin->SetAliROOTVersion("v5-04-13-AN");
   // Declare input data to be processed.
 
   // Method 1: Create automatically XML collections using alien 'find' command.
@@ -32,9 +32,12 @@ AliAnalysisGrid* CreateAlienHandlerCaloEtSim(TString outputDir, TString outputNa
   //   plugin->AddRunNumber(125020);    // simulated
   //   plugin->AddRunNumber(104065);  // real data
 
-   plugin->SetGridDataDir("/alice/sim/LHC10d4");
+   //plugin->SetGridDataDir("/alice/sim/LHC10d4");
+   //plugin->AddRunNumber("120741");//smallest of the above
+   plugin->SetGridDataDir("/alice/sim/LHC11a4_bis");
+    plugin->AddRunNumber(137366);
+    plugin->AddRunNumber(137161);
    plugin->SetDataPattern("*ESDs.root");
-   plugin->AddRunNumber("120741");//smallest of the above
   // Method 2: Declare existing data files (raw collections, xml collections, root file)
   // If no path mentioned data is supposed to be in the work directory (see SetGridWorkingDir())
   // XML collections added via this method can be combined with the first method if
@@ -50,11 +53,11 @@ AliAnalysisGrid* CreateAlienHandlerCaloEtSim(TString outputDir, TString outputNa
   // Declare the analysis source files names separated by blancs. To be compiled runtime IN THE SAME ORDER THEY ARE LISTED
   //plugin->SetAdditionalRootLibs("libPHOSUtils.so libEMCALUtils.so libPWG4CaloCalib.so libPWG4PartCorrBase.so libPWG4PartCorrDep.so");
   // using ACLiC on the worker nodes.
-  plugin->SetAnalysisSource("AliAnalysisEtCuts.cxx AliAnalysisHadEtCorrections.cxx AliAnalysisEtCommon.cxx AliAnalysisEtSelector.cxx AliAnalysisEtSelectorPhos.cxx AliAnalysisEtSelectorEmcal.cxx AliAnalysisEt.cxx AliAnalysisEtMonteCarlo.cxx AliAnalysisEtMonteCarloPhos.cxx AliAnalysisEtMonteCarloEmcal.cxx AliAnalysisEtReconstructed.cxx AliAnalysisEtReconstructedPhos.cxx AliAnalysisEtReconstructedEmcal.cxx AliAnalysisTaskTransverseEnergy.cxx AliAnalysisEmEtMonteCarlo.cxx AliAnalysisEmEtReconstructed.cxx AliAnalysisTaskTotEt.cxx");
+  plugin->SetAnalysisSource("AliAnalysisEtCuts.cxx AliAnalysisHadEtCorrections.cxx AliAnalysisEtCommon.cxx AliAnalysisEtSelector.cxx AliAnalysisEtSelectorPhos.cxx AliAnalysisEtSelectorEmcal.cxx AliAnalysisEtTrackMatchCorrections.cxx AliAnalysisEtRecEffCorrection.cxx AliAnalysisEt.cxx AliAnalysisEtMonteCarlo.cxx AliAnalysisEtMonteCarloPhos.cxx AliAnalysisEtMonteCarloEmcal.cxx AliAnalysisEtReconstructed.cxx AliAnalysisEtReconstructedPhos.cxx AliAnalysisEtReconstructedEmcal.cxx AliAnalysisTaskTransverseEnergy.cxx AliAnalysisEmEtMonteCarlo.cxx AliAnalysisEmEtReconstructed.cxx AliAnalysisTaskTotEt.cxx");
   //plugin->SetAnalysisSource("AliAnalysisEtCuts.cxx AliAnalysisHadEtCorrections.cxx AliAnalysisEtCommon.cxx AliAnalysisEtSelector.cxx AliAnalysisEtSelectorPhos.cxx AliAnalysisEt.cxx AliAnalysisEtMonteCarlo.cxx AliAnalysisEtMonteCarloPhos.cxx AliAnalysisEtMonteCarloEmcal.cxx AliAnalysisEtReconstructed.cxx AliAnalysisEtReconstructedPhos.cxx AliAnalysisEtReconstructedEmcal.cxx AliAnalysisTaskTransverseEnergy.cxx AliAnalysisTaskTotEt.cxx");
   // Declare all libraries (other than the default ones for the framework. These will be
   // loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
-  plugin->SetAdditionalLibs("libPHOSUtils.so AliAnalysisEtCuts.h AliAnalysisEt.h AliAnalysisEtMonteCarlo.h AliAnalysisEtMonteCarloPhos.h AliAnalysisEtMonteCarloEmcal.h AliAnalysisEtReconstructed.h AliAnalysisEtReconstructedPhos.h AliAnalysisEtReconstructedEmcal.h AliAnalysisTaskTotEt.h AliAnalysisEtCuts.cxx AliAnalysisEt.cxx AliAnalysisEtMonteCarlo.cxx AliAnalysisEtMonteCarloPhos.cxx AliAnalysisEtMonteCarloEmcal.cxx AliAnalysisEtReconstructed.cxx AliAnalysisEtReconstructedPhos.cxx AliAnalysisEtReconstructedEmcal.cxx AliAnalysisTaskTotEt.cxx  AliAnalysisEtCommon.cxx AliAnalysisEtSelector.cxx AliAnalysisEtSelectorPhos.cxx AliAnalysisEtSelectorEmcal.cxx  AliAnalysisEtCommon.h AliAnalysisHadEtCorrections.h AliAnalysisHadEtCorrections.cxx AliAnalysisTaskTransverseEnergy.h AliAnalysisTaskTransverseEnergy.cxx AliAnalysisEmEtMonteCarlo.cxx AliAnalysisEmEtReconstructed.cxx AliAnalysisEmEtMonteCarlo.h AliAnalysisEmEtReconstructed.h AliAnalysisEtSelector.h AliAnalysisEtSelectorPhos.h AliAnalysisEtSelectorEmcal.h ConfigEtMonteCarlo.C ConfigEtReconstructed.C corrections.root badchannels.root libTENDER.so libTENDERSupplies.so");
+  plugin->SetAdditionalLibs("libPHOSUtils.so libTENDER.so libTENDERSupplies.so AliAnalysisEtCuts.cxx AliAnalysisEtCuts.h AliAnalysisHadEtCorrections.cxx AliAnalysisHadEtCorrections.h AliAnalysisEtCommon.cxx AliAnalysisEtCommon.h AliAnalysisEtSelector.cxx AliAnalysisEtSelector.h AliAnalysisEtSelectorPhos.cxx AliAnalysisEtSelectorPhos.h AliAnalysisEtSelectorEmcal.cxx AliAnalysisEtSelectorEmcal.h AliAnalysisEtTrackMatchCorrections.cxx AliAnalysisEtTrackMatchCorrections.h AliAnalysisEtRecEffCorrection.cxx AliAnalysisEtRecEffCorrection.h AliAnalysisEt.cxx AliAnalysisEt.h AliAnalysisEtMonteCarlo.cxx AliAnalysisEtMonteCarlo.h AliAnalysisEtMonteCarloPhos.cxx AliAnalysisEtMonteCarloPhos.h AliAnalysisEtMonteCarloEmcal.cxx AliAnalysisEtMonteCarloEmcal.h AliAnalysisEtReconstructed.cxx AliAnalysisEtReconstructed.h AliAnalysisEtReconstructedPhos.cxx AliAnalysisEtReconstructedPhos.h AliAnalysisEtReconstructedEmcal.cxx AliAnalysisEtReconstructedEmcal.h AliAnalysisTaskTransverseEnergy.cxx AliAnalysisTaskTransverseEnergy.h AliAnalysisEmEtMonteCarlo.cxx AliAnalysisEmEtMonteCarlo.h AliAnalysisEmEtReconstructed.cxx AliAnalysisEmEtReconstructed.h AliAnalysisTaskTotEt.cxx AliAnalysisTaskTotEt.h badchannels.root corrections.root calocorrections.root ConfigEtMonteCarlo.C ConfigEtReconstructed.C");
   plugin->SetExecutableCommand("aliroot -b -q");
   // add extra include files/path
   plugin->AddIncludePath("-I. -I$ALICE_ROOT/EMCAL -I$ALICE_ROOT/ANALYSIS");