#include <L1Trigger/DTTrigger/interface/DTTrigTest.h>
Public Member Functions | |
void | analyze (const edm::Event &iEvent, const edm::EventSetup &iEventSetup) |
Analyze function executed on all the events. | |
void | beginJob (const edm::EventSetup &iEventSetup) |
Create tree and Branches. | |
void | beginRun (const edm::Run &iRun, const edm::EventSetup &iEventSetup) |
Create DTTrig instance and TUs. | |
DTTrigTest (const edm::ParameterSet &pset) | |
Constructor. | |
void | endJob () |
Close Tree and write File. | |
~DTTrigTest () | |
Destructor. | |
Private Attributes | |
int | bbx [100] |
int | bcod [100] |
float | bdirx [100] |
float | bdiry [100] |
float | bdirz [100] |
int | bk [100] |
int | bnum [100] |
float | bposx [100] |
float | bposy [100] |
float | bposz [100] |
int | bsect [100] |
int | bsl [100] |
int | bstat [100] |
int | bwh [100] |
int | bx [100] |
int | chagen [10] |
float | etagen [10] |
int | eventn |
bool | my_debug |
edm::ParameterSet | my_params |
TFile * | my_rootfile |
TTree * | my_tree |
DTTrig * | my_trig |
int | nbti |
int | ngen |
int | nscphi |
int | nsctheta |
int | ntraco |
int | ntsphi |
int | ntstheta |
float | phigen [10] |
float | ptgen [10] |
float | pxgen [10] |
float | pygen [10] |
float | pzgen [10] |
int | runn |
int | sbx [40] |
int | scod [40] |
int | scphbx [40] |
int | scphcod [40] |
float | scphdirx [100] |
float | scphdiry [100] |
float | scphdirz [100] |
int | scphphi [40] |
int | scphphib [40] |
float | scphposx [100] |
float | scphposy [100] |
float | scphposz [100] |
int | scphsect [40] |
int | scphstat [40] |
int | scphwh [40] |
int | scthbx [40] |
int | scthcode [40][7] |
int | scthpos [40][7] |
int | scthqual [40][7] |
int | scthsect [40] |
int | scthstat [40] |
int | scthwh [40] |
float | sdirx [100] |
float | sdiry [100] |
float | sdirz [100] |
int | sphi [40] |
int | sphib [40] |
float | sposx [100] |
float | sposy [100] |
float | sposz [100] |
int | ssect [40] |
int | sstat [40] |
int | swh [40] |
int | tbx [80] |
int | tcod [80] |
float | tdirx [100] |
float | tdiry [100] |
float | tdirz [100] |
int | thbx [40] |
int | thcode [40][7] |
int | thpos [40][7] |
int | thqual [40][7] |
int | thsect [40] |
int | thstat [40] |
int | thwh [40] |
int | tk [80] |
int | tnum [80] |
float | tposx [100] |
float | tposy [100] |
float | tposz [100] |
int | tsect [80] |
int | tstat [80] |
int | twh [80] |
int | tx [80] |
float | vxgen [10] |
float | vygen [10] |
float | vzgen [10] |
float | weight |
Static Private Attributes | |
static const double | my_TtoTDC = 32./25. |
Definition at line 34 of file DTTrigTest.h.
DTTrigTest::DTTrigTest | ( | const edm::ParameterSet & | pset | ) |
Constructor.
Definition at line 53 of file DTTrigTest.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), edm::ParameterSet::getUntrackedParameter(), my_debug, my_params, my_rootfile, and my_tree.
00053 : my_trig(0) { 00054 00055 my_debug= pset.getUntrackedParameter<bool>("debug"); 00056 string outputfile = pset.getUntrackedParameter<string>("outputFileName"); 00057 if (my_debug) 00058 cout << "[DTTrigTest] Creating rootfile " << outputfile <<endl; 00059 my_rootfile = new TFile(outputfile.c_str(),"RECREATE"); 00060 my_tree = new TTree("h1","GMT",0); 00061 my_params = pset; 00062 if (my_debug) cout << "[DTTrigTest] Constructor executed!!!" << endl; 00063 00064 00065 }
DTTrigTest::~DTTrigTest | ( | ) |
Destructor.
Definition at line 67 of file DTTrigTest.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), my_debug, my_rootfile, and my_trig.
00067 { 00068 00069 if (my_trig != 0) delete my_trig; 00070 delete my_rootfile; 00071 if (my_debug) 00072 cout << "[DTTrigTest] Destructor executed!!!" << endl; 00073 00074 }
void DTTrigTest::analyze | ( | const edm::Event & | iEvent, | |
const edm::EventSetup & | iEventSetup | |||
) | [virtual] |
Analyze function executed on all the events.
Implements edm::EDAnalyzer.
Definition at line 216 of file DTTrigTest.cc.
References funct::abs(), bbx, bcod, bdirx, bdiry, bdirz, bk, bnum, bposx, bposy, bposz, bsect, bsl, bstat, DTTrig::BtiTrigs(), bwh, bx, chagen, DTTrig::CMSDirection(), DTTrig::CMSPosition(), GenMuonPlsPt100GeV_cfg::cout, dir, lat::endl(), eta, etagen, edm::EventID::event(), eventn, edm::Event::getByLabel(), i, edm::Event::id(), my_debug, my_tree, my_trig, nbti, ngen, nscphi, nsctheta, ntraco, ntsphi, ntstheta, phi, phigen, ptgen, pxgen, pygen, pzgen, edm::EventID::run(), runn, sbx, scod, scphbx, scphcod, scphdirx, scphdiry, scphdirz, scphphi, scphphib, scphposx, scphposy, scphposz, scphsect, scphstat, DTTrig::SCPhTrigs(), scphwh, scthbx, scthcode, scthpos, scthqual, scthsect, scthstat, DTTrig::SCThTrigs(), scthwh, sdirx, sdiry, sdirz, seg, sphi, sphib, sposx, sposy, sposz, ssect, sstat, swh, tbx, tcod, tdirx, tdiry, tdirz, thbx, thcode, thpos, thqual, thsect, thstat, thwh, tk, tnum, tposx, tposy, tposz, DTTrig::TracoTrigs(), DTTrig::triggerReco(), tsect, DTTrig::TSPhTrigs(), tstat, DTTrig::TSThTrigs(), twh, tx, vxgen, vygen, vzgen, weight, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
00216 { 00217 00218 const int MAXGEN = 10; 00219 const float ptcut = 1.0; 00220 const float etacut = 2.4; 00221 my_trig->triggerReco(iEvent,iEventSetup); 00222 if (my_debug) 00223 cout << "[DTTrigTest] Trigger algorithm executed for run " << iEvent.id().run() 00224 <<" event " << iEvent.id().event() << endl; 00225 00226 // GENERAL Block 00227 runn = iEvent.id().run(); 00228 eventn = iEvent.id().event(); 00229 weight = 1; // FIXME what to do with this varable? 00230 00231 // GEANT Block 00232 Handle<vector<SimTrack> > MyTracks; 00233 Handle<vector<SimVertex> > MyVertexes; 00234 iEvent.getByLabel("g4SimHits",MyTracks); 00235 iEvent.getByLabel("g4SimHits",MyVertexes); 00236 vector<SimTrack>::const_iterator itrack; 00237 ngen=0; 00238 if (my_debug) 00239 cout << "[DTTrigTest] Tracks found in the detector (not only muons) " << MyTracks->size() <<endl; 00240 00241 for (itrack=MyTracks->begin(); itrack!=MyTracks->end(); itrack++){ 00242 if ( abs(itrack->type())==13){ 00243 math::XYZTLorentzVectorD momentum = itrack->momentum(); 00244 float pt = momentum.Pt(); 00245 float eta = momentum.eta(); 00246 if ( pt>ptcut && fabs(eta)<etacut ){ 00247 float phi = momentum.phi(); 00248 int charge = static_cast<int> (-itrack->type()/13); //static_cast<int> (itrack->charge()); 00249 if ( phi<0 ) phi = 2*M_PI + phi; 00250 int vtxindex = itrack->vertIndex(); 00251 float gvx=0,gvy=0,gvz=0; 00252 if (vtxindex >-1){ 00253 gvx=MyVertexes->at(vtxindex).position().x(); 00254 gvy=MyVertexes->at(vtxindex).position().y(); 00255 gvz=MyVertexes->at(vtxindex).position().z(); 00256 } 00257 if ( ngen < MAXGEN ) { 00258 pxgen[ngen]=momentum.x(); 00259 pygen[ngen]=momentum.y(); 00260 pzgen[ngen]=momentum.z(); 00261 ptgen[ngen]=pt; 00262 etagen[ngen]=eta; 00263 phigen[ngen]=phi; 00264 chagen[ngen]=charge; 00265 vxgen[ngen]=gvx; 00266 vygen[ngen]=gvy; 00267 vzgen[ngen]=gvz; 00268 ngen++; 00269 } 00270 } 00271 } 00272 } 00273 00274 // L1 Local Trigger Block 00275 // BTI 00276 vector<DTBtiTrigData> btitrigs = my_trig->BtiTrigs(); 00277 vector<DTBtiTrigData>::const_iterator pbti; 00278 int ibti = 0; 00279 if (my_debug) 00280 cout << "[DTTrigTest] " << btitrigs.size() << " BTI triggers found" << endl; 00281 00282 for ( pbti = btitrigs.begin(); pbti != btitrigs.end(); pbti++ ) { 00283 if ( ibti < 100 ) { 00284 bwh[ibti]=pbti->wheel(); 00285 bstat[ibti]=pbti->station(); 00286 bsect[ibti]=pbti->sector(); 00287 bsl[ibti]=pbti->btiSL(); 00288 bnum[ibti]=pbti->btiNumber(); 00289 bbx[ibti]=pbti->step(); 00290 bcod[ibti]=pbti->code(); 00291 bk[ibti]=pbti->K(); 00292 bx[ibti]=pbti->X(); 00293 GlobalPoint pos = my_trig->CMSPosition(&(*pbti)); 00294 GlobalVector dir = my_trig->CMSDirection(&(*pbti)); 00295 bposx[ibti] = pos.x(); 00296 bposy[ibti] = pos.y(); 00297 bposz[ibti] = pos.z(); 00298 bdirx[ibti] = dir.x(); 00299 bdiry[ibti] = dir.y(); 00300 bdirz[ibti] = dir.z(); 00301 ibti++; 00302 } 00303 } 00304 nbti = ibti; 00305 00306 //TRACO 00307 vector<DTTracoTrigData> tracotrigs = my_trig->TracoTrigs(); 00308 vector<DTTracoTrigData>::const_iterator ptc; 00309 int itraco = 0; 00310 if (my_debug) 00311 cout << "[DTTrigTest] " << tracotrigs.size() << " TRACO triggers found" << endl; 00312 00313 for (ptc=tracotrigs.begin(); ptc!=tracotrigs.end(); ptc++) { 00314 if (itraco<80) { 00315 twh[itraco]=ptc->wheel(); 00316 tstat[itraco]=ptc->station(); 00317 tsect[itraco]=ptc->sector(); 00318 tnum[itraco]=ptc->tracoNumber(); 00319 tbx[itraco]=ptc->step(); 00320 tcod[itraco]=ptc->code(); 00321 tk[itraco]=ptc->K(); 00322 tx[itraco]=ptc->X(); 00323 GlobalPoint pos = my_trig->CMSPosition(&(*ptc)); 00324 GlobalVector dir = my_trig->CMSDirection(&(*ptc)); 00325 tposx[itraco] = pos.x(); 00326 tposy[itraco] = pos.y(); 00327 tposz[itraco] = pos.z(); 00328 tdirx[itraco] = dir.x(); 00329 tdiry[itraco] = dir.y(); 00330 tdirz[itraco] = dir.z(); 00331 itraco++; 00332 } 00333 } 00334 ntraco = itraco; 00335 00336 //TSPHI 00337 vector<DTChambPhSegm> tsphtrigs = my_trig->TSPhTrigs(); 00338 vector<DTChambPhSegm>::const_iterator ptsph; 00339 int itsphi = 0; 00340 if (my_debug ) 00341 cout << "[DTTrigTest] " << tsphtrigs.size() << " TSPhi triggers found" << endl; 00342 00343 for (ptsph=tsphtrigs.begin(); ptsph!=tsphtrigs.end(); ptsph++) { 00344 if (itsphi<40 ) { 00345 swh[itsphi] = ptsph->wheel(); 00346 sstat[itsphi] = ptsph->station(); 00347 ssect[itsphi] = ptsph->sector(); 00348 sbx[itsphi] = ptsph->step(); 00349 scod[itsphi] = ptsph->oldCode(); 00350 sphi[itsphi] = ptsph->phi(); 00351 sphib[itsphi] = ptsph->phiB(); 00352 GlobalPoint pos = my_trig->CMSPosition(&(*ptsph)); 00353 GlobalVector dir = my_trig->CMSDirection(&(*ptsph)); 00354 sposx[itsphi] = pos.x(); 00355 sposy[itsphi] = pos.y(); 00356 sposz[itsphi] = pos.z(); 00357 sdirx[itsphi] = dir.x(); 00358 sdiry[itsphi] = dir.y(); 00359 sdirz[itsphi] = dir.z(); 00360 itsphi++; 00361 } 00362 } 00363 ntsphi = itsphi; 00364 00365 //TSTHETA 00366 vector<DTChambThSegm> tsthtrigs = my_trig->TSThTrigs(); 00367 vector<DTChambThSegm>::const_iterator ptsth; 00368 int itstheta = 0; 00369 if (my_debug) 00370 cout << "[DTTrigTest] " << tsthtrigs.size() << " TSTheta triggers found" << endl; 00371 00372 for (ptsth=tsthtrigs.begin(); ptsth!=tsthtrigs.end(); ptsth++) { 00373 if (itstheta<40 ) { 00374 thwh[itstheta] = ptsth->ChamberId().wheel(); 00375 thstat[itstheta] = ptsth->ChamberId().station(); 00376 thsect[itstheta] = ptsth->ChamberId().sector(); 00377 thbx[itstheta] = ptsth->step(); 00378 for(int i=0;i<7;i++) { 00379 thcode[itstheta][i] = ptsth->code(i); 00380 thpos[itstheta][i] = ptsth->position(i); 00381 thqual[itstheta][i] = ptsth->quality(i); 00382 } 00383 itstheta++; 00384 } 00385 } 00386 ntstheta = itstheta; 00387 00388 //SCPHI 00389 vector<DTSectCollPhSegm> scphtrigs = my_trig->SCPhTrigs(); 00390 vector<DTSectCollPhSegm>::const_iterator pscph; 00391 int iscphi = 0; 00392 if (my_debug ) 00393 cout << "[DTTrigTest] " << scphtrigs.size() << " SectCollPhi triggers found" << endl; 00394 00395 for (pscph=scphtrigs.begin(); pscph!=scphtrigs.end(); pscph++) { 00396 if (iscphi<40 ) { 00397 const DTChambPhSegm *seg = (*pscph).tsPhiTrig(); 00398 scphwh[iscphi] = pscph->wheel(); 00399 scphstat[iscphi] = pscph->station(); 00400 scphsect[iscphi] = pscph->sector(); 00401 scphbx[iscphi] = pscph->step(); 00402 scphcod[iscphi] = pscph->oldCode(); 00403 scphphi[iscphi] = pscph->phi(); 00404 scphphib[iscphi] = pscph->phiB(); 00405 GlobalPoint pos = my_trig->CMSPosition(seg); 00406 GlobalVector dir = my_trig->CMSDirection(seg); 00407 scphposx[iscphi] = pos.x(); 00408 scphposy[iscphi] = pos.y(); 00409 scphposz[iscphi] = pos.z(); 00410 scphdirx[iscphi] = dir.x(); 00411 scphdiry[iscphi] = dir.y(); 00412 scphdirz[iscphi] = dir.z(); 00413 iscphi++; 00414 } 00415 } 00416 nscphi = iscphi; 00417 00418 //SCTHETA 00419 vector<DTSectCollThSegm> scthtrigs = my_trig->SCThTrigs(); 00420 vector<DTSectCollThSegm>::const_iterator pscth; 00421 int isctheta = 0; 00422 if (my_debug) 00423 cout << "[DTTrigTest] " << scthtrigs.size() << " SectCollTheta triggers found" << endl; 00424 00425 for (pscth=scthtrigs.begin(); pscth!=scthtrigs.end(); pscth++) { 00426 if (isctheta<40 ) { 00427 scthwh[isctheta] = pscth->ChamberId().wheel(); 00428 scthstat[isctheta] = pscth->ChamberId().station(); 00429 scthsect[isctheta] = pscth->ChamberId().sector(); 00430 scthbx[isctheta] = pscth->step(); 00431 for(int i=0;i<7;i++) { 00432 scthcode[isctheta][i] = pscth->code(i); 00433 scthpos[isctheta][i] = pscth->position(i); 00434 scthqual[isctheta][i] = pscth->quality(i); 00435 } 00436 isctheta++; 00437 } 00438 } 00439 nsctheta = isctheta; 00440 00441 //Fill the tree 00442 my_tree->Fill(); 00443 00444 }
void DTTrigTest::beginJob | ( | const edm::EventSetup & | iEventSetup | ) | [virtual] |
Create tree and Branches.
Reimplemented from edm::EDAnalyzer.
Definition at line 86 of file DTTrigTest.cc.
References bbx, bcod, bdirx, bdiry, bdirz, bk, bnum, bposx, bposy, bposz, bsect, bsl, bstat, bwh, bx, chagen, etagen, eventn, my_tree, nbti, ngen, nscphi, nsctheta, ntraco, ntsphi, ntstheta, phigen, ptgen, pxgen, pygen, pzgen, runn, sbx, scod, scphbx, scphcod, scphdirx, scphdiry, scphdirz, scphphi, scphphib, scphposx, scphposy, scphposz, scphsect, scphstat, scphwh, scthbx, scthcode, scthpos, scthqual, scthsect, scthstat, scthwh, sdirx, sdiry, sdirz, sphi, sphib, sposx, sposy, sposz, ssect, sstat, swh, tbx, tcod, tdirx, tdiry, tdirz, thbx, thcode, thpos, thqual, thsect, thstat, thwh, tk, tnum, tposx, tposy, tposz, tsect, tstat, twh, tx, vxgen, vygen, vzgen, and weight.
00086 { 00087 00088 // get DTConfigManager 00089 // ESHandle< DTConfigManager > confManager ; 00090 // iEventSetup.get< DTConfigManagerRcd >().get( confManager ) ; 00091 00092 //for testing purpose.... 00093 //DTBtiId btiid(1,1,1,1,1); 00094 //confManager->getDTConfigBti(btiid)->print(); 00095 00096 // my_trig = new DTTrig(my_params); 00097 00098 // my_trig->createTUs(iEventSetup); 00099 // if (my_debug) 00100 // cout << "[DTTrigTest] TU's Created" << endl; 00101 00102 // BOOKING of the tree's varables 00103 // GENERAL block branches 00104 my_tree->Branch("Run",&runn,"Run/I"); 00105 my_tree->Branch("Event",&eventn,"Event/I"); 00106 my_tree->Branch("Weight",&weight,"Weight/F"); 00107 // GEANT block branches 00108 my_tree->Branch("Ngen",&ngen,"Ngen/I"); 00109 my_tree->Branch("Pxgen",pxgen,"Pxgen[Ngen]/F"); 00110 my_tree->Branch("Pygen",pygen,"Pygen[Ngen]/F"); 00111 my_tree->Branch("Pzgen",pzgen,"Pzgen[Ngen]/F"); 00112 my_tree->Branch("Ptgen",ptgen,"Ptgen[Ngen]/F"); 00113 my_tree->Branch("Etagen",etagen,"Etagen[Ngen]/F"); 00114 my_tree->Branch("Phigen",phigen,"Phigen[Ngen]/F"); 00115 my_tree->Branch("Chagen",chagen,"Chagen[Ngen]/I"); 00116 my_tree->Branch("Vxgen",vxgen,"Vxgen[Ngen]/F"); 00117 my_tree->Branch("Vygen",vygen,"Vygen[Ngen]/F"); 00118 my_tree->Branch("Vzgen",vzgen,"Vzgen[Ngen]/F"); 00119 // L1MuDTBtiChipS block 00120 my_tree->Branch("Nbti",&nbti,"Nbti/I"); 00121 my_tree->Branch("bwh",bwh,"bwh[Nbti]/I"); 00122 my_tree->Branch("bstat",bstat,"bstat[Nbti]/I"); 00123 my_tree->Branch("bsect",bsect,"bsect[Nbti]/I"); 00124 my_tree->Branch("bsl",bsl,"bsl[Nbti]/I"); 00125 my_tree->Branch("bnum",bnum,"bnum[Nbti]/I"); 00126 my_tree->Branch("bbx",bbx,"bbx[Nbti]/I"); 00127 my_tree->Branch("bcod",bcod,"bcod[Nbti]/I"); 00128 my_tree->Branch("bk",bk,"bk[Nbti]/I"); 00129 my_tree->Branch("bx",bx,"bx[Nbti]/I"); 00130 my_tree->Branch("bposx",bposx,"bposx[Nbti]/F"); 00131 my_tree->Branch("bposy",bposy,"bposy[Nbti]/F"); 00132 my_tree->Branch("bposz",bposz,"bposz[Nbti]/F"); 00133 my_tree->Branch("bdirx",bdirx,"bdirx[Nbti]/F"); 00134 my_tree->Branch("bdiry",bdiry,"bdiry[Nbti]/F"); 00135 my_tree->Branch("bdirz",bdirz,"bdirz[Nbti]/F"); 00136 // L1MuDTTracoChipS block 00137 my_tree->Branch("Ntraco",&ntraco,"Ntraco/I"); 00138 my_tree->Branch("twh",twh,"twh[Ntraco]/I"); 00139 my_tree->Branch("tstat",tstat,"tstat[Ntraco]/I"); 00140 my_tree->Branch("tsect",tsect,"tsect[Ntraco]/I"); 00141 my_tree->Branch("tnum",tnum,"tnum[Ntraco]/I"); 00142 my_tree->Branch("tbx",tbx,"tbx[Ntraco]/I"); 00143 my_tree->Branch("tcod",tcod,"tcod[Ntraco]/I"); 00144 my_tree->Branch("tk",tk,"tk[Ntraco]/I"); 00145 my_tree->Branch("tx",tx,"tx[Ntraco]/I"); 00146 my_tree->Branch("tposx",tposx,"tposx[Ntraco]/F"); 00147 my_tree->Branch("tposy",tposy,"tposy[Ntraco]/F"); 00148 my_tree->Branch("tposz",tposz,"tposz[Ntraco]/F"); 00149 my_tree->Branch("tdirx",tdirx,"tdirx[Ntraco]/F"); 00150 my_tree->Branch("tdiry",tdiry,"tdiry[Ntraco]/F"); 00151 my_tree->Branch("tdirz",tdirz,"tdirz[Ntraco]/F"); 00152 // TSPHI block 00153 my_tree->Branch("Ntsphi",&ntsphi,"Ntsphi/I"); 00154 my_tree->Branch("swh",swh,"swh[Ntsphi]/I"); 00155 my_tree->Branch("sstat",sstat,"sstat[Ntsphi]/I"); 00156 my_tree->Branch("ssect",ssect,"ssect[Ntsphi]/I"); 00157 my_tree->Branch("sbx",sbx,"sbx[Ntsphi]/I"); 00158 my_tree->Branch("scod",scod,"scod[Ntsphi]/I"); 00159 my_tree->Branch("sphi",sphi,"sphi[Ntsphi]/I"); 00160 my_tree->Branch("sphib",sphib,"sphib[Ntsphi]/I"); 00161 my_tree->Branch("sposx",sposx,"sposx[Ntsphi]/F"); 00162 my_tree->Branch("sposy",sposy,"sposy[Ntsphi]/F"); 00163 my_tree->Branch("sposz",sposz,"sposz[Ntsphi]/F"); 00164 my_tree->Branch("sdirx",sdirx,"sdirx[Ntsphi]/F"); 00165 my_tree->Branch("sdiry",sdiry,"sdiry[Ntsphi]/F"); 00166 my_tree->Branch("sdirz",sdirz,"sdirz[Ntsphi]/F"); 00167 // TSTHETA block 00168 my_tree->Branch("Ntstheta",&ntstheta,"Ntstheta/I"); 00169 my_tree->Branch("thwh",thwh,"thwh[Ntstheta]/I"); 00170 my_tree->Branch("thstat",thstat,"thstat[Ntstheta]/I"); 00171 my_tree->Branch("thsect",thsect,"thsect[Ntstheta]/I"); 00172 my_tree->Branch("thbx",thbx,"thbx[Ntstheta]/I"); 00173 my_tree->Branch("thcode",thcode,"thcode[Ntstheta][7]/I"); 00174 my_tree->Branch("thpos",thpos,"thpos[Ntstheta][7]/I"); 00175 my_tree->Branch("thqual",thqual,"thqual[Ntstheta][7]/I"); 00176 // SC PHI block 00177 my_tree->Branch("Nscphi",&nscphi,"Nscphi/I"); 00178 my_tree->Branch("scphwh",scphwh,"scphwh[Nscphi]/I"); 00179 my_tree->Branch("scphstat",scphstat,"scphstat[Nscphi]/I"); 00180 my_tree->Branch("scphsect",scphsect,"scphsect[Nscphi]/I"); 00181 my_tree->Branch("scphbx",scphbx,"scphbx[Nscphi]/I"); 00182 my_tree->Branch("scphcod",scphcod,"scphcod[Nscphi]/I"); 00183 my_tree->Branch("scphphi",scphphi,"scphphi[Nscphi]/I"); 00184 my_tree->Branch("scphphib",scphphib,"scphphib[Nscphi]/I"); 00185 my_tree->Branch("scphposx",scphposx,"scphposx[Nscphi]/F"); 00186 my_tree->Branch("scphposy",scphposy,"scphposy[Nscphi]/F"); 00187 my_tree->Branch("scphposz",scphposz,"scphposz[Nscphi]/F"); 00188 my_tree->Branch("scphdirx",scphdirx,"scphdirx[Nscphi]/F"); 00189 my_tree->Branch("scphdiry",scphdiry,"scphdiry[Nscphi]/F"); 00190 my_tree->Branch("scphdirz",scphdirz,"scphdirz[Nscphi]/F"); 00191 // SC THETA block 00192 my_tree->Branch("Nsctheta",&nsctheta,"Nsctheta/I"); 00193 my_tree->Branch("scthwh",scthwh,"scthwh[Nsctheta]/I"); 00194 my_tree->Branch("scthstat",scthstat,"scthstat[Nsctheta]/I"); 00195 my_tree->Branch("scthsect",scthsect,"scthsect[Nsctheta]/I"); 00196 my_tree->Branch("scthbx",scthbx,"scthbx[Nsctheta]/I"); 00197 my_tree->Branch("scthcode",scthcode,"scthcode[Nsctheta][7]/I"); 00198 my_tree->Branch("scthpos",scthpos,"scthpos[Nsctheta][7]/I"); 00199 my_tree->Branch("scthqual",scthqual,"scthqual[Nsctheta][7]/I"); 00200 00201 }
void DTTrigTest::beginRun | ( | const edm::Run & | iRun, | |
const edm::EventSetup & | iEventSetup | |||
) | [virtual] |
Create DTTrig instance and TUs.
Reimplemented from edm::EDAnalyzer.
Definition at line 203 of file DTTrigTest.cc.
References GenMuonPlsPt100GeV_cfg::cout, DTTrig::createTUs(), lat::endl(), my_debug, my_params, and my_trig.
00203 { 00204 00205 if (!my_trig) { 00206 my_trig = new DTTrig(my_params); 00207 my_trig->createTUs(iEventSetup); 00208 if (my_debug) 00209 cout << "[DTTrigTest] TU's Created" << endl; 00210 } 00211 00212 }
Close Tree and write File.
Reimplemented from edm::EDAnalyzer.
Definition at line 76 of file DTTrigTest.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), my_debug, my_rootfile, and my_tree.
00076 { 00077 00078 if (my_debug) 00079 cout << "[DTTrigTest] Writing Tree and Closing File" << endl; 00080 my_tree->Write(); 00081 delete my_tree; 00082 my_rootfile->Close(); 00083 00084 }
int DTTrigTest::bbx[100] [private] |
int DTTrigTest::bcod[100] [private] |
float DTTrigTest::bdirx[100] [private] |
float DTTrigTest::bdiry[100] [private] |
float DTTrigTest::bdirz[100] [private] |
int DTTrigTest::bk[100] [private] |
int DTTrigTest::bnum[100] [private] |
float DTTrigTest::bposx[100] [private] |
float DTTrigTest::bposy[100] [private] |
float DTTrigTest::bposz[100] [private] |
int DTTrigTest::bsect[100] [private] |
int DTTrigTest::bsl[100] [private] |
int DTTrigTest::bstat[100] [private] |
int DTTrigTest::bwh[100] [private] |
int DTTrigTest::bx[100] [private] |
int DTTrigTest::chagen[10] [private] |
float DTTrigTest::etagen[10] [private] |
int DTTrigTest::eventn [private] |
bool DTTrigTest::my_debug [private] |
Definition at line 64 of file DTTrigTest.h.
Referenced by analyze(), beginRun(), DTTrigTest(), endJob(), and ~DTTrigTest().
edm::ParameterSet DTTrigTest::my_params [private] |
TFile* DTTrigTest::my_rootfile [private] |
Definition at line 72 of file DTTrigTest.h.
Referenced by DTTrigTest(), endJob(), and ~DTTrigTest().
TTree* DTTrigTest::my_tree [private] |
Definition at line 70 of file DTTrigTest.h.
Referenced by analyze(), beginJob(), DTTrigTest(), and endJob().
DTTrig* DTTrigTest::my_trig [private] |
const double DTTrigTest::my_TtoTDC = 32./25. [static, private] |
Definition at line 58 of file DTTrigTest.h.
int DTTrigTest::nbti [private] |
int DTTrigTest::ngen [private] |
int DTTrigTest::nscphi [private] |
int DTTrigTest::nsctheta [private] |
int DTTrigTest::ntraco [private] |
int DTTrigTest::ntsphi [private] |
int DTTrigTest::ntstheta [private] |
float DTTrigTest::phigen[10] [private] |
float DTTrigTest::ptgen[10] [private] |
float DTTrigTest::pxgen[10] [private] |
float DTTrigTest::pygen[10] [private] |
float DTTrigTest::pzgen[10] [private] |
int DTTrigTest::runn [private] |
int DTTrigTest::sbx[40] [private] |
int DTTrigTest::scod[40] [private] |
int DTTrigTest::scphbx[40] [private] |
int DTTrigTest::scphcod[40] [private] |
float DTTrigTest::scphdirx[100] [private] |
float DTTrigTest::scphdiry[100] [private] |
float DTTrigTest::scphdirz[100] [private] |
int DTTrigTest::scphphi[40] [private] |
int DTTrigTest::scphphib[40] [private] |
float DTTrigTest::scphposx[100] [private] |
float DTTrigTest::scphposy[100] [private] |
float DTTrigTest::scphposz[100] [private] |
int DTTrigTest::scphsect[40] [private] |
int DTTrigTest::scphstat[40] [private] |
int DTTrigTest::scphwh[40] [private] |
int DTTrigTest::scthbx[40] [private] |
int DTTrigTest::scthcode[40][7] [private] |
int DTTrigTest::scthpos[40][7] [private] |
int DTTrigTest::scthqual[40][7] [private] |
int DTTrigTest::scthsect[40] [private] |
int DTTrigTest::scthstat[40] [private] |
int DTTrigTest::scthwh[40] [private] |
float DTTrigTest::sdirx[100] [private] |
float DTTrigTest::sdiry[100] [private] |
float DTTrigTest::sdirz[100] [private] |
int DTTrigTest::sphi[40] [private] |
int DTTrigTest::sphib[40] [private] |
float DTTrigTest::sposx[100] [private] |
float DTTrigTest::sposy[100] [private] |
float DTTrigTest::sposz[100] [private] |
int DTTrigTest::ssect[40] [private] |
int DTTrigTest::sstat[40] [private] |
int DTTrigTest::swh[40] [private] |
int DTTrigTest::tbx[80] [private] |
int DTTrigTest::tcod[80] [private] |
float DTTrigTest::tdirx[100] [private] |
float DTTrigTest::tdiry[100] [private] |
float DTTrigTest::tdirz[100] [private] |
int DTTrigTest::thbx[40] [private] |
int DTTrigTest::thcode[40][7] [private] |
int DTTrigTest::thpos[40][7] [private] |
int DTTrigTest::thqual[40][7] [private] |
int DTTrigTest::thsect[40] [private] |
int DTTrigTest::thstat[40] [private] |
int DTTrigTest::thwh[40] [private] |
int DTTrigTest::tk[80] [private] |
int DTTrigTest::tnum[80] [private] |
float DTTrigTest::tposx[100] [private] |
float DTTrigTest::tposy[100] [private] |
float DTTrigTest::tposz[100] [private] |
int DTTrigTest::tsect[80] [private] |
int DTTrigTest::tstat[80] [private] |
int DTTrigTest::twh[80] [private] |
int DTTrigTest::tx[80] [private] |
float DTTrigTest::vxgen[10] [private] |
float DTTrigTest::vygen[10] [private] |
float DTTrigTest::vzgen[10] [private] |
float DTTrigTest::weight [private] |