fSumRings(0),
fCoverage(0),
fMergeMethod(kStraightMean),
- fFiducialMethod(kByCut)
+ fFiducialMethod(kByCut),
+ fSkipFMDRings(0),
+ fBgAndHitMaps(false)
{}
//____________________________________________________________________
fSumRings(0),
fCoverage(0),
fMergeMethod(kStraightMean),
- fFiducialMethod(kByCut)
+ fFiducialMethod(kByCut),
+ fSkipFMDRings(0),
+ fBgAndHitMaps(false)
{
}
//____________________________________________________________________
fSumRings(o.fSumRings),
fCoverage(o.fCoverage),
fMergeMethod(o.fMergeMethod),
- fFiducialMethod(o.fFiducialMethod)
+ fFiducialMethod(o.fFiducialMethod),
+ fSkipFMDRings(o.fSkipFMDRings),
+ fBgAndHitMaps(o.fBgAndHitMaps)
{}
//____________________________________________________________________
fCoverage = o.fCoverage;
fMergeMethod = o.fMergeMethod;
fFiducialMethod = o.fFiducialMethod;
-
+ fSkipFMDRings = o.fSkipFMDRings;
+ fBgAndHitMaps = o.fBgAndHitMaps;
+
return *this;
}
// Find the eta bin ranges
for (UShort_t iVz = 1; iVz <= nVz; iVz++) {
- TList* vtxList = new TList;
+
Double_t vMin = vtxAxis.GetBinLowEdge(iVz);
Double_t vMax = vtxAxis.GetBinUpEdge(iVz);
- vtxList->SetName(Form("%c%02d_%c%02d",
- vMin < 0 ? 'm' : 'p', int(TMath::Abs(vMin)),
- vMax < 0 ? 'm' : 'p', int(TMath::Abs(vMax))));
- fList->Add(vtxList);
-
+ TList* vtxList=0;
+ if(fBgAndHitMaps) {
+ vtxList = new TList;
+ vtxList->SetName(Form("%c%02d_%c%02d",
+ vMin < 0 ? 'm' : 'p', int(TMath::Abs(vMin)),
+ vMax < 0 ? 'm' : 'p', int(TMath::Abs(vMax))));
+ fList->Add(vtxList);
+ }
// Find the first and last eta bin to use for each ring for
// each vertex bin. This is instead of using the methods
// provided by AliFMDAnaParameters
Char_t r = 0;
GetDetRing(iIdx, d, r);
+ // Skipping selected FMD rings
+ if(d==1 && r=='I' && (fSkipFMDRings & kFMD1I)) continue;
+ if(d==2 && r=='I' && (fSkipFMDRings & kFMD2I)) continue;
+ if(d==2 && r=='O' && (fSkipFMDRings & kFMD2O)) continue;
+ if(d==3 && r=='I' && (fSkipFMDRings & kFMD3I)) continue;
+ if(d==3 && r=='O' && (fSkipFMDRings & kFMD3O)) continue;
+
// Get the background object
// TH2F* bg = pars->GetBackgroundCorrection(d,r,iVz);
TH2D* bg = fcm.GetSecondaryMap()->GetCorrection(d,r,iVz);
// Store the result for later use
fFirstBins[(iVz-1)*5+iIdx] = first;
fLastBins[(iVz-1)*5+iIdx] = last;
- TH2D* obg = static_cast<TH2D*>(bg->Clone(Form("secMapFMD%d%c", d, r)));
- obg->SetDirectory(0);
- obg->Reset();
- vtxList->Add(obg);
-
- TH2D* hitmap = static_cast<TH2D*>(bg->Clone(Form("hitMapFMD%d%c", d, r)));
- if(r == 'O') hitmap->RebinY(2);
- hitmap->SetDirectory(0);
- hitmap->GetZaxis()->SetTitle("");
- hitmap->Reset();
- vtxList->Add(hitmap);
-
+ TH2D* obg=0;
+ if(fBgAndHitMaps) {
+ obg = static_cast<TH2D*>(bg->Clone(Form("secMapFMD%d%c", d, r)));
+ obg->SetDirectory(0);
+ obg->Reset();
+ vtxList->Add(obg);
+
+ TH2D* hitmap = static_cast<TH2D*>(bg->Clone(Form("hitMapFMD%d%c", d, r)));
+ if(r == 'O') hitmap->RebinY(2);
+ hitmap->SetDirectory(0);
+ hitmap->GetZaxis()->SetTitle("");
+ hitmap->Reset();
+ vtxList->Add(hitmap);
+ }
// Fill diagnostics histograms
for (Int_t ie = first+fNCutBins; ie <= last-fNCutBins; ie++) {
Double_t old = fCoverage->GetBinContent(ie, iVz);
fCoverage->SetBinContent(ie, iVz, old+1);
- for (Int_t ip = 1; ip <= bg->GetNbinsY(); ip++) {
- obg->SetBinContent(ie, ip, bg->GetBinContent(ie, ip));
- obg->SetBinError(ie, ip, bg->GetBinError(ie, ip));
+ if(fBgAndHitMaps) {
+ for (Int_t ip = 1; ip <= bg->GetNbinsY(); ip++) {
+ obg->SetBinContent(ie, ip, bg->GetBinContent(ie, ip));
+ obg->SetBinError(ie, ip, bg->GetBinError(ie, ip));
+ }
}
}
} // for j
TH2D* t = static_cast<TH2D*>(h->Clone(Form("FMD%d%c_tmp",d,r)));
Int_t i = (d == 1 ? 1 : 2*d + (q == 0 ? -2 : -1));
TH2D* o = sums.Get(d, r);
-
+
+ // Skipping selected FMD rings
+ if(d==1 && r=='I' && (fSkipFMDRings & kFMD1I)) { delete t; continue; }
+ if(d==2 && r=='I' && (fSkipFMDRings & kFMD2I)) { delete t; continue; }
+ if(d==2 && r=='O' && (fSkipFMDRings & kFMD2O)) { delete t; continue; }
+ if(d==3 && r=='I' && (fSkipFMDRings & kFMD3I)) { delete t; continue; }
+ if(d==3 && r=='O' && (fSkipFMDRings & kFMD3O)) { delete t; continue; }
+
// Get valid range
Int_t first = 0;
Int_t last = 0;
}
}
// Remove temporary histogram
- TH2D* hRingSumVtx
- = static_cast<TH2D*>(vtxList->FindObject(Form("hitMapFMD%d%c", d, r)));
- hRingSumVtx->Add(t);
+ if(fBgAndHitMaps) {
+ TH2D* hRingSumVtx
+ = static_cast<TH2D*>(vtxList->FindObject(Form("hitMapFMD%d%c", d, r)));
+ hRingSumVtx->Add(t);
+ }
delete t;
} // for r
} // for d
*/
kDistance
};
+ /**
+ * FMD ring bits for skipping
+ */
+ enum FMDRingBits {
+ kFMD1I=0x01,
+ kFMD1 =0x01,
+ kFMD2I=0x02,
+ kFMD2O=0x04,
+ kFMD2 =0x06,
+ kFMD3I=0x08,
+ kFMD3O=0x10,
+ kFMD3 =0x18
+ };
/**
* Constructor
*/
*/
void SetCorrectionCut(Float_t cut=0.5) { fCorrectionCut = cut; }
/**
- * Set the debug level. The higher the value the more output
+ * Set FMD rings to skip. Argument should be kFirstRingToSkip|kSecondRingToSkip...
+ *
+ * @param mask bit pattern
+ */
+ void SetFMDRingsToSkip(UShort_t mask) { fSkipFMDRings = mask; }
+ /**
+ * Set whether to make bg maps or not
+ *
+ * @param use make them
+ */
+ void SetMakeBGHitMaps(Bool_t use) { fBgAndHitMaps = use; }
+
+ /**
+ * Set the debug level. The higher the value the more output
*
* @param dbg Debug level
*/
+
void SetDebug(Int_t dbg=1) { fDebug = dbg; }
/**
* Print information
TH2D* fCoverage; // Sum per ring (on y-axis)
MergeMethod fMergeMethod; // Merge methiod for overlapping bins
FiducialMethod fFiducialMethod; // Fidicual method
-
- ClassDef(AliFMDHistCollector,1); // Calculate Nch density
+ UShort_t fSkipFMDRings; // FMD rings to ignore
+ Bool_t fBgAndHitMaps; // Make hit/bg maps or not
+
+ ClassDef(AliFMDHistCollector,2); // Calculate Nch density
};
//____________________________________________________________________