1) Mods in AddTaskPHOSPi0Flow to comply with LEGO train
authorkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 17 Aug 2012 06:50:12 +0000 (06:50 +0000)
committerkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 17 Aug 2012 06:50:12 +0000 (06:50 +0000)
2) Mods in AliAnalysisTaskPi0Flow.cxx to replace GetEntries by GetEntresFast everywhere (Henrik).

PWGGA/PHOSTasks/PHOS_PbPb/AddTaskPHOSPi0Flow.C
PWGGA/PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0Flow.cxx

index 1307c66..e3f9e9e 100644 (file)
@@ -1,5 +1,4 @@
-AliAnalysisTaskPi0Flow* AddTaskPHOSPi0Flow (char* fname="PHOSPi0Flow.root",
-                                            char* contname="PHOSPi0FlowResults")
+AliAnalysisTaskPi0Flow* AddTaskPHOSPi0Flow ()
 {
   //Add a task AliAnalysisTaskPi0Flow to the analysis train
   //Author: Henrik Qvigstad
@@ -17,6 +16,7 @@ AliAnalysisTaskPi0Flow* AddTaskPHOSPi0Flow (char* fname="PHOSPi0Flow.root",
   }
 
   AliAnalysisTaskPi0Flow* task = new AliAnalysisTaskPi0Flow("PHOSPi0Flow");
+
   // Reduce binning for reduece memory footprint
   const int kNEdges = 4;
   Double_t cbin[kNEdges] = {0., 10., 40., 80.};
@@ -26,12 +26,12 @@ AliAnalysisTaskPi0Flow* AddTaskPHOSPi0Flow (char* fname="PHOSPi0Flow.root",
   //task->SetMixingArraysLength(10);
   task->SelectCollisionCandidates(AliVEvent::kCentral);
   
-  mgr->AddTask(task);
 
+  mgr->AddTask(task);
   mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer() );
-
-  // container output into particular file
-  mgr->ConnectOutput(task, 1, mgr->CreateContainer(contname,TList::Class(), AliAnalysisManager::kOutputContainer, fname));
+  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("PHOSPi0FlowCoutput1", TList::Class(), AliAnalysisManager::kOutputContainer, 
+                                                           Form("%s:PHOSPi0Flow", AliAnalysisManager::GetCommonFileName())             );
+  mgr->ConnectOutput(task, 1, coutput1);
   
   return task;
 }
index 70441bf..64fb578 100644 (file)
@@ -827,12 +827,12 @@ void AliAnalysisTaskPi0Flow::SelectPhotonClusters()
     ph->SetUnfolded(clu->GetNExMax()<2); // Remember, if it is unfolde
 
   }
-  FillHistogram("hCenPHOS",fCentralityV0M, fCaloPhotonsPHOS->GetEntries()) ;
+  FillHistogram("hCenPHOS",fCentralityV0M, fCaloPhotonsPHOS->GetEntriesFast()) ;
 }
 //_____________________________________________________________________________
 void AliAnalysisTaskPi0Flow::FillSelectedClusterHistograms()
 {
-  for (Int_t i1=0; i1<fCaloPhotonsPHOS->GetEntries(); i1++) {
+  for (Int_t i1=0; i1<fCaloPhotonsPHOS->GetEntriesFast(); i1++) {
     AliCaloPhoton * ph1=(AliCaloPhoton*)fCaloPhotonsPHOS->At(i1) ;
 
     Double_t dphiA=ph1->Phi()-fRPV0A ;
@@ -914,9 +914,9 @@ void AliAnalysisTaskPi0Flow::FillSelectedClusterHistograms()
 void AliAnalysisTaskPi0Flow::ConsiderPi0s()
 {
   char key[55];
-  for (Int_t i1=0; i1 < fCaloPhotonsPHOS->GetEntries()-1; i1++) {
+  for (Int_t i1=0; i1 < fCaloPhotonsPHOS->GetEntriesFast()-1; i1++) {
     AliCaloPhoton * ph1=(AliCaloPhoton*)fCaloPhotonsPHOS->At(i1) ;
-    for (Int_t i2=i1+1; i2<fCaloPhotonsPHOS->GetEntries(); i2++) {
+    for (Int_t i2=i1+1; i2<fCaloPhotonsPHOS->GetEntriesFast(); i2++) {
       AliCaloPhoton * ph2=(AliCaloPhoton*)fCaloPhotonsPHOS->At(i2) ;
       TLorentzVector p12  = *ph1  + *ph2;
       TLorentzVector pv12 = *(ph1->GetMomV2()) + *(ph2->GetMomV2());
@@ -1103,9 +1103,9 @@ void AliAnalysisTaskPi0Flow::ConsiderPi0sMix()
 
   TList * arrayList = GetCaloPhotonsPHOSList(fVtxBin, fCentBin, fEMRPBin);
 
-  for (Int_t i1=0; i1<fCaloPhotonsPHOS->GetEntries(); i1++) {
+  for (Int_t i1=0; i1<fCaloPhotonsPHOS->GetEntriesFast(); i1++) {
     AliCaloPhoton * ph1=(AliCaloPhoton*)fCaloPhotonsPHOS->At(i1) ;
-    for(Int_t evi=0; evi<arrayList->GetEntries();evi++){
+    for(Int_t evi=0; evi<arrayList->GetEntriesFast();evi++){
       TObjArray * mixPHOS = static_cast<TObjArray*>(arrayList->At(evi));
       for(Int_t i2=0; i2<mixPHOS->GetEntriesFast();i2++){
        AliCaloPhoton * ph2=(AliCaloPhoton*)mixPHOS->At(i2) ;
@@ -1280,10 +1280,10 @@ void AliAnalysisTaskPi0Flow::UpdateLists()
   //Now we either add current events to stack or remove
   //If no photons in current event - no need to add it to mixed
   TList * arrayList = GetCaloPhotonsPHOSList(fVtxBin, fCentBin, fEMRPBin);
-  if(fCaloPhotonsPHOS->GetEntries()>0){
+  if(fCaloPhotonsPHOS->GetEntriesFast()>0){
     arrayList->AddFirst(fCaloPhotonsPHOS) ;
     fCaloPhotonsPHOS=0;
-    if(arrayList->GetEntries()>100){//Remove redundant events
+    if(arrayList->GetEntriesFast()>100){//Remove redundant events
       TObjArray * tmp = static_cast<TObjArray*>(arrayList->Last()) ;
       arrayList->RemoveLast() ;
       delete tmp ; // TODO: may conflict with delete done by list being owner.