//
-// Class to do the sharing correction of FMD ESD data
+// Class to do the sharing correction for MC data.
//
+// Input:
+// - AliESDFMD object - from reconstruction
+// - Kinematics
+// - Track-References
+//
+// Output:
+// - AliESDFMD object - copy of input, but with signals merged
+//
+// Corrections used:
+// - None
+//
+// Histograms:
+// - For each ring (FMD1i, FMD2i, FMD2o, FMD3i, FMD3o) the distribution of
+// signals before and after the filter.
+// - For each ring (see above), an array of distributions of number of
+// hit strips for each vertex bin (if enabled - see Init method)
+//
#include "AliFMDMCSharingFilter.h"
#include <AliESDFMD.h>
#include <AliMCEvent.h>
#include <TList.h>
#include <TH1.h>
#include <TMath.h>
-#include "AliForwardCorrectionManager.h"
-// #include "AliFMDAnaParameters.h"
#include "AliFMDStripIndex.h"
#include <AliLog.h>
#include <TROOT.h>
#endif
-//____________________________________________________________________
-AliFMDMCSharingFilter::AliFMDMCSharingFilter()
- : AliFMDSharingFilter(),
- fFMD1i(0),
- fFMD2i(0),
- fFMD2o(0),
- fFMD3i(0),
- fFMD3o(0),
- fSumEta(0)
-{}
-
//____________________________________________________________________
AliFMDMCSharingFilter::AliFMDMCSharingFilter(const char* title)
: AliFMDSharingFilter(title),
fFMD3o(0),
fSumEta(0)
{
- fFMD1i = new TH2D("FMD1i_corr", "Merged vs MC", 21, -.5, 20.5, 100, 0, 20);
- fFMD2i = new TH2D("FMD2i_corr", "Merged vs MC", 21, -.5, 20.5, 100, 0, 20);
- fFMD2o = new TH2D("FMD2o_corr", "Merged vs MC", 21, -.5, 20.5, 100, 0, 20);
- fFMD3i = new TH2D("FMD3i_corr", "Merged vs MC", 21, -.5, 20.5, 100, 0, 20);
- fFMD3o = new TH2D("FMD3o_corr", "Merged vs MC", 21, -.5, 20.5, 100, 0, 20);
+ //
+ // Constructor
+ //
+ // Parameters:
+ // title Title of object - not significant
+ //
+ fFMD1i = new TH2D("FMD1i_corr", "Merged vs MC", 21, -.5, 20.5, 300, 0, 15);
+ fFMD2i = new TH2D("FMD2i_corr", "Merged vs MC", 21, -.5, 20.5, 300, 0, 15);
+ fFMD2o = new TH2D("FMD2o_corr", "Merged vs MC", 21, -.5, 20.5, 300, 0, 15);
+ fFMD3i = new TH2D("FMD3i_corr", "Merged vs MC", 21, -.5, 20.5, 300, 0, 15);
+ fFMD3o = new TH2D("FMD3o_corr", "Merged vs MC", 21, -.5, 20.5, 300, 0, 15);
fFMD1i->SetYTitle("#Delta E/#Delta_{mip} (ESD)");
fFMD1i->SetXTitle("Hits (MC)");
fFMD2i->SetYTitle("#Delta E/#Delta_{mip} (ESD)");
fFMD3o(o.fFMD3o),
fSumEta(o.fSumEta)
{
+ //
+ // Copy constructor
+ //
+ // Parameters:
+ // o Object to copy from
+ //
}
//____________________________________________________________________
AliFMDMCSharingFilter::~AliFMDMCSharingFilter()
{
+ //
+ // Destructor
+ //
if (fFMD1i) delete fFMD1i;
if (fFMD2i) delete fFMD2i;
if (fFMD2o) delete fFMD2o;
AliFMDMCSharingFilter&
AliFMDMCSharingFilter::operator=(const AliFMDMCSharingFilter& o)
{
+ //
+ // Assignment operator
+ //
+ // Parameters:
+ // o Object to assign from
+ //
+ // Return:
+ // Reference to this
+ //
AliFMDSharingFilter::operator=(o);
return *this;
}
UShort_t t,
AliESDFMD& output) const
{
+ //
+ // Store a particle hit in FMD<i>dr</i>[<i>s,t</i>] in @a output
+ //
+ // Parameters:
+ // d Detector
+ // r Ring
+ // s Sector
+ // t Strip
+ // output Output ESD object
+ //
Double_t old = output.Multiplicity(d,r,s,t);
if (old == AliESDFMD::kInvalidMult) old = 0;
output.SetMultiplicity(d,r,s,t,old+1);
AliFMDMCSharingFilter::FilterMC(const AliESDFMD& input,
const AliMCEvent& event,
Double_t vz,
- AliESDFMD& output)
+ AliESDFMD& output,
+ TH2D* primary)
{
+ //
+ // Filter the input kinematics and track references, using
+ // some of the ESD information
+ //
+ // Parameters:
+ // input Input ESD event
+ // event Input MC event
+ // vz Vertex position
+ // output Output ESD-like object
+ // primary Per-event histogram of primaries
+ //
+ // Return:
+ // True on succes, false otherwise
+ //
output.Clear();
// Copy eta values to output
Bool_t isPrimary = stack->IsPhysicalPrimary(iTr);
// Fill 'dn/deta' histogram
- if (isPrimary) fSumEta->Fill(particle->Eta());
+ if (isPrimary) {
+ fSumEta->Fill(particle->Eta());
+ primary->Fill(particle->Eta(), particle->Phi());
+ }
Int_t nTrRef = particle->GetNumberOfTrackReferences();
Int_t longest = -1;
AliFMDMCSharingFilter::CompareResults(const AliESDFMD& esd,
const AliESDFMD& mc)
{
+ //
+ // Compare the result of merging to the monte-carlo truth. This
+ // fills the correlation histograms
+ //
+ // Parameters:
+ // esd ESD after sharing correction
+ // mc MC ESD
+ //
+
// Copy eta values to output
for (UShort_t d = 1; d <= 3; d++) {
UShort_t nq = (d == 1 ? 1 : 2);
void
AliFMDMCSharingFilter::DefineOutput(TList* dir)
{
+ //
+ // Define the output histograms. These are put in a sub list of the
+ // passed list. The histograms are merged before the parent task calls
+ // AliAnalysisTaskSE::Terminate
+ //
+ // Parameters:
+ // dir Directory to add to
+ //
AliFMDSharingFilter::DefineOutput(dir);
TList* d = static_cast<TList*>(dir->FindObject(GetName()));
TList* cd = new TList;
void
AliFMDMCSharingFilter::ScaleHistograms(TList* dir, Int_t nEvents)
{
+ //
+ // Scale the histograms to the total number of events
+ //
+ // Parameters:
+ // dir Where the output is
+ // nEvents Number of events
+ //
AliFMDSharingFilter::ScaleHistograms(dir, nEvents);
TH1D* sumEta = static_cast<TH1D*>(dir->FindObject("mcSumEta"));
if (!sumEta) {
void
AliFMDMCSharingFilter::Print(Option_t* option) const
{
+ //
+ // Print information
+ //
+ // Parameters:
+ // option Not used
+ //
char ind[gROOT->GetDirLevel()+1];
for (Int_t i = 0; i < gROOT->GetDirLevel(); i++) ind[i] = ' ';
ind[gROOT->GetDirLevel()] = '\0';