13 for (UShort_t d = 1; d <= 3; d++) {
14 UShort_t nRing = (d == 1 ? 1 : 2);
15 for (UShort_t q = 0; q < nRing; q++) {
16 Char_t r = (q == 0 ?
'I' :
'O');
17 UShort_t nStr = (q == 0 ? 512 : 256);
18 for (UShort_t t = 0; t < nStr; t++) {
21 Double_t phi = TMath::ATan2(y, x);
22 Double_t rr = TMath::Sqrt(y * y + x * x);
23 Double_t theta = TMath::ATan2(rr, z);
24 Double_t eta = -TMath::Log(TMath::Tan(theta / 2));
25 etas(d, r, 0, t) = eta;
34 return TMath::Min(20., gRandom->Landau(1, .1));
45 for (UShort_t d = 1; d <= 3; d++) {
46 UShort_t nRing = (d == 1 ? 1 : 2);
47 for (UShort_t q = 0; q < nRing; q++) {
48 Char_t r = (q == 0 ?
'I' :
'O');
49 UShort_t nSec = (q == 0 ? 20 : 40);
50 UShort_t nStr = (q == 0 ? 512 : 256);
51 for (UShort_t s = 0; s < nSec; s++) {
52 for (UShort_t t = 0; t < nStr; t++) {
54 Double_t eta = etas(d, r, s, t);
55 fmd.
SetEta(d, r, s, t, eta);
57 Double_t now = Double_t(nFilled) / nTotal;
58 Bool_t fill = now < ratio;
78 TString
fname(Form(
"test_%03d_%02d.root", ratio, split));
79 TString tname(Form(
"T_%03d_%02d", ratio, split));
81 TTree*
tree =
new TTree(tname.Data(),
82 Form(
"Ratio=%3d%%, Split=%2d", ratio, split));
83 TBranch* branch = tree->Branch(split == 0 ?
"FMDESD" :
"FMDESD.",
87 std::cout <<
" Doing " << tree->GetTitle() <<
" " << std::flush;
89 for (Int_t i = 0; i < nEvents; i++) {
90 std::cout <<
"." << std::flush;
97 tree->GetCurrentFile()->cd();
99 tree->GetCurrentFile()->Close();
102 tree =
static_cast<TTree*
>(file->Get(tname.Data()));
104 branch = tree->FindBranch(
"FMDESD");
105 else if (split == 1) {
106 TLeaf* leaf = tree->FindLeaf(
"FMDESD.fMultiplicity");
107 if (leaf) branch = leaf->GetBranch();
108 else Warning(
"FillTree",
"Failed to find FMDESD.fMultiplicity");
110 else if (split > 1) {
111 TLeaf* leaf = tree->FindLeaf(
"FMDESD.fMultiplicity.fData");
112 if (leaf) branch = leaf->GetBranch();
113 else Warning(
"FillTree",
"Failed to find FMDESD.fMultiplicity.fData");
116 TH1* h =
new TH1F(
"h", tree->GetTitle(), 100, 0, 20);
117 tree->Draw(
"FMDESD.fMultiplicity.fData>>h",
118 "FMDESD.fMultiplicity.fData<20&&FMDESD.fMultiplicity.fData>0");
119 Int_t nEntries = h->GetEntries();
120 Float_t fratio = Float_t(nEntries) / 51200 / nEvents;
122 Int_t
comp = branch->GetCompressionLevel();
123 Long64_t
totSize = branch->GetTotBytes();
124 Long64_t
zipSize = branch->GetZipBytes();
125 Float_t compz = (zipSize ? Float_t(totSize+0.00001)/zipSize : 1);
126 std::cout <<
" done - " 127 <<
"Compression: " << compz <<
" (" << comp <<
", " 128 << Int_t(fratio*1000+.5)/10. <<
"%)" << std::endl;
146 Int_t ratios[] = { 1, 10, 25, 50, 100, -1 };
147 Int_t splits[] = { 0, 1, 99, -1 };
148 Int_t* pratio = ratios;
150 Double_t arat[] = { 0.5, 1.5, 9.5, 10.5, 24.5, 25.5, 49.5, 50.5, 99.5, 100.5};
151 Double_t aspl[] = { -0.5, 0.5, 1.5, 98.5, 99.5 };
152 TH2* h =
new TH2F(
"size",
"ESD size", 9, arat, 4, aspl);
153 h->GetXaxis()->SetTitle(
"Fill ratio");
154 h->GetYaxis()->SetTitle(
"Split level");
157 std::cout <<
"Loop over ratios" << std::endl;
158 while (*pratio > 0) {
159 Int_t ratio = *pratio++;
160 Int_t* psplit = splits;
162 std::cout <<
" Loop over splits" << std::endl;
163 while (*psplit >= 0) {
164 Int_t split = *psplit++;
167 h->Fill(ratio, split, comp);
TFile * Open(const char *filename, Long64_t &nevents)
virtual void InitTransformations(Bool_t force=kFALSE)
Float_t MakeTree(Int_t ratio, Int_t split, AliFMDFloatMap &etas)
void FillEtas(AliFMDFloatMap &etas)
void SetMultiplicity(UShort_t detector, Char_t ring, UShort_t sector, UShort_t strip, Float_t mult)
void SetEta(UShort_t detector, Char_t ring, UShort_t sector, UShort_t strip, Float_t eta)
Singleton object of FMD geometry descriptions and parameters. This class is a singleton that handles ...
void Detector2XYZ(UShort_t detector, Char_t ring, UShort_t sector, UShort_t strip, Double_t &x, Double_t &y, Double_t &z) const
Event Summary Data for the Forward Multiplicity Detector.This stores the psuedo-multiplicity and -rap...
void SetDefaultStorage(const char *dbString)
void Clear(Option_t *option="")
void FillESDFMD(AliESDFMD &fmd, AliFMDFloatMap &etas, Double_t ratio)
static AliCDBManager * Instance(TMap *entryCache=NULL, Int_t run=-1)
static AliFMDGeometry * Instance()
static void LoadGeometry(const char *geomFileName=NULL)