File indexing completed on 2024-04-06 12:19:58
0001 {
0002 using namespace std;
0003
0004 gROOT->Reset();
0005
0006 gSystem->Load("libPhysicsToolsFWLite") ;
0007 FWLiteEnabler::enable() ;
0008
0009 TFile* f = new TFile("runGMT.root") ;
0010
0011 TTree* tevt = f->Get("Events") ;
0012
0013 int nevt = tevt->GetEntries() ;
0014 std::cout << "Number of Events = " << nevt << std::endl ;
0015
0016 std::vector<L1MuRegionalCand> EvtInDT;
0017 std::vector<L1MuRegionalCand> EvtInCSC;
0018 std::vector<L1MuRegionalCand> EvtInRPCb;
0019 std::vector<L1MuRegionalCand> EvtInRPCf;
0020 std::vector<L1MuGMTCand> EvtOutGMT;
0021
0022 TBranch* dtprod = tevt->GetBranch("L1MuRegionalCands_L1MuGMTHWFileReader_DT.obj") ;
0023 TBranch* cscprod = tevt->GetBranch("L1MuRegionalCands_L1MuGMTHWFileReader_CSC.obj") ;
0024 TBranch* rpcbprod = tevt->GetBranch("L1MuRegionalCands_L1MuGMTHWFileReader_RPCb.obj") ;
0025 TBranch* rpcfprod = tevt->GetBranch("L1MuRegionalCands_L1MuGMTHWFileReader_RPCf.obj") ;
0026 TBranch* gmtprod = tevt->GetBranch("L1MuGMTCands_gmt.obj") ;
0027
0028 gmtprod->SetAddress( & EvtOutGMT );
0029 dtprod->SetAddress( & EvtInDT );
0030 cscprod->SetAddress( & EvtInCSC );
0031 rpcbprod->SetAddress( & EvtInRPCb );
0032 rpcfprod->SetAddress( & EvtInRPCf );
0033
0034
0035
0036
0037
0038 for ( int iev=0; iev<nevt; iev++ )
0039 {
0040
0041 cout << "event " << iev << endl;
0042
0043 dtprod->GetEntry(iev);
0044 cscprod->GetEntry(iev);
0045 rpcbprod->GetEntry(iev);
0046 rpcfprod->GetEntry(iev);
0047 gmtprod->GetEntry(iev);
0048
0049 for(int i=0; i<4; i++) {
0050 cout << "DT: " << EvtInDT[i].phiValue() << " " <<
0051 EvtInDT[i].etaValue() << " " <<
0052 EvtInDT[i].ptValue() << " " <<
0053 EvtInDT[i].quality() << endl;
0054 }
0055
0056 for(int i=0; i<4; i++) {
0057 cout << "CSC: " << EvtInCSC[i].phiValue() << " " <<
0058 EvtInCSC[i].etaValue() << " " <<
0059 EvtInCSC[i].ptValue() << " " <<
0060 EvtInCSC[i].quality() << endl;
0061 }
0062
0063 for(int i=0; i<4; i++) {
0064 cout << "RPCb: " << EvtInRPCb[i].phiValue() << " " <<
0065 EvtInRPCb[i].etaValue() << " " <<
0066 EvtInRPCb[i].ptValue() << " " <<
0067 EvtInRPCb[i].quality() << endl;
0068 }
0069
0070 for(int i=0; i<4; i++) {
0071 cout << "RPBf: " << EvtInRPCf[i].phiValue() << " " <<
0072 EvtInRPCf[i].etaValue() << " " <<
0073 EvtInRPCf[i].ptValue() << " " <<
0074 EvtInRPCf[i].quality() << endl;
0075 }
0076
0077 for(int i=0; i<4; i++) {
0078 cout << "GMT: " << EvtOutGMT[i].phiValue() << " " <<
0079 EvtOutGMT[i].etaValue() << " " <<
0080 EvtOutGMT[i].ptValue() << " " <<
0081 EvtOutGMT[i].quality() << endl;
0082 }
0083
0084
0085 }
0086
0087 }