CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTTrigTest.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
15 //
16 //--------------------------------------------------
17 
18 // This class's header
20 
21 // Framework related classes
24 
27 
28 // Trigger and DataFormats headers
33 
34 // ROOT headers
35 #include "TROOT.h"
36 #include "TTree.h"
37 #include "TFile.h"
38 
39 // Collaborating classes
41 #include <CLHEP/Vector/LorentzVector.h>
42 
43 // C++ headers
44 #include <iostream>
45 #include <math.h>
46 #include<time.h>
47 
48 using namespace std;
49 using namespace edm;
50 
51 const double DTTrigTest::my_TtoTDC = 32./25.;
52 
53 DTTrigTest::DTTrigTest(const ParameterSet& pset): my_trig(0) {
54 
55  my_debug= pset.getUntrackedParameter<bool>("debug");
56  string outputfile = pset.getUntrackedParameter<string>("outputFileName");
57  if (my_debug)
58  cout << "[DTTrigTest] Creating rootfile " << outputfile <<endl;
59  my_rootfile = new TFile(outputfile.c_str(),"RECREATE");
60  my_tree = new TTree("h1","GMT",0);
61  my_params = pset;
62  if (my_debug) cout << "[DTTrigTest] Constructor executed!!!" << endl;
63 
64 
65 }
66 
68 
69  if (my_trig != 0) delete my_trig;
70  delete my_rootfile;
71  if (my_debug)
72  cout << "[DTTrigTest] Destructor executed!!!" << endl;
73 
74 }
75 
77 
78  if (my_debug)
79  cout << "[DTTrigTest] Writing Tree and Closing File" << endl;
80  my_tree->Write();
81  delete my_tree;
82  my_rootfile->Close();
83 
84 }
85 
86 //void DTTrigTest::beginJob(const EventSetup & iEventSetup){
88  // get DTConfigManager
89  // ESHandle< DTConfigManager > confManager ;
90  // iEventSetup.get< DTConfigManagerRcd >().get( confManager ) ;
91 
92  //for testing purpose....
93  //DTBtiId btiid(1,1,1,1,1);
94  //confManager->getDTConfigBti(btiid)->print();
95 
96 // my_trig = new DTTrig(my_params);
97 
98 // my_trig->createTUs(iEventSetup);
99 // if (my_debug)
100 // cout << "[DTTrigTest] TU's Created" << endl;
101 
102  // BOOKING of the tree's varables
103  // GENERAL block branches
104  my_tree->Branch("Run",&runn,"Run/I");
105  my_tree->Branch("Event",&eventn,"Event/I");
106  my_tree->Branch("Weight",&weight,"Weight/F");
107  // GEANT block branches
108  my_tree->Branch("Ngen",&ngen,"Ngen/I");
109  my_tree->Branch("Pxgen",pxgen,"Pxgen[Ngen]/F");
110  my_tree->Branch("Pygen",pygen,"Pygen[Ngen]/F");
111  my_tree->Branch("Pzgen",pzgen,"Pzgen[Ngen]/F");
112  my_tree->Branch("Ptgen",ptgen,"Ptgen[Ngen]/F");
113  my_tree->Branch("Etagen",etagen,"Etagen[Ngen]/F");
114  my_tree->Branch("Phigen",phigen,"Phigen[Ngen]/F");
115  my_tree->Branch("Chagen",chagen,"Chagen[Ngen]/I");
116  my_tree->Branch("Vxgen",vxgen,"Vxgen[Ngen]/F");
117  my_tree->Branch("Vygen",vygen,"Vygen[Ngen]/F");
118  my_tree->Branch("Vzgen",vzgen,"Vzgen[Ngen]/F");
119  // L1MuDTBtiChipS block
120  my_tree->Branch("Nbti",&nbti,"Nbti/I");
121  my_tree->Branch("bwh",bwh,"bwh[Nbti]/I");
122  my_tree->Branch("bstat",bstat,"bstat[Nbti]/I");
123  my_tree->Branch("bsect",bsect,"bsect[Nbti]/I");
124  my_tree->Branch("bsl",bsl,"bsl[Nbti]/I");
125  my_tree->Branch("bnum",bnum,"bnum[Nbti]/I");
126  my_tree->Branch("bbx",bbx,"bbx[Nbti]/I");
127  my_tree->Branch("bcod",bcod,"bcod[Nbti]/I");
128  my_tree->Branch("bk",bk,"bk[Nbti]/I");
129  my_tree->Branch("bx",bx,"bx[Nbti]/I");
130  my_tree->Branch("bposx",bposx,"bposx[Nbti]/F");
131  my_tree->Branch("bposy",bposy,"bposy[Nbti]/F");
132  my_tree->Branch("bposz",bposz,"bposz[Nbti]/F");
133  my_tree->Branch("bdirx",bdirx,"bdirx[Nbti]/F");
134  my_tree->Branch("bdiry",bdiry,"bdiry[Nbti]/F");
135  my_tree->Branch("bdirz",bdirz,"bdirz[Nbti]/F");
136  // L1MuDTTracoChipS block
137  my_tree->Branch("Ntraco",&ntraco,"Ntraco/I");
138  my_tree->Branch("twh",twh,"twh[Ntraco]/I");
139  my_tree->Branch("tstat",tstat,"tstat[Ntraco]/I");
140  my_tree->Branch("tsect",tsect,"tsect[Ntraco]/I");
141  my_tree->Branch("tnum",tnum,"tnum[Ntraco]/I");
142  my_tree->Branch("tbx",tbx,"tbx[Ntraco]/I");
143  my_tree->Branch("tcod",tcod,"tcod[Ntraco]/I");
144  my_tree->Branch("tk",tk,"tk[Ntraco]/I");
145  my_tree->Branch("tx",tx,"tx[Ntraco]/I");
146  my_tree->Branch("tposx",tposx,"tposx[Ntraco]/F");
147  my_tree->Branch("tposy",tposy,"tposy[Ntraco]/F");
148  my_tree->Branch("tposz",tposz,"tposz[Ntraco]/F");
149  my_tree->Branch("tdirx",tdirx,"tdirx[Ntraco]/F");
150  my_tree->Branch("tdiry",tdiry,"tdiry[Ntraco]/F");
151  my_tree->Branch("tdirz",tdirz,"tdirz[Ntraco]/F");
152  // TSPHI block
153  my_tree->Branch("Ntsphi",&ntsphi,"Ntsphi/I");
154  my_tree->Branch("swh",swh,"swh[Ntsphi]/I");
155  my_tree->Branch("sstat",sstat,"sstat[Ntsphi]/I");
156  my_tree->Branch("ssect",ssect,"ssect[Ntsphi]/I");
157  my_tree->Branch("sbx",sbx,"sbx[Ntsphi]/I");
158  my_tree->Branch("scod",scod,"scod[Ntsphi]/I");
159  my_tree->Branch("sphi",sphi,"sphi[Ntsphi]/I");
160  my_tree->Branch("sphib",sphib,"sphib[Ntsphi]/I");
161  my_tree->Branch("sposx",sposx,"sposx[Ntsphi]/F");
162  my_tree->Branch("sposy",sposy,"sposy[Ntsphi]/F");
163  my_tree->Branch("sposz",sposz,"sposz[Ntsphi]/F");
164  my_tree->Branch("sdirx",sdirx,"sdirx[Ntsphi]/F");
165  my_tree->Branch("sdiry",sdiry,"sdiry[Ntsphi]/F");
166  my_tree->Branch("sdirz",sdirz,"sdirz[Ntsphi]/F");
167  // TSTHETA block
168  my_tree->Branch("Ntstheta",&ntstheta,"Ntstheta/I");
169  my_tree->Branch("thwh",thwh,"thwh[Ntstheta]/I");
170  my_tree->Branch("thstat",thstat,"thstat[Ntstheta]/I");
171  my_tree->Branch("thsect",thsect,"thsect[Ntstheta]/I");
172  my_tree->Branch("thbx",thbx,"thbx[Ntstheta]/I");
173  my_tree->Branch("thcode",thcode,"thcode[Ntstheta][7]/I");
174  my_tree->Branch("thpos",thpos,"thpos[Ntstheta][7]/I");
175  my_tree->Branch("thqual",thqual,"thqual[Ntstheta][7]/I");
176  // SC PHI block
177  my_tree->Branch("Nscphi",&nscphi,"Nscphi/I");
178  my_tree->Branch("scphwh",scphwh,"scphwh[Nscphi]/I");
179  my_tree->Branch("scphstat",scphstat,"scphstat[Nscphi]/I");
180  my_tree->Branch("scphsect",scphsect,"scphsect[Nscphi]/I");
181  my_tree->Branch("scphbx",scphbx,"scphbx[Nscphi]/I");
182  my_tree->Branch("scphcod",scphcod,"scphcod[Nscphi]/I");
183  my_tree->Branch("scphphi",scphphi,"scphphi[Nscphi]/I");
184  my_tree->Branch("scphphib",scphphib,"scphphib[Nscphi]/I");
185  my_tree->Branch("scphposx",scphposx,"scphposx[Nscphi]/F");
186  my_tree->Branch("scphposy",scphposy,"scphposy[Nscphi]/F");
187  my_tree->Branch("scphposz",scphposz,"scphposz[Nscphi]/F");
188  my_tree->Branch("scphdirx",scphdirx,"scphdirx[Nscphi]/F");
189  my_tree->Branch("scphdiry",scphdiry,"scphdiry[Nscphi]/F");
190  my_tree->Branch("scphdirz",scphdirz,"scphdirz[Nscphi]/F");
191  // SC THETA block
192  my_tree->Branch("Nsctheta",&nsctheta,"Nsctheta/I");
193  my_tree->Branch("scthwh",scthwh,"scthwh[Nsctheta]/I");
194  my_tree->Branch("scthstat",scthstat,"scthstat[Nsctheta]/I");
195  my_tree->Branch("scthsect",scthsect,"scthsect[Nsctheta]/I");
196  my_tree->Branch("scthbx",scthbx,"scthbx[Nsctheta]/I");
197  my_tree->Branch("scthcode",scthcode,"scthcode[Nsctheta][7]/I");
198  my_tree->Branch("scthpos",scthpos,"scthpos[Nsctheta][7]/I");
199  my_tree->Branch("scthqual",scthqual,"scthqual[Nsctheta][7]/I");
200 
201 }
202 
203 void DTTrigTest::beginRun(const edm::Run& iRun, const edm::EventSetup& iEventSetup) {
204 
205  if (!my_trig) {
206  my_trig = new DTTrig(my_params);
207  my_trig->createTUs(iEventSetup);
208  if (my_debug)
209  cout << "[DTTrigTest] TU's Created" << endl;
210  }
211 
212 }
213 
214 
215 
216 void DTTrigTest::analyze(const Event & iEvent, const EventSetup& iEventSetup){
217 
218  const int MAXGEN = 10;
219  const float ptcut = 1.0;
220  const float etacut = 2.4;
221  my_trig->triggerReco(iEvent,iEventSetup);
222  if (my_debug)
223  cout << "[DTTrigTest] Trigger algorithm executed for run " << iEvent.id().run()
224  <<" event " << iEvent.id().event() << endl;
225 
226  // GENERAL Block
227  runn = iEvent.id().run();
228  eventn = iEvent.id().event();
229  weight = 1; // FIXME what to do with this varable?
230 
231  // GEANT Block
232  Handle<vector<SimTrack> > MyTracks;
233  Handle<vector<SimVertex> > MyVertexes;
234  iEvent.getByLabel("g4SimHits",MyTracks);
235  iEvent.getByLabel("g4SimHits",MyVertexes);
236  vector<SimTrack>::const_iterator itrack;
237  ngen=0;
238  if (my_debug)
239  cout << "[DTTrigTest] Tracks found in the detector (not only muons) " << MyTracks->size() <<endl;
240 
241  for (itrack=MyTracks->begin(); itrack!=MyTracks->end(); itrack++){
242  if ( abs(itrack->type())==13){
243  math::XYZTLorentzVectorD momentum = itrack->momentum();
244  float pt = momentum.Pt();
245  float eta = momentum.eta();
246  if ( pt>ptcut && fabs(eta)<etacut ){
247  float phi = momentum.phi();
248  int charge = static_cast<int> (-itrack->type()/13); //static_cast<int> (itrack->charge());
249  if ( phi<0 ) phi = 2*M_PI + phi;
250  int vtxindex = itrack->vertIndex();
251  float gvx=0,gvy=0,gvz=0;
252  if (vtxindex >-1){
253  gvx=MyVertexes->at(vtxindex).position().x();
254  gvy=MyVertexes->at(vtxindex).position().y();
255  gvz=MyVertexes->at(vtxindex).position().z();
256  }
257  if ( ngen < MAXGEN ) {
258  pxgen[ngen]=momentum.x();
259  pygen[ngen]=momentum.y();
260  pzgen[ngen]=momentum.z();
261  ptgen[ngen]=pt;
262  etagen[ngen]=eta;
263  phigen[ngen]=phi;
264  chagen[ngen]=charge;
265  vxgen[ngen]=gvx;
266  vygen[ngen]=gvy;
267  vzgen[ngen]=gvz;
268  ngen++;
269  }
270  }
271  }
272  }
273 
274  // L1 Local Trigger Block
275  // BTI
276  vector<DTBtiTrigData> btitrigs = my_trig->BtiTrigs();
277  vector<DTBtiTrigData>::const_iterator pbti;
278  int ibti = 0;
279  if (my_debug)
280  cout << "[DTTrigTest] " << btitrigs.size() << " BTI triggers found" << endl;
281 
282  for ( pbti = btitrigs.begin(); pbti != btitrigs.end(); pbti++ ) {
283  if ( ibti < 100 ) {
284  bwh[ibti]=pbti->wheel();
285  bstat[ibti]=pbti->station();
286  bsect[ibti]=pbti->sector();
287  bsl[ibti]=pbti->btiSL();
288  bnum[ibti]=pbti->btiNumber();
289  bbx[ibti]=pbti->step();
290  bcod[ibti]=pbti->code();
291  bk[ibti]=pbti->K();
292  bx[ibti]=pbti->X();
293  GlobalPoint pos = my_trig->CMSPosition(&(*pbti));
294  GlobalVector dir = my_trig->CMSDirection(&(*pbti));
295  bposx[ibti] = pos.x();
296  bposy[ibti] = pos.y();
297  bposz[ibti] = pos.z();
298  bdirx[ibti] = dir.x();
299  bdiry[ibti] = dir.y();
300  bdirz[ibti] = dir.z();
301  ibti++;
302  }
303  }
304  nbti = ibti;
305 
306  //TRACO
307  vector<DTTracoTrigData> tracotrigs = my_trig->TracoTrigs();
308  vector<DTTracoTrigData>::const_iterator ptc;
309  int itraco = 0;
310  if (my_debug)
311  cout << "[DTTrigTest] " << tracotrigs.size() << " TRACO triggers found" << endl;
312 
313  for (ptc=tracotrigs.begin(); ptc!=tracotrigs.end(); ptc++) {
314  if (itraco<80) {
315  twh[itraco]=ptc->wheel();
316  tstat[itraco]=ptc->station();
317  tsect[itraco]=ptc->sector();
318  tnum[itraco]=ptc->tracoNumber();
319  tbx[itraco]=ptc->step();
320  tcod[itraco]=ptc->code();
321  tk[itraco]=ptc->K();
322  tx[itraco]=ptc->X();
323  GlobalPoint pos = my_trig->CMSPosition(&(*ptc));
324  GlobalVector dir = my_trig->CMSDirection(&(*ptc));
325  tposx[itraco] = pos.x();
326  tposy[itraco] = pos.y();
327  tposz[itraco] = pos.z();
328  tdirx[itraco] = dir.x();
329  tdiry[itraco] = dir.y();
330  tdirz[itraco] = dir.z();
331  itraco++;
332  }
333  }
334  ntraco = itraco;
335 
336  //TSPHI
337  vector<DTChambPhSegm> tsphtrigs = my_trig->TSPhTrigs();
338  vector<DTChambPhSegm>::const_iterator ptsph;
339  int itsphi = 0;
340  if (my_debug )
341  cout << "[DTTrigTest] " << tsphtrigs.size() << " TSPhi triggers found" << endl;
342 
343  for (ptsph=tsphtrigs.begin(); ptsph!=tsphtrigs.end(); ptsph++) {
344  if (itsphi<40 ) {
345  swh[itsphi] = ptsph->wheel();
346  sstat[itsphi] = ptsph->station();
347  ssect[itsphi] = ptsph->sector();
348  sbx[itsphi] = ptsph->step();
349  scod[itsphi] = ptsph->oldCode();
350  sphi[itsphi] = ptsph->phi();
351  sphib[itsphi] = ptsph->phiB();
352  GlobalPoint pos = my_trig->CMSPosition(&(*ptsph));
353  GlobalVector dir = my_trig->CMSDirection(&(*ptsph));
354  sposx[itsphi] = pos.x();
355  sposy[itsphi] = pos.y();
356  sposz[itsphi] = pos.z();
357  sdirx[itsphi] = dir.x();
358  sdiry[itsphi] = dir.y();
359  sdirz[itsphi] = dir.z();
360  itsphi++;
361  }
362  }
363  ntsphi = itsphi;
364 
365  //TSTHETA
366  vector<DTChambThSegm> tsthtrigs = my_trig->TSThTrigs();
367  vector<DTChambThSegm>::const_iterator ptsth;
368  int itstheta = 0;
369  if (my_debug)
370  cout << "[DTTrigTest] " << tsthtrigs.size() << " TSTheta triggers found" << endl;
371 
372  for (ptsth=tsthtrigs.begin(); ptsth!=tsthtrigs.end(); ptsth++) {
373  if (itstheta<40 ) {
374  thwh[itstheta] = ptsth->ChamberId().wheel();
375  thstat[itstheta] = ptsth->ChamberId().station();
376  thsect[itstheta] = ptsth->ChamberId().sector();
377  thbx[itstheta] = ptsth->step();
378  for(int i=0;i<7;i++) {
379  thcode[itstheta][i] = ptsth->code(i);
380  thpos[itstheta][i] = ptsth->position(i);
381  thqual[itstheta][i] = ptsth->quality(i);
382  }
383  itstheta++;
384  }
385  }
386  ntstheta = itstheta;
387 
388  //SCPHI
389  vector<DTSectCollPhSegm> scphtrigs = my_trig->SCPhTrigs();
390  vector<DTSectCollPhSegm>::const_iterator pscph;
391  int iscphi = 0;
392  if (my_debug )
393  cout << "[DTTrigTest] " << scphtrigs.size() << " SectCollPhi triggers found" << endl;
394 
395  for (pscph=scphtrigs.begin(); pscph!=scphtrigs.end(); pscph++) {
396  if (iscphi<40 ) {
397  const DTChambPhSegm *seg = (*pscph).tsPhiTrig();
398  scphwh[iscphi] = pscph->wheel();
399  scphstat[iscphi] = pscph->station();
400  scphsect[iscphi] = pscph->sector();
401  scphbx[iscphi] = pscph->step();
402  scphcod[iscphi] = pscph->oldCode();
403  scphphi[iscphi] = pscph->phi();
404  scphphib[iscphi] = pscph->phiB();
407  scphposx[iscphi] = pos.x();
408  scphposy[iscphi] = pos.y();
409  scphposz[iscphi] = pos.z();
410  scphdirx[iscphi] = dir.x();
411  scphdiry[iscphi] = dir.y();
412  scphdirz[iscphi] = dir.z();
413  iscphi++;
414  }
415  }
416  nscphi = iscphi;
417 
418  //SCTHETA
419  vector<DTSectCollThSegm> scthtrigs = my_trig->SCThTrigs();
420  vector<DTSectCollThSegm>::const_iterator pscth;
421  int isctheta = 0;
422  if (my_debug)
423  cout << "[DTTrigTest] " << scthtrigs.size() << " SectCollTheta triggers found" << endl;
424 
425  for (pscth=scthtrigs.begin(); pscth!=scthtrigs.end(); pscth++) {
426  if (isctheta<40 ) {
427  scthwh[isctheta] = pscth->ChamberId().wheel();
428  scthstat[isctheta] = pscth->ChamberId().station();
429  scthsect[isctheta] = pscth->ChamberId().sector();
430  scthbx[isctheta] = pscth->step();
431  for(int i=0;i<7;i++) {
432  scthcode[isctheta][i] = pscth->code(i);
433  scthpos[isctheta][i] = pscth->position(i);
434  scthqual[isctheta][i] = pscth->quality(i);
435  }
436  isctheta++;
437  }
438  }
439  nsctheta = isctheta;
440 
441  //Fill the tree
442  my_tree->Fill();
443 
444 }
RunNumber_t run() const
Definition: EventID.h:42
float scphdirx[100]
Definition: DTTrigTest.h:167
int thpos[40][7]
Definition: DTTrigTest.h:152
EventNumber_t event() const
Definition: EventID.h:44
T getUntrackedParameter(std::string const &, T const &) const
int tstat[80]
Definition: DTTrigTest.h:115
int sbx[40]
Definition: DTTrigTest.h:134
int i
Definition: DBlmapReader.cc:9
int scphbx[40]
Definition: DTTrigTest.h:160
int scthsect[40]
Definition: DTTrigTest.h:175
float weight
Definition: DTTrigTest.h:79
edm::ParameterSet my_params
Definition: DTTrigTest.h:68
float scphposz[100]
Definition: DTTrigTest.h:166
float etagen[10]
Definition: DTTrigTest.h:87
float tdirz[100]
Definition: DTTrigTest.h:127
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:15
int bstat[100]
Definition: DTTrigTest.h:97
int bsl[100]
Definition: DTTrigTest.h:99
int bnum[100]
Definition: DTTrigTest.h:100
int thstat[40]
Definition: DTTrigTest.h:148
int twh[80]
Definition: DTTrigTest.h:114
float vygen[10]
Definition: DTTrigTest.h:91
int scod[40]
Definition: DTTrigTest.h:135
float tdiry[100]
Definition: DTTrigTest.h:126
int scthbx[40]
Definition: DTTrigTest.h:176
int ssect[40]
Definition: DTTrigTest.h:133
int sphib[40]
Definition: DTTrigTest.h:137
float bdirz[100]
Definition: DTTrigTest.h:110
int tcod[80]
Definition: DTTrigTest.h:119
float vxgen[10]
Definition: DTTrigTest.h:90
int scthpos[40][7]
Definition: DTTrigTest.h:178
int scphphib[40]
Definition: DTTrigTest.h:163
float pxgen[10]
Definition: DTTrigTest.h:83
float scphdirz[100]
Definition: DTTrigTest.h:169
void analyze(const edm::Event &iEvent, const edm::EventSetup &iEventSetup)
Analyze function executed on all the events.
Definition: DTTrigTest.cc:216
int scphcod[40]
Definition: DTTrigTest.h:161
T y() const
Definition: PV3DBase.h:62
float scphposx[100]
Definition: DTTrigTest.h:164
#define abs(x)
Definition: mlp_lapack.h:159
int bx[100]
Definition: DTTrigTest.h:104
float scphposy[100]
Definition: DTTrigTest.h:165
int scphwh[40]
Definition: DTTrigTest.h:157
T eta() const
int bwh[100]
Definition: DTTrigTest.h:96
float sposx[100]
Definition: DTTrigTest.h:138
int sstat[40]
Definition: DTTrigTest.h:132
float ptgen[10]
Definition: DTTrigTest.h:86
double charge(const std::vector< uint8_t > &Ampls)
int bcod[100]
Definition: DTTrigTest.h:102
int bsect[100]
Definition: DTTrigTest.h:98
float sposy[100]
Definition: DTTrigTest.h:139
int tnum[80]
Definition: DTTrigTest.h:117
std::vector< DTSectCollPhSegm > SCPhTrigs()
Return a copy of all the Sector Collector (Phi) triggers.
Definition: DTTrig.cc:551
int thbx[40]
Definition: DTTrigTest.h:150
int iEvent
Definition: GenABIO.cc:243
float sposz[100]
Definition: DTTrigTest.h:140
float tposz[100]
Definition: DTTrigTest.h:124
int thwh[40]
Definition: DTTrigTest.h:147
int scphphi[40]
Definition: DTTrigTest.h:162
int bk[100]
Definition: DTTrigTest.h:103
T z() const
Definition: PV3DBase.h:63
float scphdiry[100]
Definition: DTTrigTest.h:168
int scthwh[40]
Definition: DTTrigTest.h:173
int scthqual[40][7]
Definition: DTTrigTest.h:179
static const double my_TtoTDC
Definition: DTTrigTest.h:59
int tk[80]
Definition: DTTrigTest.h:120
int scphsect[40]
Definition: DTTrigTest.h:159
int swh[40]
Definition: DTTrigTest.h:131
TTree * my_tree
Definition: DTTrigTest.h:71
void beginRun(const edm::Run &iRun, const edm::EventSetup &iEventSetup)
Create DTTrig instance and TUs.
Definition: DTTrigTest.cc:203
int tx[80]
Definition: DTTrigTest.h:121
~DTTrigTest()
Destructor.
Definition: DTTrigTest.cc:67
int bbx[100]
Definition: DTTrigTest.h:101
float sdirz[100]
Definition: DTTrigTest.h:143
void triggerReco(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Run the whole trigger reconstruction chain.
Definition: DTTrig.cc:150
int nsctheta
Definition: DTTrigTest.h:172
const int MAXGEN
int thcode[40][7]
Definition: DTTrigTest.h:151
GlobalPoint CMSPosition(const DTTrigData *trig) const
Coordinate of a trigger-data object in CMS frame.
Definition: DTTrig.h:212
int ntstheta
Definition: DTTrigTest.h:146
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
GlobalVector CMSDirection(const DTTrigData *trig) const
Direction of a trigger-data object in CMS frame.
Definition: DTTrig.h:222
float bdirx[100]
Definition: DTTrigTest.h:108
float tdirx[100]
Definition: DTTrigTest.h:125
int scphstat[40]
Definition: DTTrigTest.h:158
float tposx[100]
Definition: DTTrigTest.h:122
std::vector< DTChambThSegm > TSThTrigs()
Return a copy of all the Trigger Server (Theta) triggers.
Definition: DTTrig.cc:535
Definition: DTTrig.h:54
#define M_PI
Definition: BFit3D.cc:3
float sdiry[100]
Definition: DTTrigTest.h:142
float pygen[10]
Definition: DTTrigTest.h:84
std::vector< DTTracoTrigData > TracoTrigs()
Return a copy of all the TRACO triggers.
Definition: DTTrig.cc:503
float bposx[100]
Definition: DTTrigTest.h:105
TFile * my_rootfile
Definition: DTTrigTest.h:73
int tsect[80]
Definition: DTTrigTest.h:116
float phigen[10]
Definition: DTTrigTest.h:88
int scthstat[40]
Definition: DTTrigTest.h:174
DTTrigTest(const edm::ParameterSet &pset)
Constructor.
Definition: DTTrigTest.cc:53
int sphi[40]
Definition: DTTrigTest.h:136
edm::EventID id() const
Definition: EventBase.h:56
float bdiry[100]
Definition: DTTrigTest.h:109
int thsect[40]
Definition: DTTrigTest.h:149
float sdirx[100]
Definition: DTTrigTest.h:141
int scthcode[40][7]
Definition: DTTrigTest.h:177
void beginJob()
Create tree and Branches.
Definition: DTTrigTest.cc:87
float pzgen[10]
Definition: DTTrigTest.h:85
tuple cout
Definition: gather_cfg.py:121
int eventn
Definition: DTTrigTest.h:78
float bposz[100]
Definition: DTTrigTest.h:107
dbl *** dir
Definition: mlp_gen.cc:35
float tposy[100]
Definition: DTTrigTest.h:123
int chagen[10]
Definition: DTTrigTest.h:89
float bposy[100]
Definition: DTTrigTest.h:106
T x() const
Definition: PV3DBase.h:61
void createTUs(const edm::EventSetup &iSetup)
Create the trigger units and store them in the cache.
Definition: DTTrig.cc:76
float vzgen[10]
Definition: DTTrigTest.h:92
bool my_debug
Definition: DTTrigTest.h:65
void endJob()
Close Tree and write File.
Definition: DTTrigTest.cc:76
Definition: Run.h:33
DTTrig * my_trig
Definition: DTTrigTest.h:62
std::vector< DTBtiTrigData > BtiTrigs()
Return a copy of all the BTI triggers.
Definition: DTTrig.cc:487
std::vector< DTSectCollThSegm > SCThTrigs()
Return a copy of all the Sector Collector (Theta) triggers.
Definition: DTTrig.cc:580
int thqual[40][7]
Definition: DTTrigTest.h:153
std::vector< DTChambPhSegm > TSPhTrigs()
Return a copy of all the Trigger Server (Phi) triggers.
Definition: DTTrig.cc:519
int tbx[80]
Definition: DTTrigTest.h:118
Definition: DDAxes.h:10