//__________________________________________________
AliAnalysisTaskEMCALPi0CalibSelection::AliAnalysisTaskEMCALPi0CalibSelection(const char* name) :
AliAnalysisTaskSE(name),fEMCALGeo(0x0),//fCalibData(0x0),
//__________________________________________________
AliAnalysisTaskEMCALPi0CalibSelection::AliAnalysisTaskEMCALPi0CalibSelection(const char* name) :
AliAnalysisTaskSE(name),fEMCALGeo(0x0),//fCalibData(0x0),
- fEmin(0.5), fEmax(15.), fAsyCut(1.),fMinNCells(2), fGroupNCells(0),
+ fEmin(0.5), fEmax(15.), fDTimeCut(20.), fAsyCut(1.),fMinNCells(2), fGroupNCells(0),
fLogWeight(4.5), fSameSM(kFALSE), fFilteredInput(kFALSE),
fCorrectClusters(kFALSE), fEMCALGeoName("EMCAL_COMPLETEV1"),
fRecoUtils(new AliEMCALRecoUtils),
fLogWeight(4.5), fSameSM(kFALSE), fFilteredInput(kFALSE),
fCorrectClusters(kFALSE), fEMCALGeoName("EMCAL_COMPLETEV1"),
fRecoUtils(new AliEMCALRecoUtils),
fHIncidentAngle(0x0), fHIncidentAngleDifferentSM(0x0),
fHAsymmetry(0x0), fHAsymmetryDifferentSM(0x0),
fhNEvents(0x0),fCuts(0x0),fLoadMatrices(0),
fHIncidentAngle(0x0), fHIncidentAngleDifferentSM(0x0),
fHAsymmetry(0x0), fHAsymmetryDifferentSM(0x0),
fhNEvents(0x0),fCuts(0x0),fLoadMatrices(0),
- fNMaskCellColumns(11), fMaskCellColumns(0x0)
+ fNMaskCellColumns(11), fMaskCellColumns(0x0),
+ fhClusterTime(0x0), fhClusterPairDiffTime(0x0)
- //SM0-SM8, columns: 6, 35, 36, 37
- //SM1-SM9, columns: 12, 36, 37
- //- Pour les SM pairs : col 6 a 8, 35-36.
- //- Pour les SM impairs : col 12-13, 40 a 42.
fMaskCellColumns[0] = 6 ; fMaskCellColumns[1] = 7 ; fMaskCellColumns[2] = 8 ;
fMaskCellColumns[3] = 35; fMaskCellColumns[4] = 36; fMaskCellColumns[5] = 37;
fMaskCellColumns[6] = 12+AliEMCALGeoParams::fgkEMCALCols; fMaskCellColumns[7] = 13+AliEMCALGeoParams::fgkEMCALCols;
fMaskCellColumns[0] = 6 ; fMaskCellColumns[1] = 7 ; fMaskCellColumns[2] = 8 ;
fMaskCellColumns[3] = 35; fMaskCellColumns[4] = 36; fMaskCellColumns[5] = 37;
fMaskCellColumns[6] = 12+AliEMCALGeoParams::fgkEMCALCols; fMaskCellColumns[7] = 13+AliEMCALGeoParams::fgkEMCALCols;
for(Int_t iSMPair = 0; iSMPair < AliEMCALGeoParams::fgkEMCALModules/2; iSMPair++) {
fHmggPairSameSectorSM[iSMPair] = 0;
fHmggPairSameSectorSMMaskFrame[iSMPair] = 0;
for(Int_t iSMPair = 0; iSMPair < AliEMCALGeoParams::fgkEMCALModules/2; iSMPair++) {
fHmggPairSameSectorSM[iSMPair] = 0;
fHmggPairSameSectorSMMaskFrame[iSMPair] = 0;
}
for(Int_t iSMPair = 0; iSMPair < AliEMCALGeoParams::fgkEMCALModules-2; iSMPair++){
fHmggPairSameSideSM[iSMPair] = 0;
fHmggPairSameSideSMMaskFrame[iSMPair] = 0;
}
for(Int_t iSMPair = 0; iSMPair < AliEMCALGeoParams::fgkEMCALModules-2; iSMPair++){
fHmggPairSameSideSM[iSMPair] = 0;
fHmggPairSameSideSMMaskFrame[iSMPair] = 0;
}
DefineOutput(1, TList::Class());
DefineOutput(2, TList::Class()); // will contain cuts or local params
}
DefineOutput(1, TList::Class());
DefineOutput(2, TList::Class()); // will contain cuts or local params
if(fEMCALGeo) delete fEMCALGeo ;
if(fRecoUtils) delete fRecoUtils ;
if(fNMaskCellColumns) delete [] fMaskCellColumns;
if(fEMCALGeo) delete fEMCALGeo ;
if(fRecoUtils) delete fRecoUtils ;
if(fNMaskCellColumns) delete [] fMaskCellColumns;
//_____________________________________________________
void AliAnalysisTaskEMCALPi0CalibSelection::LocalInit()
{
//_____________________________________________________
void AliAnalysisTaskEMCALPi0CalibSelection::LocalInit()
{
- // Local Initialization
-
- // Create cuts/param objects and publish to slot
- const Int_t buffersize = 255;
- char onePar[buffersize] ;
- fCuts = new TList();
-
- snprintf(onePar,buffersize, "Custer cuts: %2.2f < E < %2.2f GeV; min number of cells %d; Assymetry cut %1.2f", fEmin,fEmax, fMinNCells, fAsyCut) ;
- fCuts->Add(new TObjString(onePar));
- snprintf(onePar,buffersize, "Group %d cells;", fGroupNCells) ;
- fCuts->Add(new TObjString(onePar));
+ // Local Initialization
+
+ // Create cuts/param objects and publish to slot
+ const Int_t buffersize = 255;
+ char onePar[buffersize] ;
+ fCuts = new TList();
+
+ snprintf(onePar,buffersize, "Custer cuts: %2.2f < E < %2.2f GeV; min number of cells %d; Assymetry cut %1.2f", fEmin,fEmax, fMinNCells, fAsyCut) ;
+ fCuts->Add(new TObjString(onePar));
+ snprintf(onePar,buffersize, "Group %d cells;", fGroupNCells) ;
+ fCuts->Add(new TObjString(onePar));
snprintf(onePar,buffersize, "Cluster maximal cell away from border at least %d cells;", fRecoUtils->GetNumberOfCellsFromEMCALBorder()) ;
snprintf(onePar,buffersize, "Cluster maximal cell away from border at least %d cells;", fRecoUtils->GetNumberOfCellsFromEMCALBorder()) ;
- fCuts->Add(new TObjString(onePar));
- snprintf(onePar,buffersize, "Histograms: bins %d; energy range: %2.2f < E < %2.2f GeV;",fNbins,fMinBin,fMaxBin) ;
- fCuts->Add(new TObjString(onePar));
- snprintf(onePar,buffersize, "Switchs: Remove Bad Channels? %d; Use filtered input? %d; Correct Clusters? %d, Mass per channel same SM clusters? %d ",
- fRecoUtils->IsBadChannelsRemovalSwitchedOn(),fFilteredInput,fCorrectClusters, fSameSM) ;
- fCuts->Add(new TObjString(onePar));
- snprintf(onePar,buffersize, "EMCAL Geometry name: < %s >, Load Matrices? %d",fEMCALGeoName.Data(),fLoadMatrices) ;
- fCuts->Add(new TObjString(onePar));
-
- fCuts ->SetOwner(kTRUE);
-
- // Post Data
- PostData(2, fCuts);
-
+ fCuts->Add(new TObjString(onePar));
+ snprintf(onePar,buffersize, "Histograms: bins %d; energy range: %2.2f < E < %2.2f GeV;",fNbins,fMinBin,fMaxBin) ;
+ fCuts->Add(new TObjString(onePar));
+ snprintf(onePar,buffersize, "Switchs: Remove Bad Channels? %d; Use filtered input? %d; Correct Clusters? %d, Mass per channel same SM clusters? %d ",
+ fRecoUtils->IsBadChannelsRemovalSwitchedOn(),fFilteredInput,fCorrectClusters, fSameSM) ;
+ fCuts->Add(new TObjString(onePar));
+ snprintf(onePar,buffersize, "EMCAL Geometry name: < %s >, Load Matrices? %d",fEMCALGeoName.Data(),fLoadMatrices) ;
+ fCuts->Add(new TObjString(onePar));
+
+ fCuts ->SetOwner(kTRUE);
+
+ // Post Data
+ PostData(2, fCuts);
+
}
//__________________________________________________
void AliAnalysisTaskEMCALPi0CalibSelection::UserCreateOutputObjects()
{
//Create output container, init geometry
}
//__________________________________________________
void AliAnalysisTaskEMCALPi0CalibSelection::UserCreateOutputObjects()
{
//Create output container, init geometry
fEMCALGeo = AliEMCALGeometry::GetInstance(fEMCALGeoName) ;
Int_t nSM = (fEMCALGeo->GetEMCGeometry())->GetNumberOfSuperModules();
fEMCALGeo = AliEMCALGeometry::GetInstance(fEMCALGeoName) ;
Int_t nSM = (fEMCALGeo->GetEMCGeometry())->GetNumberOfSuperModules();
fHmgg = new TH2F("hmgg","2-cluster invariant mass",fNbins,fMinBin,fMaxBin,100,0,10);
fHmgg->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
fHmgg->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
fHmgg = new TH2F("hmgg","2-cluster invariant mass",fNbins,fMinBin,fMaxBin,100,0,10);
fHmgg->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
fHmgg->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
fHmggPairSameSectorSMMaskFrame[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
fHmggPairSameSectorSMMaskFrame[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
fOutputContainer->Add(fHmggPairSameSectorSMMaskFrame[iSM]);
fHmggPairSameSectorSMMaskFrame[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
fHmggPairSameSectorSMMaskFrame[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
fOutputContainer->Add(fHmggPairSameSectorSMMaskFrame[iSM]);
+
+ fhClusterPairDiffTimeSameSector[iSM] = new TH2F(Form("hClusterPairDiffTimeSameSector%d",iSM),
+ Form("cluster pair time difference vs E, Sector %d",iSM),
+ 100,0,10, 200,-100,100);
+ fhClusterPairDiffTimeSameSector[iSM]->SetXTitle("E_{pair} (GeV)");
+ fhClusterPairDiffTimeSameSector[iSM]->SetYTitle("#Delta t (ns)");
+ fOutputContainer->Add(fhClusterPairDiffTimeSameSector[iSM]);
+
+
fHmggPairSameSideSMMaskFrame[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
fHmggPairSameSideSMMaskFrame[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
fHmggPairSameSideSMMaskFrame[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
fHmggPairSameSideSMMaskFrame[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
fHmggPairSameSideSMMaskFrame[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
fHmggPairSameSideSMMaskFrame[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
- fOutputContainer->Add(fHmggPairSameSideSMMaskFrame[iSM]);
+ fOutputContainer->Add(fHmggPairSameSideSMMaskFrame[iSM]);
+
+ fhClusterPairDiffTimeSameSide[iSM] = new TH2F(Form("hClusterPairDiffTimeSameSide%d",iSM),
+ Form("cluster pair time difference vs E, Side %d",iSM),
+ 100,0,10, 200,-100,100);
+ fhClusterPairDiffTimeSameSide[iSM]->SetXTitle("E_{pair} (GeV)");
+ fhClusterPairDiffTimeSameSide[iSM]->SetYTitle("#Delta t (ns)");
+ fOutputContainer->Add(fhClusterPairDiffTimeSameSide[iSM]);
+
}
snprintf(hname, buffersize, "hopang_SM%d",iSM);
}
snprintf(hname, buffersize, "hopang_SM%d",iSM);
- fhTowerDecayPhotonHit[iSM] = new TH2F (Form("hTowerDecPhotonHit_Mod%d",iSM),Form("Entries in grid of cells in Module %d",iSM),
- colmax+2,-1.5,colmax+0.5, rowmax+2,-1.5,rowmax+0.5);
+ fhTowerDecayPhotonHit[iSM] = new TH2F (Form("hTowerDecPhotonHit_Mod%d",iSM),
+ Form("Entries in grid of cells in Module %d",iSM),
+ colmax+2,-1.5,colmax+0.5, rowmax+2,-1.5,rowmax+0.5);
fhTowerDecayPhotonHit[iSM]->SetYTitle("row (phi direction)");
fhTowerDecayPhotonHit[iSM]->SetXTitle("column (eta direction)");
fOutputContainer->Add(fhTowerDecayPhotonHit[iSM]);
fhTowerDecayPhotonHit[iSM]->SetYTitle("row (phi direction)");
fhTowerDecayPhotonHit[iSM]->SetXTitle("column (eta direction)");
fOutputContainer->Add(fhTowerDecayPhotonHit[iSM]);
- fhTowerDecayPhotonEnergy[iSM] = new TH2F (Form("hTowerDecPhotonEnergy_Mod%d",iSM),Form("Accumulated energy in grid of cells in Module %d",iSM),
- colmax+2,-1.5,colmax+0.5, rowmax+2,-1.5,rowmax+0.5);
+ fhTowerDecayPhotonEnergy[iSM] = new TH2F (Form("hTowerDecPhotonEnergy_Mod%d",iSM),
+ Form("Accumulated energy in grid of cells in Module %d",iSM),
+ colmax+2,-1.5,colmax+0.5, rowmax+2,-1.5,rowmax+0.5);
fhTowerDecayPhotonEnergy[iSM]->SetYTitle("row (phi direction)");
fhTowerDecayPhotonEnergy[iSM]->SetXTitle("column (eta direction)");
fOutputContainer->Add(fhTowerDecayPhotonEnergy[iSM]);
fhTowerDecayPhotonEnergy[iSM]->SetYTitle("row (phi direction)");
fhTowerDecayPhotonEnergy[iSM]->SetXTitle("column (eta direction)");
fOutputContainer->Add(fhTowerDecayPhotonEnergy[iSM]);
- fhTowerDecayPhotonAsymmetry[iSM] = new TH2F (Form("hTowerDecPhotonAsymmetry_Mod%d",iSM),Form("Accumulated asymmetry in grid of cells in Module %d",iSM),
- colmax+2,-1.5,colmax+0.5, rowmax+2,-1.5,rowmax+0.5);
+ fhTowerDecayPhotonAsymmetry[iSM] = new TH2F (Form("hTowerDecPhotonAsymmetry_Mod%d",iSM),
+ Form("Accumulated asymmetry in grid of cells in Module %d",iSM),
+ colmax+2,-1.5,colmax+0.5, rowmax+2,-1.5,rowmax+0.5);
fhTowerDecayPhotonAsymmetry[iSM]->SetYTitle("row (phi direction)");
fhTowerDecayPhotonAsymmetry[iSM]->SetXTitle("column (eta direction)");
fOutputContainer->Add(fhTowerDecayPhotonAsymmetry[iSM]);
fhTowerDecayPhotonAsymmetry[iSM]->SetYTitle("row (phi direction)");
fhTowerDecayPhotonAsymmetry[iSM]->SetXTitle("column (eta direction)");
fOutputContainer->Add(fhTowerDecayPhotonAsymmetry[iSM]);
fhTowerDecayPhotonHitMaskFrame[iSM]->SetYTitle("row (phi direction)");
fhTowerDecayPhotonHitMaskFrame[iSM]->SetXTitle("column (eta direction)");
fOutputContainer->Add(fhTowerDecayPhotonHitMaskFrame[iSM]);
fhTowerDecayPhotonHitMaskFrame[iSM]->SetYTitle("row (phi direction)");
fhTowerDecayPhotonHitMaskFrame[iSM]->SetXTitle("column (eta direction)");
fOutputContainer->Add(fhTowerDecayPhotonHitMaskFrame[iSM]);
+
+ fhClusterTimeSM[iSM] = new TH2F(Form("hClusterTime_SM%d",iSM),"cluster time vs E",100,0,10, 100,0,1000);
+ fhClusterTimeSM[iSM]->SetXTitle("E (GeV)");
+ fhClusterTimeSM[iSM]->SetYTitle("t (ns)");
+ fOutputContainer->Add(fhClusterTimeSM[iSM]);
+ fhClusterPairDiffTimeSameSM[iSM] = new TH2F(Form("hClusterPairDiffTimeSameSM%d",iSM),
+ Form("cluster pair time difference vs E, SM %d",iSM),
+ 100,0,10, 200,-100,100);
+ fhClusterPairDiffTimeSameSM[iSM]->SetXTitle("E (GeV)");
+ fhClusterPairDiffTimeSameSM[iSM]->SetYTitle("#Delta t (ns)");
+ fOutputContainer->Add(fhClusterPairDiffTimeSameSM[iSM]);
+
+ fhClusterTime = new TH2F("hClusterTime","cluster time vs E",100,0,10, 100,0,1000);
+ fhClusterTime->SetXTitle("E (GeV)");
+ fhClusterTime->SetYTitle("t (ns)");
+ fOutputContainer->Add(fhClusterTime);
+
+ fhClusterPairDiffTime = new TH2F("hClusterPairDiffTime","cluster pair time difference vs E",100,0,10, 200,-100,100);
+ fhClusterPairDiffTime->SetXTitle("E_{pair} (GeV)");
+ fhClusterPairDiffTime->SetYTitle("#Delta t (ns)");
+ fOutputContainer->Add(fhClusterPairDiffTime);
+
+
fhNEvents = new TH1I("hNEvents", "Number of analyzed events" , 1 , 0 , 1 ) ;
fOutputContainer->Add(fhNEvents);
fOutputContainer->SetOwner(kTRUE);
fhNEvents = new TH1I("hNEvents", "Number of analyzed events" , 1 , 0 , 1 ) ;
fOutputContainer->Add(fhNEvents);
fOutputContainer->SetOwner(kTRUE);
PostData(1,fOutputContainer);
}
//__________________________________________________
Bool_t AliAnalysisTaskEMCALPi0CalibSelection::MaskFrameCluster(const Int_t iSM, const Int_t ieta) const {
PostData(1,fOutputContainer);
}
//__________________________________________________
Bool_t AliAnalysisTaskEMCALPi0CalibSelection::MaskFrameCluster(const Int_t iSM, const Int_t ieta) const {
if(DebugLevel() > 1)
printf("AliAnalysisTaskEMCALPi0CalibSelection <<< %s: Event %d >>>\n",event->GetName(), (Int_t)Entry());
if(DebugLevel() > 1)
printf("AliAnalysisTaskEMCALPi0CalibSelection <<< %s: Event %d >>>\n",event->GetName(), (Int_t)Entry());
esd->GetEMCALMatrix(mod)->Print();
if(esd->GetEMCALMatrix(mod)) fEMCALGeo->SetMisalMatrix(esd->GetEMCALMatrix(mod),mod) ;
}
esd->GetEMCALMatrix(mod)->Print();
if(esd->GetEMCALMatrix(mod)) fEMCALGeo->SetMisalMatrix(esd->GetEMCALMatrix(mod),mod) ;
}
for(Int_t iClu=0; iClu<kNumberOfEMCALClusters; iClu++) {
AliVCluster *c1 = (AliVCluster *) caloClustersArr->At(iClu);
for(Int_t iClu=0; iClu<kNumberOfEMCALClusters; iClu++) {
AliVCluster *c1 = (AliVCluster *) caloClustersArr->At(iClu);
if(fRecoUtils->ClusterContainsBadChannel(fEMCALGeo, c1->GetCellsAbsId(), c1->GetNCells())) continue;
if(DebugLevel() > 2)
if(fRecoUtils->ClusterContainsBadChannel(fEMCALGeo, c1->GetCellsAbsId(), c1->GetNCells())) continue;
if(DebugLevel() > 2)
c1->SetE(fRecoUtils->CorrectClusterEnergyLinearity(c1));
if(DebugLevel() > 2)
printf("after linearity correction %f\n",c1->E());
c1->SetE(fRecoUtils->CorrectClusterEnergyLinearity(c1));
if(DebugLevel() > 2)
printf("after linearity correction %f\n",c1->E());
printf("IMA : i %d, x %f, y %f, z %f\n",c1->GetID(), pos[0], pos[1], pos[2]);
}
printf("IMA : i %d, x %f, y %f, z %f\n",c1->GetID(), pos[0], pos[1], pos[2]);
}
- //AliEMCALAodCluster newc1(*((AliAODCaloCluster*)c1));
- //newc1.EvalAllFromRecoUtils(fEMCALGeo,fRecoUtils,emCells);
- //printf("i %d, recal? %d\n",iClu,newc1.IsRecalibrated());
- //clu1.Recalibrate(fCalibData, emCells, fEMCALGeoName);
- //clu1.EvalEnergy();
- //clu1.EvalAll(fLogWeight, fEMCALGeoName);
-
fRecoUtils->GetMaxEnergyCell(fEMCALGeo, emCells,c1,absId1,iSupMod1,ieta1,iphi1,shared);
c1->GetMomentum(p1,v);
fRecoUtils->GetMaxEnergyCell(fEMCALGeo, emCells,c1,absId1,iSupMod1,ieta1,iphi1,shared);
c1->GetMomentum(p1,v);
//Check if cluster is in fidutial region, not too close to borders
Bool_t in1 = fRecoUtils->CheckCellFiducialRegion(fEMCALGeo, c1, emCells);
//Check if cluster is in fidutial region, not too close to borders
Bool_t in1 = fRecoUtils->CheckCellFiducialRegion(fEMCALGeo, c1, emCells);
Bool_t mask1 = MaskFrameCluster(iSupMod1, ieta1);
//if(mask1) printf("Reject eta %d SM %d\n",ieta1, iSupMod1);
Bool_t mask1 = MaskFrameCluster(iSupMod1, ieta1);
//if(mask1) printf("Reject eta %d SM %d\n",ieta1, iSupMod1);
// Combine cluster with other clusters and get the invariant mass
for (Int_t jClu=iClu+1; jClu<kNumberOfEMCALClusters; jClu++) {
AliAODCaloCluster *c2 = (AliAODCaloCluster *) caloClustersArr->At(jClu);
// Combine cluster with other clusters and get the invariant mass
for (Int_t jClu=iClu+1; jClu<kNumberOfEMCALClusters; jClu++) {
AliAODCaloCluster *c2 = (AliAODCaloCluster *) caloClustersArr->At(jClu);
if(fRecoUtils->ClusterContainsBadChannel(fEMCALGeo, c2->GetCellsAbsId(), c2->GetNCells())) continue;
Float_t e2i = c2->E();
if (e2i < fEmin) continue;
else if (e2i > fEmax) continue;
else if (c2->GetNCells() < fMinNCells) continue;
if(fRecoUtils->ClusterContainsBadChannel(fEMCALGeo, c2->GetCellsAbsId(), c2->GetNCells())) continue;
Float_t e2i = c2->E();
if (e2i < fEmin) continue;
else if (e2i > fEmax) continue;
else if (c2->GetNCells() < fMinNCells) continue;
-
- //AliEMCALAodCluster newc2(*((AliAODCaloCluster*)c2));
- //newc2.EvalAllFromRecoUtils(fEMCALGeo,fRecoUtils,emCells);
- //printf("\t j %d, recal? %d\n",jClu,newc2.IsRecalibrated());
- //clu2.Recalibrate(fCalibData, emCells,fEMCALGeoName);
- //clu2.EvalEnergy();
- //clu2.EvalAll(fLogWeight,fEMCALGeoName);
fRecoUtils->GetMaxEnergyCell(fEMCALGeo, emCells,c2,absId2,iSupMod2,ieta2,iphi2,shared);
c2->GetMomentum(p2,v);
fRecoUtils->GetMaxEnergyCell(fEMCALGeo, emCells,c2,absId2,iSupMod2,ieta2,iphi2,shared);
c2->GetMomentum(p2,v);
p12 = p1+p2;
Float_t invmass = p12.M()*1000;
//printf("*** mass %f\n",invmass);
p12 = p1+p2;
Float_t invmass = p12.M()*1000;
//printf("*** mass %f\n",invmass);
Float_t asym = TMath::Abs(p1.E()-p2.E())/(p1.E()+p2.E());
//printf("asymmetry %f\n",asym);
Float_t asym = TMath::Abs(p1.E()-p2.E())/(p1.E()+p2.E());
//printf("asymmetry %f\n",asym);
-
- if(invmass < fMaxBin && invmass > fMinBin){
+
+ //Time cut
+ Double_t time2 = c2->GetTOF()*1.e9;
+ fhClusterPairDiffTime->Fill(p12.E(),time1-time2);
+ if(TMath::Abs(time1-time2) > fDTimeCut) continue;
+
+ if(invmass < fMaxBin && invmass > fMinBin ){
//Check if cluster is in fidutial region, not too close to borders
Bool_t in2 = fRecoUtils->CheckCellFiducialRegion(fEMCALGeo, c2, emCells);
//Check if cluster is in fidutial region, not too close to borders
Bool_t in2 = fRecoUtils->CheckCellFiducialRegion(fEMCALGeo, c2, emCells);
- if(iSupMod1==iSupMod2) fHmggSM[iSupMod1]->Fill(invmass,p12.Pt());
- else fHmggDifferentSM ->Fill(invmass,p12.Pt());
+ if(iSupMod1==iSupMod2) {
+ fHmggSM[iSupMod1]->Fill(invmass,p12.Pt());
+ fhClusterPairDiffTimeSameSM[iSupMod1]->Fill(p12.E(),time1-time2);
+ }
+ else
+ fHmggDifferentSM ->Fill(invmass,p12.Pt());
- if((iSupMod1==j && iSupMod2==j+1) || (iSupMod1==j+1 && iSupMod2==j)) fHmggPairSameSectorSM[i]->Fill(invmass,p12.Pt());
+ if((iSupMod1==j && iSupMod2==j+1) || (iSupMod1==j+1 && iSupMod2==j)) {
+ fHmggPairSameSectorSM[i]->Fill(invmass,p12.Pt());
+ fhClusterPairDiffTimeSameSector[i]->Fill(p12.E(),time1-time2);
+ }
- if((iSupMod1==i && iSupMod2==i+2) || (iSupMod1==i+2 && iSupMod2==i)) fHmggPairSameSideSM[i]->Fill(invmass,p12.Pt());
+ if((iSupMod1==i && iSupMod2==i+2) || (iSupMod1==i+2 && iSupMod2==i)) {
+ fHmggPairSameSideSM[i]->Fill(invmass,p12.Pt());
+ fhClusterPairDiffTimeSameSide[i]->Fill(p12.E(),time1-time2);
+ }
- printf("Cluster cuts: %2.2f < E < %2.2f GeV; min number of cells %d; Assymetry cut %1.2f\n", fEmin,fEmax, fMinNCells, fAsyCut) ;
- printf("Group %d cells\n", fGroupNCells) ;
+ printf("Cluster cuts: %2.2f < E < %2.2f GeV; number of cells > %d; Assymetry < %1.2f, pair time diff < %2.2f\n",
+ fEmin,fEmax, fMinNCells, fAsyCut, fDTimeCut) ;
+ printf("Group %d cells\n", fGroupNCells) ;
- printf("Histograms: bins %d; energy range: %2.2f < E < %2.2f GeV\n",fNbins,fMinBin,fMaxBin) ;
- printf("Switchs:\n \t Remove Bad Channels? %d; Use filtered input? %d; Correct Clusters? %d, \n \t Mass per channel same SM clusters? %d\n",
- fRecoUtils->IsBadChannelsRemovalSwitchedOn(),fFilteredInput,fCorrectClusters, fSameSM) ;
- printf("EMCAL Geometry name: < %s >, Load Matrices %d\n",fEMCALGeoName.Data(), fLoadMatrices) ;
+ printf("Histograms: bins %d; energy range: %2.2f < E < %2.2f GeV\n",fNbins,fMinBin,fMaxBin) ;
+ printf("Switchs:\n \t Remove Bad Channels? %d; Use filtered input? %d; Correct Clusters? %d, \n \t Mass per channel same SM clusters? %d\n",
+ fRecoUtils->IsBadChannelsRemovalSwitchedOn(),fFilteredInput,fCorrectClusters, fSameSM) ;
+ printf("EMCAL Geometry name: < %s >, Load Matrices %d\n",fEMCALGeoName.Data(), fLoadMatrices) ;
-//__________________________________________________
-//void AliAnalysisTaskEMCALPi0CalibSelection::SetCalibCorrections(AliEMCALCalibData* const cdata)
-//{
-// //Set new correction factors (~1) to calibration coefficients, delete previous.
-//
-// if(fCalibData) delete fCalibData;
-// fCalibData = cdata;
-//
-//}