TClonesArray &caloClusters = *(AODEvent()->GetCaloClusters());
Int_t jClusters=0;
- for (Int_t iClust=0; iClust<nCaloClus; ++iClust) {
-
- AliVCluster * cluster = event->GetCaloCluster(iClust);
-
- //Check which calorimeter information we want to keep.
-
- if(fCaloFilter!=kBoth){
- if (fCaloFilter==kPHOS && cluster->IsEMCAL()) continue ;
- else if(fCaloFilter==kEMCAL && cluster->IsPHOS()) continue ;
- }
-
- //--------------------------------------------------------------
- //If EMCAL, and requested, correct energy, position ...
- if(cluster->IsEMCAL() && fCorrect){
+ //Do Corrections in EMCAL
+ //If EMCAL, and requested, correct energy, position ...
+ //Need to do this in a separate loop before filling the ESDs because of the track matching recalculations
+ if(fCorrect && (fCaloFilter==kEMCAL || fCaloFilter==kBoth) ) {
+ //Cluster Loop
+ for (Int_t iClust=0; iClust<nCaloClus; ++iClust) {
+
+ AliVCluster * cluster = event->GetCaloCluster(iClust);
+ if(cluster->IsPHOS()) continue ;
+
Float_t position[]={0,0,0};
if(DebugLevel() > 2)
printf("Check cluster %d for bad channels and close to border\n",cluster->GetID());
if(fEMCALRecoUtils->ClusterContainsBadChannel(fEMCALGeo,cluster->GetCellsAbsId(), cluster->GetNCells())) continue;
-// if(!fEMCALRecoUtils->CheckCellFiducialRegion(fEMCALGeo, cluster, event->GetEMCALCells())) {
-// printf("Finally reject\n");
-// continue;
-// }
+ // if(!fEMCALRecoUtils->CheckCellFiducialRegion(fEMCALGeo, cluster, event->GetEMCALCells())) {
+ // printf("Finally reject\n");
+ // continue;
+ // }
if(DebugLevel() > 2)
{
printf("Filter, before : i %d, E %f, dispersion %f, m02 %f, m20 %f\n",iClust,cluster->E(),
cluster->GetPosition(position);
printf("Filter, before : i %d, x %f, y %f, z %f\n",cluster->GetID(), position[0], position[1], position[2]);
}
-
+
if(fEMCALRecoUtils->IsRecalibrationOn()) {
fEMCALRecoUtils->RecalibrateClusterEnergy(fEMCALGeo, cluster, event->GetEMCALCells());
fEMCALRecoUtils->RecalculateClusterShowerShapeParameters(fEMCALGeo, event->GetEMCALCells(),cluster);
fEMCALRecoUtils->RecalculateClusterPID(cluster);
-
}
cluster->SetE(fEMCALRecoUtils->CorrectClusterEnergyLinearity(cluster));
fEMCALRecoUtils->RecalculateClusterPosition(fEMCALGeo, event->GetEMCALCells(),cluster);
-
+
if(DebugLevel() > 2)
{
printf("Filter, after : i %d, E %f, dispersion %f, m02 %f, m20 %f\n",cluster->GetID(),cluster->E(),
printf("Filter, after : i %d, x %f, y %f, z %f\n",cluster->GetID(), position[0], position[1], position[2]);
}
+ }
+ //Recalculate track-matching
+ fEMCALRecoUtils->FindMatches(event);
+
+ } // corrections in EMCAL
+
+ //Now loop on clusters to fill AODs
+ for (Int_t iClust=0; iClust<nCaloClus; ++iClust) {
+
+ AliVCluster * cluster = event->GetCaloCluster(iClust);
+
+ //Check which calorimeter information we want to keep.
+
+ if(fCaloFilter!=kBoth){
+ if (fCaloFilter==kPHOS && cluster->IsEMCAL()) continue ;
+ else if(fCaloFilter==kEMCAL && cluster->IsPHOS()) continue ;
+ }
+
+ //Temporary trick, FIXME
+ Float_t dR = cluster->GetTrackDx();
+ Float_t dZ = cluster->GetTrackDz();
+ if(DebugLevel() > 2)
+ printf("Original residuals : dZ %f, dR %f\n ",dZ, dR);
+ //--------------------------------------------------------------
+ //If EMCAL and corrections done, get the new matching parameters, do not copy noisy clusters
+ if(cluster->IsEMCAL() && fCorrect){
+ if(DebugLevel() > 2)
+ printf("Check cluster %d for bad channels and close to border\n",cluster->GetID());
+ if(fEMCALRecoUtils->ClusterContainsBadChannel(fEMCALGeo,cluster->GetCellsAbsId(), cluster->GetNCells())) continue;
+ // if(!fEMCALRecoUtils->CheckCellFiducialRegion(fEMCALGeo, cluster, event->GetEMCALCells())) {
+ // printf("Finally reject\n");
+ // continue;
+ // }
+
+ fEMCALRecoUtils->GetMatchedResiduals(cluster->GetID(),dR,dZ);
+ if(DebugLevel() > 2)
+ printf("Corrected Residuals : dZ %f, dR %f\n ",dZ, dR);
+
}
//--------------------------------------------------------------
//Now fill AODs
+
Int_t id = cluster->GetID();
Float_t energy = cluster->E();
cluster->GetPosition(posF);
NULL,
cluster->GetType());
+ caloCluster->SetChi2(dZ);//Temporary trick, FIXME
caloCluster->SetCaloCluster(cluster->GetDistanceToBadChannel(),
cluster->GetDispersion(),
cluster->GetM20(), cluster->GetM02(),
- cluster->GetEmcCpvDistance(),
+ dR, //Temporary trick, FIXME
cluster->GetNExMax(),cluster->GetTOF()) ;
caloCluster->SetPIDFromESD(cluster->GetPID());
if(DebugLevel() > 2)
{
- printf("Filter, aod : i %d, E %f, dispersion %f, m02 %f, m20 %f\n",caloCluster->GetID(),caloCluster->E(),
+ printf("Filter, aod : i %d, E %f, dispersion %f, m02 %f, m20 %f\n",caloCluster->GetID(),caloCluster->E(),
caloCluster->GetDispersion(),caloCluster->GetM02(),caloCluster->GetM20());
caloCluster->GetPosition(posF);
- printf("Filter, aod : i %d, x %f, y %f, z %f\n",caloCluster->GetID(), posF[0], posF[1], posF[2]);
+ printf("Filter, aod : i %d, x %f, y %f, z %f\n",caloCluster->GetID(), posF[0], posF[1], posF[2]);
}
//Matched tracks, just to know if there was any match, the track pointer is useless.
+ //Temporary trick, FIXME
if(bESD){
- TArrayI* matchedT = ((AliESDCaloCluster*)cluster)->GetTracksMatched();
- if (InputEvent()->GetNumberOfTracks() > 0 && matchedT && cluster->GetTrackMatchedIndex() >= 0) {
- for (Int_t im = 0; im < matchedT->GetSize(); im++) {
- Int_t iESDtrack = matchedT->At(im);;
- if ((AliVTrack*)InputEvent()->GetTrack(iESDtrack) != 0) {
- caloCluster->AddTrackMatched((AliVTrack*)InputEvent()->GetTrack(iESDtrack));
- }
- }
- }// There is at least a match with a track
+ if(TMath::Abs(dR) < 990 && TMath::Abs(dZ) < 990) { //Default value in PHOS 999, in EMCAL 1024, why?
+ if(DebugLevel() > 2)
+ printf("*** Cluster Track-Matched *** dR %f, dZ %f\n",caloCluster->GetEmcCpvDistance(),caloCluster->Chi2());
+ caloCluster->AddTrackMatched(0x0);
+ }// fill the array with one entry to signal a possible match
+ //TArrayI* matchedT = ((AliESDCaloCluster*)cluster)->GetTracksMatched();
+ //if (InputEvent()->GetNumberOfTracks() > 0 && matchedT && cluster->GetTrackMatchedIndex() >= 0) {
+ // for (Int_t im = 0; im < matchedT->GetSize(); im++) {
+ // Int_t iESDtrack = matchedT->At(im);;
+ // if ((AliVTrack*)InputEvent()->GetTrack(iESDtrack) != 0) {
+ // caloCluster->AddTrackMatched((AliVTrack*)InputEvent()->GetTrack(iESDtrack));
+ // }
+ // }
+ //}// There is at least a match with a track
}
}
caloClusters.Expand(jClusters); // resize TObjArray to 'remove' slots for pseudo clusters
//Int_t runNum = aod->GetRunNumber();
//if(DebugLevel() > 1) printf("Run number: %d\n",runNum);
- //FIXME Not need the matrices for the moment MEFIX
//Get the matrix with geometry information
//Still not implemented in AOD, just a workaround to be able to work at least with ESDs
- // if(!strcmp(InputEvent()->GetName(),"AliAODEvent")) {
- // if(DebugLevel() > 1)
- // printf("AliAnalysisTaskEMCALPi0CalibSelection Use ideal geometry, values geometry matrix not kept in AODs.\n");
- // }
- // else{
- // if(DebugLevel() > 1) printf("AliAnalysisTaskEMCALPi0CalibSelection Load Misaligned matrices. \n");
- // AliESDEvent* esd = dynamic_cast<AliESDEvent*>(InputEvent()) ;
- // if(!esd) {
- // printf("AliAnalysisTaskEMCALPi0CalibSelection::UserExec() - This event does not contain ESDs?");
- // return;
- // }
- // for(Int_t mod=0; mod < (fEMCALGeo->GetEMCGeometry())->GetNumberOfSuperModules(); mod++){
- // if(esd->GetEMCALMatrix(mod)) fEMCALGeo->SetMisalMatrix(esd->GetEMCALMatrix(mod),mod) ;
- // }
- // }
+ if(!gGeoManager && fhNEvents->GetEntries()==1){
+ printf("AliAnalysisTaskEMCALPi0CalibSelection::UserExec() - Get geo matrices from data\n");
+ if(!strcmp(event->GetName(),"AliAODEvent")) {
+ if(DebugLevel() > 1)
+ printf("AliAnalysisTaskEMCALPi0CalibSelection Use ideal geometry, values geometry matrix not kept in AODs.\n");
+ }//AOD
+ else {
+ if(DebugLevel() > 1) printf("AliAnalysisTaskEMCALPi0CalibSelection Load Misaligned matrices. \n");
+ AliESDEvent* esd = dynamic_cast<AliESDEvent*>(event) ;
+ if(!esd) {
+ printf("AliAnalysisTaskEMCALPi0CalibSelection::UserExec() - This event does not contain ESDs?");
+ return;
+ }
+ for(Int_t mod=0; mod < (fEMCALGeo->GetEMCGeometry())->GetNumberOfSuperModules(); mod++){
+ if(DebugLevel() > 1) esd->GetEMCALMatrix(mod)->Print();
+ if(esd->GetEMCALMatrix(mod)) fEMCALGeo->SetMisalMatrix(esd->GetEMCALMatrix(mod),mod) ;
+ }
+ }//ESD
+ }//first event
if(DebugLevel() > 1) printf("AliAnalysisTaskEMCALPi0CalibSelection Will use fLogWeight %.3f .\n",fLogWeight);
Int_t absId1 = -1;
Float_t opangle = p1.Angle(p2.Vect())*TMath::RadToDeg();
//printf("*******>>>>>>>> In PEAK pt %f, angle %f \n",p12.Pt(),opangle);
- //Inciden angle of each photon
- Float_t posSM1cen[3]={0.,0.,0.};
- Float_t depth = fRecoUtils->GetDepth(p1.Energy(),fRecoUtils->GetParticleType(),iSupMod1);
- fEMCALGeo->RecalculateTowerPosition(11.5, 23.5, iSupMod1, depth, fRecoUtils->GetMisalTransShiftArray(),fRecoUtils->GetMisalRotShiftArray(),posSM1cen);
- Float_t posSM2cen[3]={0.,0.,0.};
- depth = fRecoUtils->GetDepth(p2.Energy(),fRecoUtils->GetParticleType(),iSupMod2);
- fEMCALGeo->RecalculateTowerPosition(11.5, 23.5, iSupMod2, depth, fRecoUtils->GetMisalTransShiftArray(),fRecoUtils->GetMisalRotShiftArray(),posSM2cen);
- //printf("SM1 %d pos (%2.3f,%2.3f,%2.3f) \n",iSupMod1,posSM1cen[0],posSM1cen[1],posSM1cen[2]);
- //printf("SM2 %d pos (%2.3f,%2.3f,%2.3f) \n",iSupMod2,posSM2cen[0],posSM2cen[1],posSM2cen[2]);
-
- TVector3 vecSM1cen(posSM1cen[0]-v[0],posSM1cen[1]-v[1],posSM1cen[2]-v[2]);
- TVector3 vecSM2cen(posSM2cen[0]-v[0],posSM2cen[1]-v[1],posSM2cen[2]-v[2]);
- Float_t inangle1 = p1.Angle(vecSM1cen)*TMath::RadToDeg();
- Float_t inangle2 = p2.Angle(vecSM2cen)*TMath::RadToDeg();
- //printf("Incident angle: cluster 1 %2.3f; cluster 2 %2.3f\n",inangle1,inangle2);
-
+ //Incident angle of each photon
+ Float_t inangle1 =0., inangle2=0.;
+ if(gGeoManager){
+ Float_t posSM1cen[3]={0.,0.,0.};
+ Float_t depth = fRecoUtils->GetDepth(p1.Energy(),fRecoUtils->GetParticleType(),iSupMod1);
+ fEMCALGeo->RecalculateTowerPosition(11.5, 23.5, iSupMod1, depth, fRecoUtils->GetMisalTransShiftArray(),fRecoUtils->GetMisalRotShiftArray(),posSM1cen);
+ Float_t posSM2cen[3]={0.,0.,0.};
+ depth = fRecoUtils->GetDepth(p2.Energy(),fRecoUtils->GetParticleType(),iSupMod2);
+ fEMCALGeo->RecalculateTowerPosition(11.5, 23.5, iSupMod2, depth, fRecoUtils->GetMisalTransShiftArray(),fRecoUtils->GetMisalRotShiftArray(),posSM2cen);
+ //printf("SM1 %d pos (%2.3f,%2.3f,%2.3f) \n",iSupMod1,posSM1cen[0],posSM1cen[1],posSM1cen[2]);
+ //printf("SM2 %d pos (%2.3f,%2.3f,%2.3f) \n",iSupMod2,posSM2cen[0],posSM2cen[1],posSM2cen[2]);
+
+ TVector3 vecSM1cen(posSM1cen[0]-v[0],posSM1cen[1]-v[1],posSM1cen[2]-v[2]);
+ TVector3 vecSM2cen(posSM2cen[0]-v[0],posSM2cen[1]-v[1],posSM2cen[2]-v[2]);
+ inangle1 = p1.Angle(vecSM1cen)*TMath::RadToDeg();
+ inangle2 = p2.Angle(vecSM2cen)*TMath::RadToDeg();
+ //printf("Incident angle: cluster 1 %2.3f; cluster 2 %2.3f\n",inangle1,inangle2);
+ }
fHOpeningAngle ->Fill(opangle,p12.Pt());
fHIncidentAngle->Fill(inangle1,p1.Pt());
fHIncidentAngle->Fill(inangle2,p2.Pt());
virtual void GetVertex(Double_t vertex[3],const Int_t evtIndex) const { GetReader()->GetVertex(vertex,evtIndex) ; }
virtual Double_t* GetVertex(const Int_t evtIndex) const { return GetReader()->GetVertex(evtIndex) ; }
- virtual Bool_t IsTrackMatched(const AliVCluster * cluster) const { return fCaloPID->IsTrackMatched(cluster); }
+ virtual Bool_t IsTrackMatched(const AliVCluster * cluster) const { return fCaloPID->IsTrackMatched(cluster, fCaloUtils); }
void SwitchOnPlotsMaking() {fMakePlots = kTRUE ;}
void SwitchOffPlotsMaking() {fMakePlots = kFALSE ;}
#include "AliMixedEvent.h"
#include "AliAODEvent.h"
#include "AliESDEvent.h"
+#include "AliAnalysisDataSlot.h"
ClassImp(AliAnalysisTaskParticleCorrelationM)
fAna->ProcessEvent((Int_t) Entry(), CurrentFileName());
//printf("AliAnalysisTaskParticleCorrelationM::Current Event %d; Current File Name : %s\n",(Int_t) Entry(), CurrentFileName());
if (DebugLevel() > 1) printf("AliAnalysisTaskParticleCorrelationM::UserExec() - End\n");
-
+
PostData(1, fOutputContainer);
+ AliAnalysisDataSlot *out0 = GetOutputSlot(0);
+ if (out0 && out0->IsConnected()) PostData(0, fTreeA);
+
//gObjectTable->Print();
-
}
//_____________________________________________________
#include "AliVCluster.h"
#include "AliAODPWG4Particle.h"
#include "AliEMCALPIDUtils.h"
+#include "AliCalorimeterUtils.h"
+
ClassImp(AliCaloPID)
fPHOSNeutralWeight(0.), //fPHOSWeightFormula(0),
//fPHOSPhotonWeightFormula(0x0), fPHOSPi0WeightFormula(0x0),
fDispCut(0.),fTOFCut(0.), fDebug(-1),
-fRecalculateBayesian(kFALSE), fParticleFlux(kLow), fEMCALPIDUtils(new AliEMCALPIDUtils)
+fRecalculateBayesian(kFALSE), fParticleFlux(kLow),
+fEMCALPIDUtils(new AliEMCALPIDUtils)
{
//Ctor
fPHOSNeutralWeight(0.), //fPHOSWeightFormula(0),
//fPHOSPhotonWeightFormula(0x0), fPHOSPi0WeightFormula(0x0),
fDispCut(0.),fTOFCut(0.), fDebug(-1),
-fRecalculateBayesian(kTRUE), fParticleFlux(flux), fEMCALPIDUtils(new AliEMCALPIDUtils)
+fRecalculateBayesian(kTRUE), fParticleFlux(flux),
+fEMCALPIDUtils(new AliEMCALPIDUtils)
{
//Ctor
fPHOSNeutralWeight(0.), //fPHOSWeightFormula(0),
//fPHOSPhotonWeightFormula(0x0), fPHOSPi0WeightFormula(0x0),
fDispCut(0.),fTOFCut(0.), fDebug(-1),
-fRecalculateBayesian(kTRUE), fParticleFlux(-1), fEMCALPIDUtils( (AliEMCALPIDUtils*) emcalpid)
+fRecalculateBayesian(kTRUE), fParticleFlux(-1),
+fEMCALPIDUtils( (AliEMCALPIDUtils*) emcalpid)
{
//Ctor
}
//_______________________________________________________________
-void AliCaloPID::SetPIDBits(const TString calo, const AliVCluster * cluster, AliAODPWG4Particle * ph) {
+void AliCaloPID::SetPIDBits(const TString calo, const AliVCluster * cluster, AliAODPWG4Particle * ph, const AliCalorimeterUtils* cu) {
//Set Bits for PID selection
//Dispersion/lambdas
//Bool_t isNeutral = kTRUE ;
//if(cluster->IsPHOS()) isNeutral = cluster->GetEmcCpvDistance() > 5. ;
//else
- Bool_t isNeutral = IsTrackMatched(cluster);
+ Bool_t isNeutral = IsTrackMatched(cluster,cu);
ph->SetChargedBit(isNeutral);
}
//__________________________________________________________________________
-Bool_t AliCaloPID::IsTrackMatched(const AliVCluster* cluster) const {
+Bool_t AliCaloPID::IsTrackMatched(const AliVCluster* cluster, const AliCalorimeterUtils * cu) const {
//Check if there is any track attached to this cluster
Int_t nMatches = cluster->GetNTracksMatched();
// if (cluster->GetTrackMatched(0)) printf("\t matched track id %d\n",((AliVTrack*)cluster->GetTrackMatched(0))->GetID()) ;
// else if(cluster->GetTrackMatchedIndex()>=0) printf("\t matched track id %d\n",((AliVTrack*) GetReader()->GetInputEvent()->GetTrack(cluster->GetTrackMatchedIndex()))->GetID()) ;
+
if(!strcmp("AliESDCaloCluster",Form("%s",cluster->ClassName())))
{
+ //If EMCAL track matching needs to be recalculated
+ if(cluster->IsEMCAL() && cu && cu->IsRecalculationOfClusterTrackMatchingOn()){
+ Float_t dR = 999., dZ = 999.;
+ cu->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dR,dZ);
+ if(dR < 999) return kTRUE;
+ else return kFALSE;
+ }
+
if (nMatches > 0) {
if (nMatches == 1 ) {
Int_t iESDtrack = cluster->GetTrackMatchedIndex();
else
{
//AODs
- if(nMatches > 0) return kTRUE; //There is at least one match.
- else return kFALSE;
-
+ if(cu && cu->IsRecalculationOfClusterTrackMatchingOn()){
+ Float_t dR = TMath::Abs(cluster->GetEmcCpvDistance()) ; //FIXME
+ if(dR > cu->GetCutR()) return kFALSE;
+ else return kTRUE;
+ }
+ else {
+ if(nMatches > 0) return kTRUE; //There is at least one match.
+ else return kFALSE;
+ }
}//AODs or MC (copy into AOD)
return kFALSE;
class AliVCluster;
class AliAODPWG4Particle;
class AliEMCALPIDUtils;
+class AliCalorimeterUtils;
class AliCaloPID : public TObject {
TString GetPIDParametersList();
- void SetPIDBits(const TString calo, const AliVCluster * cluster, AliAODPWG4Particle *aodph);
+ void SetPIDBits(const TString calo, const AliVCluster * cluster, AliAODPWG4Particle *aodph, const AliCalorimeterUtils* cu);
void Print(const Option_t * opt)const;
//PID bits setters and getters
- Bool_t IsTrackMatched(const AliVCluster * cluster) const ;
+ Bool_t IsTrackMatched(const AliVCluster * cluster, const AliCalorimeterUtils* cu) const ;
void SetDispersionCut(Float_t dcut ) {fDispCut = dcut; }
Float_t GetDispersionCut() const {return fDispCut ;}
void SetLowParticleFlux() {fParticleFlux = kLow;}
void SetHighParticleFlux() {fParticleFlux = kHigh;}
- private:
+private:
Float_t fEMCALPhotonWeight; //Bayesian PID weight for photons in EMCAL
Float_t fEMCALPi0Weight; //Bayesian PID weight for pi0 in EMCAL
Int_t fDebug; //Debug level
- Bool_t fRecalculateBayesian; // Recalculate PID bayesian or use simple PID?
- Int_t fParticleFlux; // Particle flux for setting PID parameters
- AliEMCALPIDUtils * fEMCALPIDUtils; //Pointer to EMCALPID to redo the PID Bayesian calculation
-
+ Bool_t fRecalculateBayesian; // Recalculate PID bayesian or use simple PID?
+ Int_t fParticleFlux; // Particle flux for setting PID parameters
+ AliEMCALPIDUtils * fEMCALPIDUtils; // Pointer to EMCALPID to redo the PID Bayesian calculation
ClassDef(AliCaloPID,4)
} ;
}//EMCAL cluster
}// cluster exists
}// cluster loop
+
+ //Recalculate track matching
+ GetCaloUtils()->RecalculateClusterTrackMatching(fInputEvent);
+
//fAODEMCALNormalInputEntries = fAODEMCAL->GetEntriesFast();
if(fDebug > 1) printf("AliCaloTrackReader::FillInputEMCAL() - aod entries %d\n", fAODEMCAL->GetEntriesFast());//fAODEMCALNormalInputEntries);
fNCellsFromPHOSBorder(0), fRecalibration(kFALSE),
fPHOSRecalibrationFactors(),
fEMCALRecoUtils(new AliEMCALRecoUtils),
- fRecalculatePosition(kFALSE),fCorrectELinearity(kFALSE)
+ fRecalculatePosition(kFALSE),fCorrectELinearity(kFALSE),
+ fRecalculateMatching(kFALSE),fCutR(20), fCutZ(20)
{
//Ctor
printf("Recalibrate Clusters? %d\n",fRecalibration);
printf("Recalculate Clusters Position? %d\n",fRecalculatePosition);
printf("Recalculate Clusters Energy? %d\n",fCorrectELinearity);
+ printf("Matching criteria: dR < %2.2f[cm], dZ < %2.2f[cm]\n",fCutR,fCutZ);
printf(" \n") ;
}
Float_t RecalibrateClusterEnergy(AliVCluster* cluster, AliVCaloCells * cells);
+ //EMCAL specific utils for the moment
void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) {fEMCALRecoUtils = ru;}
AliEMCALRecoUtils* GetEMCALRecoUtils() const {return fEMCALRecoUtils;}
}
void RecalculateClusterPID(AliVCluster* clu) {fEMCALRecoUtils->RecalculateClusterPID(clu);}
+ //Track matching recalculation
+ void RecalculateClusterTrackMatching(AliVEvent * event) {if (fRecalculateMatching) fEMCALRecoUtils->FindMatches(event);}
+ void GetMatchedResiduals(Int_t index, Float_t &dR, Float_t &dZ) {if (fRecalculateMatching) fEMCALRecoUtils->GetMatchedResiduals(index,dR,dZ);}
+ //This could be used for PHOS ...
+ void SwitchOnRecalculateClusterTrackMatching() { fRecalculateMatching = kTRUE; }
+ void SwitchOffRecalculateClusterTrackMatching() { fRecalculateMatching = kFALSE; }
+ Bool_t IsRecalculationOfClusterTrackMatchingOn() const { return fRecalculateMatching ; }
+ Float_t GetCutR() const { return fCutR; }
+ Float_t GetCutZ() const { return fCutZ; }
+
+ void SetCutR(Float_t cutR) { fCutR=cutR; fEMCALRecoUtils->SetCutR(cutR); }
+ void SetCutZ(Float_t cutZ) { fCutZ=cutZ; fEMCALRecoUtils->SetCutZ(cutZ);}
+
private:
Int_t fDebug; // Debugging level
AliEMCALRecoUtils* fEMCALRecoUtils; // EMCAL utils for cluster rereconstruction
Bool_t fRecalculatePosition; // Recalculate cluster position
Bool_t fCorrectELinearity ; // Correct cluster energy linearity
-
- ClassDef(AliCalorimeterUtils,3)
+ Bool_t fRecalculateMatching; // Recalculate cluster position
+ Float_t fCutR; // dR cut on matching
+ Float_t fCutZ; // dZ cut on matching
+
+ ClassDef(AliCalorimeterUtils,4)
} ;
else{
//Set PID bits for later selection (AliAnaPi0 for example)
//GetPDG already called in SetPIDBits.
- GetCaloPID()->SetPIDBits(fCalorimeter,calo,&aodph);
+ GetCaloPID()->SetPIDBits(fCalorimeter,calo,&aodph, GetCaloUtils());
if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - PID Bits set \n");
}
else{
//Set PID bits for later selection (AliAnaPi0 for example)
//GetPDG already called in SetPIDBits.
- GetCaloPID()->SetPIDBits(fCalorimeter,calo,&aodpi0);
+ GetCaloPID()->SetPIDBits(fCalorimeter,calo,&aodpi0, GetCaloUtils());
if(GetDebug() > 1) printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - PID Bits set \n");
}
//Set PID bits for later selection (AliAnaPi0 for example)
//GetPDG already called in SetPIDBits.
- GetCaloPID()->SetPIDBits(fCalorimeter,calo,&aodph);
+ GetCaloPID()->SetPIDBits(fCalorimeter,calo,&aodph, GetCaloUtils());
if(GetDebug() > 1) printf("AliAnaShowerParameter::MakeAnalysisFillAOD() - PID Bits set \n");
//Play with the MC stack if available