2 // Test Macro, shows how to execute the Trigger, and prints the results.
3 // Author: Gustavo Conesa
5 void TestPHOSTrigger(){
10 // cout<<"TestPHOSTrigger: Creating Run Loader ..."<<endl;
11 // rl = AliRunLoader::Open("galice.root",
12 // AliConfig::GetDefaultEventFolderName(),
16 // gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
20 // AliPHOSLoader *emcalLoader = dynamic_cast<AliPHOSLoader*>
21 // (rl->GetDetectorLoader("PHOS"));
24 // rl->LoadDigits("PHOS");
26 AliPHOSGetter * gime = AliPHOSGetter::Instance("./galice.root");
27 //Get Maximum number of events
28 Int_t maxevent = gime->MaxEvent();
29 //Int_t maxevent = rl->GetNumberOfEvents();
30 cout<<"n events "<<maxevent<<endl;
35 for(Int_t iEvent = 0; iEvent < maxevent ; iEvent++){
36 // rl->GetEvent(iEvent);
37 gime->Event(iEvent,"D"); //Only Digits
38 cout<<">>>>>>>>>>> Event >>> "<<iEvent<<endl;
39 AliPHOSTrigger *tr = new AliPHOSTrigger();
40 //Create trigger pointer and set thresholds if you want
41 //Default threshold values need to be fixed
42 // tr->SetL0Threshold(10000);
43 // tr->SetL1JetLowPtThreshold(10000);
44 // tr->SetL1JetHighPtThreshold(10000);
45 tr->SetPatchSize(1);//0 means 2x2, 1->4x4, 2->8x8, 3->16x16 ...
46 //Select trigger for each event
47 tr->Trigger();//Do the trigger algorithm
48 //cout<<"Patch "<<tr->GetPatchSize()<<endl;
49 cout<<"Trigger patch "<< tr->GetPatchSize()
50 <<" 2x2 maximum amplitude sum "<<tr->Get2x2MaxAmplitude()
51 <<" nxn max amp sum "<<tr->GetnxnMaxAmplitude()<<endl;
52 //tr->Print("");//Print results.