ATLAS Offline Software
Loading...
Searching...
No Matches
TTileTripReader.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5/*
6 * File: TTileTripReader.h
7 * Author: Stephen Cole <stephen.cole@cern.ch>
8 *
9 * Created on August 7, 2012, 4:21 PM
10 */
11
12#ifndef TTILETRIPREADER_H
13#define TTILETRIPREADER_H
14
15#include <vector>
16#include <map>
17#include <iostream>
18#include <iosfwd>
19
20#ifndef ROOTCORE
21#include "PATCore/AcceptData.h"
22#include "PATCore/AcceptInfo.h"
23#endif /*ROOTCORE*/
24
25
26class TTree;
27
28
29
31 double eta1;
32 double eta2;
33 double phi1;
34 double phi2;
35};
36
37
38namespace Root{
39
41{
42public:
46 };
47
48 TTileTripReader(const char* name="TTileTripReader" );
49 virtual ~TTileTripReader();
50
53
55 inline const char* getName() const { return m_name.c_str(); };
56
58 {
59 return m_accept;
60 }
61
62#ifndef ROOTCORE
76 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);
77#endif /*ROOTCORE*/
78
88 double areaTripFraction(int run, int lbn, double eta, double phi, double dR);
89
90#ifndef ROOTCORE
102 float calculate(int run, int lbn, double eta, double phi, double dR, int tileError=0, int tileFlags=0);
103#endif /*ROOTCORE*/
104
105
114 bool checkEtaPhi(int run,int lbn,double eta,double phi);
115
125 bool checkEvent(unsigned int run,unsigned int lbn,unsigned int event);
126
137 bool checkExtendedEtaPhi(int run,int lbn,double eta,double phi,double delEta,double delPhi);
138
139 inline int finalize() { return 1; }
140
148 std::vector<TripRegion> getEtaPhi(int run, int lbn, bool force=false);
149
150 int initialize();
151
156 void memLoadTripFile();
157
164 TripRegion partModToEtaPhi(int part, int mod);
165
176 void readTileFlags(int run, int lbn, int tileError, int tileFlags);
177
186 int setTripFile(const char* file);
187
188 void setVerbosity(int v=Debug,std::ostream& stream=std::cout){
189 m_verbosity=v;
190 m_msglog=&stream;
191 }
192
195private:
199 void buildOffsets();
200
206 int findStartEntry(int run);
207
211 void setBadEventList();
212
213
215 std::string m_name;
216
218
219 TTree* m_trips;
220 TTree* m_runMap;
222 int m_Run;
229 std::map<unsigned int,std::map<unsigned short,unsigned int> > m_badEvents;
230 std::vector<TripRegion> m_currentTrips;
231 std::vector<int> m_Offsets;
232 std::vector<char>* m_Partition;
233 std::vector<char>* m_Module;
235 std::vector<int>* m_LumiEnd;
236 std::ostream* m_msglog;
238
239
240};
241}
242
243#endif /* TTILETRIPREADER_H */
244
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
void setBadEventList()
Fills the bad event map.
std::vector< TripRegion > getEtaPhi(int run, int lbn, bool force=false)
void memLoadTripFile()
closes the ability to add more trip files to the chain and loads the current TChain into memory as a ...
float calculate(int run, int lbn, double eta, double phi, double dR, int tileError=0, int tileFlags=0)
asg::AcceptInfo m_accept
bool checkExtendedEtaPhi(int run, int lbn, double eta, double phi, double delEta, double delPhi)
TTileTripReader(const char *name="TTileTripReader")
const char * getName() const
Get the name of the class instance.
int setTripFile(const char *file)
bool checkEtaPhi(int run, int lbn, double eta, double phi)
const asg::AcceptInfo & getAcceptInfo() const
std::string m_name
The name of the class instance.
void setVerbosity(int v=Debug, std::ostream &stream=std::cout)
std::vector< char > * m_Module
TTileTripReader & operator=(const TTileTripReader &)=delete
bool checkEvent(unsigned int run, unsigned int lbn, unsigned int event)
TTileTripReader(const TTileTripReader &)=delete
std::vector< int > m_Offsets
std::vector< TripRegion > m_currentTrips
TripRegion partModToEtaPhi(int part, int mod)
void buildOffsets()
Attempts to correct for improperly built trip list files.
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)
void readTileFlags(int run, int lbn, int tileError, int tileFlags)
std::vector< int > * m_LumiEnd
double areaTripFraction(int run, int lbn, double eta, double phi, double dR)
std::vector< char > * m_Partition
std::map< unsigned int, std::map< unsigned short, unsigned int > > m_badEvents
Definition run.py:1
TFile * file