// EMCal tender task adder
// Author: Jiri Kral
-// Script to recover AliEMCALRecParam from OCDB
-// Author: Jiri Kral
-
-#if !defined(__CINT__)
-#include <TString.h>
-#include <TH2.h>
-#include <TF1.h>
-
-#include "AliRun.h"
-#include "AliCaloCalibPedestal.h"
-#include "AliEMCALGeoParams.h"
-#include "AliEMCALRecParam.h"
-#include "AliCDBMetaData.h"
-#include "AliCDBId.h"
-#include "AliCDBEntry.h"
-#include "AliCDBManager.h"
-#include "AliCDBStorage.h"
-#endif
-
-
-
AliTender *AddTaskEMCALTender(const char *geoname="EMCAL_COMPLETEV1", AliEMCALRecParam *pars = 0 )
{
// Parameters: geoname = "EMCAL_FIRSTYEARV1" or "EMCAL_COMPLETEV1" or ""
if( pars == 0 ){
// you can write your reco params here to avoid loading them automatically
// from OCDB during execution time
-/* AliEMCALRecParam *params = new AliEMCALRecParam();
+ AliEMCALRecParam *params = new AliEMCALRecParam();
// reclustering parameters
// use v1 for pp and v2 for PbPb
params->SetClusterizerFlag(AliEMCALRecParam::kClusterizerv2);
params->SetTimeMin(-1);
params->SetTimeMax(1e6);//s
- EMCALSupply->SetRecParam(params);*/
+ EMCALSupply->SetRecParam(params);
}
else{
cout << "------- TENDER is using supplied reco params -------" << endl;
EMCALSupply->SwitchOnCutEtaPhiSum();
EMCALSupply->SetRCut(0.025);
//EMCALSupply->SwitchOnCutEtaPhiSeparate();
- //EMCALSupply->SetEtaCut(0.025);
- //EMCALSupply->SetPhiCut(0.05);
+ EMCALSupply->SetEtaCut(0.025);
+ EMCALSupply->SetPhiCut(0.05);
// switches ---------------------------------------------------------------
EMCALSupply->SwitchOnBadCellRemove();
return ana;
}
-
-AliEMCALRecParam* GetOCDBRecParam( Int_t runNum, char *datatype="pp", Bool_t grid=kTRUE ){
-
- AliCDBManager *man;
-
- AliEMCALRecParam *pars;
- TObjArray *arr;
-
- if( grid ){
- cout << "======= Will get reco params from OCDB on grid ============= " << endl;
- if(!gGrid) {
- if (!TGrid::Connect("alien://")){
- cout << "Error: can't connect to grid" << endl;
- exit(1);
- }
- }
- }
- else{
- cout << "======= Will get reco params from local ODCB =============== " << endl;
- }
-
- // created the OCDB manager
- man = AliCDBManager::Instance();
-
- // point it to local storage
- // !!! careful, one must build an exact path of OCDB directories
- // and store the file in those
- // here "./OCDB/EMCAL/Calib/Pedestals/Run*.root) for masks
- if( grid )
- man->SetDefaultStorageFromRun( runNum );
- else
- man->SetDefaultStorage( "local://$ALICE_ROOT/OCDB" );
-
- // load the file data
- arr = (TObjArray*)(man->Get("EMCAL/Calib/RecoParam", runNum)->GetObject());
-
- if( !strcmp( datatype, "pp" ))
- pars = (AliEMCALRecParam*)arr->FindObject( "Low Flux - p+p" );
- else
- pars = (AliEMCALRecParam*)arr->FindObject( "High Flux - Pb+Pb" );
-
- // cleanup
- arr->Clear();
- delete arr;
- man->ClearCache();
- man->DestroyActiveStorages();
- man->Destroy();
-
- cout << "======= Reco parames retrieval finished ==================== " << endl;
-
- return pars;
-}
//With the argument true this submits jobs to the grid
//As written this requires an xml script tag.xml in the ~/et directory on the grid to submit jobs
void runCaloEt(bool submit = false, // true or false
- const char *dataType="realPbPb", // "sim" or "real" etc.
- const char *pluginRunMode="test", // "test" or "full" or "terminate"
- const char *det = "EMCalDetail") // "PHOS" or "EMCAL" or EMCalDetail
+ const char *dataType="simPbPb", // "sim" or "real" etc.
+ const char *pluginRunMode="full", // "test" or "full" or "terminate"
+ const char *det = "EMCAL") // "PHOS" or "EMCAL" or EMCalDetail
{
TStopwatch timer;
timer.Start();
gROOT->ProcessLine(".L AliAnalysisEmEtReconstructed.cxx+g");
gROOT->ProcessLine(".L AliAnalysisTaskTotEt.cxx+g");
+ TString detStr(det);
+ TString dataStr(dataType);
+ if ( detStr.Contains("PHOS") ) {
+ gSystem->CopyFile("calocorrections.PHOS.root","calocorrections.root",kTRUE);
+ if ( dataStr.Contains("sim") ) {
+ gSystem->CopyFile("ConfigEtMonteCarlo.PHOS.C","ConfigEtMonteCarlo.C",kTRUE);
+ }
+ else{
+ gSystem->CopyFile("ConfigEtMonteCarlo.PHOS.data.C","ConfigEtMonteCarlo.C",kTRUE);
+ }
+ }
+ else{
+ gSystem->CopyFile("calocorrections.EMCAL.root","calocorrections.root",kTRUE);
+ if ( dataStr.Contains("sim") ) {
+ gSystem->CopyFile("ConfigEtMonteCarlo.EMCAL.C","ConfigEtMonteCarlo.C",kTRUE);
+ }
+ else{
+ gSystem->CopyFile("ConfigEtMonteCarlo.EMCAL.data.C","ConfigEtMonteCarlo.C",kTRUE);
+ }
+ }
+
char *kTreeName = "esdTree" ;
TChain * chain = new TChain(kTreeName,"myESDTree") ;
// Make the analysis manager
AliAnalysisManager *mgr = new AliAnalysisManager("TotEtManager");
- TString detStr(det);
TString taskName = "TaskTotEt" + detStr;
- TString dataStr(dataType);
TString dataStrName(dataType);
dataStrName.ReplaceAll("/",".");
TString outputName = "Et.ESD." + dataStrName + "." + detStr + ".root";
- TString outputDir = "totEt" + dataStr;
+ TString outputDir = "totEt" + dataStr + detStr;
cout << " taskName " << taskName
<< " outputName " << outputName
cout << " MC " << endl;
if ( dataStr.Contains("PbPb") ) { // a la: simPbPb/LHC10e18a
cout << " PbPb " << endl;
- TString fileLocation = "/home/dsilverm/data/E_T/" + dataStr + "/dir/AliESDs.root";
+ TString fileLocation = "/data/LHC10h8/137161/999/AliESDs.root";//"/home/dsilverm/data/E_T/" + dataStr + "/dir/AliESDs.root";
cout << "fileLocation " << fileLocation.Data() << endl;
chain->Add(fileLocation.Data()); // link to local test file
}
}
- if(!isMc && detStr.Contains("EMC")){
+ //if(!isMc && detStr.Contains("EMC")){
+ if(detStr.Contains("EMC")){
cout<<"You are running over EMCal data and using the tender supply"<<endl;
gSystem->Load("libTENDER.so");
gSystem->Load("libTENDERSupplies.so");
gROOT->ProcessLine(".include $ALICE_ROOT/Tender/");
gSystem->AddIncludePath("-I$ALICE_ROOT/ANALYSIS ");
-
//this macro is downloaded from the EMCal tender supply twiki
//hopefully it will be replaced by something checked in to aliroot
//I have added the function from GetOCDBRecParam.C in Jiri's example to this so that we don't add gobs of macros to the code
// gROOT->LoadMacro("./GetOCDBRecParam.C");
// // run num, data type pp/PbPb, from grid
//Gets calibration factors from grid if jobs are to be submitted to the grid
- AliEMCALRecParam* pars = GetOCDBRecParam( 137161, "PbPb", submit);
+// AliEMCALRecParam* pars = GetOCDBRecParam( 137161, "PbPb", submit);
AliTender *tender = AddTaskEMCALTender( "EMCAL_COMPLETEV1", 0);
//this also likely needs modification
- tender->SelectCollisionCandidates( AliVEvent::kMB | AliVEvent::kEMCEGA | AliVEvent::kEMC1 | AliVEvent::kEMC7 );
- if(submit){tender->SetDefaultCDBStorage("raw://");} //uncomment if you work on grid
- else{tender->SetDefaultCDBStorage("local://$ALICE_ROOT/OCDB");} //uncomment if you work local
+// tender->SelectCollisionCandidates( AliVEvent::kMB | AliVEvent::kEMCEGA | AliVEvent::kEMC1 | AliVEvent::kEMC7 );
+// if(submit){tender->SetDefaultCDBStorage("raw://");} //uncomment if you work on grid
+// else{tender->SetDefaultCDBStorage("local://$ALICE_ROOT/OCDB");} //uncomment if you work local
if(submit){
cout<<"Setting tender to run on grid"<<endl;