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 851031e0a8cb3ac88fb6dbc78118bcc7448e5a34..3906ed80fb27735e9011e1b2a315f26442e9ccd2 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 044709a145c7b29b4ae8550d8a952c31f720b709..e74739562512b647c052c65b899abe617314b595 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 5eef4539a09542441d83afa4b8e2357529e9e9a7..a189e9585c0470413033392f0dfc0a1dc4ad095b 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 f448418c8bcefd19f8409cb1543f2f43f5fa8b45..7f0a010370334745d60b212ac0a00703e5cb2a3b 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 0a8eec130095f7246ff929404921eed627764bb9..2e890a0d1424012a91168935307f7c8cdfaaecbc 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 1500e4bd76512cea0bf262328b03d5661b50aa37..2f4dc724e411f201f01213b36b6a8981391e3ec6 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 61c602ba9b7bfa1541827fe14a2c027cfe652831..3cc73ab2c6baa74f8aaa5127e5cd05ad454c2a2c 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 2dd3de08b218dba719047f69517b5eedc832dd85..3b9a9733298d20c1fe4268f9014dc47a43a7e86b 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 d11a65da4f7d3a11aae6b101b023092ffb1a5dd6..6bd8ef034566a97a83681ae979731d8691b9383b 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 42beb10583d2aa388b28d349cb5c70c4a199b734..c0b240a0cd3c205ae566a68ac026d48ca15747c3 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+;