FEDRA emulsion software from the OPERA Collaboration
EdbCorrectionMap Class Reference

#include <EdbLayer.h>

Inheritance diagram for EdbCorrectionMap:
Collaboration diagram for EdbCorrectionMap:

Public Member Functions

void ApplyCorrections (EdbCorrectionMap &map)
 
void CorrectSeg (EdbSegP &s)
 
EdbSegCorr CorrLoc (float x, float y)
 
EdbSegCorr CorrLoc (int j)
 
 EdbCorrectionMap ()
 
 EdbCorrectionMap (const EdbCorrectionMap &map)
 
EdbLayerGetLayer (float x, float y)
 
EdbLayerGetLayer (int i)
 
void Init (EdbCell2 &c)
 
void Init (int nx, float minx, float maxx, int ny, float miny, float maxy)
 
int Ncp ()
 
void PrintDZ ()
 
virtual ~EdbCorrectionMap ()
 
- Public Member Functions inherited from EdbCell2
bool AddObject (float v[2], TObject *obj)
 
bool AddObject (float x, float y, TObject *obj)
 
bool AddObject (int ix, int iy, TObject *obj)
 
bool AddObject (int j, TObject *obj)
 
int CellLim ()
 
void Copy (const EdbCell2 &cell)
 
void Delete ()
 
 EdbCell2 ()
 
 EdbCell2 (const EdbCell2 &cell)
 
TObject * GetObject (float x, float y, int ientr) const
 
TObject * GetObject (int ix, int iy, int ientr) const
 
TObject * GetObject (int j, int ientr) const
 
int InitCell (EdbCell2 &c)
 
int InitCell (int maxpercell, int n[2], float min[2], float max[2])
 
int InitCell (int nx, float minx, float maxx, int ny, float miny, float maxy, int maxpercell)
 
void InitEPC ()
 
void PrintStat ()
 
void Reset ()
 
int SelectObjects (float min[2], float max[2], TObjArray &arr)
 
int SelectObjects (int min[2], int max[2], TObjArray &arr)
 
int SelectObjects (TObjArray &arr)
 
int SelectObjectsC (float v[2], float r, TObjArray &arr)
 
int SelectObjectsC (float v[2], int ir[2], TObjArray &arr)
 
int SelectObjectsC (int iv[2], int ir[2], TObjArray &arr)
 
int SelectObjectsCJ (int j, int ir, TObjArray &arr)
 
void Set0 ()
 
 ~EdbCell2 ()
 
- Public Member Functions inherited from EdbH2
void AddBin (int jcell, int n)
 
int Bin (float x, float y) const
 
int Bin (int iv[2]) const
 
int Bin (int ix, int iy) const
 
int Bin (int j) const
 
void CleanCells ()
 
void Copy (const EdbH2 &h)
 
void Delete ()
 
int DiscardHighCells (int nmax)
 
TH2F * DrawH2 (const char *name="plot2d", const char *title="EdbH2plot2D")
 
TH1I * DrawSpectrum (const char *name="plot1d", const char *title="EdbH2 DrawSpectrun")
 
 EdbH2 ()
 
 EdbH2 (const EdbH2 &h)
 
 EdbH2 (int nx, float minx, float maxx, int ny, float miny, float maxy)
 
int Fill (float x, float y)
 
int Fill (float x, float y, int n)
 
int InitH2 (const EdbH2 &h)
 
int InitH2 (int n[2], float min[2], float max[2])
 
int InitH2 (int nx, float minx, float maxx, int ny, float miny, float maxy)
 
Long_t Integral ()
 
Long_t Integral (int iv[2], int ir[2])
 
int IX (float x) const
 
int IX (int jcell) const
 
int IY (float y) const
 
int IY (int jcell) const
 
int Jcell (float v[2]) const
 
int Jcell (float x, float y) const
 
int Jcell (int ix, int iy) const
 
int MaxBin ()
 
Float_t Mean ()
 
int Ncell () const
 
int NX () const
 
int NY () const
 
void PrintStat ()
 
EdbH1ProjectionX ()
 
EdbH1ProjectionY ()
 
void Set0 ()
 
void SetBin (int ix, int iy, int n)
 
void SetBin (int j, int n)
 
float X (int ix) const
 
float Xbin () const
 
float Xj (int j) const
 
float Xmax () const
 
float XmaxA (float level=0)
 
float Xmin () const
 
float XminA (float level=0)
 
float Y (int iy) const
 
float Ybin () const
 
float Yj (int j) const
 
float Ymax () const
 
float YmaxA (float level=0)
 
float Ymin () const
 
float YminA (float level=0)
 
 ~EdbH2 ()
 

Additional Inherited Members

- Protected Attributes inherited from EdbH2
Float_t eBin [2]
 bin size More...
 
Float_t eMax [2]
 max More...
 
Float_t eMin [2]
 min More...
 
Int_t eN [2]
 divisions More...
 
Int_t * eNC
 [eNcell] number of objects/cell More...
 
Int_t eNcell
 eNx*eNy More...
 

Constructor & Destructor Documentation

◆ EdbCorrectionMap() [1/2]

EdbCorrectionMap::EdbCorrectionMap ( )
inline
17{}

◆ EdbCorrectionMap() [2/2]

EdbCorrectionMap::EdbCorrectionMap ( const EdbCorrectionMap map)
inline
18: EdbCell2(map){}
EdbCell2()
Definition: EdbCell2.cpp:567

◆ ~EdbCorrectionMap()

EdbCorrectionMap::~EdbCorrectionMap ( )
virtual
163{
164}

Member Function Documentation

◆ ApplyCorrections()

void EdbCorrectionMap::ApplyCorrections ( EdbCorrectionMap map)
195{
196 if( !map.Ncell() ) return;
197 if( NX() != map.NX() ||
198 NY() != map.NY() ) {
199 Log(1,"EdbCorrectionMap::ApplyCorrections","Warning: incompatible maps: %dx%d vs %dx%d Reset map to new one!", NX(),NY(), map.NX(), map.NY() );
200 Init( map );
201 }
202 for(int i=0; i<Ncell(); i++) {
203 EdbLayer *loc = GetLayer(i);
204 EdbLayer *locD = map.GetLayer(i);
205 loc->ApplyCorrections( *locD );
206 }
207}
bool Log(int level, const char *location, const char *fmt,...)
Definition: EdbLog.cxx:75
EdbLayer * GetLayer(float x, float y)
Definition: EdbLayer.h:24
void Init(EdbCell2 &c)
Definition: EdbLayer.cxx:167
int Ncell() const
Definition: EdbCell2.h:49
int NX() const
Definition: EdbCell2.h:50
int NY() const
Definition: EdbCell2.h:51
Definition: EdbLayer.h:39
void ApplyCorrections(EdbLayer &la)
Definition: EdbLayer.cxx:81

◆ CorrectSeg()

void EdbCorrectionMap::CorrectSeg ( EdbSegP s)
181{
182 EdbLayer *loc = GetLayer(s.X(), s.Y());
183 if(loc) loc->CorrectSeg(s);
184}
void CorrectSeg(EdbSegP &s)
Definition: EdbLayer.cxx:69
s
Definition: check_shower.C:55

◆ CorrLoc() [1/2]

EdbSegCorr EdbCorrectionMap::CorrLoc ( float  x,
float  y 
)

257{
258 EdbSegCorr corr;
259//TODO
260 return corr;
261}
Definition: EdbSegCorr.h:8

◆ CorrLoc() [2/2]

EdbSegCorr EdbCorrectionMap::CorrLoc ( int  j)

236{
237 EdbSegP s;
238 float x0=Xj(j), y0=Yj(j);
239 s.Set(j, x0,y0, 0, 0, 0, 0);
240 EdbLayer *la = GetLayer(j);
241 la->CorrectSeg(s);
242 s.SetX( s.X() - x0 );
243 s.SetY( s.Y() - y0 );
244 s.SetZ(la->Zcorr());
245 EdbSegCorr corr;
246 corr.SetV( 0, s.X());
247 corr.SetV( 1, s.Y());
248 corr.SetV( 2, s.Z());
249 corr.SetV( 3, s.TX());
250 corr.SetV( 4, s.TY());
251 corr.SetV( 5, la->Shr());
252 return corr;
253}
float Xj(int j) const
Definition: EdbCell2.h:62
float Yj(int j) const
Definition: EdbCell2.h:63
float Zcorr() const
Definition: EdbLayer.h:90
float Shr() const
Definition: EdbLayer.h:89
void SetV(int i, float x)
Definition: EdbSegCorr.h:21
Definition: EdbSegP.h:21

◆ GetLayer() [1/2]

EdbLayer * EdbCorrectionMap::GetLayer ( float  x,
float  y 
)
inline
24{ return (EdbLayer *)(GetObject(x, y, 0)); }
TObject * GetObject(float x, float y, int ientr) const
Definition: EdbCell2.h:195

◆ GetLayer() [2/2]

EdbLayer * EdbCorrectionMap::GetLayer ( int  i)
inline
25{ return (EdbLayer *)(GetObject(i, 0)); }

◆ Init() [1/2]

void EdbCorrectionMap::Init ( EdbCell2 c)
168{
169 Init(c.NX(),c.Xmin(),c.Xmax(),c.NY(),c.Ymin(),c.Ymax());
170}
float Xmax() const
Definition: EdbCell2.h:65
float Ymin() const
Definition: EdbCell2.h:66
float Xmin() const
Definition: EdbCell2.h:64
float Ymax() const
Definition: EdbCell2.h:67

◆ Init() [2/2]

void EdbCorrectionMap::Init ( int  nx,
float  minx,
float  maxx,
int  ny,
float  miny,
float  maxy 
)
174{
175 EdbCell2::InitCell( nx, minx, maxx, ny, miny, maxy, 1);
176 for(int i=0; i<Ncell(); i++) AddObject(i, new EdbLayer() );
177}
int InitCell(EdbCell2 &c)
Definition: EdbCell2.h:167
bool AddObject(float v[2], TObject *obj)
Definition: EdbCell2.h:173

◆ Ncp()

int EdbCorrectionMap::Ncp ( )
211{
212 int ncp=0;
213 for(int i=0; i<Ncell(); i++) {
214 EdbLayer *loc = GetLayer(i);
215 if(loc) ncp+=loc->Ncp();
216 }
217 return ncp;
218}
int Ncp() const
Definition: EdbLayer.h:74

◆ PrintDZ()

void EdbCorrectionMap::PrintDZ ( )
188{
189 int n=Ncell();
190 for(int i=0; i<n; i++) printf("%d dz=%7.2f\n",i,GetLayer(i)->Zcorr());
191}

The documentation for this class was generated from the following files: