3 #include "AliTrackReference.h" 8 #include "AliMCParticle.h" 14 #include <TLorentzVector.h> 15 #include <TParticle.h> 16 #include <TClonesArray.h> 34 if (alsoCount)
count = 0;
41 if (&o ==
this)
return *
this;
59 : fGamma(0), fBeta(0),
fEta(0), fDe(0), fDx(0), fDetId(0), fPdg(0),
60 fPrimary(true), fDetector(0), fRing(
'\0'),
61 fSector(0xFFFF), fStrip(0xFFFF)
74 return TMath::Abs(
fPdg);
123 SetTitle(
"mcTrackELoss");
124 fHits =
new TClonesArray(
"AliFMDMCTrackELoss::Hit");
147 if (&o ==
this)
return *
this;
169 TList* ll =
static_cast<TList*
>(l->FindObject(GetTitle()));
172 fNr =
new TH1D(
"clusterRefs",
"# track references per cluster",
174 fNr->SetXTitle(
"# of track references/cluster");
175 fNr->SetFillColor(kRed+1);
176 fNr->SetFillStyle(3001);
177 fNr->SetDirectory(0);
180 fNt =
new TH1D(
"clusterSize",
"cluster length in strips", 21, -.5, 20.5);
181 fNt->SetXTitle(
"Cluster size [strips]");
182 fNt->SetFillColor(kBlue+1);
183 fNt->SetFillStyle(3001);
184 fNt->SetDirectory(0);
187 fNc =
new TH1D(
"nClusters",
"# clusters per track", 21, -.5, 20.5);
188 fNc->SetXTitle(
"# clusters");
189 fNc->SetFillColor(kGreen+1);
190 fNc->SetFillStyle(3001);
191 fNc->SetDirectory(0);
194 fNcr =
new TH2D(
"clusterVsRefs",
"# clusters vs. # refs",
195 21, -.5, 20.5, 21, -.5, 20.5);
196 fNcr->SetXTitle(
"# References");
197 fNcr->SetYTitle(
"# Clusters");
198 fNcr->SetOption(
"COLZ");
199 fNcr->SetDirectory(0);
207 for (
Int_t i = 0; i < edepArray.GetSize(); i++)
211 bgArray.GetSize()-1, bgArray.GetArray(),
212 edepArray.GetSize()-1, edepArray.GetArray());
220 200, -4, 6, bgArray.GetSize()-1, bgArray.GetArray());
227 200, -4, 6, edepArray.GetSize()-1, edepArray.GetArray());
229 fDEdxEta->SetYTitle(
"d#it{#Delta}/d#it{x}");
247 fEta.Reset(AliESDFMD::kInvalidEta);
255 return AliTrackReference::kFMD;
277 const AliMCParticle* mother,
278 AliTrackReference* ref)
284 Double_t edep, length, dEdep, dLength;
305 if (
fDebug) Info(
"Process",
"New because new sector");
309 if (
fDebug) Info(
"Process",
"New because too long: %d (%d,%d,%d)",
316 Info(
"Process",
"I=%p L=%p D=%d (was %d), R=%c (was %c), " 317 "S=%2d (was %2d) t=%3d (was %3d) nT=%3d/%4d",
348 Info(
"Process",
"New cluster starting at FMD%d%c[%2d,%3d]",
351 Info(
"Process",
"Adding to cluster starting at FMD%d%c[%2d,%3d], " 352 "length=%3d (now in %3d, previous %3d)",
369 const AliMCParticle* mother,
370 AliTrackReference* ref)
const 374 if (w <= 0)
return w;
383 Bool_t prim = particle == mother;
394 if (de <= 0 || dx <= 0)
return w;
397 particle->Particle()->Momentum(v);
398 if (v.E() <= 0)
return w;
399 if (v.Beta() < 0 || v.Beta() > 1)
return w;
412 Hit* hit =
new((*fHits)[nHits])
Hit;
420 hit->
fPdg = particle->PdgCode();
428 const AliMCEvent& event,
451 for (
UShort_t ed = 1; ed <= 3; ed++) {
453 for (
UShort_t eq = 0; eq < nq; eq++) {
454 Char_t er = (eq == 0 ?
'I' :
'O');
456 UShort_t nt = (eq == 0 ? 512 : 256);
457 for (
UShort_t es = 0; es < ns; es++)
458 for (
UShort_t et = 0; et < nt; et++)
459 fEta(ed, er, es, et) = input.Eta(ed, er, es, et);
470 #define PFV(N,VALUE) \ 472 AliForwardUtil::PrintName(N); \ 473 std::cout << (VALUE) << std::endl; } while(false) 479 gROOT->IncreaseDirLevel();
481 gROOT->DecreaseDirLevel();
AliFMDFloatMap fPrimaries
Double_t StoreParticle(AliMCParticle *particle, const AliMCParticle *mother, AliTrackReference *ref) const
void Clear(Bool_t alsoCount=false)
Longest track through.
virtual void CreateOutputObjects(TList *list)
AliTrackReference * longest
void Print(Option_t *option="") const
static const Spec & GetdEAxis()
struct AliFMDMCTrackELoss::State fState
State & operator=(const State &o)
virtual Double_t StoreParticle(AliMCParticle *particle, const AliMCParticle *mother, AliTrackReference *ref) const
virtual void Print(Option_t *option="") const
Double_t GetTrackRefTheta(const AliTrackReference *ref) const
static void Decode(UInt_t bits, Double_t &edep, Double_t &length)
UShort_t fMaxConsequtiveStrips
void FillBinArray(TArrayD &a) const
AliFMDMCTrackELoss & operator=(const AliFMDMCTrackELoss &o)
Class to encode the energy loss and path length of a particle into track reference bits...
AliBaseMCTrackDensity & operator=(const AliBaseMCTrackDensity &o)
void Clear(Option_t *opt="")
Bool_t Calculate(const AliESDFMD &esd, const AliMCEvent &event, const TVector3 &ip, Double_t cent)
void EndTrackRefs(Int_t nRefs)
static void MakeLogScale(Int_t nBins, Int_t minOrder, Int_t maxOrder, TArrayD &bins)
Int_t GetDetectorId() const
Bool_t ProcessTracks(const AliMCEvent &event, const TVector3 &ip, TH2D *primary)
AliFMDFloatMap fSecondaries
void CreateOutputObjects(TList *list)
AliTrackReference * ProcessRef(AliMCParticle *particle, const AliMCParticle *mother, AliTrackReference *ref)
static void Unpack(UInt_t id, UShort_t &det, Char_t &rng, UShort_t &sec, UShort_t &str)