}
else{
printf("AliAnalysisTaskEMCALClusterize - Set time cuts for ESDs\n");
- params->SetTimeCut(maxDeltaT*1.e-9);
- params->SetTimeMin(-1*timeWindow*1.e-9);
- params->SetTimeMax(timeWindow*1.e-9);
+ if(maxDeltaT > 1) params->SetTimeCut(maxDeltaT*1.e-9);
+ else { params->SetTimeCut(250*1.e-9); printf("default maxDeltaT = 250 ns\n"); }// Same as in reco
+
+ if(timeWindow > 1){
+ params->SetTimeMin(-1*timeWindow*1.e-9);
+ params->SetTimeMax(timeWindow*1.e-9);
+ }
+ else{ // same as in reco
+ params->SetTimeMin(425*1.e-9);
+ params->SetTimeMax(825*1.e-9);
+ printf("default time window 425 ns < T < 825 ns\n");
+ }
}
params->SetClusteringThreshold(minEseed/1.e3);
TGeoHMatrix* matrix[10],
TString path = "",
Int_t run = 0,
- TString pass = "pass2"
+ TString pass = "pass2",
+ Bool_t bRecalE= kTRUE,
+ Bool_t bBad = kTRUE,
+ Bool_t bRecalT= kFALSE
)
{
printf("**** Configure AliEMCALRecoUtils, LOAD AODB ***\n");
printf("\t run %d, pass %s\n",run,pass.Data());
+
// Exotic cells removal
+
reco->SwitchOnRejectExoticCell() ;
reco->SetExoticCellDiffTimeCut(10000); // Open
reco->SetExoticCellFractionCut(0.95); // 1-Ecross/Ecell > 0.95 -> out
- reco->SetExoticCellMinAmplitudeCut(2); // 2 GeV
+ reco->SetExoticCellMinAmplitudeCut(0.75); // 750 MeV
gSystem->Load("libOADB");
+ // Geometry settings, matrices
+
// Instantiate EMCAL geometry for the first time
AliEMCALGeometry* geom = 0;
reco->SetPositionAlgorithm(AliEMCALRecoUtils::kPosTowerGlobal);
- //----------------------------------------------
+ // *** Energy recalibration settings ***
- Bool_t bRecal = kTRUE;
- Bool_t bBad = kTRUE;
if(pass == "pass3"){
- bRecal = kFALSE;
+ bRecalE = kFALSE;
bBad = kFALSE;
}
if(bMC){
- bRecal = kFALSE;
+ bRecalE = kFALSE;
}
//Recalibration factors
- if(bRecal){
+ if(bRecalE){
fileName="$ALICE_ROOT/OADB/EMCAL/EMCALRecalib.root";
if(path!="") fileName=path+"EMCALRecalib.root";
} else printf("AliEMCALRecoUtils ---Do NOT recalibrate\n");
- // Remove EMCAL hot channels
+ // *** Remove EMCAL hot channels ***
if(bBad){
}
*/
+ // *** Time recalibration settings ***
- reco->SwitchOnTimeRecalibration();
-
- //Waiting for OADB, meanwhile
+ if(bRecalT){
+
+ reco->SwitchOnTimeRecalibration();
+
+ //Waiting for OADB, meanwhile
+
+ TFile * ftime = 0;
+ TString path ="./";
+ //TString path = "alien:///alice/cern.ch/user/g/germain/RecalDB/Time";
+ //TGrid::Connect("alien://");
+
+ if (run > 140000 && run < 146500 )
+ ftime = TFile::Open(Form("%s/RefLHC11apass1-7TeV.root",path.Data()));
+ else if(run > 146500 && run <= 146860 )
+ ftime = TFile::Open(Form("%s/RefLHC11apass3-2.76TeV.root",path.Data()));
+ else if(run > 146860 && run < 156477 )
+ ftime = TFile::Open(Form("%s/RefLHC11cpass1-7TeV.root",path.Data()));
+ else if(run >= 156477)
+ ftime = TFile::Open(Form("%s/RefLHC11dpass1-7TeV.root",path.Data()));
+ else if(run < 140000 && run > 136850)
+ ftime = TFile::Open(Form("%s/RefLHC10hpass2PbPb2.76TeV.root",path.Data()));
+ else if(run < 136850)
+ ftime = TFile::Open(Form("%s/RefLHC10dpass2-7TeV.root",path.Data()));
+ else printf("Run %d, not considered for time calibration\n",run);
+
+ if(ftime){
+ printf("AliEMCALRecoUtils - Time recalibration ON\n");
+
+ for(Int_t i =0; i< 4; i++) reco->SetEMCALChannelTimeRecalibrationFactors( i, (TH1F*) ftime->Get(Form("hAllTimeAvBC%d",i)));
+ }
+ else printf("AliEMCALRecoUtils --- Time recalibration OFF\n");
+
+ } else printf("AliEMCALRecoUtils --- Time recalibration OFF 2\n");
- TFile * ftime = 0;
- //TString path ="./";
- TString path = "alien:///alice/cern.ch/user/g/germain/RecalDB/Time";
- //TGrid::Connect("alien://");
-
- if (run > 140000 && run < 146500 )
- ftime = TFile::Open(Form("%s/RefLHC11apass1-7TeV.root",path.Data()));
- else if(run > 146500 && run <= 146860 )
- ftime = TFile::Open(Form("%s/RefLHC11apass3-2.76TeV.root",path.Data()));
- else if(run > 146860 && run < 156477 )
- ftime = TFile::Open(Form("%s/RefLHC11cpass1-7TeV.root",path.Data()));
- else if(run >= 156477)
- ftime = TFile::Open(Form("%s/RefLHC11dpass1-7TeV.root",path.Data()));
- else if(run < 140000 && run > 136850)
- ftime = TFile::Open(Form("%s/RefLHC10hpass2PbPb2.76TeV.root",path.Data()));
- else if(run < 136850)
- ftime = TFile::Open(Form("%s/RefLHC10dpass2-7TeV.root",path.Data()));
- else printf("Run %d, not considered for time calibration\n",run);
-
- if(ftime){
- printf("AliEMCALRecoUtils - Time recalibration ON\n");
-
- for(Int_t i =0; i< 4; i++) reco->SetEMCALChannelTimeRecalibrationFactors( i, (TH1F*) ftime->Get(Form("hAllTimeAvBC%d",i)));
- }
- else printf("AliEMCALRecoUtils --- Time recalibration OFF\n");
-
+
}
maker->AddAnalysis(ConfigureQAAnalysis() , n++);
// Isolation settings
- Int_t partInCone = AliIsolationCut::kOnlyCharged;
- Int_t thresType = AliIsolationCut::kPtThresIC;
+ Int_t partInCone = AliIsolationCut::kNeutralAndCharged;//kOnlyCharged;
+ Int_t thresType = AliIsolationCut::kSumPtFracIC; // kPtThresIC;
if(kClusterArray!=""){
reader->SetEMCALClusterListName(kClusterArray);
if(kClusterArray == "") {
- printf("**************** Normal analysis **************** \n");
+ printf("**************** Standard EMCAL clusters branch analysis **************** \n");
reader->SwitchOnClusterRecalculation();
+ // Check in ConfigureCaloUtils that the recalibration and bad map are ON
}
else {
printf("**************** Input for analysis is Clusterizer %s **************** \n", kClusterArray.Data());
//EMCAL only settings
AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
+ Bool_t bCalib = kTRUE;
+ Bool_t bBadMap= kTRUE;
+ cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
+ cu->SwitchOnBadChannelsRemoval(); // Check the reader if it is taken into account during filtering
+
TGeoHMatrix* matrix[10];
gROOT->LoadMacro("ConfigureEMCALRecoUtils.C");
ConfigureEMCALRecoUtils(
matrix,
"",//AODB path, default
kRunNumber,
- kPass
+ kPass,
+ bCalib,
+ bBadMap
);
+ printf("ConfigureCaloUtils() - Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
+ printf("ConfigureCaloUtils() - BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
+
if(kCollisions=="pp" ) { // Do only for pp for the moment
cu->SwitchOnCorrectClusterLinearity();
anaphoton->SetNCellCut(1);// At least 2 cells
anaphoton->SetMinPt(0.5); // avoid mip peak at E = 260 MeV
anaphoton->SetMaxPt(1000);
- if(!kUseKinematics) anaphoton->SetTimeCut(-1000,1000);// Time window of [400-900] ns if time recalibration is off,
- // restrict to less than 100 ns when time calibration is on
+ anaphoton->SetTimeCut(-1000,1000); // open cut, usual time window of [425-825] ns if time recalibration is off
anaphoton->SetMinDistanceToBadChannel(1, 2, 3); // For filtered AODs, new releases.
}
//anaQA->SetDebug(10); //10 for lots of messages
anaQA->SetCalorimeter(kCalorimeter);
+ anaQA->SetTimeCut(-1000,1000); // Open time cut
+
anaQA->SwitchOffFiducialCut();
anaQA->SwitchOnCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
anaQA->SwitchOffFillAllTH3Histogram();
AddTaskCounter("EMC7"); // Trig Th > 4-5 GeV
AddTaskCounter("PHOS"); //
}
-
- gROOT->LoadMacro("AddTaskPartCorr.C"); // $ALICE_ROOT/PWG4/macros
-
+
Bool_t kPrint = kFALSE;
Bool_t deltaAOD = kFALSE;
+ gROOT->LoadMacro("AddTaskPartCorr.C"); // $ALICE_ROOT/PWG4/macros
+ gROOT->LoadMacro("AddTaskEMCALClusterize.C"); // $ALICE_ROOT/PWG4/CaloCalib/macros
+
// ------
// Tracks
// ------
// EMCAL
// -----
- gROOT->LoadMacro("AddTaskEMCALClusterize.C"); // $ALICE_ROOT/PWG4/CaloCalib/macros
Bool_t bTrackMatch = kTRUE;
Int_t minEcell = 50; // 50 MeV (10 MeV used in reconstruction)
Int_t minEseed = 100; // 100 MeV
- Int_t dTime = 40; // 40 ns difference in time of cells in cluster
- Int_t wTime = 10000; // open time window of cells in cluster, open
+ Int_t dTime = 0; // default, 250 ns
+ Int_t wTime = 0; // default 425 < T < 825 ns
TString clTrigger = ""; // Do not select, do Min Bias and triggered
//Analysis with clusterizer V1
sprintf(fileG, "%s/%s%d/galice.root", kInDir,kPattern,event) ;
sprintf(fileEm, "%s/%s%d/embededAOD.root", kInDir,kPattern,event) ;
- TFile * fAOD = 0 ;
+ TFile * fESD = TFile::Open(fileE) ;
+ TFile * fAOD = TFile::Open(fileA) ;
+
//Check if file exists and add it, if not skip it
- if ( TFile::Open(fileE)) {
+ if (fESD) {
kTreeName ="esdTree";
kInputData = "ESD";
- if(TFile::Open(fileG)) kMC=kTRUE;
- else kMC = kFALSE;
+ TFile * fG = TFile::Open(fileG);
+ if(fG) { kMC = kTRUE; fG->Close();}
+ else kMC = kFALSE;
+
+ // Get run number
+ TTree* esdTree = (TTree*)fESD->Get("esdTree");
+ AliESDEvent* esd = new AliESDEvent();
+ esd->ReadFromTree(esdTree);
+ esdTree->GetEvent(0);
+ kRun = esd->GetRunNumber();
+
return;
}
- else if(fAOD=TFile::Open(fileA)){
+ else if(fAOD){
kTreeName ="aodTree";
kInputData = "AOD";
if(((TTree*) fAOD->Get("aodTree"))->GetBranch("mcparticles")) kMC=kTRUE;
else kMC = kFALSE;
+
+ // Get run number
+ TTree* aodTree = (TTree*)fAOD->Get("aodTree");
+ AliAODEvent* aod = new AliAODEvent();
+ aod->ReadFromTree(esdTree);
+ aodTree->GetEvent(0);
+ kRun = aod->GetRunNumber();
return;
}
- else if(fAOD=TFile::Open(fileEm)){
- kTreeName ="aodTree";
+ else if(TFile::Open(fileEm)){
+ kTreeName = "aodTree";
kInputData = "AOD";
- kMC=kTRUE;
+ kMC = kTRUE;
+
return;
}
else if(TFile::Open(fileG)){
- kTreeName ="TE";
+ kTreeName = "TE";
kInputData = "MC";
- kMC=kTRUE;
+ kMC = kTRUE;
return;
}
}
+ if(fESD) fESD->Close();
+ if(fAOD) fAOD->Close();
+
}// local files analysis
//------------------------------
else if(kInputData.Contains("AOD")) datafile = "AliAOD.root" ;//////////
else if(kInputData == "MC") datafile = "galice.root" ;
- //Loop on ESD files, add them to chain
+ //Loop on ESD/AOD/MC files, add them to chain
Int_t event =0;
Int_t skipped=0 ;
char file[120] ;
for (event = 0 ; event < kFile ; event++) {
sprintf(file, "%s/%s%d/%s", kInDir,kPattern,event,datafile.Data()) ;
sprintf(filexs, "%s/%s%d/%s", kInDir,kPattern,event,kXSFileName) ;
- TFile * fESD = 0 ;
+ TFile * fData = 0 ;
//Check if file exists and add it, if not skip it
- if ( fESD = TFile::Open(file)) {
- if ( fESD->Get(kTreeName) ) {
+ if ( fData = TFile::Open(file)) {
+ if ( fData->Get(kTreeName) ) {
printf("++++ Adding %s\n", file) ;
chain->AddFile(file);
chainxs->Add(filexs) ;