fFillSSHistograms(kFALSE), fFillOnlySimpleSSHisto(1),
fNOriginHistograms(8), fNPrimaryHistograms(4),
fMomentum(), fPrimaryMom(),
+fSmearShowerShape(0), fSmearShowerShapeWidth(0), fRandom(0),
// Histograms
// Control histograms
fhPtPhotonNPileUpSPDVtxTimeCut2(0), fhPtPhotonNPileUpTrkVtxTimeCut2(0),
fhEClusterSM(0), fhEPhotonSM(0),
-fhPtClusterSM(0), fhPtPhotonSM(0)
+fhPtClusterSM(0), fhPtPhotonSM(0),
+fhLam0ESmeared(0)
{
//default ctor
fhLam0E->SetYTitle("#lambda_{0}^{2}");
fhLam0E->SetXTitle("#it{E} (GeV)");
outputContainer->Add(fhLam0E);
+
+ if(fSmearShowerShape && IsDataMC())
+ {
+ fhLam0ESmeared = new TH2F ("hLam0ESmeared",Form("#lambda_{0}^{2} vs E, smeared width %2.4f",fSmearShowerShapeWidth), nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
+ fhLam0ESmeared->SetYTitle("#lambda_{0}^{2}");
+ fhLam0ESmeared->SetXTitle("#it{E} (GeV)");
+ outputContainer->Add(fhLam0ESmeared);
+ }
fhLam1E = new TH2F ("hLam1E","#lambda_{1}^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
fhLam1E->SetYTitle("#lambda_{1}^{2}");
fRejectTrackMatch = kTRUE ;
+ fSmearShowerShapeWidth = 0.002;
+
}
//__________________________________________________________________
FillShowerShapeHistograms(calo,tag,maxCellFraction);
- aodph.SetM02(calo->GetM02());
+ Float_t l0 = calo->GetM02();
+
+ // Smear the SS to try to match data and simulations,
+ // do it only for simulations.
+ if(fSmearShowerShape && IsDataMC())
+ {
+ // Smear non merged clusters
+// if( !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) &&
+// !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta))
+// {
+ //printf("Width %f, L0: Before l0 %2.2f ",fSmearShowerShapeWidth, l0);
+ l0 = fRandom.Landau(l0, fSmearShowerShapeWidth);
+ //printf("After %2.2f \n",l0);
+// }
+
+ if(fFillSSHistograms) fhLam0ESmeared->Fill(fMomentum.E(),l0);
+ }
+
+ aodph.SetM02(l0);
aodph.SetNLM(nMaxima);
aodph.SetTime(calo->GetTOF()*1e9);
aodph.SetNCells(calo->GetNCells());
Bool_t IsTrackMatchRejectionOn() const { return fRejectTrackMatch ; }
void SwitchOnTrackMatchRejection() { fRejectTrackMatch = kTRUE ; }
void SwitchOffTrackMatchRejection() { fRejectTrackMatch = kFALSE ; }
-
+
+ Bool_t IsShowerShapeSmeared() const { return fSmearShowerShape ; }
+ void SwitchOnShowerShapeSmearing() { fSmearShowerShape = kTRUE ; }
+ void SwitchOffShowerShapeSmearing() { fSmearShowerShape = kFALSE ; }
+
+ void SetShowerShapeSmearWidth(Float_t w ) { fSmearShowerShapeWidth = w ; }
+
void FillNOriginHistograms(Int_t n) { fNOriginHistograms = n ;
if(n > 14) fNOriginHistograms = 14; }
void FillNPrimaryHistograms(Int_t n) { fNPrimaryHistograms= n ;
TLorentzVector fMomentum; //! Cluster momentum
TLorentzVector fPrimaryMom; //! Primary MC momentum
+ Bool_t fSmearShowerShape; // Smear shower shape (use in MC)
+ Float_t fSmearShowerShapeWidth; // Smear shower shape landau function "width" (use in MC)
+ TRandom3 fRandom ; //! Random generator
+
+
//Histograms
TH1F * fhClusterCutsE [10]; //! control histogram on the different photon selection cuts, E
TH1F * fhClusterCutsPt[10]; //! control histogram on the different photon selection cuts, pT
TH2F * fhPtClusterSM; //! cluster E distribution per SM, before any selection, after reader
TH2F * fhPtPhotonSM ; //! photon-like cluster E distribution per SM
+ TH2F * fhLam0ESmeared; //! cluster lambda0 vs E after smearing
+
+
AliAnaPhoton( const AliAnaPhoton & g) ; // cpy ctor
AliAnaPhoton & operator = (const AliAnaPhoton & g) ; // cpy assignment
- ClassDef(AliAnaPhoton,38)
+ ClassDef(AliAnaPhoton,39)
} ;