00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 inline void MyEvent::init(const int & run_nb,
00016 const int & event_nb,
00017 const double & ev_weight,
00018 const std::vector<MyParticle*> & rec_electron,
00019 const std::vector<MyParticle*> & rec_photon,
00020 const std::vector<MyParticle*> & rec_muon,
00021 const std::vector<MyParticle*> & rec_jet,
00022 const std::vector<MyParticle*> & rec_taujet,
00023 const std::vector<MyParticle*> & truth_particle,
00024 const std::vector<MyParticle*> & truth_jet,
00025 const MyMissingEtManager & met_manager,
00026 const MyTrigger & trigger,
00027 std::vector<MyParticle*> * track_jet,
00028 std::vector<MyParticle*> * tracks,
00029 std::vector<MyParticle*> * truth_track_jet,
00030 const std::vector<MyVertex*> * vertices,
00031 const std::vector<MyVertex*> * truth_vertices,
00032 const std::vector<MyParticle*> * trigger_muon) {
00033
00034 m_run_nb = run_nb;
00035 m_event_nb = event_nb;
00036 m_event_weight = ev_weight;
00037 m_rec_electron = rec_electron;
00038 m_rec_photon = rec_photon;
00039 m_rec_muon = rec_muon;
00040 m_rec_jet = rec_jet;
00041 m_rec_taujet = rec_taujet;
00042 m_truth_particle = truth_particle;
00043 m_truth_jet = truth_jet;
00044 m_met_manager = met_manager;
00045 m_trigger = trigger;
00046 m_trigger_muon = trigger_muon;
00047 m_vertices = vertices;
00048 m_truth_vertices = truth_vertices;
00049 m_track_jet = track_jet;
00050 m_tracks = tracks;
00051 m_truth_track_jet = truth_track_jet;
00052
00053 m_dataset_info = &MyDatasetInfo::Instance();
00054
00055 return;
00056
00057 }
00058
00059
00060
00061
00062
00063
00064
00065 inline int MyEvent::run_number(void) const {
00066
00067 return m_run_nb;
00068
00069 }
00070
00071
00072
00073
00074
00075
00076
00077 inline int MyEvent::event_number(void) const {
00078
00079 return m_event_nb;
00080
00081 }
00082
00083
00084
00085
00086
00087
00088
00089 inline double MyEvent::event_weight(void) const {
00090
00091 return m_event_weight;
00092
00093 }
00094
00095
00096
00097
00098
00099
00100
00101 inline std::vector<MyParticle*> MyEvent::reco_electrons(void) const {
00102
00103 return m_rec_electron;
00104
00105 }
00106
00107
00108
00109
00110
00111
00112 inline std::vector<MyParticle*> MyEvent::reco_photons(void) const {
00113
00114 return m_rec_photon;
00115
00116 }
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131 inline std::vector<MyParticle*>
00132 MyEvent::reco_muons(int alg_flag) const {
00133
00134 if(alg_flag==-1){
00135 return m_rec_muon;
00136 }
00137
00138 std::vector<MyParticle*> return_vector(0);
00139
00140 for (unsigned int k=0; k<m_rec_muon.size(); k++) {
00141
00142 if( ((MyMuon*)(m_rec_muon[k]))->algorithm_flag() == alg_flag ){
00143 return_vector.push_back(m_rec_muon[k]);
00144 }
00145 }
00146
00147 return return_vector;
00148
00149 }
00150
00151 inline std::vector<MyParticle*>
00152 MyEvent::reco_muons(std::string alg_string) const {
00153
00154 std::vector<MyParticle*> return_vector(0);
00155
00156
00157 if(m_dataset_info->get_AtlFastFlag()){
00158
00159 return_vector = this->reco_muons(1);
00160 }
00161 else{
00162
00163
00164 if(alg_string=="default"){
00165 return_vector = this->reco_muons(3);
00166 }
00167 else if(alg_string=="all"){
00168 return_vector = this->reco_muons(-1);
00169 }
00170 else if(alg_string=="atlfast"){
00171 return_vector = this->reco_muons(1);
00172 }
00173 else if(alg_string=="muid"){
00174 return_vector = this->reco_muons(2);
00175 }
00176 else if(alg_string=="staco"){
00177 return_vector = this->reco_muons(3);
00178 }
00179 else{
00180 std::cerr << "In MyEvent: Muons with name \"" << alg_string
00181 << "\" not known!"
00182 << std::endl;
00183 exit(1);
00184 }
00185
00186 }
00187
00188 return return_vector;
00189
00190 }
00191
00192
00193
00194
00195
00196
00197
00198
00199 inline std::vector<MyParticle*> MyEvent::reco_jets(void) const {
00200
00201 return m_rec_jet;
00202
00203 }
00204
00205
00206
00207
00208
00209
00210
00211 inline std::vector<MyParticle*> MyEvent::reco_taujets(void) const {
00212
00213 return m_rec_taujet;
00214
00215 }
00216
00217
00218
00219
00220
00221
00222
00223 inline std::vector<MyParticle*> MyEvent::truth_particles(void) const {
00224
00225 return m_truth_particle;
00226
00227 }
00228
00229
00230
00231
00232
00233
00234
00235 inline std::vector<MyParticle*> MyEvent::truth_jets(void) const {
00236
00237 return m_truth_jet;
00238
00239 }
00240
00241
00242
00243
00244
00245
00246
00247
00248 inline MyMissingEtManager MyEvent::met_manager(void) const {
00249
00250 return m_met_manager;
00251
00252 }
00253
00254
00255
00256
00257
00258
00259
00260 inline MyTrigger MyEvent::trigger(void) const {
00261
00262 return m_trigger;
00263
00264 }
00265
00266
00267
00268
00269
00270
00271
00272 inline const std::vector<MyParticle*> * MyEvent::trigger_muon(void) const {
00273
00274 return m_trigger_muon;
00275
00276 }
00277
00278
00279
00280
00281
00282
00283
00284 inline const std::vector<MyVertex*> * MyEvent::primary_vertices(void) const {
00285
00286 return m_vertices;
00287
00288 }
00289
00290
00291
00292
00293
00294
00295
00296 inline const std::vector<MyVertex*> * MyEvent::truth_vertices(void) const {
00297
00298 return m_truth_vertices;
00299
00300 }
00301
00302
00303
00304
00305
00306
00307
00308 inline std::vector<MyParticle*> * MyEvent::track_jets(void) const {
00309
00310 return m_track_jet;
00311
00312 }
00313
00314
00315
00316
00317
00318
00319
00320 inline std::vector<MyParticle*> * MyEvent::tracks(void) const {
00321
00322 return m_tracks;
00323
00324 }
00325
00326
00327
00328
00329
00330
00331
00332 inline std::vector<MyParticle*> * MyEvent::truth_track_jets(void) const {
00333
00334 return m_truth_track_jet;
00335
00336 }
00337
00338
00339
00340
00341
00342
00343
00344 inline void MyEvent::Print(std::string option) const {
00345
00346 std::cout << std::endl
00347 << "event, weight, run: "
00348 << Form("%i, %.2f, %i",
00349 this->event_number(),
00350 this->event_weight(),
00351 this->run_number() )
00352 << std::endl;
00353
00354 std::cout << " nb_reco_electrons: "
00355 << this->reco_electrons().size() << std::endl;
00356 MyTools::PrintVector(this->reco_electrons(), option);
00357
00358 std::cout << " nb_reco_photons: "
00359 << this->reco_photons().size() << std::endl;
00360 MyTools::PrintVector(this->reco_photons(), option);
00361
00362 std::cout << " nb_reco_muons: "
00363 << this->reco_muons().size() << std::endl;
00364 MyTools::PrintVector(this->reco_muons("all"), option);
00365
00366 std::cout << " nb_reco_jets: "
00367 << this->reco_jets().size() << std::endl;
00368 MyTools::PrintVector(this->reco_jets(), option);
00369
00370 std::cout << " nb_reco_taujets: "
00371 << this->reco_taujets().size() << std::endl;
00372 MyTools::PrintVector(this->reco_taujets(), option);
00373
00374 std::cout << " nb_truth_jets: "
00375 << this->truth_jets().size() << std::endl;
00376 MyTools::PrintVector(this->truth_jets(), option);
00377
00378 if(option=="v"){
00379 std::cout << " nb_truth_particles: "
00380 << this->truth_particles().size() << std::endl;
00381 MyTools::PrintVector(this->truth_particles(), option);
00382 }
00383
00384 this->met_manager().Print(option);
00385
00386
00387 return;
00388
00389 }