ATLAS Offline Software
Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
Root::TTileTripReader Class Reference

#include <TTileTripReader.h>

Collaboration diagram for Root::TTileTripReader:

Public Types

enum  Verbosity { Default =0, Debug =1 }
 

Public Member Functions

 TTileTripReader (const char *name="TTileTripReader")
 
virtual ~TTileTripReader ()
 
 TTileTripReader (const TTileTripReader &)=delete
 
TTileTripReaderoperator= (const TTileTripReader &)=delete
 
const char * getName () const
 Get the name of the class instance. More...
 
const asg::AcceptInfogetAcceptInfo () const
 
asg::AcceptData accept (int run, int lbn, unsigned int event=0, double eta=-99.9, double phi=-99.9, int tileError=0, int tileFlags=0)
 
double areaTripFraction (int run, int lbn, double eta, double phi, double dR)
 
float calculate (int run, int lbn, double eta, double phi, double dR, int tileError=0, int tileFlags=0)
 
bool checkEtaPhi (int run, int lbn, double eta, double phi)
 
bool checkEvent (unsigned int run, unsigned int lbn, unsigned int event)
 
bool checkExtendedEtaPhi (int run, int lbn, double eta, double phi, double delEta, double delPhi)
 
int finalize ()
 
std::vector< TripRegiongetEtaPhi (int run, int lbn, bool force=false)
 
int initialize ()
 
void memLoadTripFile ()
 closes the ability to add more trip files to the chain and loads the current TChain into memory as a TTree. More...
 
TripRegion partModToEtaPhi (int part, int mod)
 
void readTileFlags (int run, int lbn, int tileError, int tileFlags)
 
int setTripFile (const char *file)
 
void setVerbosity (int v=Debug, std::ostream &stream=std::cout)
 

Public Attributes

TripRegion m_LBOffsets
 
TripRegion m_EBOffsets
 

Private Member Functions

void buildOffsets ()
 Attempts to correct for improperly built trip list files. More...
 
int findStartEntry (int run)
 
void setBadEventList ()
 Fills the bad event map. More...
 

Private Attributes

std::string m_name
 The name of the class instance. More...
 
asg::AcceptInfo m_accept
 
TTree * m_trips
 
TTree * m_runMap
 
int m_mapRun
 
int m_Run
 
int m_FirstEntry
 
int m_currentRun
 
int m_currentLbn
 
int m_startEntry
 
int m_verbosity
 
int m_LastTileFlags
 
std::map< unsigned int, std::map< unsigned short, unsigned int > > m_badEvents
 
std::vector< TripRegionm_currentTrips
 
std::vector< int > m_Offsets
 
std::vector< char > * m_Partition
 
std::vector< char > * m_Module
 
int m_LumiStart
 
std::vector< int > * m_LumiEnd
 
std::ostream * m_msglog
 
bool m_ChainsLoaded
 

Detailed Description

Definition at line 40 of file TTileTripReader.h.

Member Enumeration Documentation

◆ Verbosity

Enumerator
Default 
Debug 

Definition at line 43 of file TTileTripReader.h.

43  {
44  Default=0,
45  Debug=1
46  };

Constructor & Destructor Documentation

◆ TTileTripReader() [1/2]

Root::TTileTripReader::TTileTripReader ( const char *  name = "TTileTripReader")

Definition at line 28 of file TTileTripReader.cxx.

29  : m_name (name)
30 {
31  m_trips=new TChain("TripList");
32  m_runMap=new TChain("RunMap");
33  m_currentRun=0;
34  m_currentLbn=0;
35  m_startEntry=0;
36  m_Partition=0;
37  m_Module=0;
38  m_LumiEnd=0;
39  m_FirstEntry=0;
40  m_LumiStart=0;
41  m_Run=0;
42  m_mapRun=0;
45  m_msglog=&cout;
46  m_LBOffsets.eta1=0;
47  m_LBOffsets.eta2=0;
48  m_LBOffsets.phi1=0;
49  m_LBOffsets.phi2=0;
50  m_EBOffsets.eta1=0;
51  m_EBOffsets.eta2=0;
52  m_EBOffsets.phi1=0;
53  m_EBOffsets.phi2=0;
54  m_ChainsLoaded=false;
56 }

◆ ~TTileTripReader()

Root::TTileTripReader::~TTileTripReader ( )
virtual

Definition at line 58 of file TTileTripReader.cxx.

58  {
59  if(m_trips)delete m_trips;
60  if(m_runMap)delete m_runMap;
61 }

◆ TTileTripReader() [2/2]

Root::TTileTripReader::TTileTripReader ( const TTileTripReader )
delete

Member Function Documentation

◆ accept()

asg::AcceptData Root::TTileTripReader::accept ( int  run,
int  lbn,
unsigned int  event = 0,
double  eta = -99.9,
double  phi = -99.9,
int  tileError = 0,
int  tileFlags = 0 
)
Parameters
runRun number
lbnLumiblock number
eventEvent number
etaEta position
phiPhi position
tileErrorthe tileError value
tileFlagsthe tileFlags value
Returns
Constant AcceptData containing the result of the check

Trip result is stored under "InTrip", event check is stored under "BadEvent"

Definition at line 63 of file TTileTripReader.cxx.

63  {
64  asg::AcceptData acceptData (&m_accept);
65  readTileFlags(run,lbn,tileError,tileFlags);
66  if(eta!=-99.9 && phi!=-99.9)
67  acceptData.setCutResult("InTrip",checkEtaPhi(run,lbn,eta,phi));
68  acceptData.setCutResult("BadEvent",checkEvent((unsigned int)run,
69  (unsigned short)lbn,
70  (unsigned int)event));
71  return acceptData;
72 }

◆ areaTripFraction()

double Root::TTileTripReader::areaTripFraction ( int  run,
int  lbn,
double  eta,
double  phi,
double  dR 
)
Parameters
runthe run number
lbnthe lumiblock number
etathe area central eta coordinate
phithe area central phi coordinate
dRthe area size
Returns
The fraction of the area in eta phi space covered by tripped modules

Definition at line 74 of file TTileTripReader.cxx.

74  {
75  vector<TripRegion> trips=getEtaPhi(run,lbn);
76  if(phi>pi)phi=phi-2*pi;
77  double dR2=dR*dR;
78  double tripArea=0;
79  size_t ntrips=trips.size();
80  for(size_t i=0;i<ntrips;++i){
81  TripRegion& trip=trips[i];
82  for(double x=trip.eta1+.05;x<trip.eta2;x+=0.1 ){
83  double dx2=pow(eta-x,2);
84  for(double y=trip.phi1+width/8.;y<trip.phi2;y+=width/4.){
85  double deltaR12 = fabs(phi - y);
86  if (deltaR12 > pi)
87  deltaR12 = 2.0 * pi - deltaR12;
88  double dy2=pow(deltaR12,2);
89  double delR2=dx2+dy2;
90  if(delR2<=dR2)
91  tripArea+=0.1*width/4.;
92  }
93  }
94  }
95  double jetArea=pi*dR*dR;
96  return tripArea/jetArea;
97 }

◆ buildOffsets()

void Root::TTileTripReader::buildOffsets ( )
private

Attempts to correct for improperly built trip list files.

DEPRECIATED

Definition at line 104 of file TTileTripReader.cxx.

104  {
105  if(m_ChainsLoaded)return;
106  ostream& msg=*m_msglog;
107  m_Offsets.clear();
108  m_Offsets.push_back(0);
109  int nTrees=((TChain*)m_trips)->GetNtrees();
110  if(nTrees==1){
111  int mapentries=m_runMap->GetEntries();
112  for(int i=0;i<mapentries;++i){
113  m_runMap->GetEntry(i);
114  m_trips->GetEntry(m_FirstEntry+m_Offsets.back());
115  if(m_Run!=m_mapRun){
116  int findRun=m_mapRun;
117  m_runMap->GetEntry(i-1);
118  if(m_verbosity==Debug){
119  msg<<"Searching for "<<findRun<<" starting from "<<
120  m_mapRun<<" current offset "<<m_Offsets.back()<<
121  endl;
122  }
123  int tripEntry=m_FirstEntry+m_Offsets.back();
124  while(m_Run!=findRun){
125  if(!m_trips->GetEntry(tripEntry)){
126  msg<<"Overshot the end of the TTree!\n";
127  return;
128  }
129  ++tripEntry;
130  }
131  m_Offsets.push_back(tripEntry-1);
132  }
133  }
134  return;
135  }
136  m_trips->SetBranchStatus("*",0);
137  int tree=0;
138  while(tree<nTrees){
139  m_trips->GetEntry(m_Offsets.back());
140  TTree* currentTree=m_trips->GetTree();
141  m_Offsets.push_back(currentTree->GetEntries()+m_Offsets.back());
142  ++tree;
143  }
144  m_trips->SetBranchStatus("*",1);
145 }

◆ calculate()

float Root::TTileTripReader::calculate ( int  run,
int  lbn,
double  eta,
double  phi,
double  dR,
int  tileError = 0,
int  tileFlags = 0 
)
Parameters
runRun number
lbnLumiblock number
etaEta value of cone center
phiPhi value of cone center
dRRadius of the cone in (eta,phi) space
tileErrorthe tileError value
tileFlagsthe tileFlags value
Returns
fraction of the area in eta phi space covered by tripped modules

Definition at line 99 of file TTileTripReader.cxx.

99  {
100  readTileFlags(run,lbn,tileError,tileFlags);
101  return areaTripFraction(run,lbn,eta,phi,dR);
102 }

◆ checkEtaPhi()

bool Root::TTileTripReader::checkEtaPhi ( int  run,
int  lbn,
double  eta,
double  phi 
)
Parameters
runthe run number
lbnthe lumiblock number
etaeta value to check
phiphi value to check
Returns
true if there's a tripped module in the region

Definition at line 147 of file TTileTripReader.cxx.

147  {
148  ostream& msg=*m_msglog;
149  vector<TripRegion> tripRegions=getEtaPhi(run,lbn);
150  size_t ntrips=tripRegions.size();
151  if(phi>pi)phi=phi-2.*pi;
152  if(m_verbosity==Debug){
153  msg<<"Checking region eta= "<<eta<<", phi="<<phi<<" for run "<<run<<
154  " lbn "<<lbn<<endl;
155  }
156 
157  for(size_t i=0;i<ntrips;++i){
158  if(tripRegions[i].eta1==0 || tripRegions[i].eta1==-0.9){// Long Barrel
159  //Use a delta phi check to account for extended regions around pi--
160  double delPhi=tripRegions[i].phi2+m_LBOffsets.phi2-tripRegions[i].phi1+m_LBOffsets.phi1;
161  delPhi/=2.;
162  double tripPhiCenter=fabs(delPhi+tripRegions[i].phi1-m_LBOffsets.phi1) <= pi ?
163  delPhi+tripRegions[i].phi1-m_LBOffsets.phi1 : tripRegions[i].phi2+m_LBOffsets.phi2 - delPhi;
164  double deltaR12 = fabs(phi - tripPhiCenter);
165  if (deltaR12 > pi)
166  deltaR12 = 2.0 * pi - deltaR12;
167  //--
168  if(tripRegions[i].eta1-m_LBOffsets.eta1<=eta &&
169  tripRegions[i].eta2+m_LBOffsets.eta2>=eta &&
170  deltaR12<delPhi)
171  return true;
172  }
173  else{// Extended Barrel
174  //Use a delta phi check to account for extended regions around pi--
175  double delPhi=tripRegions[i].phi2+m_EBOffsets.phi2-tripRegions[i].phi1+m_EBOffsets.phi1;
176  delPhi/=2.;
177  double tripPhiCenter=fabs(delPhi+tripRegions[i].phi1-m_EBOffsets.phi1) <= pi ?
178  delPhi+tripRegions[i].phi1-m_EBOffsets.phi1 : tripRegions[i].phi2+m_EBOffsets.phi2 - delPhi;
179  double deltaR12 = fabs(phi - tripPhiCenter);
180  if (deltaR12 > pi)
181  deltaR12 = 2.0 * pi - deltaR12;
182  //--
183  if(tripRegions[i].eta1-m_EBOffsets.eta1<=eta &&
184  tripRegions[i].eta2+m_EBOffsets.eta2>=eta &&
185  deltaR12<delPhi )
186  return true;
187  }
188  }
189  return false;
190 }

◆ checkEvent()

bool Root::TTileTripReader::checkEvent ( unsigned int  run,
unsigned int  lbn,
unsigned int  event 
)
Parameters
runRun number
lbnLumiblock number
eventevent number
Returns
true if event is good false if bad

Checks against an internal map of 433 bad events

Definition at line 192 of file TTileTripReader.cxx.

192  {
193  ostream& msg=*m_msglog;
194  unsigned int evt;
195  if(m_verbosity==Debug){
196  msg<<"Checking bad event for run= "<<run<<", lbn="<<lbn<<" event "<<
197  event<<endl;
198  }
199  map<unsigned int,map<unsigned short,unsigned int> >::iterator itr=m_badEvents.find(run);
200  if(itr!=m_badEvents.end()){
201  map<unsigned short,unsigned int>& lumi=(*itr).second;
203  if(litr!=lumi.end()){
204  evt=(*litr).second;
205  if(m_verbosity==Debug){
206  msg<<"run= "<<run<<", lbn="<<lbn<<" event "<<
207  event<<" pass check = "<<(evt!=event)<<endl;
208  }
209  return (evt!=event);
210  }
211  if(m_verbosity==Debug){
212  msg<<"run= "<<run<<", lbn="<<lbn<<" event "<<
213  event<<" pass check = "<<true<<endl;
214  }
215  return true;
216  }
217  if(m_verbosity==Debug){
218  msg<<"run= "<<run<<", lbn="<<lbn<<" event "<<
219  event<<" pass check = "<<true<<endl;
220  }
221  return true;
222 }

◆ checkExtendedEtaPhi()

bool Root::TTileTripReader::checkExtendedEtaPhi ( int  run,
int  lbn,
double  eta,
double  phi,
double  delEta,
double  delPhi 
)
Parameters
runthe run number
lbnthe lumiblock number
etaeta value to check
phiphi value to check
delEtaextends each trip region checked by delEta on both sides
delPhiextends each trip region checked by delPhi on both sides
Returns
true if there's a tripped module near eta,phi

Definition at line 224 of file TTileTripReader.cxx.

224  {
225  ostream& msg=*m_msglog;
226  vector<TripRegion> tripRegions=getEtaPhi(run,lbn);
227  size_t ntrips=tripRegions.size();
228  if(phi>pi)phi=phi-2.*pi;
229  if(m_verbosity==Debug){
230  msg<<"Checking region eta= "<<eta<<", phi="<<phi<<" for run "<<run<<
231  " lbn "<<lbn<<endl;
232  }
233  for(size_t i=0;i<ntrips;++i){
234  //Use a delta phi check to account for extended regions around pi--
235  double dPhi=tripRegions[i].phi2+delPhi-tripRegions[i].phi1+delPhi;
236  dPhi/=2.;
237  double tripPhiCenter=fabs(dPhi+tripRegions[i].phi1-delPhi) <= pi ?
238  dPhi+tripRegions[i].phi1-delPhi : tripRegions[i].phi2+delPhi - dPhi;
239  double deltaR12 = fabs(phi - tripPhiCenter);
240  if (deltaR12 > pi)
241  deltaR12 = 2.0 * pi - deltaR12;
242  //--
243  if(tripRegions[i].eta1-delEta<=eta && tripRegions[i].eta2+delEta>=eta &&
244  tripRegions[i].phi1-delPhi<=phi && tripRegions[i].phi2+delPhi>=phi )
245  return true;
246  }
247  return false;
248 }

◆ finalize()

int Root::TTileTripReader::finalize ( )
inline

Definition at line 139 of file TTileTripReader.h.

139 { return 1; }

◆ findStartEntry()

int Root::TTileTripReader::findStartEntry ( int  run)
private
Parameters
runRun number
Returns
Position in trip TTree where the run starts

Definition at line 250 of file TTileTripReader.cxx.

250  {
251  ostream& msg=*m_msglog;
252  if(run==m_currentRun)return m_startEntry;
253  int entry=-1;
254  do{
255  ++entry;
256  if(!m_runMap->GetEntry(entry))return -999;
257  }while(run!=m_mapRun);
258  if(m_Offsets.empty()){
259  m_trips->GetEntry(m_FirstEntry);
261  }
262  else{
263  if(m_ChainsLoaded || ((TChain*)m_runMap)->GetNtrees()==1){
264  size_t nOffsets=m_Offsets.size();
265  for(size_t i=0;i<nOffsets;++i){
266  m_trips->GetEntry(m_FirstEntry+m_Offsets[i]);
267  if(m_Run==run){
269  break;
270  }
271  }
272  if(m_Run!=run)
273  msg<<"Problem! Can't find proper offset\n";
274  }
275  else{
276  int offIdx=m_runMap->GetTreeNumber();
278  m_trips->GetEntry(m_startEntry);
279  }
280  }
281  if(m_Run!=run){
282  msg<<"Problem! Can't find proper offset\n";
283  return -999;
284 // buildOffsets();
285 // m_runMap->GetEntry(entry);
286 // if(m_runMap->GetNtrees()==1){
287 // size_t nOffsets=m_Offsets.size();
288 // for(size_t i=0;i<nOffsets;++i){
289 // m_startEntry=m_FirstEntry+m_Offsets[i];
290 // m_trips->GetEntry(m_FirstEntry+m_Offsets[i]);
291 // if(m_Run==run)break;
292 // }
293 // if(m_Run!=run)
294 // msg<<"Problem! Can't find proper offset\n";
295 // }
296 // else{
297 // int offIdx=m_runMap->GetTreeNumber();
298 // m_startEntry=m_FirstEntry+m_Offsets[offIdx];
299 // }
300  }
302  if(m_verbosity==Debug){
303  const string partition[4]={
304  "LBA",
305  "LBC",
306  "EBA",
307  "EBC"
308  };
309  msg<<"Trip list for run "<<run<<endl;
310  msg<<"First entry val="<<m_startEntry<<endl;
311  int loop=m_startEntry;
312  m_trips->GetEntry(loop);
313  msg<<" Run returned = "<<m_Run<<endl;
314  while(m_Run==run){
315  vector<char>& part=*m_Partition;
316  vector<char>& mod=*m_Module;
317  vector<int>& lbend=*m_LumiEnd;
318  size_t ntrips=lbend.size();
319  for(size_t i=0;i<ntrips;++i){
320  msg<<m_Run<<" "<<partition[(int)part[i]]<<
321  setfill('0')<<setw(2)<<(int)mod[i]+1<<setw(4)<<
322  " lbn"<<m_LumiStart<<"-"<<
323  lbend[i]<<endl;
324 
325  }
326  ++loop;
327  m_trips->GetEntry(loop);
328  }
329  }
330  return m_startEntry;
331 }

◆ getAcceptInfo()

const asg::AcceptInfo& Root::TTileTripReader::getAcceptInfo ( ) const
inline

Definition at line 57 of file TTileTripReader.h.

58  {
59  return m_accept;
60  }

◆ getEtaPhi()

vector< TripRegion > Root::TTileTripReader::getEtaPhi ( int  run,
int  lbn,
bool  force = false 
)
Parameters
runthe run number
lbnthe lumiblock number
forceForces regenerating the trip list when the run and lbn haven't changed
Returns
a vector containing TripRegions structs for all trip regions

Definition at line 333 of file TTileTripReader.cxx.

333  {
334  ostream& msg=*m_msglog;
335  if(run==m_currentRun && m_currentLbn==lbn && !force){
336  if(m_verbosity==Debug){
337  msg<<"Trip regions found for run "<<run<<" lbn "<<lbn<<endl;
338  size_t ntrips=m_currentTrips.size();
339  for(size_t i=0;i<ntrips;++i){
340  msg<<m_currentTrips[i].eta1<<" <= eta <= "<<
341  m_currentTrips[i].eta2<<endl<<" "<<
342  m_currentTrips[i].phi1<<" <= phi <= "<<
343  m_currentTrips[i].phi2<<endl;
344  }
345  }
346  return m_currentTrips;
347  }
348  int entry=findStartEntry(run);
349  if(entry==-999){
350  vector<TripRegion> emptyTrips;
351  msg<<"Run not contained in chain!\n";
352  return emptyTrips;
353  }
354  vector<TripRegion>& tripRegions=m_currentTrips;
355  tripRegions.clear();
356 // m_currentLbn=lbn;
357  if(m_verbosity==Debug)
358  msg<<"Generating trip regions found for run "<<run<<" lbn "<<lbn<<
359  " Current run = "<<m_currentRun<<" current lbn = "<<
360  m_currentLbn<<endl;
361  if(!m_trips->GetEntry(entry)){
362  msg<<"Run not contained in trip chain!\n";
363  return tripRegions;
364  }
365  while(run==m_Run){
366  vector<char>& part=*m_Partition;
367  vector<char>& mod=*m_Module;
368  vector<int>& lbend=*m_LumiEnd;
369  size_t ntrips=lbend.size();
370  if(m_LumiStart<=lbn){
371  for(size_t i=0;i<ntrips;++i){
372  if(lbend[i]>=lbn){
373  tripRegions.push_back(partModToEtaPhi(part[i],mod[i]));
374  if(m_verbosity==Debug){
375  msg<<tripRegions.back().eta1<<" <= eta <= "<<
376  tripRegions.back().eta2<<endl<<" "<<
377  tripRegions.back().phi1<<" <= phi <= "<<
378  tripRegions.back().phi2<<endl;
379  }
380  }
381  }
382 
383  }
384  ++entry;
385  if(!m_trips->GetEntry(entry)){
386  msg<<"Run not contained in trip chain!\n";
387  return tripRegions;
388  }
389  }
390  m_currentLbn=lbn;
391  return tripRegions;
392 }

◆ getName()

const char* Root::TTileTripReader::getName ( ) const
inline

Get the name of the class instance.

Definition at line 55 of file TTileTripReader.h.

55 { return m_name.c_str(); };

◆ initialize()

int Root::TTileTripReader::initialize ( )

Definition at line 394 of file TTileTripReader.cxx.

394  {
395 #ifndef ROOTCORE
396  m_accept.addCut("InTrip","true if eta phi fall inside a powered off module");
397 #endif /*ROOTCORE*/
398  return 1;
399 }

◆ memLoadTripFile()

void Root::TTileTripReader::memLoadTripFile ( )

closes the ability to add more trip files to the chain and loads the current TChain into memory as a TTree.

Definition at line 401 of file TTileTripReader.cxx.

401  {
402  if(m_ChainsLoaded)return;
403  TChain* tripMap=(TChain*)m_trips;
404  TChain* runMap=(TChain*)m_runMap;
405  m_trips=new TTree("TripList_Mem","Memory loaded TripList");
406  m_runMap=new TTree("RunMap_Mem","Starting entry for each run in TripList");
407 
408  m_runMap->Branch("Run",&m_mapRun,"Run/I");
409  m_runMap->Branch("FirstEntry",&m_FirstEntry,"FirstEntry/I");
410 
411  m_trips->Branch("Run",&m_Run,"Run/I");
412  m_trips->Branch("LumiStart",&m_LumiStart,"LumiStart/I");
413  m_trips->Branch("Partition",&m_Partition);
414  m_trips->Branch("Module",&m_Module);
415  m_trips->Branch("LumiEnd",&m_LumiEnd);
416 
417  m_currentRun=0;
418  m_currentLbn=0;
419  m_startEntry=0;
420 
421  int entry=0;
422  while(runMap->GetEntry(entry)){
423  m_runMap->Fill();
424  ++entry;
425  }
426  entry=0;
427  while(tripMap->GetEntry(entry)){
428  m_trips->Fill();
429  ++entry;
430  }
431  delete tripMap;
432  delete runMap;
433  m_ChainsLoaded=true;
434 
435 }

◆ operator=()

TTileTripReader& Root::TTileTripReader::operator= ( const TTileTripReader )
delete

◆ partModToEtaPhi()

TripRegion Root::TTileTripReader::partModToEtaPhi ( int  part,
int  mod 
)
Parameters
parttile partition: LBA=0, LBC=1, EBA=2, EBC=3
modtile module. Note: starts at 0, not 1
Returns
A TripRegion struct containing the limits of the module

Definition at line 437 of file TTileTripReader.cxx.

437  {
438  ostream& msg=*m_msglog;
439  TripRegion region;
440  switch(part){
441  case 0: //LBA
442  region.eta1=0;
443  region.eta2=0.9;
444  break;
445  case 1: //LBC
446  region.eta1=-0.9;
447  region.eta2=0;
448  break;
449  case 2: //EBA
450  region.eta1=0.8;
451  region.eta2=1.7;
452  break;
453  case 3: //EBC
454  region.eta1=-1.7;
455  region.eta2=-0.8;
456  break;
457  default:
458  msg<<"Bad partition value passed!\n";
459  region.eta1=-999;
460  region.eta2=-999;
461  region.phi1=-999;
462  region.phi2=-999;
463  return region;
464  }
465  if(mod<32){
466  region.phi1=((double)mod)*width;
467  region.phi2=region.phi1+width;
468  }
469  else if(mod<64){
470  region.phi1=((double)mod)*width-2.*pi;
471  region.phi2=region.phi1+width;
472  }
473  else{
474  msg<<"Bad module value passed!\n";
475  region.eta1=-999;
476  region.eta2=-999;
477  region.phi1=-999;
478  region.phi2=-999;
479  return region;
480  }
481  if(m_verbosity==Debug){
482  const string partition[4]={
483  "LBA",
484  "LBC",
485  "EBA",
486  "EBC"
487  };
488  msg<<"Module "<<partition[part]<<setfill('0')<<setw(2)<<mod+1<<
489  " region "<<region.eta1<<" <= eta <= "<<region.eta2<<" "<<
490  region.phi1<<" <= phi <= "<<region.phi2<<endl;
491  }
492  return region;
493 }

◆ readTileFlags()

void Root::TTileTripReader::readTileFlags ( int  run,
int  lbn,
int  tileError,
int  tileFlags 
)
Parameters
runthe run number
lbnthe lumiblock number
tileErrorthe tileError value
tileFlagsthe tileFlags value

Uses the tileError and tileFlags values to improve the set of trip regions in the event.

Definition at line 495 of file TTileTripReader.cxx.

495  {
496  ostream& msg=*m_msglog;
497  if(tileError==0 && m_LastTileFlags){//force regenerating trip list if tileError=OK and previously an error was present
498  getEtaPhi(run,lbn,true);
499  m_LastTileFlags=0;
500  }
501  if(tileError!=1)return; //Tile flags only contain extra masked module info if tileError==1 or Warning
502  if(tileFlags==m_LastTileFlags){
503  if(m_verbosity==Debug){
504  size_t ntrips=m_currentTrips.size();
505  msg<<"Total masked before reading tileFlags = "<<ntrips<<endl;
506  }
507  return;
508  }//if the flags havent changed since last time, don't regenerate the trip regions
509  m_LastTileFlags=tileFlags;
510  getEtaPhi(run, lbn,true);//Generates a fresh set of TripRegions from DCS to compare to the flags
511  int consecBad = (tileFlags>>16) & 0xF; //consecutive bad modules
512  int badMod1 = (tileFlags>>20) & 0x3F; //first module number
513  int badMod2= (badMod1 + consecBad - 1); //last module number
514  int part = ((tileFlags>>26) & 0x3); //partition number
515 
516  int greaterMod=-1;
517  if(badMod2>63){
518  greaterMod=badMod2-64;
519  badMod2=63;
520  }
521 
522  int currentMod=badMod1;
523  while(currentMod<=badMod2){
524  TripRegion trip=partModToEtaPhi(part,currentMod);
525  size_t ntrips=m_currentTrips.size();
526  bool inDCSlist=false;
527  for(size_t i=0;i<ntrips;++i){
528  if(m_currentTrips[i].eta1==trip.eta1 &&
529  m_currentTrips[i].eta2==trip.eta2 &&
530  m_currentTrips[i].phi1==trip.phi1 &&
531  m_currentTrips[i].phi2==trip.phi2 ){
532  inDCSlist=true;
533  break;
534  }
535  }
536  if(!inDCSlist){
537  m_currentTrips.push_back(trip);
538  if(m_verbosity==Debug){
539  const string partition[4]={
540  "LBA",
541  "LBC",
542  "EBA",
543  "EBC"
544  };
545  msg<<"Read masked module "<<partition[part]<<setfill('0')<<setw(2)<<currentMod+1<<
546  " region "<<trip.eta1<<" <= eta <= "<<trip.eta2<<" "<<
547  trip.phi1<<" <= phi <= "<<trip.phi2<<endl;
548  }
549  }
550  ++currentMod;
551  }
552 
553  if(m_verbosity==Debug){
554  size_t ntrips=m_currentTrips.size();
555  msg<<"Total masked after reading tileFlags = "<<ntrips<<endl;
556  for(size_t i=0;i<ntrips;++i){
558  msg<<"Region "<<i<<" "<<trip.eta1<<" <= eta <= "<<trip.eta2<<" "<<
559  trip.phi1<<" <= phi <= "<<trip.phi2<<endl;
560  }
561  }
562 
563  if(greaterMod<0)return;
564  currentMod=0;
565  while(currentMod<=greaterMod){
566  TripRegion trip=partModToEtaPhi(part,currentMod);
567  size_t ntrips=m_currentTrips.size();
568  bool inDCSlist=false;
569  for(size_t i=0;i<ntrips;++i){
570  if(m_currentTrips[i].eta1==trip.eta1 &&
571  m_currentTrips[i].eta2==trip.eta2 &&
572  m_currentTrips[i].phi1==trip.phi1 &&
573  m_currentTrips[i].phi2==trip.phi2 ){
574  inDCSlist=true;
575  break;
576  }
577  }
578  if(!inDCSlist){
579  m_currentTrips.push_back(trip);
580  if(m_verbosity==Debug){
581  const string partition[4]={
582  "LBA",
583  "LBC",
584  "EBA",
585  "EBC"
586  };
587  msg<<"Read masked module "<<partition[part]<<setfill('0')<<setw(2)<<currentMod+1<<
588  " region "<<trip.eta1<<" <= eta <= "<<trip.eta2<<" "<<
589  trip.phi1<<" <= phi <= "<<trip.phi2<<endl;
590  }
591  }
592  ++currentMod;
593  }
594 
595  if(m_verbosity==Debug){
596  size_t ntrips=m_currentTrips.size();
597  msg<<"Total masked after reading tileFlags = "<<ntrips<<endl;
598  for(size_t i=0;i<ntrips;++i){
600  msg<<"Region "<<i<<" "<<trip.eta1<<" <= eta <= "<<trip.eta2<<" "<<
601  trip.phi1<<" <= phi <= "<<trip.phi2<<endl;
602  }
603  }
604 }

◆ setBadEventList()

void Root::TTileTripReader::setBadEventList ( )
private

Fills the bad event map.

Definition at line 636 of file TTileTripReader.cxx.

636  {
637  m_badEvents[211620][ 809] = 30918608;
638  m_badEvents[211620][ 911] = 50250818;
639  m_badEvents[211670][ 170] = 23991666;
640  m_badEvents[211670][ 249] = 32887308;
641  m_badEvents[211697][ 296] = 20481958;
642  m_badEvents[211772][ 453] = 24016459;
643  m_badEvents[211772][ 487] = 32756300;
644  m_badEvents[211772][ 537] = 43708856;
645  m_badEvents[211772][ 665] = 66256038;
646  m_badEvents[211772][ 677] = 69195161;
647  m_badEvents[211772][ 682] = 70495320;
648  m_badEvents[211772][ 713] = 77315023;
649  m_badEvents[211787][ 137] = 25075877;
650  m_badEvents[211787][ 156] = 27722626;
651  m_badEvents[211787][ 231] = 45498134;
652  m_badEvents[211787][ 327] = 70283778;
653  m_badEvents[211787][ 341] = 73478541;
654  m_badEvents[211787][ 379] = 78891936;
655  m_badEvents[211787][ 495] = 104208286;
656  m_badEvents[211787][ 533] = 112676423;
657  m_badEvents[211787][ 606] = 125346821;
658  m_badEvents[211787][ 674] = 134529732;
659  m_badEvents[211787][ 684] = 136745813;
660  m_badEvents[211787][ 687] = 137325328;
661  m_badEvents[211787][ 705] = 141053713;
662  m_badEvents[211787][ 737] = 145106825;
663  m_badEvents[211787][ 781] = 151535382;
664  m_badEvents[211787][ 808] = 155908888;
665  m_badEvents[211787][ 833] = 160751251;
666  m_badEvents[211867][ 415] = 118577411;
667  m_badEvents[211867][ 446] = 126968304;
668  m_badEvents[211867][ 476] = 135267293;
669  m_badEvents[211867][ 488] = 137377078;
670  m_badEvents[211867][ 504] = 138631284;
671  m_badEvents[211867][ 585] = 156060507;
672  m_badEvents[211867][ 601] = 159474909;
673  m_badEvents[211867][ 643] = 166995382;
674  m_badEvents[211867][ 653] = 169150580;
675  m_badEvents[211867][ 664] = 171728297;
676  m_badEvents[211867][ 682] = 175037695;
677  m_badEvents[211867][ 697] = 177341927;
678  m_badEvents[211867][ 708] = 179982739;
679  m_badEvents[211867][ 869] = 205041330;
680  m_badEvents[211867][ 979] = 217122251;
681  m_badEvents[211867][1080] = 235986744;
682  m_badEvents[211937][ 273] = 79579535;
683  m_badEvents[211937][ 311] = 91096963;
684  m_badEvents[211937][ 344] = 100555317;
685  m_badEvents[211937][ 363] = 106299191;
686  m_badEvents[211937][ 433] = 126166771;
687  m_badEvents[211937][ 442] = 128380852;
688  m_badEvents[211937][ 539] = 149037480;
689  m_badEvents[211937][ 573] = 154820435;
690  m_badEvents[211937][ 626] = 163148429;
691  m_badEvents[211937][ 681] = 172136294;
692  m_badEvents[212034][ 268] = 61304416;
693  m_badEvents[212034][ 295] = 70488269;
694  m_badEvents[212034][ 373] = 92815632;
695  m_badEvents[212034][ 377] = 94077220;
696  m_badEvents[212034][ 447] = 110479727;
697  m_badEvents[212034][ 449] = 111039026;
698  m_badEvents[212103][ 265] = 74171827;
699  m_badEvents[212142][ 159] = 42259370;
700  m_badEvents[212142][ 187] = 49777048;
701  m_badEvents[212142][ 241] = 55650409;
702  m_badEvents[212142][ 251] = 58080132;
703  m_badEvents[212142][ 259] = 60326167;
704  m_badEvents[212142][ 305] = 70626642;
705  m_badEvents[212144][ 336] = 82794753;
706  m_badEvents[212144][ 555] = 123722841;
707  m_badEvents[212144][ 594] = 129844287;
708  m_badEvents[212144][ 904] = 184774366;
709  m_badEvents[212144][ 946] = 193059339;
710  m_badEvents[212144][ 981] = 199214801;
711  m_badEvents[212144][ 994] = 201867125;
712  m_badEvents[212144][1094] = 218050419;
713  m_badEvents[212144][1221] = 237399658;
714  m_badEvents[212172][ 128] = 34183408;
715  m_badEvents[212172][ 133] = 35958783;
716  m_badEvents[212172][ 274] = 68520156;
717  m_badEvents[212172][ 283] = 71005981;
718  m_badEvents[212172][ 303] = 75609633;
719  m_badEvents[212172][ 435] = 102794917;
720  m_badEvents[212172][ 453] = 106963891;
721  m_badEvents[212172][ 587] = 133067590;
722  m_badEvents[212172][ 787] = 165298506;
723  m_badEvents[212172][ 825] = 172232714;
724  m_badEvents[212199][ 131] = 34583718;
725  m_badEvents[212199][ 138] = 36561516;
726  m_badEvents[212199][ 165] = 45222651;
727  m_badEvents[212199][ 368] = 97625582;
728  m_badEvents[212199][ 400] = 105175388;
729  m_badEvents[212199][ 414] = 108306676;
730  m_badEvents[212199][ 479] = 122276322;
731  m_badEvents[212199][ 485] = 123361057;
732  m_badEvents[212199][ 557] = 139813253;
733  m_badEvents[212199][ 628] = 154879540;
734  m_badEvents[212272][ 399] = 112893675;
735  m_badEvents[212272][ 402] = 113746110;
736  m_badEvents[212272][ 467] = 132448931;
737  m_badEvents[212272][ 491] = 139054835;
738  m_badEvents[212272][ 504] = 142569344;
739  m_badEvents[212272][ 520] = 146768355;
740  m_badEvents[212272][ 622] = 170422008;
741  m_badEvents[212272][ 656] = 177673918;
742  m_badEvents[212272][ 824] = 213994461;
743  m_badEvents[212272][ 893] = 227713742;
744  m_badEvents[212663][ 312] = 79790422;
745  m_badEvents[212663][ 316] = 80951546;
746  m_badEvents[212663][ 326] = 83989774;
747  m_badEvents[212663][ 366] = 94212644;
748  m_badEvents[212663][ 381] = 97930421;
749  m_badEvents[212663][ 383] = 98521948;
750  m_badEvents[212663][ 387] = 99677557;
751  m_badEvents[212687][ 114] = 17058218;
752  m_badEvents[212687][ 126] = 21243793;
753  m_badEvents[212687][ 168] = 32985216;
754  m_badEvents[212687][ 271] = 58155185;
755  m_badEvents[212687][ 323] = 70331631;
756  m_badEvents[212687][ 357] = 77176767;
757  m_badEvents[212721][ 201] = 52039190;
758  m_badEvents[212721][ 220] = 58603120;
759  m_badEvents[212721][ 246] = 65278591;
760  m_badEvents[212721][ 252] = 67402330;
761  m_badEvents[212721][ 289] = 75228740;
762  m_badEvents[212721][ 319] = 82842050;
763  m_badEvents[212721][ 479] = 122996628;
764  m_badEvents[212721][ 565] = 142364781;
765  m_badEvents[212721][ 604] = 150988998;
766  m_badEvents[212721][ 632] = 155954020;
767  m_badEvents[212742][ 207] = 60144748;
768  m_badEvents[212742][ 223] = 62405230;
769  m_badEvents[212742][ 241] = 68197732;
770  m_badEvents[212742][ 293] = 83308673;
771  m_badEvents[212742][ 295] = 83626188;
772  m_badEvents[212742][ 317] = 88821259;
773  m_badEvents[212742][ 331] = 92381337;
774  m_badEvents[212742][ 560] = 141298623;
775  m_badEvents[212742][ 565] = 142245925;
776  m_badEvents[212742][ 647] = 157663517;
777  m_badEvents[212809][ 303] = 88340723;
778  m_badEvents[212815][ 109] = 31575524;
779  m_badEvents[212815][ 165] = 49225559;
780  m_badEvents[212815][ 204] = 60227314;
781  m_badEvents[212815][ 205] = 60579290;
782  m_badEvents[212815][ 225] = 65242249;
783  m_badEvents[212815][ 227] = 65919654;
784  m_badEvents[212815][ 274] = 76382992;
785  m_badEvents[212815][ 406] = 105164459;
786  m_badEvents[212815][ 631] = 150577349;
787  m_badEvents[212815][ 638] = 151728427;
788  m_badEvents[212858][ 222] = 62152125;
789  m_badEvents[212858][ 225] = 62891044;
790  m_badEvents[212858][ 274] = 77090238;
791  m_badEvents[212858][ 362] = 99938214;
792  m_badEvents[212858][ 379] = 103224773;
793  m_badEvents[212858][ 646] = 160856798;
794  m_badEvents[212858][ 777] = 184840226;
795  m_badEvents[212858][ 801] = 189409163;
796  m_badEvents[212858][ 885] = 204054306;
797  m_badEvents[212858][ 951] = 214360091;
798  m_badEvents[212967][ 131] = 36562258;
799  m_badEvents[212967][ 257] = 63562358;
800  m_badEvents[212967][ 277] = 67422524;
801  m_badEvents[212967][ 389] = 92025946;
802  m_badEvents[212967][ 433] = 100838299;
803  m_badEvents[212993][ 163] = 46421469;
804  m_badEvents[212993][ 244] = 71271803;
805  m_badEvents[212993][ 290] = 83452971;
806  m_badEvents[212993][ 433] = 114146865;
807  m_badEvents[212993][ 495] = 127176803;
808  m_badEvents[212993][ 518] = 132055043;
809  m_badEvents[212993][ 711] = 161451113;
810  m_badEvents[213039][ 435] = 123595163;
811  m_badEvents[213039][ 442] = 125966331;
812  m_badEvents[213039][ 444] = 126635986;
813  m_badEvents[213039][ 449] = 127047496;
814  m_badEvents[213039][ 491] = 139509462;
815  m_badEvents[213039][ 506] = 143494956;
816  m_badEvents[213039][ 508] = 144037393;
817  m_badEvents[213039][ 664] = 183458266;
818  m_badEvents[213039][ 672] = 185493703;
819  m_badEvents[213039][ 676] = 186652045;
820  m_badEvents[213039][ 810] = 218014014;
821  m_badEvents[213039][ 844] = 226420789;
822  m_badEvents[213039][ 942] = 248131356;
823  m_badEvents[213039][ 984] = 255977737;
824  m_badEvents[213039][ 985] = 256259471;
825  m_badEvents[213039][1028] = 264763402;
826  m_badEvents[213039][1091] = 278267871;
827  m_badEvents[213079][ 76] = 21118131;
828  m_badEvents[213079][ 93] = 26924960;
829  m_badEvents[213079][ 107] = 31629850;
830  m_badEvents[213079][ 108] = 32121270;
831  m_badEvents[213079][ 142] = 42417897;
832  m_badEvents[213079][ 253] = 68071791;
833  m_badEvents[213079][ 388] = 97942628;
834  m_badEvents[213079][ 406] = 101552414;
835  m_badEvents[213079][ 446] = 109435226;
836  m_badEvents[213079][ 491] = 118065478;
837  m_badEvents[213092][ 304] = 89221417;
838  m_badEvents[213092][ 329] = 98196863;
839  m_badEvents[213092][ 336] = 100870506;
840  m_badEvents[213092][ 413] = 125456520;
841  m_badEvents[213092][ 428] = 128742710;
842  m_badEvents[213092][ 442] = 131280992;
843  m_badEvents[213092][ 455] = 135005521;
844  m_badEvents[213092][ 456] = 135419301;
845  m_badEvents[213092][ 461] = 136517543;
846  m_badEvents[213130][ 225] = 66606499;
847  m_badEvents[213130][ 238] = 70706931;
848  m_badEvents[213130][ 302] = 87362821;
849  m_badEvents[213130][ 369] = 104601473;
850  m_badEvents[213155][ 161] = 45502898;
851  m_badEvents[213155][ 226] = 65665665;
852  m_badEvents[213155][ 253] = 74594415;
853  m_badEvents[213155][ 271] = 79960342;
854  m_badEvents[213157][ 96] = 27645561;
855  m_badEvents[213157][ 97] = 27788698;
856  m_badEvents[213157][ 173] = 51882395;
857  m_badEvents[213157][ 175] = 52411595;
858  m_badEvents[213157][ 197] = 57234239;
859  m_badEvents[213157][ 206] = 58514150;
860  m_badEvents[213157][ 242] = 63663521;
861  m_badEvents[213157][ 255] = 67535487;
862  m_badEvents[213157][ 270] = 71637795;
863  m_badEvents[213250][ 205] = 60520332;
864  m_badEvents[213250][ 222] = 65257465;
865  m_badEvents[213250][ 247] = 72263290;
866  m_badEvents[213250][ 320] = 92907476;
867  m_badEvents[213250][ 363] = 103329459;
868  m_badEvents[213250][ 382] = 108284785;
869  m_badEvents[213250][ 451] = 128056187;
870  m_badEvents[213314][ 409] = 124373091;
871  m_badEvents[213359][ 46] = 11973418;
872  m_badEvents[213359][ 100] = 29627794;
873  m_badEvents[213359][ 134] = 41636632;
874  m_badEvents[213431][ 371] = 113733490;
875  m_badEvents[213431][ 383] = 117357719;
876  m_badEvents[213486][ 226] = 62935200;
877  m_badEvents[213486][ 356] = 98460803;
878  m_badEvents[213486][ 369] = 103161912;
879  m_badEvents[213486][ 408] = 116687821;
880  m_badEvents[213486][ 443] = 127413823;
881  m_badEvents[213486][ 470] = 136352132;
882  m_badEvents[213486][ 605] = 172136447;
883  m_badEvents[213539][ 166] = 48261169;
884  m_badEvents[213539][ 343] = 96085689;
885  m_badEvents[213539][ 364] = 101400979;
886  m_badEvents[213539][ 401] = 110923015;
887  m_badEvents[213539][ 437] = 122855066;
888  m_badEvents[213539][ 457] = 129277962;
889  m_badEvents[213539][ 471] = 132857115;
890  m_badEvents[213539][ 596] = 174867207;
891  m_badEvents[213539][ 702] = 206952674;
892  m_badEvents[213539][ 722] = 213262287;
893  m_badEvents[213539][ 867] = 257284352;
894  m_badEvents[213539][ 918] = 271585195;
895  m_badEvents[213539][ 935] = 276532153;
896  m_badEvents[213539][1062] = 311135385;
897  m_badEvents[213539][1093] = 319727565;
898  m_badEvents[213539][1152] = 336490953;
899  m_badEvents[213627][ 272] = 80425704;
900  m_badEvents[213640][ 56] = 12005902;
901  m_badEvents[213640][ 70] = 14918463;
902  m_badEvents[213640][ 81] = 18079040;
903  m_badEvents[213640][ 163] = 39220054;
904  m_badEvents[213684][ 253] = 70685007;
905  m_badEvents[213695][ 260] = 78929129;
906  m_badEvents[213695][ 275] = 83295843;
907  m_badEvents[213695][ 395] = 118353505;
908  m_badEvents[213695][ 422] = 127780110;
909  m_badEvents[213702][ 224] = 65859325;
910  m_badEvents[213702][ 234] = 69356479;
911  m_badEvents[213702][ 241] = 71928803;
912  m_badEvents[213754][ 439] = 130286845;
913  m_badEvents[213754][ 468] = 139658841;
914  m_badEvents[213754][ 487] = 145336905;
915  m_badEvents[213754][ 501] = 149295259;
916  m_badEvents[213754][ 513] = 152831111;
917  m_badEvents[213754][ 530] = 158255438;
918  m_badEvents[213754][ 661] = 194754352;
919  m_badEvents[213754][ 668] = 197140774;
920  m_badEvents[213754][ 826] = 239811696;
921  m_badEvents[213754][ 881] = 258669913;
922  m_badEvents[213754][ 938] = 277098450;
923  m_badEvents[213754][1142] = 338925991;
924  m_badEvents[213754][1329] = 392113583;
925  m_badEvents[213796][ 158] = 44507365;
926  m_badEvents[213796][ 206] = 58985238;
927  m_badEvents[213796][ 301] = 83448459;
928  m_badEvents[213796][ 333] = 93593176;
929  m_badEvents[213796][ 360] = 99781558;
930  m_badEvents[213816][ 192] = 55406360;
931  m_badEvents[213816][ 269] = 78481689;
932  m_badEvents[213816][ 283] = 82641406;
933  m_badEvents[213816][ 370] = 108457578;
934  m_badEvents[213819][ 160] = 46811285;
935  m_badEvents[213819][ 180] = 52871721;
936  m_badEvents[213819][ 202] = 59259282;
937  m_badEvents[213819][ 239] = 68706061;
938  m_badEvents[213819][ 280] = 81117930;
939  m_badEvents[213819][ 305] = 87854925;
940  m_badEvents[213819][ 332] = 95539190;
941  m_badEvents[213900][ 324] = 96085442;
942  m_badEvents[213900][ 349] = 104773361;
943  m_badEvents[213900][ 373] = 110881775;
944  m_badEvents[213900][ 475] = 139955858;
945  m_badEvents[213900][ 491] = 144250720;
946  m_badEvents[213900][ 561] = 167029804;
947  m_badEvents[213900][ 624] = 186510324;
948  m_badEvents[213900][ 722] = 218591613;
949  m_badEvents[213900][ 734] = 221225189;
950  m_badEvents[213900][ 871] = 263297620;
951  m_badEvents[213951][ 271] = 79566293;
952  m_badEvents[213951][ 401] = 118812783;
953  m_badEvents[213951][ 441] = 128654993;
954  m_badEvents[213951][ 457] = 132288337;
955  m_badEvents[213951][ 571] = 154551203;
956  m_badEvents[213951][ 620] = 169085961;
957  m_badEvents[213964][ 52] = 13462948;
958  m_badEvents[213968][ 179] = 52179074;
959  m_badEvents[213968][ 206] = 60769634;
960  m_badEvents[214021][ 377] = 111694242;
961  m_badEvents[214021][ 393] = 116031010;
962  m_badEvents[214021][ 515] = 151050310;
963  m_badEvents[214021][ 529] = 154745174;
964  m_badEvents[214021][ 531] = 155421765;
965  m_badEvents[214021][ 577] = 167678775;
966  m_badEvents[214021][ 687] = 201372055;
967  m_badEvents[214021][ 753] = 223504090;
968  m_badEvents[214021][ 862] = 256032256;
969  m_badEvents[214021][1077] = 315933922;
970  m_badEvents[214086][ 198] = 58661578;
971  m_badEvents[214086][ 222] = 65915113;
972  m_badEvents[214086][ 265] = 78838619;
973  m_badEvents[214086][ 312] = 90367641;
974  m_badEvents[214086][ 337] = 97701655;
975  m_badEvents[214086][ 398] = 117844979;
976  m_badEvents[214086][ 405] = 120239052;
977  m_badEvents[214086][ 505] = 151404219;
978  m_badEvents[214086][ 511] = 152654874;
979  m_badEvents[214086][ 583] = 175508847;
980  m_badEvents[214086][ 620] = 187280092;
981  m_badEvents[214086][ 862] = 259666334;
982  m_badEvents[214086][ 935] = 280635242;
983  m_badEvents[214086][ 949] = 284662039;
984  m_badEvents[214086][1152] = 337584653;
985  m_badEvents[214160][ 120] = 35196096;
986  m_badEvents[214160][ 132] = 39644970;
987  m_badEvents[214160][ 304] = 91735548;
988  m_badEvents[214160][ 446] = 134801908;
989  m_badEvents[214160][ 489] = 148028079;
990  m_badEvents[214160][ 673] = 208029920;
991  m_badEvents[214160][ 713] = 219965263;
992  m_badEvents[214176][ 348] = 101831142;
993  m_badEvents[214216][ 315] = 92809021;
994  m_badEvents[214216][ 327] = 95746910;
995  m_badEvents[214216][ 409] = 119902265;
996  m_badEvents[214216][ 426] = 124577717;
997  m_badEvents[214216][ 443] = 129177081;
998  m_badEvents[214216][ 524] = 157789464;
999  m_badEvents[214216][ 604] = 182047256;
1000  m_badEvents[214216][ 609] = 183268716;
1001  m_badEvents[214216][ 620] = 186867324;
1002  m_badEvents[214216][ 643] = 194803186;
1003  m_badEvents[214216][ 654] = 198743354;
1004  m_badEvents[214216][ 693] = 211156533;
1005  m_badEvents[214216][ 718] = 219502607;
1006  m_badEvents[214388][ 482] = 141016617;
1007  m_badEvents[214388][ 512] = 149507370;
1008  m_badEvents[214388][ 529] = 154431800;
1009  m_badEvents[214388][ 546] = 160010331;
1010  m_badEvents[214390][ 126] = 30550658;
1011  m_badEvents[214390][ 165] = 43024151;
1012  m_badEvents[214390][ 396] = 106759792;
1013  m_badEvents[214494][ 109] = 29478633;
1014  m_badEvents[214494][ 139] = 39122996;
1015  m_badEvents[214494][ 153] = 42985263;
1016  m_badEvents[214494][ 235] = 67626184;
1017  m_badEvents[214494][ 240] = 68658006;
1018  m_badEvents[214494][ 361] = 107230032;
1019  m_badEvents[214494][ 376] = 112238214;
1020  m_badEvents[214494][ 388] = 115761949;
1021  m_badEvents[214494][ 438] = 130702325;
1022  m_badEvents[214494][ 469] = 140339628;
1023  m_badEvents[214494][ 478] = 143408490;
1024  m_badEvents[214494][ 528] = 158894657;
1025  m_badEvents[214494][ 628] = 187805212;
1026  m_badEvents[214523][ 190] = 50181037;
1027  m_badEvents[214523][ 208] = 55621427;
1028  m_badEvents[214523][ 215] = 57401419;
1029  m_badEvents[214523][ 227] = 61119795;
1030  m_badEvents[214523][ 293] = 80518599;
1031  m_badEvents[214523][ 306] = 83568653;
1032  m_badEvents[214523][ 358] = 97821922;
1033  m_badEvents[214523][ 383] = 105821339;
1034  m_badEvents[214523][ 608] = 175714199;
1035  m_badEvents[214523][ 649] = 187930472;
1036  m_badEvents[214523][ 692] = 201168808;
1037  m_badEvents[214523][ 707] = 205911433;
1038  m_badEvents[214544][ 121] = 32531579;
1039  m_badEvents[214544][ 128] = 34278960;
1040  m_badEvents[214544][ 196] = 52990693;
1041  m_badEvents[214544][ 238] = 63202772;
1042  m_badEvents[214544][ 264] = 69547403;
1043  m_badEvents[214544][ 309] = 80169757;
1044  m_badEvents[214544][ 358] = 95684444;
1045  m_badEvents[214544][ 415] = 113028399;
1046  m_badEvents[214544][ 425] = 116453891;
1047  m_badEvents[214544][ 512] = 144322637;
1048  m_badEvents[214544][ 530] = 150403783;
1049  m_badEvents[214544][ 551] = 156914594;
1050  m_badEvents[214544][ 581] = 165650856;
1051  m_badEvents[214544][ 610] = 173948673;
1052  m_badEvents[214544][ 663] = 189356210;
1053  m_badEvents[214553][ 81] = 21848484;
1054  m_badEvents[214553][ 107] = 28867085;
1055  m_badEvents[214553][ 143] = 34975171;
1056  m_badEvents[214553][ 175] = 43375728;
1057  m_badEvents[214553][ 235] = 55710673;
1058  m_badEvents[214553][ 278] = 65777105;
1059  m_badEvents[214553][ 336] = 83565966;
1060  m_badEvents[214553][ 351] = 88977043;
1061  m_badEvents[214553][ 352] = 89040957;
1062  m_badEvents[214553][ 392] = 101340699;
1063  m_badEvents[214553][ 403] = 104486789;
1064  m_badEvents[214553][ 465] = 123363220;
1065  m_badEvents[214553][ 498] = 133139714;
1066  m_badEvents[214553][ 519] = 140070084;
1067  m_badEvents[214553][ 673] = 185284263;
1068  m_badEvents[214553][ 678] = 186353867;
1069  m_badEvents[214553][ 694] = 191167020;
1070 
1071 }

◆ setTripFile()

int Root::TTileTripReader::setTripFile ( const char *  file)
Parameters
filethe file path to the trip list root file
Returns
the number of files added

The trip reader uses TChain to read the TTrees inside the root file.
You can load multiple files by using wildcards.

Definition at line 606 of file TTileTripReader.cxx.

606  {
607  ostream& msg=*m_msglog;
608  if(m_ChainsLoaded){
609  msg<<"ERROR: Cannot add more trip files to the chain after you have closed the file and loaded it into memory!\n";
610  return 0;
611  }
612  int files_connected=0;
613  files_connected=((TChain*)m_trips)->Add(file);
614  if(files_connected!=((TChain*)m_runMap)->Add(file))
615  msg<<"Connected file missmatch.\n";
616 
617  m_mapRun=0;
618  m_FirstEntry=0;
619  m_runMap->SetBranchAddress("Run",&m_mapRun);
620  m_runMap->SetBranchAddress("FirstEntry",&m_FirstEntry);
621 
622  m_Run=0;
623  m_Partition=0;
624  m_Module=0;
625  m_LumiStart=0;
626  m_LumiEnd=0;
627  m_trips->SetBranchAddress("Run",&m_Run);
628  m_trips->SetBranchAddress("Partition",&m_Partition);
629  m_trips->SetBranchAddress("Module",&m_Module);
630  m_trips->SetBranchAddress("LumiStart",&m_LumiStart);
631  m_trips->SetBranchAddress("LumiEnd",&m_LumiEnd);
632 
633  return files_connected;
634 }

◆ setVerbosity()

void Root::TTileTripReader::setVerbosity ( int  v = Debug,
std::ostream &  stream = std::cout 
)
inline

Definition at line 188 of file TTileTripReader.h.

188  {
189  m_verbosity=v;
190  m_msglog=&stream;
191  }

Member Data Documentation

◆ m_accept

asg::AcceptInfo Root::TTileTripReader::m_accept
private

Definition at line 217 of file TTileTripReader.h.

◆ m_badEvents

std::map<unsigned int,std::map<unsigned short,unsigned int> > Root::TTileTripReader::m_badEvents
private

Definition at line 229 of file TTileTripReader.h.

◆ m_ChainsLoaded

bool Root::TTileTripReader::m_ChainsLoaded
private

Definition at line 237 of file TTileTripReader.h.

◆ m_currentLbn

int Root::TTileTripReader::m_currentLbn
private

Definition at line 225 of file TTileTripReader.h.

◆ m_currentRun

int Root::TTileTripReader::m_currentRun
private

Definition at line 224 of file TTileTripReader.h.

◆ m_currentTrips

std::vector<TripRegion> Root::TTileTripReader::m_currentTrips
private

Definition at line 230 of file TTileTripReader.h.

◆ m_EBOffsets

TripRegion Root::TTileTripReader::m_EBOffsets

Definition at line 194 of file TTileTripReader.h.

◆ m_FirstEntry

int Root::TTileTripReader::m_FirstEntry
private

Definition at line 223 of file TTileTripReader.h.

◆ m_LastTileFlags

int Root::TTileTripReader::m_LastTileFlags
private

Definition at line 228 of file TTileTripReader.h.

◆ m_LBOffsets

TripRegion Root::TTileTripReader::m_LBOffsets

Definition at line 193 of file TTileTripReader.h.

◆ m_LumiEnd

std::vector<int>* Root::TTileTripReader::m_LumiEnd
private

Definition at line 235 of file TTileTripReader.h.

◆ m_LumiStart

int Root::TTileTripReader::m_LumiStart
private

Definition at line 234 of file TTileTripReader.h.

◆ m_mapRun

int Root::TTileTripReader::m_mapRun
private

Definition at line 221 of file TTileTripReader.h.

◆ m_Module

std::vector<char>* Root::TTileTripReader::m_Module
private

Definition at line 233 of file TTileTripReader.h.

◆ m_msglog

std::ostream* Root::TTileTripReader::m_msglog
private

Definition at line 236 of file TTileTripReader.h.

◆ m_name

std::string Root::TTileTripReader::m_name
private

The name of the class instance.

Definition at line 215 of file TTileTripReader.h.

◆ m_Offsets

std::vector<int> Root::TTileTripReader::m_Offsets
private

Definition at line 231 of file TTileTripReader.h.

◆ m_Partition

std::vector<char>* Root::TTileTripReader::m_Partition
private

Definition at line 232 of file TTileTripReader.h.

◆ m_Run

int Root::TTileTripReader::m_Run
private

Definition at line 222 of file TTileTripReader.h.

◆ m_runMap

TTree* Root::TTileTripReader::m_runMap
private

Definition at line 220 of file TTileTripReader.h.

◆ m_startEntry

int Root::TTileTripReader::m_startEntry
private

Definition at line 226 of file TTileTripReader.h.

◆ m_trips

TTree* Root::TTileTripReader::m_trips
private

Definition at line 219 of file TTileTripReader.h.

◆ m_verbosity

int Root::TTileTripReader::m_verbosity
private

Definition at line 227 of file TTileTripReader.h.


The documentation for this class was generated from the following files:
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Root::TTileTripReader::findStartEntry
int findStartEntry(int run)
Definition: TTileTripReader.cxx:250
Root::TTileTripReader::m_accept
asg::AcceptInfo m_accept
Definition: TTileTripReader.h:217
Root::TTileTripReader::m_LumiStart
int m_LumiStart
Definition: TTileTripReader.h:234
Root::TTileTripReader::areaTripFraction
double areaTripFraction(int run, int lbn, double eta, double phi, double dR)
Definition: TTileTripReader.cxx:74
ParticleGun_SamplingFraction.eta2
eta2
Definition: ParticleGun_SamplingFraction.py:96
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
Root::TTileTripReader::m_runMap
TTree * m_runMap
Definition: TTileTripReader.h:220
calibdata.force
bool force
Definition: calibdata.py:19
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
width
const double width
Definition: TTileTripReader.cxx:24
tree
TChain * tree
Definition: tile_monitor.h:30
Root::TTileTripReader::m_Offsets
std::vector< int > m_Offsets
Definition: TTileTripReader.h:231
Root::TTileTripReader::m_ChainsLoaded
bool m_ChainsLoaded
Definition: TTileTripReader.h:237
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
Root::TTileTripReader::m_LBOffsets
TripRegion m_LBOffsets
Definition: TTileTripReader.h:193
xAOD::eta1
setEt setPhi setE277 setWeta2 eta1
Definition: TrigEMCluster_v1.cxx:41
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
Root::TTileTripReader::m_badEvents
std::map< unsigned int, std::map< unsigned short, unsigned int > > m_badEvents
Definition: TTileTripReader.h:229
x
#define x
TripRegion::eta1
double eta1
Definition: TTileTripReader.h:31
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
Root::TTileTripReader::m_EBOffsets
TripRegion m_EBOffsets
Definition: TTileTripReader.h:194
TripRegion::eta2
double eta2
Definition: TTileTripReader.h:32
Root::TTileTripReader::m_trips
TTree * m_trips
Definition: TTileTripReader.h:219
Root::TTileTripReader::m_mapRun
int m_mapRun
Definition: TTileTripReader.h:221
Root::TTileTripReader::m_currentLbn
int m_currentLbn
Definition: TTileTripReader.h:225
Root::TTileTripReader::checkEtaPhi
bool checkEtaPhi(int run, int lbn, double eta, double phi)
Definition: TTileTripReader.cxx:147
Root::TTileTripReader::m_LumiEnd
std::vector< int > * m_LumiEnd
Definition: TTileTripReader.h:235
maskDeadModules.mod
mod
Definition: maskDeadModules.py:36
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
ReadTripsProbsFromCool.trip
trip
Definition: ReadTripsProbsFromCool.py:99
lumiFormat.i
int i
Definition: lumiFormat.py:85
TauGNNUtils::Variables::Track::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:538
file
TFile * file
Definition: tile_monitor.h:29
Root::TTileTripReader::Debug
@ Debug
Definition: TTileTripReader.h:45
Root::TTileTripReader::getEtaPhi
std::vector< TripRegion > getEtaPhi(int run, int lbn, bool force=false)
Definition: TTileTripReader.cxx:333
run
Definition: run.py:1
Root::TTileTripReader::partModToEtaPhi
TripRegion partModToEtaPhi(int part, int mod)
Definition: TTileTripReader.cxx:437
TripRegion::phi1
double phi1
Definition: TTileTripReader.h:33
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
Root::TTileTripReader::m_msglog
std::ostream * m_msglog
Definition: TTileTripReader.h:236
Root::TTileTripReader::readTileFlags
void readTileFlags(int run, int lbn, int tileError, int tileFlags)
Definition: TTileTripReader.cxx:495
python.pydraw.loop
def loop(arg)
Definition: pydraw.py:1242
TripRegion::phi2
double phi2
Definition: TTileTripReader.h:34
Root::TTileTripReader::m_name
std::string m_name
The name of the class instance.
Definition: TTileTripReader.h:215
Root::TTileTripReader::m_startEntry
int m_startEntry
Definition: TTileTripReader.h:226
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Root::TTileTripReader::checkEvent
bool checkEvent(unsigned int run, unsigned int lbn, unsigned int event)
Definition: TTileTripReader.cxx:192
Root::TTileTripReader::m_Run
int m_Run
Definition: TTileTripReader.h:222
python.PyAthena.v
v
Definition: PyAthena.py:154
pi
const double pi
Definition: TTileTripReader.cxx:23
Root::TTileTripReader::Default
@ Default
Definition: TTileTripReader.h:44
Root::TTileTripReader::m_LastTileFlags
int m_LastTileFlags
Definition: TTileTripReader.h:228
lumiFormat.lumi
lumi
Definition: lumiFormat.py:106
y
#define y
Root::TTileTripReader::m_verbosity
int m_verbosity
Definition: TTileTripReader.h:227
Root::TTileTripReader::m_currentTrips
std::vector< TripRegion > m_currentTrips
Definition: TTileTripReader.h:230
Root::TTileTripReader::setBadEventList
void setBadEventList()
Fills the bad event map.
Definition: TTileTripReader.cxx:636
StateLessPT_NewConfig.partition
partition
Definition: StateLessPT_NewConfig.py:49
Root::TTileTripReader::m_Partition
std::vector< char > * m_Partition
Definition: TTileTripReader.h:232
TripRegion
Definition: TTileTripReader.h:30
Default
asg::AcceptData
Definition: AcceptData.h:30
Root::TTileTripReader::m_FirstEntry
int m_FirstEntry
Definition: TTileTripReader.h:223
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
Root::TTileTripReader::m_Module
std::vector< char > * m_Module
Definition: TTileTripReader.h:233
Root::TTileTripReader::m_currentRun
int m_currentRun
Definition: TTileTripReader.h:224
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
asg::AcceptInfo::addCut
int addCut(const std::string &cutName, const std::string &cutDescription)
Add a cut; returning the cut position.
Definition: AcceptInfo.h:53