including Salvatore's (saiola) tasks and macros for the lego train
authormcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 11 Apr 2012 16:32:20 +0000 (16:32 +0000)
committermcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 11 Apr 2012 16:32:20 +0000 (16:32 +0000)
PWGGA/CMakelibPWGGAEMCALTasks.pkg
PWGGA/EMCALJetTasks/AliEmcalJetTask.cxx
PWGGA/EMCALTasks/AliEmcalClusTrackMatcherTask.cxx
PWGGA/EMCALTasks/AliEmcalEsdTpcTrackTask.cxx
PWGGA/EMCALTasks/AliEmcalTrackPropagatorTask.cxx
PWGGA/EMCALTasks/macros/AddTaskClusterizerFW.C
PWGGA/EMCALTasks/macros/AddTaskEMCALClusterize.C
PWGGA/EMCALTasks/macros/AddTaskEMCALTender.C
PWGGA/EMCALTasks/macros/AddTaskEmcalPhysicsSelection.C
PWGGA/PWGGAEMCALTasksLinkDef.h

index 851031e..3906ed8 100644 (file)
@@ -45,6 +45,7 @@ set ( SRCS
  EMCALTasks/AliStaObjects.cxx
  EMCALTasks/AliAnalysisTaskTrgContam.cxx
  EMCALTasks/AliAnalysisTaskEMCALPhoton.cxx
+ EMCALTasks/AliEmcalIsolatedPhotonsTask.cxx
 )
 
 string ( REPLACE ".cxx" ".h" HDRS "${SRCS}" )
index 044709a..e747395 100644 (file)
@@ -56,8 +56,8 @@ AliEmcalJetTask::AliEmcalJetTask(const char *name) :
   SetName(name);
   fBranchNames="ESD:AliESDRun.,AliESDHeader.,PrimaryVertex.";
 
-  DefineInput(0,TChain::Class());
-  DefineOutput(1,TList::Class());
+  //DefineInput(0,TChain::Class());
+  //DefineOutput(1,TList::Class());
 }
 
 //________________________________________________________________________
index 5eef453..a189e95 100644 (file)
@@ -111,7 +111,7 @@ void AliEmcalClusTrackMatcherTask::UserExec(Option_t *)
         if (TMath::Abs(etadiff)<TMath::Abs(dEtaMin) && TMath::Abs(phidiff)<TMath::Abs(dPhiMin)) {
           dEtaMin = etadiff;
           dPhiMin = phidiff;
-          imin = t;
+          imin = i;
         }
       }
       track->SetEMCALcluster(imin);
index f448418..7f0a010 100644 (file)
@@ -16,7 +16,7 @@ ClassImp(AliEmcalEsdTpcTrackTask)
 
 //________________________________________________________________________
 AliEmcalEsdTpcTrackTask::AliEmcalEsdTpcTrackTask() : 
-  AliAnalysisTaskSE(),
+  AliAnalysisTaskSE("TpcSpdVertexConstrainedTracks"),
   fEsdTrackCuts(0),
   fDoSpdVtxCon(0),
   fHybridTrackCuts(0),
@@ -38,6 +38,12 @@ AliEmcalEsdTpcTrackTask::AliEmcalEsdTpcTrackTask(const char *name) :
   fTracks(0)
 {
   // Constructor.
+
+  if (!name)
+    return;
+
+  SetName(name);
+
   fBranchNames = "ESD:AliESDHeader.,AliESDRun.,SPDVertex.,Tracks";
 }
 
index 0a8eec1..2e890a0 100644 (file)
@@ -14,7 +14,7 @@ ClassImp(AliEmcalTrackPropagatorTask)
 
 //________________________________________________________________________
 AliEmcalTrackPropagatorTask::AliEmcalTrackPropagatorTask() : 
-  AliAnalysisTaskSE(),
+  AliAnalysisTaskSE("AliEmcalTrackPropagatorTask"),
   fRecoUtils(0),
   fTracksName(),
   fDist(430),
@@ -27,7 +27,7 @@ AliEmcalTrackPropagatorTask::AliEmcalTrackPropagatorTask() :
 
 //________________________________________________________________________
 AliEmcalTrackPropagatorTask::AliEmcalTrackPropagatorTask(const char *name) : 
-  AliAnalysisTaskSE(name),
+  AliAnalysisTaskSE("AliEmcalTrackPropagatorTask"),
   fRecoUtils(0),
   fTracksName("TpcSpdVertexConstrainedTracks"),
   fDist(430),
@@ -36,6 +36,12 @@ AliEmcalTrackPropagatorTask::AliEmcalTrackPropagatorTask(const char *name) :
   fTracks(0)
 {
   // Constructor.
+
+  if (!name)
+    return;
+
+  SetName(name);
+
   fBranchNames = "ESD:AliESDHeader.,Tracks";
 }
 
index 1500e4b..2f4dc72 100644 (file)
@@ -1,6 +1,11 @@
 // $Id: $
 
-AliAnalysisTaskEMCALClusterizeFast* AddTaskClusterizerFW(Bool_t clusL0, Bool_t fOR) 
+AliAnalysisTaskEMCALClusterizeFast* AddTaskClusterizerFW(
+                                                        const char* trigType = "L0",   // Trigger type: it can be "L0" (4x4, with 2x2 sliding inside SM), 
+                                                        //"L1GAMMA" (4x4, with 2x2 sliding through SMs), "L1JET" (40x40 with 4x4 sliding through SMs)
+                                                        const Bool_t fOR = 0,
+                                                        const TString & geomName = "EMCAL_COMPLETEV1"
+                                                        ) 
 {
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
   if (!mgr) {
@@ -17,17 +22,26 @@ AliAnalysisTaskEMCALClusterizeFast* AddTaskClusterizerFW(Bool_t clusL0, Bool_t f
   TString nameout("Clusters");
   Int_t n, s;
   Float_t minE, minT, maxT;
+  Bool_t slidingTRU;
   
-  if (clusL0) {
-    name += "L0";
-    nameout += "L0";
+  name += trigType;
+  nameout += trigType;
+
+  if (!strcmp(trigType, "L0")) {
+    n = 4;
+    s = 2;
+    slidingTRU = 0;
+  } else if (!strcmp(trigType, "L1GAMMA")) {
     n = 4;
     s = 2;
+    slidingTRU = 1;
+  } else if (!strcmp(trigType, "L1GJET")) {
+    n = 40;
+    s = 4;
+    slidingTRU = 1;
   } else {
-    name += "L1";
-    nameout += "L1";
-    n = 32;
-    s = 8;
+    ::AliError("trigType not valid, returning...");
+    return 0;
   }
   
   if (fOR) {
@@ -44,14 +58,13 @@ AliAnalysisTaskEMCALClusterizeFast* AddTaskClusterizerFW(Bool_t clusL0, Bool_t f
     maxT = +1.;
   }
   
-  
   AliAnalysisTaskEMCALClusterizeFast *task = new AliAnalysisTaskEMCALClusterizeFast(name);
   AliEMCALRecParam *recparam = task->GetRecParam();
   recparam->SetClusterizerFlag(AliEMCALRecParam::kClusterizerFW);
   recparam->SetMinECut(minE);
   recparam->SetTimeMax(maxT);
   recparam->SetTimeMin(minT);
-  task->SetGeometryName(AliEMCALGeometry::GetDefaultGeometryName());
+  task->SetGeometryName(geomName);
   task->SetAttachClusters(kTRUE);
   task->SetOverwrite(kFALSE);
   task->SetNewClusterArrayName(nameout);
@@ -59,7 +72,7 @@ AliAnalysisTaskEMCALClusterizeFast* AddTaskClusterizerFW(Bool_t clusL0, Bool_t f
   task->SetnEta(n);
   task->SetShiftPhi(s);
   task->SetShiftEta(s);
-  task->SetTRUShift(clusL0);
+  task->SetTRUShift(!slidingTRU);
   task->SetClusterizeFastORs(fOR);
   task->SetLoadPed(kFALSE);
   task->SetLoadCalib(kFALSE);
index 61c602b..3cc73ab 100644 (file)
@@ -1,8 +1,8 @@
 AliAnalysisTaskEMCALClusterize* AddTaskEMCALClusterize(
+                                                      TString & arrayName,
                                                        const Int_t   bMC        = kFALSE,
                                                        const Bool_t  exotic     = kTRUE,
                                                        const TString name       = "V1Unfold", 
-                                                       TString & arrayName,
                                                        const TString trigger    = "", 
                                                        const Bool_t  tm         = kTRUE, 
                                                        const Int_t   minEcell   = 50,
index 2dd3de0..3b9a973 100644 (file)
@@ -12,7 +12,7 @@ AliTender *AddTaskEMCALTender(const char *geoname="EMCAL_COMPLETEV1", const char
   
   // Create the task and configure it.
   //===========================================================================
-  AliTender* ana = new  AliTender("");
+  AliTender* ana = new  AliTender("AliTender");
 
   ana->SelectCollisionCandidates( AliVEvent::kEMC1 | AliVEvent::kMB | AliVEvent::kEMC7 | AliVEvent::kINT7);
 
@@ -39,7 +39,7 @@ AliTender *AddTaskEMCALTender(const char *geoname="EMCAL_COMPLETEV1", const char
   EMCALSupply->SwitchOffCellFiducialRegion(); //Does NOT remove edge clusters
   if (!ismc) {
     if (1){//datatype == "pp") {
-      ::Info("AddTaskEMCALTender", "USING pp data configuration...");
+      //::Info("AddTaskEMCALTender", "USING pp data configuration...");
       //params->SetClusterizerFlag(AliEMCALRecParam::kClusterizerv2); //Std for pbpb
       EMCALSupply->SwitchOnRecalDistBadChannel();
       EMCALSupply->SwitchOnReCalibrateCluster();
@@ -48,7 +48,7 @@ AliTender *AddTaskEMCALTender(const char *geoname="EMCAL_COMPLETEV1", const char
       //EMCALSupply->SwitchOnUpdateCell(); // will update cells and reclusterize
       //EMCALSupply->SwitchOnReclustering(); //SwitchOnReclustering if needed      
     } else {
-      ::Info("AddTaskEMCALTender", "USING PbPb data configuration...");
+      //::Info("AddTaskEMCALTender", "USING PbPb data configuration...");
       //params->SetClusterizerFlag(AliEMCALRecParam::kClusterizerv2); //Std for pbpb
       EMCALSupply->SwitchOnUpdateCell(); // will update cells and reclusterize
       //EMCALSupply->SwitchOnReclustering(); //SwitchOnReclustering if needed      
index d11a65d..6bd8ef0 100644 (file)
@@ -11,14 +11,14 @@ AddTaskEmcalPhysicsSelelection(Bool_t exFOnly, Bool_t rejectBG=kTRUE, Bool_t com
     ::Error("AddTask1PhysSel", "No analysis manager found.");
     return 0;
   }
-  isMC = (mgr->GetMCtruthEventHandler()) ? kTRUE:kFALSE; 
+  Bool_t isMC = (mgr->GetMCtruthEventHandler()) ? kTRUE:kFALSE; 
 
   AliEmcalPhysicsSelectionTask *pseltask = new AliEmcalPhysicsSelectionTask("PhysSel");
   //pseltask->SetDoWriteHistos(kFALSE);
   AliEmcalPhysicsSelection *physSel = pseltask->GetPhysicsSelection();
-  physSel->SetExcludeFastOnly(exFOnly);
-  if (rejectBG) 
-    physSel->AddBackgroundIdentification(new AliBackgroundSelection());
+  physSel->SetSkipFastOnly(exFOnly);
+  //if (rejectBG) 
+  //physSel->AddBackgroundIdentification(new AliBackgroundSelection());
   if (computeBG)
     physSel->SetComputeBG(computeBG);
   if (isMC)      
@@ -35,5 +35,5 @@ AddTaskEmcalPhysicsSelelection(Bool_t exFOnly, Bool_t rejectBG=kTRUE, Bool_t com
                          oname);
   mgr->ConnectOutput(pseltask,1,co1);
   cout << " *** AliEmcalPhysicsTask configured *** " << endl;
-  return task;
+  return pseltask;
 }   
index 42beb10..c0b240a 100644 (file)
@@ -18,6 +18,7 @@
 #pragma link C++ class AliEmcalPhysicsSelectionTask+;
 #pragma link C++ class AliEmcalSetupTask+;
 #pragma link C++ class AliEmcalTrackPropagatorTask+;
+#pragma link C++ class AliEmcalIsolatedPhotonsTask+;
 #pragma link C++ class AliEsdSkimTask+;
 #pragma link C++ class AliEsdTrackExt+;
 #pragma link C++ class AliPicoTrack+;