Changeset 72 in svn for trunk/src/TriggerUtil.cc
- Timestamp:
- Dec 3, 2008, 12:01:04 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/TriggerUtil.cc
r63 r72 65 65 } 66 66 67 bool TriggerTable::GetGlobalResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig, 68 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig, 69 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig, ExRootTreeBranch *branchTrigger) { 70 71 TRootTrigger *elementTrigger; 72 GlobalResult=false; 73 for(unsigned int i=0; i < list_of_trigger_bits.size(); i++) { 74 if(list_of_trigger_bits[i].GetResult(branchElecTrig, branchMuonTrig, branchJetTrig, branchTauJetTrig, branchPhotonTrig, branchETmisTrig)) 75 { 76 GlobalResult=true; 77 int flag=i+1; 78 elementTrigger = (TRootTrigger*) branchTrigger->NewEntry(); 79 elementTrigger->Accepted=flag; 80 } 81 } 82 if(GlobalResult) 83 { 84 elementTrigger = (TRootTrigger*) branchTrigger->NewEntry(); 85 elementTrigger->Accepted=0; 86 } 87 return GlobalResult; 88 89 } 90 67 91 //************************************************************************* 68 69 92 TriggerBit::TriggerBit() { 70 has_been_evaluated=false; 93 } 94 95 bool TriggerBit::GetResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig, 96 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig, 97 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig) 98 { 99 int elec_size = ElecValues.size(); 100 int muon_size = MuonValues.size(); 101 int jet_size = JetValues.size(); 102 int taujet_size = TauJetValues.size(); 103 int gamma_size = GammaValues.size(); 104 int etmis_size = EtmisValues.size(); 105 106 Result=false; 107 if( 108 (branchElecTrig->GetEntries() >= elec_size ) 109 && (branchMuonTrig->GetEntries() >= muon_size ) 110 && (branchJetTrig->GetEntries() >= jet_size ) 111 && (branchTauJetTrig->GetEntries() >= taujet_size ) 112 && (branchPhotonTrig->GetEntries() >= gamma_size ) 113 ) 114 { 115 Result=true; 116 if(elec_size!=0){ 117 TRootElectron *electron; 118 for(int i=0;i<elec_size;i++){ 119 electron = (TRootElectron*)branchElecTrig->At(i); 120 if(electron->PT < ElecValues[i])Result=false;}} 121 122 if(muon_size!=0){ 123 TRootMuon *muon; 124 for(int i=0;i<muon_size;i++){ 125 muon = (TRootMuon*)branchMuonTrig->At(i); 126 if(muon->PT < MuonValues[i])Result=false;}} 127 128 if(jet_size!=0){ 129 TRootJet *jet; 130 for(int i=0;i<jet_size;i++){ 131 jet = (TRootJet*)branchJetTrig->At(i); 132 if(jet->PT < JetValues[i])Result=false;}} 133 134 if(taujet_size!=0){ 135 TRootTauJet *taujet; 136 for(int i=0;i<taujet_size;i++){ 137 taujet = (TRootTauJet*)branchTauJetTrig->At(i); 138 if(taujet->PT < TauJetValues[i])Result=false;}} 139 140 if(gamma_size!=0){ 141 TRootPhoton *gamma; 142 for(int i=0;i<gamma_size;i++){ 143 gamma = (TRootPhoton*)branchPhotonTrig->At(i); 144 if(gamma->PT < GammaValues[i])Result=false;}} 145 146 147 if(etmis_size!=0){ 148 TRootETmis *etmis = (TRootETmis*)branchETmisTrig->At(0); 149 if(etmis->ET < EtmisValues[0])Result=false;} 150 151 } 152 return Result; 71 153 } 72 154
Note:
See TracChangeset
for help on using the changeset viewer.