Modifications for B=0 field in SDD task in CPass0/CPass1 and for the ITS task
authorzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 25 Apr 2012 08:10:30 +0000 (08:10 +0000)
committerzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 25 Apr 2012 08:10:30 +0000 (08:10 +0000)
run during reconstruction (Ruben)

PWGPP/CalibMacros/CPass0/runCalibTrain.C
PWGPP/CalibMacros/CPass1/runCalibTrain.C
PWGPP/ITS/AliAnalysisTaskITSAlignQA.cxx

index a19cba9..29f8526 100644 (file)
@@ -81,6 +81,7 @@ void runCalibTrain(TString runNumberString, const char *inFileName = "AliESDs.ro
   if (!okTPC) useTPCcrv = kFALSE;
   AliAnalysisTaskITSAlignQA *itsAlign = AddTaskSDDCalib(0,writeITSTP,useTPCcrv);
   if (!okTPC) itsAlign->SetUseITSstandaloneTracks(kTRUE); 
+  if (grpData->GetL3Current()[0] < 300) itsAlign->SetMinPt(0.001);
   //
   // Run the analysis
   if (!mgr->InitAnalysis()) {
index 9b3aa90..6890413 100644 (file)
@@ -81,7 +81,8 @@ void runCalibTrain(TString runNumberString, const char *inFileName = "AliESDs.ro
   Bool_t writeITSTP = kTRUE;
   if (!okTPC) useTPCcrv = kFALSE;
   AliAnalysisTaskITSAlignQA *itsAlign = AddTaskSDDCalib(0,writeITSTP,useTPCcrv);
-  if (!okTPC) itsAlign->SetUseITSstandaloneTracks(kTRUE); 
+  if (!okTPC) itsAlign->SetUseITSstandaloneTracks(kTRUE);
+  if (grpData->GetL3Current()[0] < 300) itsAlign->SetMinPt(0.001); 
   //
   // Run the analysis
   if (!mgr->InitAnalysis()) {
index d067e86..e6ccd33 100644 (file)
@@ -3,6 +3,8 @@
 #include "AliAnalysisDataContainer.h"
 #include "AliITSRecPoint.h"
 #include "AliESDEvent.h"
+#include "AliESDRun.h"
+#include "AliDAQ.h"
 #include "AliTrackPointArray.h"
 #include "AliITSgeomTGeo.h"
 #include "AliITSTPArrayFit.h"
@@ -320,6 +322,24 @@ void AliAnalysisTaskITSAlignQA::UserExec(Option_t *)
     return;
   }
   //
+  static Bool_t firstCheck = kTRUE;
+  if (firstCheck) {
+    //    
+    if (TMath::Abs(esd->GetCurrentL3())<300) { // no field
+      SetMinPt(0.005);
+      AliInfo("No magnetic field: eliminating pt cut");
+    }
+    const AliESDRun *esdrn = esd->GetESDRun();
+    if (!esdrn) return;
+    Int_t activeDetectors = esdrn->GetDetectorsInReco();
+    if ( !(activeDetectors & AliDAQ::kTPC) ) {
+      AliInfo("No TPC, suppress TPC points request");
+      SetUseITSstandaloneTracks(kTRUE);
+      SetUseTPCMomentum(kFALSE);
+    }
+    firstCheck = kFALSE;
+  }
+  //
   if (!AcceptCentrality(esd)) return;
   fHistNEvents->Fill(kEvCnt);