27 fArray(), fBins(1001), fTackCollectionsPerEvent(0), fMin(-0.5), fMax(100.5), fHistograms(NULL) {}
29 void FluctuationsAna::CheckCutContainerCollections() {
30 fEventCollectionsNo = fCutContainer->GetEventCollectionsNo();
31 fTrackCollectionsNo = fCutContainer->GetTrackCollectionsNo();
32 fTackCollectionsPerEvent = fTrackCollectionsNo;
34 for (
int i = 1; i < fEventCollectionsNo; i++) {
35 for (
int j = 0; j < fTackCollectionsPerEvent; j++) {
36 fCutContainer->ReplicateCollection(ECutUpdate::kTrack, j, fTackCollectionsPerEvent * i + j);
39 fTrackCollectionsNo = fCutContainer->GetTrackCollectionsNo();
42 void FluctuationsAna::ProcessEvent() {
43 for (
int i = 0; i < fTackCollectionsPerEvent; i++)
45 CutCollection* cont = fCutContainer->GetEventCollection(fCurrentEventCollectionID);
46 for (
int i = 0; i < fMemoryMap->GetTemporaryTotalTracksNo(); i++) {
47 fCurrentTrack = fCurrentEvent->GetTrack(i);
48 for (
int j = 0; j < cont->
GetNextNo(); j++) {
50 if (fCutContainer->PassTrack(fCurrentTrack, fCurrentTrackCollectionID)) { fArray[j]++; }
53 for (
int i = 0; i < fTackCollectionsPerEvent; i++) {
54 fHistograms->Fill(fCurrentEventCollectionID, i, fArray[i]);
58 Task::EInitFlag FluctuationsAna::Init() {
59 if (TrackAna::Init() == Task::EInitFlag::kFATAL)
return Task::EInitFlag::kFATAL;
61 fHistograms->Init(fEventCollectionsNo, fTackCollectionsPerEvent, fBins, fMin, fMax, kFALSE);
62 fArray.MakeBigger(fEventCollectionsNo);
63 return Task::EInitFlag::kSUCCESS;
78 Package* FluctuationsAna::Report()
const {
79 Package* report = TrackAna::Report();
80 for (
int i = 0; i < fEventCollectionsNo; i++) {
81 TList* list =
new TList();
82 list->SetName(Form(
"Event collection [%i]", i));
83 for (
int j = 0; j < fTackCollectionsPerEvent; j++) {
84 TH1* h = (TH1*) fHistograms->At(i, j)->Clone(Form(
"HIST_%i", j));
85 h->SetName(Form(
"[%i][%i]", i, j));