1 #ifndef DNDETAANALYSIS_C 2 #define DNDETAANALYSIS_C 7 # include <TParticle.h> 8 # include <TObjArray.h> 39 "Charged particle pseudo-rapidity density",
40 nEta, -maxEta, +maxEta);
42 eta->SetXTitle(
"#it{#eta}");
43 eta->SetYTitle(
"1/N d#it{N}_{ch}/d#it{#eta}");
44 eta->SetMarkerColor(kRed+2);
45 eta->SetMarkerStyle(20);
59 Info(
"SlaveBegin",
"Making dN/deta histogram");
61 fdNdeta->SetMarkerColor(kBlack);
62 fdNdeta->SetMarkerStyle(21);
63 fdNdeta->SetTitle(GetName());
64 fOutput->Add(fdNdeta);
75 Double_t theta = TMath::ATan2(pT, pZ);
76 Double_t eta = (pT < 1e-10 ? 1024 : -TMath::Log(TMath::Tan(theta/2)));
77 if (TMath::Abs(eta) > 1000)
return false;
92 Warning(
"Terminate",
"No events selected");
98 Warning(
"Terminate",
"No dN/deta histogram found");
101 Printf(
"A total of %ld events",
fOK);
102 TH1* copy =
static_cast<TH1*
>(fdNdeta->Clone(
"before"));
105 fdNdeta->Scale(1. /
fOK,
"width");
117 m1->SetUniqueID(0x8);
141 :
Base(verbose, monitor)
171 :
Base(verbose,monitor)
196 :
Base(verbose,monitor)
227 :
Base(verbose,monitor)
257 :
Base(verbose,monitor),
321 return fCentBin >= 0;
334 if (fCentBin < 0)
return;
348 Printf(
"Centrality %6.2f-%6.2f (bin %4d) " 349 "Nch=%8.1f/%4.2f=%8.1f out=%s (%d)",
350 fHelper.
fCentAxis->GetBinLowEdge(fCentBin),
351 fHelper.
fCentAxis->GetBinUpEdge(fCentBin),
355 Int_t(out->GetBinContent(0)));
364 out->SetBinContent(0, out->GetBinContent(0)+1);
377 Warning(
"Terminate",
"No events selected");
386 if (!o->IsA()->InheritsFrom(TH1::Class()))
return 0;
387 TH1* h =
static_cast<TH1*
>(o);
388 Int_t m = h->GetBinContent(0);
390 ::Warning(
"Normalize",
"Different event count here:%d helper:%d",m,n);
391 h->SetBinContent(0,0);
392 h->Scale(1. / n,
"width");
407 m3->SetUniqueID(0x8);
418 Printf(
" Least # events: %d", fMinEvents);
419 fHelper.
Print(option);
445 Double_t bins[]={ 0, 3, 6, 9, 14, 19, 24, 29, 39, 49, 59, 69, 79, 89, 99};
446 fHelper.SetCentAxis(14, bins);
479 if (t.EqualTo(
"INEL")) ret =
new dNdeta::INEL (verbose,monitor);
480 else if (t.EqualTo(
"NSD")) ret =
new dNdeta::NSD (verbose,monitor);
481 else if (t.EqualTo(
"INELGt0")) ret =
new dNdeta::INELGt0(verbose,monitor);
482 else if (t.EqualTo(
"V0AND")) ret =
new dNdeta::V0AND (verbose,monitor);
483 else if (t.BeginsWith(
"MULT") || t.BeginsWith(
"CENT")) {
485 if (!(w.BeginsWith(
"RefMult") ||
486 w.BeginsWith(
"ZNA") ||
487 w.BeginsWith(
"ZNC") ||
488 w.BeginsWith(
"ZPA") ||
489 w.BeginsWith(
"ZPC") ||
490 w.BeginsWith(
"V0M") ||
491 w.BeginsWith(
"V0A") ||
492 w.BeginsWith(
"V0C") ||
495 Printf(
"Warning: dNdetaMaker::Make: Unknown estimator: %s",
499 if (t.BeginsWith(
"MULT"))
506 TPair* tp =
static_cast<TPair*
>(uopt.FindObject(
"trig"));
507 if( tp) ret->
SetTrigger(tp->Value()->GetName());
510 Printf(
"Error: dNdetaMaker::Make: Invalid spec: %s", t.Data());
519 Printf(
" INEL - inelastic");
520 Printf(
" INELGt0 - inelastic with at least 1 particle in |eta|<1");
521 Printf(
" NSD - Non-single diffractive");
522 Printf(
" V0AND - Visible X-section");
523 Printf(
" CENT<est> - Centrality classes. <est> is one of ");
524 Printf(
" ZNA - ZNA signal");
525 Printf(
" ZNC - ZNC signal");
526 Printf(
" ZPA - ZPA signal");
527 Printf(
" ZPC - ZPC signal");
528 Printf(
" V0M - V0-A + -C");
529 Printf(
" V0A - V0-A");
530 Printf(
" V0C - V0-C");
535 const char*
Script()
const {
return __FILE__; }
543 #pragma link C++ nestedclasses; 544 #pragma link C++ namespace dNdeta; TObject * GetOutputObject(const char *name, TClass *cls)
virtual Bool_t ProcessHeader()
virtual Bool_t ProcessParticle(const TParticle *p)
Bool_t CheckTrigger() const
Cent(const char *method="V0M", Bool_t verbose=true, Int_t monitor=0)
FastShortHeader * fHeader
virtual Bool_t SetupEstimator()
Bool_t Finalize(TCollection *output, Long_t minEvents, TH1 *(*callback)(TObject *, Int_t))
static TObject * CreateOutput()
This script defines classes for looping over the data produced by FastSim.C.
NSD(Bool_t verbose=false, Int_t monitor=0)
virtual Bool_t ProcessHeader()
virtual void Fill(Double_t eta)
dNdetaMaker * _dNdetaMaker
const char * Script() const
virtual void Clear(Option_t *option="")
virtual TList * GetMonitorObjects()
V0AND(Bool_t verbose=false, Int_t monitor=0)
virtual Bool_t SetupEstimator()
virtual void SlaveBegin(TTree *t)
static TH1 * Normalize(TObject *o, Int_t n)
static TH1D * CreatedNdeta()
virtual Bool_t ProcessHeader()
void Print(Option_t *option="") const
Base(Bool_t verbose=false, Int_t monitor=0)
void CreateHistos(TCollection *output, TObject *(*callback)())
virtual void Print(Option_t *option="") const
Double_t GetCentrality() const
virtual void ProcessParticles()
Mult(const char *method="RefMult00d80", Bool_t verbose=false, Int_t monitor=0)
INEL(Bool_t verbose=false, Int_t monitor=0)
void Print(Option_t *option="") const
virtual Bool_t ProcessHeader()
void CreateDiagnostics(TCollection *output, TH1 *centHist)
Int_t CheckCentrality(Double_t cent, Double_t mult, Double_t b, Double_t nPart, Double_t nBin)
virtual Bool_t ProcessHeader()
virtual void ProcessParticles()
INELGt0(Bool_t verbose=false, Int_t monitor=0)
FastAnalysis * Make(const TString &subtype, Int_t monitor, Bool_t verbose, TMap &uopt)
void SetTrigger(UInt_t mask)
virtual TList * GetMonitorObjects()
virtual TH1 * CreateSingle()
virtual void SlaveBegin(TTree *)
virtual void Clear(Option_t *option="")