AliInfo("Adding Tracklets-loader");
AliDataLoader *dl = new AliDataLoader("TRD.Tracklets.root","tracklets", "tracklets");
fLoader->AddDataLoader(dl);
+ dl = new AliDataLoader("TRD.GtuTracks.root", "gtutracks", "gtutracks");
+ fLoader->AddDataLoader(dl);
return fLoader;
}
#include "AliDetector.h"
+#include "AliTRDTrigger.h"
class AliRawReader;
class AliTRDgeometry;
+class AliTriggerDetector;
class AliTRD : public AliDetector {
virtual AliDigitizer *CreateDigitizer(AliRunDigitizer *manager) const;
virtual AliLoader *MakeLoader(const char* topfoldername);
+ virtual AliTriggerDetector* CreateTriggerDetector() const { return new AliTRDTrigger(); }
+
protected:
AliTRDgeometry *fGeometry; // The TRD geometry
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id: AliTRDTrigger.cxx 31904 2009-04-08 16:42:03Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// TRD trigger interface class to CTP //
+// currently the Trigger() method calls the GTU tracking simulation and //
+// runs two example triggers, namely on a single high pt particle and //
+// on a jet. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "TClonesArray.h"
+
+#include "AliLog.h"
+#include "AliTriggerInput.h"
+#include "AliRunLoader.h"
+#include "AliLoader.h"
+
+#include "AliTRDgtuSim.h"
+#include "AliTRDtrackGTU.h"
+#include "AliTRDTrigger.h"
+
+AliTRDTrigger::AliTRDTrigger()
+{
+ // defautl constructor
+
+ SetName("TRD");
+}
+
+AliTRDTrigger::~AliTRDTrigger()
+{
+ // destructor
+}
+
+void AliTRDTrigger::CreateInputs()
+{
+ // Create the inputs to CTP for the TRD
+
+ // if inputs already created return
+ if (fInputs.GetEntriesFast() > 0)
+ return;
+
+ AliInfo("Creating TRD trigger inputs");
+ fInputs.AddLast(new AliTriggerInput("TRD_HIGHPT_L1", "TRD", 1));
+ fInputs.AddLast(new AliTriggerInput("TRD_JET_L1", "TRD", 1));
+}
+
+void AliTRDTrigger::Trigger()
+{
+ // TRD trigger steering
+ // currently the L1 trigger is directly put here
+ // lateron can be separated such that from here the
+ // pretrigger (generating an L0) and L1 can be called
+
+ AliRunLoader *runLoader = AliRunLoader::Instance();
+ if (!runLoader)
+ return;
+ AliLoader *trdLoader = runLoader->GetLoader("TRDLoader");
+ if (!trdLoader)
+ return;
+
+ // now running the GTU tracking;
+ AliTRDgtuSim *gtusim = new AliTRDgtuSim();
+ gtusim->RunGTU(trdLoader, 0x0);
+ gtusim->WriteTracksToLoader();
+
+ TTree *trackTree = trdLoader->GetDataLoader("gtutracks")->Tree();
+ if (!trackTree) {
+ AliDebug(1,"Did not find track tree");
+ return;
+ }
+ TBranch *branch = trackTree->GetBranch("TRDtrackGTU");
+ AliDebug(1,Form("TRD trigger: found %i tracks", trackTree->GetEntriesFast()));
+
+ // trigger thresholds should go elsewhere
+ Float_t ptThreshold1 = 2;
+ Float_t ptThreshold2 = 9.9;
+ Int_t trackThreshold1 = 6;
+ Int_t trackThreshold2 = 2;
+
+ // trigger algorithms to come, e.g.
+ Bool_t triggered_highpt = kFALSE;
+ Bool_t triggered_jet = kFALSE;
+
+ if (branch) {
+ AliTRDtrackGTU *trk = 0x0;
+ branch->SetAddress(&trk);
+
+ // high pt trigger
+ for (Int_t iTrack = 0; iTrack < trackTree->GetEntriesFast(); iTrack++) {
+ trackTree->GetEntry(iTrack);
+ if (TMath::Abs(trk->GetPt()) > 3.0) {
+ AliInfo(Form("Found track in sector %2i, stack %i with pt = %3.1f, triggered",
+ trk->GetSector(), trk->GetStack(), trk->GetPt()));
+ triggered_highpt = kTRUE;
+ }
+ }
+
+ // jet trigger
+ Int_t nTracks1[90]; // tracks above lower pt threshold
+ Int_t nTracks2[90]; // tracks above higher pt threshold
+ for (Int_t iTrack = 0; iTrack < trackTree->GetEntriesFast(); iTrack++) {
+ trackTree->GetEntry(iTrack);
+ if (TMath::Abs(trk->GetPt()) > ptThreshold1)
+ nTracks1[5*trk->GetSector() + trk->GetStack()]++;
+ if (TMath::Abs(trk->GetPt()) > ptThreshold2)
+ nTracks2[5*trk->GetSector() + trk->GetStack()]++;
+ }
+ for (Int_t iStack = 0; iStack < 90; iStack++) {
+ if ((nTracks1[iStack] >= trackThreshold1) || (nTracks2[iStack] >= trackThreshold2))
+ triggered_jet = kTRUE;
+ }
+ }
+ else {
+ AliWarning("GTU Branch not found");
+ }
+
+ if (triggered_highpt) {
+ AliInfo("Fired high-pt trigger");
+ SetInput("TRD_HIGHPT_L1");
+ }
+
+ if (triggered_jet) {
+ AliInfo("Fired jet trigger");
+ SetInput("TRD_JET_L1");
+ }
+
+ // cleaning up
+ delete gtusim;
+}
--- /dev/null
+#ifndef ALITRDTRIGGER_H
+#define ALITRDTRIGGER_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id: AliTRDTrigger.h 31443 2009-03-12 14:56:21Z cblume $ */
+
+////////////////////////////////////////////////////////////////////////////
+// //
+// TRD trigger interface class to CTP //
+// currently the Trigger() method calls the GTU tracking simulation and //
+// runs two example triggers, namely on a single high pt particle and //
+// on a jet. //
+// //
+////////////////////////////////////////////////////////////////////////////
+
+#include "AliTriggerDetector.h"
+
+class AliTRDTrigger : public AliTriggerDetector {
+
+ public:
+ AliTRDTrigger();
+ ~AliTRDTrigger();
+
+ virtual void CreateInputs();
+ virtual void Trigger();
+
+ private:
+
+ ClassDef(AliTRDTrigger, 1);
+
+};
+
+#endif
mcmfast->Init(det, rob, mcm);
mcmfast->SetData(digits, fDigitsManager);
mcmfast->Filter();
- if (feeParam->GetTracklet())
+ if (feeParam->GetTracklet()) {
mcmfast->Tracklet();
+ mcmfast->StoreTracklets();
+ }
mcmfast->ZSMapping();
mcmfast->WriteData(digits);
}
Float_t d = (1 + b * b /2 ) * (x2 - x1);
Float_t c1 = x1 * x2 / 2;
// Float_t c2 = (x1 + x2) / (x1 * x2);
- printf("c1: %f\n", c1);
+// printf("c1: %f\n", c1);
Float_t r = 0;
if ( (a >> 1) != 0)
r = (375. / 10000.) * c1 * 256 / (a >> 1);
#include "TClonesArray.h"
#include "AliTRDgtuSim.h"
+#include "AliTRDmcmTracklet.h"
#include "AliTRDgtuTMU.h"
#include "AliTRDtrackGTU.h"
#include "AliTRDtrackletWord.h"
fTMU = 0x0;
- AliInfo("--------- Reading from file ----------");
+ AliDebug(5,"--------- Reading from file ----------");
while (getline(input, str)) {
lineno++;
string = str;
- AliInfo(Form("Line %i : %s", lineno, string.Data()));
+ AliDebug(5,Form("Line %i : %s", lineno, string.Data()));
TObjArray *tokens = string.Tokenize(" ");
if (tokens->GetEntriesFast() < 7) {
fTMU->SetStack(iStackPrev);
fTMU->SetSector(iSecPrev);
fTMU->RunTMU(ListOfTracks);
- AliInfo(Form("--- There are %i tracks. Writing ...", ListOfTracks->GetEntries()));
+ AliDebug(1,Form("--- There are %i tracks. Writing ...", ListOfTracks->GetEntries()));
WriteTracksToTree(ListOfTracks);
fTMU->WriteTrackletsToTree(fTrackletTree);
WriteTracksToDataFile(ListOfTracks, iEventPrev);
if (ListOfTracks->GetEntries() > 0)
- AliInfo(Form(" %d GeV/c", ((AliTRDtrackGTU*) ListOfTracks->At(0))->GetPt() ));
+ AliDebug(2,Form(" %d GeV/c", ((AliTRDtrackGTU*) ListOfTracks->At(0))->GetPt() ));
delete fTMU;
fTMU = new AliTRDgtuTMU();
delete ListOfTracks;
sscanf(((TObjString*) tokens->At(i))->GetString().Data(), "%x", &trackletWord);
if (trackletWord == 0x10001000)
break;
- AliInfo(Form("%i. tracklet: %s -> 0x%08x", i-4, ((TObjString*) tokens->At(i))->GetString().Data(), trackletWord));
+ AliDebug(2,Form("%i. tracklet: %s -> 0x%08x", i-4, ((TObjString*) tokens->At(i))->GetString().Data(), trackletWord));
AliTRDtrackletWord *trkl = new AliTRDtrackletWord(trackletWord);
fTMU->AddTracklet(trkl, iLink);
}
Bool_t AliTRDgtuSim::LoadTracklets(AliLoader *loader)
{
- AliInfo("Loading tracklets ...");
+ AliDebug(1,"Loading tracklets ...");
if (!loader) {
AliError("No loader given!");
Int_t notrkl = 0;
UInt_t *leaves = new UInt_t[258];
- AliInfo(Form("No. of entries: %i", trklbranch->GetEntries()));
+ AliDebug(1,Form("No. of entries: %i", trklbranch->GetEntries()));
for (Int_t iEntry = 0; iEntry < trklbranch->GetEntries(); iEntry++) {
trklbranch->SetAddress(leaves);
new((*fTrackletArray)[notrkl]) AliTRDtrackletWord(leaves[2 + iTracklet], leaves[0] + leaves[1]);
notrkl++;
}
- AliInfo(Form("Entry: %3i: Det: %3i, side: %i, 1st tracklet: 0x%08x, no: %i", iEntry, leaves[0], leaves[1], leaves[2], notrkl));
+ AliDebug(2,Form("Entry: %3i: Det: %3i, side: %i, 1st tracklet: 0x%08x, no: %i", iEntry, leaves[0], leaves[1], leaves[2], notrkl));
}
return kTRUE;
FILE *out;
out = fopen("test.data", "a");
- AliInfo(Form("%i tracks found in event %i", ListOfTracks->GetSize(), event));
+ AliDebug(1,Form("%i tracks found in event %i", ListOfTracks->GetSize(), event));
fprintf(out, "0 %5i %2i %i 00000000\n", event, sm, stack);
for (Int_t i = 0; i < ListOfTracks->GetSize(); i++) {
AliTRDtrackGTU *trk = (AliTRDtrackGTU*) ListOfTracks->At(i);
Bool_t AliTRDgtuSim::WriteTracksToTree(TList *ListOfTracks, Int_t /*event*/)
{
- AliInfo(Form("Writing %i tracks to the tree...", ListOfTracks->GetEntries()));
+ AliDebug(1,Form("Writing %i tracks to the tree...", ListOfTracks->GetEntries()));
if (!ListOfTracks)
return kFALSE;
}
return kTRUE;
}
+
+Bool_t AliTRDgtuSim::WriteTracksToLoader()
+{
+ if (!fTrackTree) {
+ AliError("No track tree found!");
+ return kFALSE;
+ }
+
+ AliRunLoader *rl = AliRunLoader::Instance();
+ AliDataLoader *dl = 0x0;
+ if (rl)
+ dl = rl->GetLoader("TRDLoader")->GetDataLoader("gtutracks");
+ if (!dl) {
+ AliError("Could not get the GTU-track data loader!");
+ return kFALSE;
+ }
+
+ TTree *trackTree = dl->Tree();
+ if (!trackTree) {
+ dl->MakeTree();
+ trackTree = dl->Tree();
+ }
+
+ AliTRDtrackGTU *trk = 0x0;
+ TBranch *trkbranch = trackTree->GetBranch("TRDtrackGTU");
+ if (!trkbranch)
+ trkbranch = trackTree->Branch("TRDtrackGTU", "AliTRDtrackGTU", &trk, 32000);
+
+ TBranch *branch = fTrackTree->GetBranch("TRDgtuTrack");
+ if (!branch)
+ return kFALSE;
+
+ AliDebug(1,Form("Found %i tracks", branch->GetEntries()));
+
+ for (Int_t iTrack = 0; iTrack < branch->GetEntries(); iTrack++) {
+ branch->SetAddress(&trk);
+ branch->GetEntry(iTrack);
+ trkbranch->SetAddress(&trk);
+ trackTree->Fill();
+ }
+
+ dl->WriteData("OVERWRITE");
+
+ return kTRUE;
+}
Bool_t WriteTracksToDataFile(TList *ListOfTracks, Int_t event);
Bool_t WriteTreesToFile();
Bool_t WriteTracksToESD(TList *ListOfTracks, AliESDEvent *esd);
+ Bool_t WriteTracksToLoader();
protected:
AliRunLoader *fRunLoader; //!
}
// ----- Input units -----
- AliInfo("--------- Running Input units ----------");
+ AliDebug(1,"--------- Running Input units ----------");
for (Int_t layer = 0; layer < fGtuParam->GetNLayers(); layer++) {
if (!RunInputUnit(layer)) {
AliError(Form("Input unit in layer %i failed", layer));
}
// ----- Z-channel units -----
- AliInfo("--------- Running Z-channel units ----------");
+ AliDebug(1,"--------- Running Z-channel units ----------");
for (Int_t layer = 0; layer < fGtuParam->GetNLayers(); layer++) {
fZChannelTracklets[layer] = new TList[fGtuParam->GetNZChannels()];
if (!RunZChannelUnit(layer)) {
}
// ----- track finding -----
- AliInfo("--------- Running tracking units ----------");
+ AliDebug(1,"--------- Running tracking units ----------");
for (Int_t zch = 0; zch < fGtuParam->GetNZChannels(); zch++) {
- AliInfo(Form("Track finder for Zchannel: %i", zch));
+ AliDebug(2,Form("Track finder for Zchannel: %i", zch));
if (!RunTrackFinder(zch, ListOfTracks)) {
AliError(Form("Track Finder in z-channel %i failed", zch));
return kFALSE;
TIter next(fTracklets[layer]);
while (AliTRDtrackletGTU *trk = (AliTRDtrackletGTU*) next()) {
- printf("*TMU* Tracklet in stack %d, layer %2d: 0x%08x ", fStack, layer, trk->GetTrackletWord());
+// printf("*TMU* Tracklet in stack %d, layer %2d: 0x%08x ", fStack, layer, trk->GetTrackletWord());
for (Int_t zch = 0; zch < fGtuParam->GetNZChannels(); zch++) {
if (fGtuParam->IsInZChannel(fStack, layer, zch, trk->GetZbin()) ) {
trk->SetSubChannel(zch, fGtuParam->GetZSubchannel(fStack, layer, zch, trk->GetZbin()) );
- printf("Z%i(%i) ", zch, trk->GetSubChannel(zch));
+// printf("Z%i(%i) ", zch, trk->GetSubChannel(zch));
TIter nexttrkl(&fZChannelTracklets[layer][zch], kIterBackward);
AliTRDtrackletGTU *t = 0x0;
}
fZChannelTracklets[layer][zch].AddAfter(t, trk);
}
- else
- printf(" ");
+// else
+// printf(" ");
}
- printf("\n");
+// printf("\n");
}
return kTRUE;
}
for (Int_t refLayerIdx = 0; refLayerIdx < fGtuParam->GetNRefLayers(); refLayerIdx++) {
Int_t reflayer = fGtuParam->GetRefLayer(refLayerIdx);
- AliInfo(Form("~~~~~ Reflayer: %i", reflayer));
+ AliDebug(5,Form("~~~~~ Reflayer: %i", reflayer));
ready = kFALSE; // ready if all channels done
// ready = ready && bDone[layer];
if (reflayer == 1)
- AliInfo(Form("in layer: %i (zchannel = %i) there are: %i tracklets", layer, zch, notr[layer]));
+ AliDebug(5,Form("in layer: %i (zchannel = %i) there are: %i tracklets", layer, zch, notr[layer]));
}
if (ptrA[reflayer] < 0 && ptrB[reflayer] < 0)
if (0 <= ptrA[reflayer] && ptrA[reflayer] < notr[reflayer])
trkRA = (AliTRDtrackletGTU*) fZChannelTracklets[reflayer][zch].At(ptrA[reflayer]);
else {
- AliInfo(Form("No valid tracklet in the reference at ptr: %i! Aborting!", ptrA[reflayer]));
+ AliDebug(10,Form("No valid tracklet in the reference at ptr: %i! Aborting!", ptrA[reflayer]));
break;
}
if (0 <= ptrB[reflayer] && ptrB[reflayer] < notr[reflayer])
trkRB = (AliTRDtrackletGTU*) fZChannelTracklets[reflayer][zch].At(ptrB[reflayer]);
- AliInfo(Form("ptrRA: %i, ptrRB: %i", ptrA[reflayer], ptrB[reflayer]));
+ AliDebug(10,Form("ptrRA: %i, ptrRB: %i", ptrA[reflayer], ptrB[reflayer]));
Yplus = trkRA->GetYProj() + fGtuParam->GetDeltaY();
Yminus = trkRA->GetYProj() - fGtuParam->GetDeltaY();
Alphaplus = trkRA->GetAlpha() + fGtuParam->GetDeltaAlpha();
}
} // end of loop over layers
- AliInfo(Form("logic calculation finished, Nhits: %i", NHits));
+ AliDebug(5,Form("logic calculation finished, Nhits: %i", NHits));
if (NHits >= 4) {
// ----- track registration -----
- AliInfo("***** TMU: Track found *****");
+ AliDebug(1,"***** TMU: Track found *****");
AliTRDtrackGTU *track = new AliTRDtrackGTU();
track->SetSector(fSector);
track->SetStack(fStack);
for (Int_t layerIdx = refLayerIdx; layerIdx > 0; layerIdx--) {
if (track->IsTrackletInLayer(fGtuParam->GetRefLayer(layerIdx))) {
if ((track->GetTracklet(fGtuParam->GetRefLayer(layerIdx)))->GetSubChannel(zch) > 0) {
- AliInfo("Not registered");
+ AliDebug(1,"Not registered");
registerTrack = kFALSE;
}
}
AliError(Form("Invalid increment: %i at ptrA: %i, notr: %i", inc[layer], ptrA[layer], notr[layer]));
// AliInfo(Form("Shifting layer: %i, notr: %i, ptrA: %i, ptrB: %i, inc: %i", layer, notr[layer], ptrA[layer], ptrB[layer], inc[layer]));
- AliInfo(Form(" -- Layer: %i %i %i +%i %s (no: %i)", layer, ptrA[layer], ptrB[layer], inc[layer], bDone[layer] ? "done" : " ", notr[layer]));
+ AliDebug(10,Form(" -- Layer: %i %i %i +%i %s (no: %i)", layer, ptrA[layer], ptrB[layer], inc[layer], bDone[layer] ? "done" : " ", notr[layer]));
ptrA[layer] += inc[layer];
ptrB[layer] += inc[layer];
}
done = kFALSE;
}
}
-
+ if (!trkStage0)
+ break;
tracksRefMerged[zch]->Add(trkStage0);
fTracks[zch][minIdx].RemoveFirst();
} while (trkStage0 != 0);
}
}
-
+ if (!trkStage0)
+ break;
tracksZMergedStage0->Add(trkStage0);
tracksRefUnique[minIdx]->RemoveFirst();
} while (trkStage0 != 0);
}
}
+ if (!trkStage0)
+ break;
tracksZMergedStage1->Add(trkStage0);
tracksZSplitted[minIdx]->RemoveFirst();
} while (trkStage0 != 0);
Float_t x1;
Float_t x2;
- AliInfo(Form("There are %i tracklets in this track.", track->GetNTracklets()));
+ AliDebug(5,Form("There are %i tracklets in this track.", track->GetNTracklets()));
for (Int_t layer = 0; layer < fGtuParam->GetNLayers(); layer++) {
if (!track->IsTrackletInLayer(layer)) {
AliError(Form("Could not get tracklet in layer %i\n", layer));
continue;
}
- AliInfo(Form("trk yprime: %i", trk->GetYPrime()));
+ AliDebug(10,Form("trk yprime: %i", trk->GetYPrime()));
a += (((Int_t) (2048 * fGtuParam->GetAki(track->GetTrackletMask(), layer))) * trk->GetYPrime() + 1) >> 8;
b += fGtuParam->GetBki(track->GetTrackletMask(), layer) * trk->GetYPrime() * fGtuParam->GetBinWidthY();
c += fGtuParam->GetCki(track->GetTrackletMask(), layer) * trk->GetYPrime() * fGtuParam->GetBinWidthY();
a = a >> 2;
fGtuParam->GetIntersectionPoints(track->GetTrackletMask(), x1, x2);
- AliInfo(Form("Intersection points: %f, %f", x1, x2));
- AliInfo(Form("Sum: a = %5i, b = %9.2f, c = %9.2f\n", a, b, c));
+ AliDebug(10,Form("Intersection points: %f, %f", x1, x2));
+ AliDebug(10,Form("Sum: a = %5i, b = %9.2f, c = %9.2f\n", a, b, c));
track->SetFitParams(a, b, c);
Float_t r = fGtuParam->GetRadius(a, b, x1, x2);
pt -= 29;
pt /= 2;
track->SetPtInt(pt);
- AliInfo(Form("Track parameters: a = %i, b = %f, c = %f, x1 = %f, x2 = %f, r = %f, pt = %f (trkl mask: %i)", a, b, c, x1, x2, r, track->GetPt(), track->GetTrackletMask()));
+ AliDebug(5,Form("Track parameters: a = %i, b = %f, c = %f, x1 = %f, x2 = %f, r = %f, pt = %f (trkl mask: %i)", a, b, c, x1, x2, r, track->GetPt(), track->GetTrackletMask()));
return kTRUE;
}
branch = trklTree->Branch("gtutracklets", "AliTRDtrackletGTU", &trkl, 32000, 99);
}
- AliInfo(Form("---------- Writing tracklets to tree (not yet) ----------"));
+ AliDebug(5,Form("---------- Writing tracklets to tree (not yet) ----------"));
for (Int_t layer = 0; layer < fGtuParam->GetNLayers(); layer++) {
TIter next(fTracklets[layer]);
while ((trkl = (AliTRDtrackletGTU*) next())) {
- AliInfo(Form("InputUnit : GetIndex(): %3i, GetZbin(): %2i, GetY() : %5i, GetdY() : %3i, GetYPrime() : %5i, GetYProj() : %5i, GetAlpha() : %3i, Zidx(2..0): %i %i %i", trkl->GetIndex(), trkl->GetZbin(), trkl->GetYbin(), trkl->GetdY(), trkl->GetYPrime(), trkl->GetYProj(), trkl->GetAlpha(), trkl->GetSubChannel(2), trkl->GetSubChannel(1), trkl->GetSubChannel(0) ));
+ AliDebug(10,Form("InputUnit : GetIndex(): %3i, GetZbin(): %2i, GetY() : %5i, GetdY() : %3i, GetYPrime() : %5i, GetYProj() : %5i, GetAlpha() : %3i, Zidx(2..0): %i %i %i", trkl->GetIndex(), trkl->GetZbin(), trkl->GetYbin(), trkl->GetdY(), trkl->GetYPrime(), trkl->GetYProj(), trkl->GetAlpha(), trkl->GetSubChannel(2), trkl->GetSubChannel(1), trkl->GetSubChannel(0) ));
branch->SetAddress(&trkl);
trklTree->Fill();
}
printf("MCM %i on ROB %i in detector %i\n", fMcmPos, fRobPos, fDetector);
TString opt = option;
- if (opt.Contains("U")) {
+ if (opt.Contains("R")) {
printf("Raw ADC data (10 bit):\n");
for (Int_t iTimeBin = 0; iTimeBin < fNTimeBin; iTimeBin++) {
for (Int_t iChannel = 0; iChannel < fNADC; iChannel++) {
return;
TrackletSelection();
FitTracklet();
+}
+
+Bool_t AliTRDmcmSim::StoreTracklets()
+{
if (fTrackletArray->GetEntriesFast() == 0)
- return;
+ return kTRUE;
AliRunLoader *rl = AliRunLoader::Instance();
AliDataLoader *dl = 0x0;
dl = rl->GetLoader("TRDLoader")->GetDataLoader("tracklets");
if (!dl) {
AliError("Could not get the tracklets data loader!");
+ return kFALSE;
}
- else {
- TTree *trackletTree = dl->Tree();
- if (!trackletTree) {
- dl->MakeTree();
- trackletTree = dl->Tree();
- }
- AliTRDtrackletMCM *trkl = 0x0;
- TBranch *trkbranch = trackletTree->GetBranch("mcmtrklbranch");
- if (!trkbranch)
- trkbranch = trackletTree->Branch("mcmtrklbranch", "AliTRDtrackletMCM", &trkl, 32000);
-
- for (Int_t iTracklet = 0; iTracklet < fTrackletArray->GetEntriesFast(); iTracklet++) {
- trkl = ((AliTRDtrackletMCM*) (*fTrackletArray)[iTracklet]);
- trkbranch->SetAddress(&trkl);
+ TTree *trackletTree = dl->Tree();
+ if (!trackletTree) {
+ dl->MakeTree();
+ trackletTree = dl->Tree();
+ }
+
+ AliTRDtrackletMCM *trkl = 0x0;
+ TBranch *trkbranch = trackletTree->GetBranch("mcmtrklbranch");
+ if (!trkbranch)
+ trkbranch = trackletTree->Branch("mcmtrklbranch", "AliTRDtrackletMCM", &trkl, 32000);
+
+ for (Int_t iTracklet = 0; iTracklet < fTrackletArray->GetEntriesFast(); iTracklet++) {
+ trkl = ((AliTRDtrackletMCM*) (*fTrackletArray)[iTracklet]);
+ trkbranch->SetAddress(&trkl);
// printf("filling tracklet 0x%08x\n", trkl->GetTrackletWord());
- trkbranch->Fill();
- }
- dl->WriteData("OVERWRITE");
+ trkbranch->Fill();
}
+ dl->WriteData("OVERWRITE");
+
+ return kTRUE;
}
void AliTRDmcmSim::WriteData(AliTRDarrayADC *digits)
Bool_t LoadMCM(AliRunLoader* const runloader, Int_t det, Int_t rob, Int_t mcm);
void NoiseTest(Int_t nsamples, Int_t mean, Int_t sigma, Int_t inputGain = 1, Int_t inputTail = 2);
+ Int_t GetDataRaw(Int_t iadc, Int_t timebin) { return (fADCR[iadc][timebin] >> 2); } // Get unfiltered ADC data
+ Int_t GetDataFiltered(Int_t iadc, Int_t timebin) { return (fADCF[iadc][timebin] >> 2); } // Get filtered ADC data
void SetData(Int_t iadc, Int_t *adc); // Set ADC data with array
void SetData(Int_t iadc, Int_t it, Int_t adc ); // Set ADC data
void SetData(AliTRDarrayADC *adcArray,
static Bool_t GetApplyCut() { return fgApplyCut; }
void WriteData(AliTRDarrayADC *digits);
+ Bool_t StoreTracklets(); // Stores tracklets via runloader
Int_t ProduceRawStream( UInt_t *buf, Int_t bufsize, UInt_t iEv = 0 ); // Produce raw data stream - Read data format
Int_t ProduceTrackletStream( UInt_t *buf, Int_t bufsize ); // produce the tracklet stream for this MCM
#include "AliTRDtrackletGTU.h"
#include "AliTRDtrackletWord.h"
+#include "AliTRDmcmTracklet.h"
#include "AliTRDtrackletMCM.h"
#include "AliLog.h"
#include "AliTRDgtuParam.h"
fSubChannel[zch] = 0;
fTracklet = tracklet;
if ( fTracklet->IsA() == TClass::GetClass("AliTRDtrackletMCM")) {
- AliInfo(Form("label from mcm tracklet: %i", ((AliTRDtrackletMCM*) fTracklet)->GetLabel()));
+ AliDebug(5,Form("label from mcm tracklet: %i", ((AliTRDtrackletMCM*) fTracklet)->GetLabel()));
}
}
#pragma link C++ class AliTRD+;
#pragma link C++ class AliTRDv1+;
#pragma link C++ class AliTRDdigitizer+;
+#pragma link C++ class AliTRDTrigger+;
#pragma link C++ class AliTRDQADataMakerSim+;
#endif
AliTRD.cxx \
AliTRDv1.cxx \
AliTRDdigitizer.cxx \
+ AliTRDTrigger.cxx \
AliTRDQADataMakerSim.cxx
HDRS= $(SRCS:.cxx=.h)