Correct wagon.
fAODObjArrayName(""), fAddToHistogramsName(""),
fAODCaloCells(0x0),//fAODCaloClusters(0x0),
fCaloPID(0x0), fFidCut(0x0), fIC(0x0),fMCUtils(0x0), fNMS(0x0),
+ //fAnaOutContainer(0x0),
fHistoPtBins(0), fHistoPtMax(0.), fHistoPtMin(0.),
fHistoPhiBins(0), fHistoPhiMax(0.), fHistoPhiMin(0.),
fHistoEtaBins(0), fHistoEtaMax(0.), fHistoEtaMin(0.),
fHistoAsymBins(0), fHistoAsymMax(0.), fHistoAsymMin(0.)
{
//Default Ctor
-
- fReader = new AliCaloTrackReader();
- fCaloPID = new AliCaloPID();
- fFidCut = new AliFiducialCut();
- fIC = new AliIsolationCut();
- fMCUtils = new AliMCAnalysisUtils();
-
+
//Initialize parameters
InitParameters();
}
//fAODCaloClusters(new TClonesArray(*abc.fAODCaloClusters)),
fAODCaloCells(new AliAODCaloCells(*abc.fAODCaloCells)),
fCaloPID(abc.fCaloPID), fFidCut(abc.fFidCut), fIC(abc.fIC),fMCUtils(abc.fMCUtils), fNMS(abc.fNMS),
+ //fAnaOutContainer(abc.fAnaOutContainer),
fHistoPtBins(abc.fHistoPtBins), fHistoPtMax(abc.fHistoPtMax), fHistoPtMin(abc.fHistoPtMin),
fHistoPhiBins(abc.fHistoPhiBins), fHistoPhiMax(abc.fHistoPhiMax), fHistoPhiMin(abc.fHistoPhiMin),
fHistoEtaBins(abc.fHistoEtaBins), fHistoEtaMax(abc.fHistoEtaMax), fHistoEtaMin(abc.fHistoEtaMin),
fIC = abc.fIC;
fMCUtils = abc.fMCUtils;
fNMS = abc.fNMS;
-
+
+ //fAnaOutContainer = abc.fAnaOutContainer;
+
fInputAODBranch = new TClonesArray(*abc.fInputAODBranch) ;
fInputAODName = abc.fInputAODName;
fOutputAODBranch = new TClonesArray(*abc.fOutputAODBranch) ;
delete fAODCaloCells ;
}
+// if(fAnaOutContainer){
+// fAnaOutContainer->Clear() ;
+// delete fAnaOutContainer ;
+// }
+
if(fReader) delete fReader ;
if(fCaloPID) delete fCaloPID ;
if(fFidCut) delete fFidCut ;
fMinPt = 0.1 ; //Min pt in particle analysis
fMaxPt = 300. ; //Max pt in particle analysis
- fCaloPID = new AliCaloPID ;
- fFidCut = new AliFiducialCut;
- fIC = new AliIsolationCut;
- fNMS = new AliNeutralMesonSelection;
- fNewAOD = kFALSE ;
- fOutputAODName = "PartCorr";
- fOutputAODClassName = "AliAODPWG4Particle";
- fInputAODName = "PartCorr";
+ fReader = new AliCaloTrackReader();
+ fCaloPID = new AliCaloPID();
+ fFidCut = new AliFiducialCut();
+ fIC = new AliIsolationCut();
+ fMCUtils = new AliMCAnalysisUtils();
+ fNMS = new AliNeutralMesonSelection;
+
+ //fAnaOutContainer = new TList();
+
+ fNewAOD = kFALSE ;
+ fOutputAODName = "PartCorr";
+ fOutputAODClassName = "AliAODPWG4Particle";
+ fInputAODName = "PartCorr";
fAddToHistogramsName = "";
- fAODObjArrayName="Ref";
+ fAODObjArrayName = "Ref";
//Histogram settings
fHistoPtBins = 240 ;
virtual void ConnectAODEMCALCells();
virtual void ConnectInputOutputAODBranches();
- virtual TList * GetCreateOutputObjects() { return (new TList) ;}
-
+ virtual TList * GetCreateOutputObjects() { return (new TList) ;}
+ //virtual TList * GetAnalysisOutputContainer() { return fAnaOutContainer ;}
+
virtual void AddToHistogramsName(TString add) { fAddToHistogramsName = add; }
virtual TString GetAddedHistogramsStringToName() {return fAddToHistogramsName ;}
AliMCAnalysisUtils * fMCUtils; // MonteCarlo Analysis utils
AliNeutralMesonSelection * fNMS; // Neutral Meson Selection
+ //TList * fAnaOutContainer; // Temporal histogram output container, contents to be added to the main container passed to the main analysis frame
+
//Histograms binning and range
Int_t fHistoPtBins ; // Number of bins in pt axis
Float_t fHistoPtMax ; // Maximum value of pt histogram range
}
//Each event needs an empty branch
Int_t nAODBranches = fAODBranchList->GetEntries();
- for(Int_t iaod = 0; iaod < nAODBranches; iaod++)
- fAODBranchList->At(iaod)->Clear();
+ for(Int_t iaod = 0; iaod < nAODBranches; iaod++){
+ //fAODBranchList->At(iaod)->Clear();
+ TClonesArray *tca = dynamic_cast<TClonesArray*> (fAODBranchList->At(iaod));
+ if(tca) tca->Delete();
+ }
//Tell the reader to fill the data in the 3 detector lists
Bool_t ok = fReader->FillInputEvent(iEntry, currentFileName);
//Histograms container
OpenFile(1);
fOutputContainer = fAna->GetOutputContainer();
- fOutputContainer->SetOwner();
+ fOutputContainer->SetOwner(kTRUE);
if (DebugLevel() > 1) printf("AliAnalysisTaskParticleCorrelation::UserCreateOutputObjects() - End\n");
PostData(1,fOutputContainer);
printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - module %d calo %s clusters %d\n", imod, fCalorimeter.Data(), nClustersInModule[imod]);
fhNClustersMod[imod]->Fill(nClustersInModule[imod]);
}
+ delete [] nClustersInModule;
//----------------------------------------------------------
// CALOCELLS
printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - module %d calo %s cells %d\n", imod, fCalorimeter.Data(), nCellsInModule[imod]);
fhNCellsMod[imod]->Fill(nCellsInModule[imod]) ;
}
-
+ delete [] nCellsInModule;
+
if(GetDebug() > 0)
printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - End \n");
}
if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) {
if(fCalorimeter == "EMCAL"){
((AliESDEvent*)GetReader()->GetInputEvent())->GetPHOSClusters(caloClustersPHOS);
- caloClustersEMCAL = refArray;
+ caloClustersEMCAL = new TRefArray(*refArray);
}
else if(fCalorimeter == "PHOS") {
((AliESDEvent*)GetReader()->GetInputEvent())->GetEMCALClusters (caloClustersEMCAL);
- caloClustersEMCAL = refArray;
+ caloClustersPHOS = new TRefArray(*refArray);
}
//Fill histograms with clusters
}
}//AOD
+ delete caloClustersEMCAL;
+ delete caloClustersPHOS;
+
}
//______________________________________________________________________________
//reco electrons from various sources\r
fhPhiConversion(0),fhEtaConversion(0),\r
//for comparisons with tracking detectors\r
- fhPtTrack(0),
+ fhPtTrack(0),\r
fhPtNPEBHadron(0),\r
//for computing efficiency of B-jet tags\r
fhBJetPt1x4(0),fhBJetPt2x3(0),fhBJetPt3x2(0),\r
// Also fill some QA histograms\r
//\r
\r
- TObjArray *cl = new TObjArray();\r
-\r
Double_t bfield = 0.;\r
if(GetReader()->GetDataType() != AliCaloTrackReader::kMC) bfield = GetReader()->GetBField();\r
\r
printf("This class not yet implemented for PHOS\n");\r
abort();\r
}\r
- cl = GetAODEMCAL();\r
+ \r
+ TObjArray *cl = GetAODEMCAL();\r
\r
////////////////////////////////////////////////\r
//Start from tracks and get associated clusters \r
}
//Get List with tracks or clusters
- TObjArray * partList = new TObjArray();
+ TObjArray * partList = 0x0;
if(fDetector == "CTS") partList = GetAODCTS();
else if(fDetector == "EMCAL") partList = GetAODEMCAL();
else if(fDetector == "PHOS") partList = GetAODPHOS();
AliAnaOmegaToPi0Gamma::AliAnaOmegaToPi0Gamma() : AliAnaPartCorrBaseClass(),\r
fInputAODGamma(0),fInputAODPi0(0), fInputAODGammaName(""),\r
fEventsList(0), \r
-fVtxZCut(0), fCent(0), fRp(0), fBadChDist(0),\r
fNVtxZBin(0), fNCentBin(0), fNRpBin(0), fNBadChDistBin(0), fNpid(0),\r
-fNmaxMixEv(0), fPi0Mass(0),\r
-fPi0MassWindow(0),fPi0OverOmegaPtCut(0),fGammaOverOmegaPtCut(0),\r
+fNmaxMixEv(0),fVtxZCut(0), fCent(0), fRp(0), fBadChDist(0),\r
+fPi0Mass(0), fPi0MassWindow(0),fPi0OverOmegaPtCut(0),fGammaOverOmegaPtCut(0),\r
fhEtalon(0),\r
fRealOmega(0), fMixAOmega(0),\r
fMixBOmega(0), fMixCOmega(0),\r
fInputAODPi0(new TClonesArray (*ex.fInputAODPi0)),\r
fInputAODGammaName(ex.fInputAODGammaName),\r
fEventsList(ex.fEventsList), \r
-fVtxZCut(ex.fVtxZCut), fCent(ex.fCent), fRp(ex.fRp), fBadChDist(ex.fBadChDist),\r
fNVtxZBin(ex.fNVtxZBin), fNCentBin(ex.fNCentBin), fNRpBin(ex.fNRpBin),\r
-fNBadChDistBin(ex.fNBadChDistBin),fNpid(ex.fNpid),\r
-fNmaxMixEv(ex.fNmaxMixEv), fPi0Mass(ex.fPi0Mass),\r
-fPi0MassWindow(ex.fPi0MassWindow),\r
+fNBadChDistBin(ex.fNBadChDistBin),fNpid(ex.fNpid),fNmaxMixEv(ex.fNmaxMixEv), \r
+fVtxZCut(ex.fVtxZCut), fCent(ex.fCent), fRp(ex.fRp), fBadChDist(ex.fBadChDist),\r
+fPi0Mass(ex.fPi0Mass),fPi0MassWindow(ex.fPi0MassWindow),\r
fPi0OverOmegaPtCut(ex.fPi0OverOmegaPtCut),fGammaOverOmegaPtCut(ex.fGammaOverOmegaPtCut),\r
fhEtalon(ex.fhEtalon),\r
fRealOmega(ex.fRealOmega), fMixAOmega(ex.fMixAOmega),\r
TString fInputAODGammaName; //Input AOD gamma name
TList ** fEventsList; //event list for mixing
- Double_t *fVtxZCut; //[fNVtxZBin] vtertx z cut
- Double_t *fCent; //[fNCentBin] centrality cut
- Double_t *fRp; //[fNRpBin] reaction plane cut
- Int_t *fBadChDist; //[fNBadChDistBin] bad channel dist
-
Int_t fNVtxZBin; //Number of vertex z cut
Int_t fNCentBin; //Number of centrality cut
Int_t fNRpBin; //Number of reaction plane cut
-
Int_t fNBadChDistBin; //Number of bad channel dist cut
Int_t fNpid; //Number of PID cut
-
Int_t fNmaxMixEv; //buffer size events to be mixed
+
+ Double_t *fVtxZCut; //[fNVtxZBin] vtertx z cut
+ Double_t *fCent; //[fNCentBin] centrality cut
+ Double_t *fRp; //[fNRpBin] reaction plane cut
+ Int_t *fBadChDist; //[fNBadChDistBin] bad channel dist
+
Double_t fPi0Mass; //nominal pi0 mass
Double_t fPi0MassWindow; //pi0 mass windows
Double_t fPi0OverOmegaPtCut; //pi0 Pt over omega pt cut
Int_t n = 0, nfrac = 0;
Bool_t isolated = kFALSE ;
Float_t coneptsum = 0 ;
- TObjArray * pl = new TObjArray();
+ TObjArray * pl = 0x0; ;
//Select the calorimeter for candidate isolation with neutral particles
if(fCalorimeter == "PHOS")
// store them in outputContainer
TList * outputContainer = new TList() ;
outputContainer->SetName("PhotonHistos") ;
-
+ outputContainer->SetOwner(kFALSE);
+
Int_t nptbins = GetHistoPtBins();
Int_t nphibins = GetHistoPhiBins();
Int_t netabins = GetHistoEtaBins();
{
//Do analysis and fill aods
//Search for photons in fCalorimeter
- TObjArray * pl = new TObjArray();
+ TObjArray * pl = 0x0;
//Get vertex for photon momentum calculation
Double_t vertex[] = {0,0,0} ; //vertex
}//loop
+ delete [] indexConverted;
+
if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() End fill AODs \n");
}
{
//Search for pi0 in fCalorimeter with shower shape analysis
- TObjArray * pl = new TObjArray;
+ TObjArray * pl = 0x0;
//Get vertex for photon momentum calculation
Double_t vertex[] = {0,0,0} ; //vertex
AliCaloTrackReader * reader = 0x0;
if(data.Contains("AOD")) reader = new AliCaloTrackAODReader();
else if(data=="ESD") reader = new AliCaloTrackESDReader();
- else if(data=="MC" && dataType == "ESD") reader = new AliCaloTrackMCReader();
+ else if(data=="MC" && inputDataType == "ESD") reader = new AliCaloTrackMCReader();
reader->SetDebug(-1);//10 for lots of messages
reader->SwitchOnCTS();
//reader->SetDeltaAODFileName("");
anaphoton1->SwitchOnFiducialCut();
anaphoton1->SetFiducialCut(fidCut1stYear);
}
-
+ anaphoton1->SwitchOnTrackMatchRejection();
if(!data.Contains("delta")) anaphoton1->SetOutputAODName(Form("PhotonsForIM%s",calorimeter.Data()));
else anaphoton1->SetInputAODName (Form("PhotonsForIM%s",calorimeter.Data()));
//Set Histograms bins and ranges
anaomegaToPi0Gamma->SetNVtxZ(2);
anaomegaToPi0Gamma->SetNBadChDist(3);
anaomegaToPi0Gamma->SetNEventsMixed(4);
- if(calorimeter.Data()=="PHOS")
+ if(calorimeter=="PHOS")
anaomegaToPi0Gamma->SetPi0MassPeakWidthCut(0.008); // PHOS
- else if(calorimeter.Data()=="EMCAL")
+ else if(calorimeter=="EMCAL")
anaomegaToPi0Gamma->SetPi0MassPeakWidthCut(0.012); // EMCAL
anaomegaToPi0Gamma->SetHistoPtRangeAndNBins(0, 20, 200) ;
anaomegaToPi0Gamma->SetHistoMassRangeAndNBins(0, 1, 200) ;
maker->SetReader(reader);//pointer to reader
//if(!data.Contains("delta")) maker->AddAnalysis(qa,0);
maker->AddAnalysis(anaphoton1,0);
- maker->AddAnalysis(anapi0,1);
- maker->AddAnalysis(anaphoton2,2);
- maker->AddAnalysis(anaisol,3);
- maker->AddAnalysis(anacorrjet,4);
- maker->AddAnalysis(anacorrhadron,5);
- maker->AddAnalysis(anacorrisohadron,6);
- maker->AddAnalysis(anapi0ebe,7);
- maker->AddAnalysis(anaisolpi0,8);
- maker->AddAnalysis(anacorrhadronpi0,9);
- maker->AddAnalysis(anacorrhadronisopi0,10);
- maker->AddAnalysis(anaomegaToPi0Gamma,11);
+// maker->AddAnalysis(anapi0,1);
+// maker->AddAnalysis(anaphoton2,2);
+// maker->AddAnalysis(anaisol,3);
+// maker->AddAnalysis(anacorrjet,4);
+// maker->AddAnalysis(anacorrhadron,5);
+// maker->AddAnalysis(anacorrisohadron,6);
+// maker->AddAnalysis(anapi0ebe,7);
+// maker->AddAnalysis(anaisolpi0,8);
+// maker->AddAnalysis(anacorrhadronpi0,9);
+// maker->AddAnalysis(anacorrhadronisopi0,10);
+// maker->AddAnalysis(anaomegaToPi0Gamma,11);
maker->SetAnaDebug(-1) ;
maker->SwitchOnHistogramsMaker() ;
if(data.Contains("delta")) maker->SwitchOffAODsMaker() ;