Trigger handling inside UserExec():

I want to select some trigger classes on my own (ie. without using *PhysicsSelection).

ULong64_t iTrigger = 0; 
TString sTrigger = ""; 
TString MyTrigger1 = "CINT7-B-NOPF-CENTNOTRD"; 
TString MyTrigger2 = "CEMC7-B-NOPF-V0EMCAL"; 
if (fEsdEv)   sTrigger = fEsdEv->GetFiredTriggerClasses(); 
else if (fAodEv) sTrigger = fAodEv->GetFiredTriggerClasses(); 
Int_t isMyTrigger = 0; 
if(sTrigger.Contains(MyTrigger1)==1 || sTrigger.Contains(MyTrigger2)==1){ 
//cout << sTrigger.Data() << endl; 
isMyTrigger=1; 
} 
if(isMyTrigger==0) 
return; 
if (fEsdEv)   iTrigger = fEsdEv->GetHeader()->GetL0TriggerInputs(); 
else if (fAodEv) iTrigger = fAodEv->GetHeader()->GetL0TriggerInputs(); 
char saythis[500]; 
ULong64_t iTriggerBin = 0; 
for(ULong64_t j=0; j<TriggerList.size(); j++){ 
if(iTrigger==TriggerList[j]) 
iTriggerBin=j+1; 
} 
if(iTriggerBin==0){ 
TriggerList.push_back(iTrigger); 
iTriggerBin=TriggerList.size(); 
} 
h1_trigger->SetBinContent(iTriggerBin, h1_trigger->GetBinContent(iTriggerBin)+1); 
sprintf(saythis,"%d",iTrigger); 
h1_trigger->GetXaxis()->SetBinLabel(iTriggerBin, saythis);

-- JasonKamin - 25 Jul 2014

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2014-07-25 - JasonKamin
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback