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