Belle II Software  release-06-01-15
arich modules
Collaboration diagram for arich modules:

Classes

class  arichBtestModule
 The UserTutorial module. More...
 
class  ARICHChannelMaskModule
 Testing module for collection of calibration data. More...
 
class  ARICHDigitizerModule
 ARICH digitizer module. More...
 
class  ARICHDQMModule
 Make summary of data quality from reconstruction. More...
 
class  ARICHFillHitsModule
 Fill ARICHHit collection from ARICHDigits. More...
 
class  ARICHMCParticlesModule
 
class  ARICHNtupleModule
 ARICH reconstruction efficiency test module. More...
 
class  ARICHPackerModule
 Raw data packer for ARICH. More...
 
class  ARICHRateCalModule
 Fill ARICHHit collection from ARICHDigits. More...
 
class  ARICHRawUnpackerModule
 Fill ARICHHit collection from ARICHDigits. More...
 
class  ARICHReconstruction
 Internal ARICH track reconstruction. More...
 
class  ARICHReconstructorModule
 ARICH subdetector main module. More...
 
class  ARICHRelateModule
 
class  arichToNtupleModule
 This module extends existing variablesToNtuple to append detailed arich information to candidates in the analysis output ntuple. More...
 
struct  ARICHRawHeader
 
class  ARICHUnpackerModule
 Raw data unpacker for ARICH. More...
 

Macros

#define ARICH_BUFFER_NWORDS   252
 
#define ARICHFEB_HEADER_SIZE   10
 
#define ARICHRAW_HEADER_SIZE   12
 

Functions

TH2 * moduleHitMap (TH1 *hitMap, int moduleID)
 Make hit map in HAPD view (12*12 channels) More...
 
TH2 * moduleDeadMap (TH1 *hitMap, int moduleID)
 Make chip dead/alive map in HAPD view (2*2 chips) More...
 
TH1 * mergerClusterHitMap1D (TH1 *hitMap, int mergerID)
 Make 1D hit map of specified Merger Board. More...
 
TCanvas * mergerClusterHitMap2D (TH1 *hitMap, int mergerID)
 Make display of 6 HAPDs' 2D hit map of the Merger Board. More...
 
TCanvas * sectorHitMap (TH1 *hitMap, int sector)
 Make display of 70 HAPDs' 2D hit map of the sector. More...
 
TCanvas * sectorDeadMap (TH1 *hitMap, int sector)
 Make display of 70 HAPDs' 2D dead/alive map of the sector. More...
 
 REG_MODULE (ARICHDQM)
 
void deadPalette ()
 
 REG_MODULE (ARICHRateCal)
 
 REG_MODULE (ARICHRawUnpacker)
 
 arichBtestModule ()
 Constructor. More...
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void beginRun () override
 Called when entering a new run. More...
 
int skipdata (gzFile fp)
 Skip the data part of the record.
 
void readmwpc (unsigned int *dbuf, unsigned int len, int print=0)
 Read the MWPC information from the data buffer.
 
int readhapd (unsigned int len, unsigned int *data)
 Read the HAPD hits from the data buffer.
 
int getTrack (int mask, TVector3 &r, TVector3 &dir)
 Beamtest Track reconstruction.
 
int readdata (gzFile fp, int rec_id, int print)
 Read the data from the file (can be compressed)
 
virtual void event () override
 Running over all events. More...
 
virtual void endRun () override
 Is called after processing the last event of a run. More...
 
virtual void terminate () override
 Is called at the end of your Module. More...
 
 ARICHDigitizerModule ()
 Constructor.
 
virtual ~ARICHDigitizerModule ()
 Destructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void beginRun () override
 Called when entering a new run. More...
 
virtual void event () override
 Event processor. More...
 
void magFieldDistorsion (TVector2 &hit, int copyno)
 Apply correction to hit position due to non-perpendicular component of magnetic field. More...
 
virtual void endRun () override
 End-of-run action. More...
 
virtual void terminate () override
 Termination action. More...
 
 ARICHDQMModule ()
 Constructor.
 
virtual ~ARICHDQMModule ()
 Destructor.
 
virtual void defineHisto () override
 Function to define histograms. More...
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void beginRun () override
 Called when entering a new run. More...
 
virtual void event () override
 Event processor.
 
virtual void endRun () override
 End-of-run action. More...
 
virtual void terminate () override
 Termination action. More...
 
 ARICHFillHitsModule ()
 Constructor.
 
virtual ~ARICHFillHitsModule ()
 Destructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void beginRun () override
 Called when entering a new run. More...
 
virtual void event () override
 Event processor.
 
void magFieldCorrection (TVector3 &hitpos)
 Corrects hit position for distorsion due to non-perpendicular magnetic field component.
 
virtual void endRun () override
 End-of-run action. More...
 
virtual void terminate () override
 Termination action. More...
 
 ARICHMCParticlesModule ()
 Constructor.
 
virtual ~ARICHMCParticlesModule ()
 Destructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void beginRun () override
 Called when entering a new run. More...
 
virtual void event () override
 Event processor.
 
virtual void endRun () override
 End-of-run action. More...
 
virtual void terminate () override
 Termination action. More...
 
void printModuleParams () const
 Prints module parameters.
 
 ARICHNtupleModule ()
 Constructor.
 
virtual ~ARICHNtupleModule ()
 Destructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void beginRun () override
 Called when entering a new run. More...
 
virtual void event () override
 Event processor.
 
virtual void endRun () override
 End-of-run action. More...
 
virtual void terminate () override
 Termination action. More...
 
 ARICHPackerModule ()
 Constructor.
 
virtual ~ARICHPackerModule ()
 Destructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void beginRun () override
 Called when entering a new run. More...
 
virtual void event () override
 Event processor.
 
void writeHeader (int *buffer, unsigned &ibyte, const ARICHRawHeader &head)
 
virtual void endRun () override
 End-of-run action. More...
 
virtual void terminate () override
 Termination action. More...
 
unsigned int calbyte (const int *buf)
 
unsigned int calword (const int *buf)
 
 ARICHRateCalModule ()
 Constructor.
 
virtual ~ARICHRateCalModule ()
 Destructor.
 
virtual void defineHisto () override
 Function to define histograms. More...
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void beginRun () override
 Called when entering a new run. More...
 
virtual void event () override
 Event processor.
 
virtual void endRun () override
 End-of-run action. More...
 
virtual void terminate () override
 Termination action. More...
 
unsigned int calbyte (const int *buf)
 
unsigned int calword (const int *buf)
 
 ARICHRawUnpackerModule ()
 Constructor.
 
virtual ~ARICHRawUnpackerModule ()
 Destructor.
 
virtual void defineHisto () override
 Function to define histograms. More...
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void beginRun () override
 Called when entering a new run. More...
 
virtual void event () override
 Event processor.
 
virtual void endRun () override
 End-of-run action. More...
 
virtual void terminate () override
 Termination action. More...
 
 ARICHReconstruction (int storePhotons=0)
 Constructor.
 
void initialize ()
 read geomerty parameters from xml and initialize class memebers
 
int InsideDetector (TVector3 a, int copyno)
 Returns 1 if vector "a" lies on "copyno"-th detector active surface of detector and 0 else.
 
int smearTrack (ARICHTrack &arichTrack)
 Smeares track parameters ("simulate" the uncertainties of tracking).
 
TVector3 FastTracking (TVector3 dirf, TVector3 r, double *refind, double *z, int n, int opt)
 Calculates the intersection of the Cherenkov photon emitted from point "r" in "dirf" direction with the detector plane. More...
 
TVector3 HitVirtualPosition (const TVector3 &hitpos, int mirrorID)
 Returns the hit virtual position, assuming that it was reflected from mirror. More...
 
bool HitsMirror (const TVector3 &pos, const TVector3 &dir, int mirrorID)
 returns true if photon at position pos with direction dir hits mirror plate with ID mirrorID
 
int CherenkovPhoton (TVector3 r, TVector3 rh, TVector3 &rf, TVector3 &dirf, double *refind, double *z, int n, int mirrorID=0)
 Calculates the direction of photon emission. More...
 
int likelihood2 (ARICHTrack &arichTrack, const StoreArray< ARICHHit > &arichHits, ARICHLikelihood &arichLikelihood)
 Computes the value of identity likelihood function for different particle hypotheses.
 
void setTrackPositionResolution (double pRes)
 Sets track position resolution (from tracking)
 
void setTrackAngleResolution (double aRes)
 Sets track direction resolution (from tracking)
 
TVector3 getTrackMeanEmissionPosition (const ARICHTrack &track, int iAero)
 Returns mean emission position of Cherenkov photons from i-th aerogel layer.
 
TVector3 getTrackPositionAtZ (const ARICHTrack &track, double zout)
 Returns track direction at point with z coordinate "zout" (assumes straight track).
 
void transformTrackToLocal (ARICHTrack &arichTrack, bool align)
 Transforms track parameters from global Belle2 to ARICH local frame.
 
TVector3 getMirrorPoint (int mirrorID)
 Returns point on the mirror plate with id mirrorID.
 
TVector3 getMirrorNorm (int mirrorID)
 Returns normal vector of the mirror plate with id mirrorID.
 
void correctEmissionPoint (int tileID, double r)
 correct mean emission point z position
 
 ARICHReconstructorModule ()
 Constructor.
 
virtual ~ARICHReconstructorModule ()
 Destructor.
 
virtual void initialize () override
 Initialize the Module.
 
virtual void beginRun () override
 Called when entering a new run.
 
virtual void event () override
 Event processor.
 
virtual void endRun () override
 End-of-run action. More...
 
virtual void terminate () override
 Termination action. More...
 
void printModuleParams ()
 Print module parameters.
 
 ARICHRelateModule ()
 Constructor.
 
virtual ~ARICHRelateModule ()
 Destructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void beginRun () override
 Called when entering a new run. More...
 
virtual void event () override
 Event processor.
 
virtual void endRun () override
 End-of-run action. More...
 
virtual void terminate () override
 Termination action. More...
 
void printModuleParams () const
 Prints module parameters.
 
unsigned int calbyte (const int *buf)
 calculate number of bytes in raw Unpacker
 
unsigned int cal2byte (const int *buf)
 calculate number of lines (2 bytes) in raw Unpacker
 
unsigned int calword (const int *buf)
 calculate number of words in raw Unpacker
 
 ARICHUnpackerModule ()
 Constructor.
 
virtual ~ARICHUnpackerModule ()
 Destructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void beginRun () override
 Called when entering a new run. More...
 
virtual void event () override
 Event processor. More...
 
void readHeader (const int *buffer, unsigned &ibyte, ARICHRawHeader &head)
 
void readFEHeader (const int *buffer, unsigned &ibyte, ARICHRawHeader &head)
 read Merger header
 
void printBits (const int *buffer, int bufferSize)
 Unpack raw data given in production format. More...
 
virtual void endRun () override
 End-of-run action. More...
 
virtual void terminate () override
 Termination action. More...
 

Variables

TNtuple * m_tuple
 ntuple containing hapd hits
 
TH1F * hapd [6]
 histogram of hits for each hapd
 
TH1F * mwpc_tdc [4][5]
 tdc information from mwpcs
 
TH1F * mwpc_diff [4][2]
 tdc difference from mwpcs
 
TH1F * mwpc_sum [4][2]
 tdc sum from mwpcs
 
TH1F * mwpc_sum_cut [4][2]
 tdc sum from mwpcs, with sum cut applied
 
TH1F * mwpc_residuals [4][2]
 residuals from mwpcs
 
TH2F * mwpc_xy [4]
 calculated x-y track positions
 
TH2F * mwpc_residualsz [4][2]
 z-residuals from mwpcs
 

Detailed Description

Function Documentation

◆ arichBtestModule()

Constructor.

Sets the module parameters.

Definition at line 66 of file arichBtestModule.cc.

66  : Module(), m_end(0), m_events(0), m_file(NULL), m_timestart(0), m_mwpc(NULL)
67  {
68  //Set module properties
69  setDescription("Module for the ARICH Beamtest data analysis. It creates track form the MWPC hits and reads the HAPD hits");
70 
71  //Parameter definition
72  addParam("outputFileName", m_outFile, "Output Root Filename", string("output.root"));
73  vector<string> defaultList;
74  addParam("runList", m_runList, "Data Filenames.", defaultList);
75  vector<int> defaultMask;
76  addParam("mwpcTrackMask", m_MwpcTrackMask, "Create track from MWPC layers", defaultMask);
77  m_fp = NULL;
78  addParam("beamMomentum", m_beamMomentum, "Momentum of the beam [GeV]", 0.0);
79 
80  for (int i = 0; i < 32; i++) m_tdc[i] = 0;
81 
82  }
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
Module()
Constructor.
Definition: Module.cc:30
std::string m_outFile
output file name
time_t m_timestart
time of the first processed event
ARICHTracking * m_mwpc
Pointer to the tracking chambers.
int m_tdc[32]
raw MWPC TDC buffer
TFile * m_file
pointer to the root file
double m_beamMomentum
Momentum of the particles in the beam [GeV].
std::vector< std::string > m_runList
The filenames of the runs.
int m_events
number of events
std::vector< int > m_MwpcTrackMask
Bit mask of the MWPC tracking chambers used for the track creation.
gzFile m_fp
file desriptor of the data file
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560

◆ beginRun() [1/11]

void beginRun ( void  )
overridevirtual

Called when entering a new run.

At the beginning of each run, the function gives you the chance to change run dependent constants like alignment parameters, etc.

Reimplemented from Module.

Definition at line 152 of file arichBtestModule.cc.

◆ beginRun() [2/11]

void beginRun ( void  )
overridevirtual

Called when entering a new run.

Set run dependent things like run header parameters, alignment, etc.

Reimplemented from Module.

Definition at line 93 of file ARICHDigitizerModule.cc.

94  {
95  if (m_simPar->getNBkgHits() > 0) m_bkgLevel = m_simPar->getNBkgHits();
96  }
double m_bkgLevel
Number of background hits ped hapd per readout (electronics noise)
DBObjPtr< ARICHSimulationPar > m_simPar
simulation parameters from the DB

◆ beginRun() [3/11]

void beginRun ( void  )
overridevirtual

Called when entering a new run.

Set run dependent things like run header parameters, alignment, etc.

Reimplemented from HistoModule.

Definition at line 226 of file ARICHDQMModule.cc.

227  {
228 
229  h_chStat->Reset();
230  h_aeroStat->Reset();
231  h_chDigit->Reset();
232  h_chipDigit->Reset();
233  h_hapdDigit->Reset();
234 
235  h_chHit->Reset();
236  h_chipHit->Reset();
237  h_hapdHit->Reset();
238  h_mergerHit->Reset();
239  h_bitsPerMergerNorm->Reset();
240  h_bitsPerHapdMerger->Reset();
241 
242  h_aerogelHit->Reset();
243  h_bits->Reset();
244  h_bitsPerChannel->Reset();
245  h_hitsPerTrack2D->Reset();
246  h_tracks2D->Reset();
247  h_aerogelHits3D->Reset();
248 
249  h_hitsPerEvent->Reset();
250  h_theta->Reset();
251  h_hitsPerTrack->Reset();
252  h_trackPerEvent->Reset();
253  h_flashPerAPD->Reset();
254  h_mirrorThetaPhi->Reset();
255  h_thetaPhi->Reset();
256 
257  for (int i = 0; i < 6; i++) {
258  h_secTheta[i]->Reset();
259  h_secHitsPerTrack[i]->Reset();
260  }
261 
262  h_ARICHOccAfterInjLer->Reset();
263  h_ARICHEOccAfterInjLer->Reset();
264  h_ARICHOccAfterInjHer->Reset();
265  h_ARICHEOccAfterInjHer->Reset();
266  }
TH1 * h_chipDigit
The number of raw digits in each ASIC chip.
TH2 * h_hitsPerTrack2D
Sum of 2D hit/track map on each position of track.
TH1 * h_chipHit
The number of hits in each ASIC chip.
TH1 * h_ARICHEOccAfterInjHer
Histogram for Nr Entries (=Triggrs) for normalization after HER injection.
TH3 * h_aerogelHits3D
3D histogram of
TH1 * h_flashPerAPD
Number of flashes in each APD.
TH1 * h_hitsPerTrack
Average hits/track calculated from h_hits2D and h_track2D.
TH1 * h_trackPerEvent
Number of tracks in ARICH per event (with p>0.5 GeV)
TH1 * h_ARICHOccAfterInjLer
Histogram Ndigits after LER injection.
TH1 * h_chDigit
The number of raw digits in each channel.
TH1 * h_aerogelHit
The number of reconstructed photons in each aerogel tiles.
TH1 * h_mergerHit
The number of hits in each Merger Boards.
TH1 * h_theta
Reconstructed Cherenkov angles.
TH2 * h_thetaPhi
cherenkov theta vs phi for non-mirror-reflected photons
TH1 * h_aeroStat
Status of each aerogel tiles.
TH1 * h_ARICHOccAfterInjHer
Histogram Ndigits after HER injection.
TH3 * h_mirrorThetaPhi
cherenkov theta vs phi for mirror reflected photons (for each mirror plate)
TH1 * h_hapdDigit
The number of raw digits in each HAPD.
TH1 * h_chHit
The number of hits in each channel.
TH1 * h_chStat
Status of each channels.
TH1 * h_secHitsPerTrack[6]
Detailed average hits/track for each sector.
TH1 * h_hapdHit
The number of hits in each HAPD.
TH1 * h_ARICHEOccAfterInjLer
Histogram for Nr Entries (=Triggrs) for normalization after LER injection.
TH1 * h_secTheta[6]
Detailed view of Cherenkov angle for each sector.
TH1 * h_hitsPerEvent
Ihe number of all hits in each event.
TH2 * h_tracks2D
2D track distribution of whole ARICH
TH1 * h_bits
Timing bits.

◆ beginRun() [4/11]

void beginRun ( void  )
overridevirtual

Called when entering a new run.

Set run dependent things like run header parameters, alignment, etc.

Reimplemented from Module.

Definition at line 71 of file ARICHFillHitsModule.cc.

72  {
73  }

◆ beginRun() [5/11]

void beginRun ( void  )
overridevirtual

Called when entering a new run.

Set run dependent things like run header parameters, alignment, etc.

Reimplemented from Module.

Definition at line 63 of file ARICHMCParticlesModule.cc.

64  {
65  }

◆ beginRun() [6/11]

void beginRun ( void  )
overridevirtual

Called when entering a new run.

Set run dependent things like run header parameters, alignment, etc.

Reimplemented from Module.

Definition at line 140 of file ARICHNtupleModule.cc.

141  {
142  }

◆ beginRun() [7/11]

void beginRun ( void  )
overridevirtual

Called when entering a new run.

Set run dependent things like run header parameters, alignment, etc.

Reimplemented from Module.

Definition at line 74 of file ARICHPackerModule.cc.

75  {
76  }

◆ beginRun() [8/11]

void beginRun ( void  )
overridevirtual

Called when entering a new run.

Set run dependent things like run header parameters, alignment, etc.

Reimplemented from HistoModule.

Definition at line 106 of file ARICHRateCalModule.cc.

107  {
108  StoreObjPtr<EventMetaData> evtmetadata;
109  //int expno = evtmetadata->getExperiment();
110  int runno = evtmetadata->getRun();
111  if (runno == 100 && !m_internalmode) {
112  terminate();
113  }
114  }
virtual void terminate() override
Termination action.

◆ beginRun() [9/11]

void beginRun ( void  )
overridevirtual

Called when entering a new run.

Set run dependent things like run header parameters, alignment, etc.

Reimplemented from HistoModule.

Definition at line 65 of file ARICHRawUnpackerModule.cc.

66  {
67  }

◆ beginRun() [10/11]

void beginRun ( void  )
overridevirtual

Called when entering a new run.

Set run dependent things like run header parameters, alignment, etc.

Reimplemented from Module.

Definition at line 61 of file ARICHRelateModule.cc.

62  {
63  }

◆ beginRun() [11/11]

void beginRun ( void  )
overridevirtual

Called when entering a new run.

Set run dependent things like run header parameters, alignment, etc.

Reimplemented from Module.

Definition at line 92 of file ARICHUnpackerModule.cc.

93  {
94  }

◆ CherenkovPhoton()

int CherenkovPhoton ( TVector3  r,
TVector3  rh,
TVector3 &  rf,
TVector3 &  dirf,
double *  refind,
double *  z,
int  n,
int  mirrorID = 0 
)
private

Calculates the direction of photon emission.

Giving the Cherenkov photon emission point "r" and its position on detector plane "rh" (hit position) this methods calculates the direction "dirf" in which photon was emitted, under the assumption that it was reflected from "nmir"-th mirror plate (nmir=-1 for no reflection).

Parameters
rvector of photon emission point
rhphoton hit position
dirfvector of photon emission direction (this is output of method)
rfvector of photon position on aerogel exit
refindarray of layers refractive indices
nnumber of aerogel layers through which photon passes
zarray of z coordinates of borders between layers
nmirid of mirror from which the foton was reflected (assuming).

Definition at line 251 of file ARICHReconstruction.cc.

254  {
255  //
256  // Description:
257  // The method calculates the direction of the cherenkov photon
258  // and intersection with the aerogel exit point
259  //
260  // Called by: CerenkovAngle
261 
262 
263  // Arguments:
264  // Input:
265  // dir, r track position
266  // rh photon hit
267 
268 
269  // Output:
270  // rf aerogel exit from which the photon was emitted
271  // dirf photon direction in aerogel
272  static TVector3 norm(0, 0, 1); // detector plane normal vector
273 
274  double dwin = m_arichgp->getHAPDGeometry().getWinThickness();
275  double refractiveInd0 = m_arichgp->getHAPDGeometry().getWinRefIndex();
276 
277  // iteration is stoped when the difference of photon positions on first aerogel exit
278  // between two iterations is smaller than this value.
279  const double dmin = 0.0000001;
280  const int niter = 100; // maximal number of iterations
281  TVector3 dirw;
282  TVector3 rh1 = rh - dwin * norm;
283 
284  std::vector <TVector3> rf0(n + 2);
285  // rf0[0] .. track point
286  // rf0[1] 1. 1st aerogel exit
287  // rf0[n] n. aerogel exit ...
288  std::vector <TVector3> dirf0(n + 2);
289  // dirf0[0] .. 1st aerogel direction
290  // dirf0[1] .. 2nd aerogel direction
291  // dirf0[n] .. direction after aerogels
292 
293  // z[0] .. 1st aerogel exit
294  // z[n-1] .. 2nd aerogel exit
295  // z[n] .. detector position
296  // z[n+1] .. detector + window
297 
298  rf0[0] = r;
299  rf0[1] = rf;
300 
301  for (int iter = 0; iter < niter; iter++) {
302 
303  // direction in the space between aerogels and detector
304  // *************************************
305  if (iter == 0) dirf0[n] = (rh1 - rf0[1]).Unit();
306  else dirf0[n] = (rh1 - rf0[n]).Unit();
307 
308  // *************************************
309  // n-layers of aerogel // refractiveInd relative refractive index
310  for (int a = n - 1; a >= 0 ; a--) {
311  double rind = refractiveInd[a] / refractiveInd[a + 1];
312  dirf0[a] = Refraction(dirf0[a + 1], rind);
313  }
314 
315  double path = (z[0] - r.z()) / dirf0[0].z();
316  double x1 = rf0[1].x();
317  double y1 = rf0[1].y();
318  for (int a = 0; a < n ; a++) {
319  rf0[a + 1] = rf0[a] + dirf0[a] * path;
320  path = (z[a + 1] - rf0[a + 1].z()) / dirf0[a + 1].z();
321  }
322 
323  Refraction(dirf0[n], norm, refractiveInd0, dirw);
324 
325  // *************************************
326 
327  path = dwin / (dirw * norm);
328  rh1 = rh - dirw * path;
329 
330  double d2 = (rf0[1].x() - x1) * (rf0[1].x() - x1) + (rf0[1].y() - y1) * (rf0[1].y() - y1);
331 
332  if ((d2 < dmin) && (iter)) {
333 
334  // if mirror hypothesis check if reflection point lies on mirror plate
335  if (mirrorID) {
336  if (!HitsMirror(rf0[n], dirf0[n], mirrorID)) return -1;
337  }
338 
339  rf = rf0[1];
340  dirf = dirf0[0];
341  return iter;
342  }
343  }
344  return -1;
345  }
DBObjPtr< ARICHGeometryConfig > m_arichgp
geometry configuration parameters from the DB
bool HitsMirror(const TVector3 &pos, const TVector3 &dir, int mirrorID)
returns true if photon at position pos with direction dir hits mirror plate with ID mirrorID

◆ defineHisto() [1/3]

void defineHisto ( )
overridevirtual

Function to define histograms.

This function is hooked to HistoManager by calling RbTupleManager::Instance().register_module ( this ) or using a macro REG_HISTOGRAM. It is supposed to be done in initialize() function.

Reimplemented from HistoModule.

Definition at line 72 of file ARICHDQMModule.cc.

◆ defineHisto() [2/3]

void defineHisto ( )
overridevirtual

Function to define histograms.

This function is hooked to HistoManager by calling RbTupleManager::Instance().register_module ( this ) or using a macro REG_HISTOGRAM. It is supposed to be done in initialize() function.

Reimplemented from HistoModule.

Definition at line 67 of file ARICHRateCalModule.cc.

◆ defineHisto() [3/3]

void defineHisto ( )
overridevirtual

Function to define histograms.

This function is hooked to HistoManager by calling RbTupleManager::Instance().register_module ( this ) or using a macro REG_HISTOGRAM. It is supposed to be done in initialize() function.

Reimplemented from HistoModule.

Definition at line 48 of file ARICHRawUnpackerModule.cc.

◆ endRun() [1/12]

void endRun ( void  )
overridevirtual

Is called after processing the last event of a run.

Good e.g. for storing stuff, that you want to aggregate over one run.

Reimplemented from Module.

Definition at line 558 of file arichBtestModule.cc.

◆ endRun() [2/12]

void endRun ( void  )
overridevirtual

End-of-run action.

Save run-related stuff, such as statistics.

Reimplemented from Module.

Definition at line 228 of file ARICHDigitizerModule.cc.

◆ endRun() [3/12]

void endRun ( void  )
overridevirtual

End-of-run action.

Save run-related stuff, such as statistics.

Reimplemented from HistoModule.

Definition at line 458 of file ARICHDQMModule.cc.

◆ endRun() [4/12]

void endRun ( void  )
overridevirtual

End-of-run action.

Save run-related stuff, such as statistics.

Reimplemented from Module.

Definition at line 167 of file ARICHFillHitsModule.cc.

◆ endRun() [5/12]

void endRun ( void  )
overridevirtual

End-of-run action.

Save run-related stuff, such as statistics.

Reimplemented from Module.

Definition at line 106 of file ARICHMCParticlesModule.cc.

◆ endRun() [6/12]

void endRun ( void  )
overridevirtual

End-of-run action.

Save run-related stuff, such as statistics.

Reimplemented from Module.

Definition at line 346 of file ARICHNtupleModule.cc.

◆ endRun() [7/12]

void endRun ( void  )
overridevirtual

End-of-run action.

Save run-related stuff, such as statistics.

Reimplemented from Module.

Definition at line 256 of file ARICHPackerModule.cc.

◆ endRun() [8/12]

void endRun ( void  )
overridevirtual

End-of-run action.

Save run-related stuff, such as statistics.

Reimplemented from HistoModule.

Definition at line 158 of file ARICHRateCalModule.cc.

◆ endRun() [9/12]

void endRun ( void  )
overridevirtual

End-of-run action.

Save run-related stuff, such as statistics.

Reimplemented from HistoModule.

Definition at line 165 of file ARICHRawUnpackerModule.cc.

◆ endRun() [10/12]

void endRun ( void  )
overridevirtual

End-of-run action.

Save run-related stuff, such as statistics.

Reimplemented from Module.

Definition at line 234 of file ARICHReconstructorModule.cc.

235  {
236  }

◆ endRun() [11/12]

void endRun ( void  )
overridevirtual

End-of-run action.

Save run-related stuff, such as statistics.

Reimplemented from Module.

Definition at line 100 of file ARICHRelateModule.cc.

◆ endRun() [12/12]

void endRun ( void  )
overridevirtual

End-of-run action.

Save run-related stuff, such as statistics.

Reimplemented from Module.

Definition at line 545 of file ARICHUnpackerModule.cc.

◆ event() [1/3]

void event ( void  )
overridevirtual

Running over all events.

Function is called for each evRunning over all events This means, this function is called very often, and good performance of the code is of strong interest.

Reimplemented from Module.

Definition at line 469 of file arichBtestModule.cc.

◆ event() [2/3]

void event ( void  )
overridevirtual

Event processor.

Convert ARICHSimHits of the event to arichDigits.

Reimplemented from Module.

Definition at line 98 of file ARICHDigitizerModule.cc.

◆ event() [3/3]

void event ( void  )
overridevirtual

Event processor.

temporary! FEB Slots on merger should be 1-6 (now 0-5). Remove when firmware is updated!

Reimplemented from Module.

Definition at line 96 of file ARICHUnpackerModule.cc.

◆ FastTracking()

TVector3 FastTracking ( TVector3  dirf,
TVector3  r,
double *  refind,
double *  z,
int  n,
int  opt 
)
private

Calculates the intersection of the Cherenkov photon emitted from point "r" in "dirf" direction with the detector plane.

Parameters
rvector of photon emission point
dirfdirection of photon emission
nnumber of aerogel layers through which photon passes
refindarray of layers refractive indices
zarray of z coordinates of borders between layers

Definition at line 150 of file ARICHReconstruction.cc.

◆ HitVirtualPosition()

TVector3 HitVirtualPosition ( const TVector3 &  hitpos,
int  mirrorID 
)
private

Returns the hit virtual position, assuming that it was reflected from mirror.

Parameters
hitposvector of hit position
mirrorIDid of mirror from which the photon was reflected

Definition at line 224 of file ARICHReconstruction.cc.

◆ initialize() [1/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

Function is called only once at the beginning of your job at the beginning of the corresponding module. Things that can be done here, should be done here, as it is relatively cheap in terms of CPU time.

Reimplemented from Module.

Definition at line 96 of file arichBtestModule.cc.

◆ initialize() [2/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 74 of file ARICHDigitizerModule.cc.

◆ initialize() [3/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

better use isRequired(), but RawFTSW is not in sim

Reimplemented from HistoModule.

Definition at line 206 of file ARICHDQMModule.cc.

◆ initialize() [4/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 59 of file ARICHFillHitsModule.cc.

◆ initialize() [5/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 51 of file ARICHMCParticlesModule.cc.

◆ initialize() [6/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 71 of file ARICHNtupleModule.cc.

◆ initialize() [7/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 64 of file ARICHPackerModule.cc.

◆ initialize() [8/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from HistoModule.

Definition at line 96 of file ARICHRateCalModule.cc.

◆ initialize() [9/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from HistoModule.

Definition at line 56 of file ARICHRawUnpackerModule.cc.

◆ initialize() [10/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 50 of file ARICHRelateModule.cc.

◆ initialize() [11/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 75 of file ARICHUnpackerModule.cc.

◆ magFieldDistorsion()

void magFieldDistorsion ( TVector2 &  hit,
int  copyno 
)

Apply correction to hit position due to non-perpendicular component of magnetic field.

Parameters
hitlocal position of simhit
copynocopy number of hapd

Definition at line 209 of file ARICHDigitizerModule.cc.

◆ mergerClusterHitMap1D()

TH1 * mergerClusterHitMap1D ( TH1 *  hitMap,
int  mergerID 
)

Make 1D hit map of specified Merger Board.

Parameters
1Dhit map of all channels
Merferboard identifier [1:72]
Returns
1D hit map of the merger board

Definition at line 97 of file hitMapMaker.cc.

98  {
99 
100  int m_mergerID = mergerID;
101 
102  DBObjPtr<ARICHChannelMapping> arichChMap;
103  DBObjPtr<ARICHMergerMapping> arichMergerMap;
104 
105  TH1* m_hitMap = hitMap;
106 
107  std::vector<int> moduleIDs;
108  for (int i = 1; i < 7; i++) {
109  moduleIDs.push_back(arichMergerMap->getModuleID(m_mergerID, i));
110  }
111 
112  TH1D* m_mergerHitMap1D = new TH1D("MergerHitMap1D", Form("Hit map in Merger Board %d", m_mergerID), 144 * 6, -0.5, 144 * 6 - 0.5);
113  for (int i = 1; i < 7; i++) {
114  for (int j = 0; j < 144; j++) {
115  int hitsNum = m_hitMap->GetBinContent((moduleIDs[i] - 1) * 144 + i);
116  m_mergerHitMap1D->Fill(144 * (i - 1) + j, hitsNum);
117  }
118  }
119  return m_mergerHitMap1D;
120  }

◆ mergerClusterHitMap2D()

TCanvas * mergerClusterHitMap2D ( TH1 *  hitMap,
int  mergerID 
)

Make display of 6 HAPDs' 2D hit map of the Merger Board.

Parameters
1Dhit map of all channels
Merferboard identifier [1:72]
Returns
Display of 6 HAPDs' 2D hit map

Definition at line 122 of file hitMapMaker.cc.

◆ moduleDeadMap()

TH2 * moduleDeadMap ( TH1 *  hitMap,
int  moduleID 
)

Make chip dead/alive map in HAPD view (2*2 chips)

Parameters
1Dhit map of all channels
Moduleidentifier [1:420]
Returns
2D dead/alive map on HAPD

Definition at line 64 of file hitMapMaker.cc.

◆ moduleHitMap()

TH2 * moduleHitMap ( TH1 *  hitMap,
int  moduleID 
)

Make hit map in HAPD view (12*12 channels)

Parameters
1Dhit map of all channels
Moduleidentifier [1:420]
Returns
2D hit map on HAPD

Definition at line 40 of file hitMapMaker.cc.

◆ printBits()

void printBits ( const int *  buffer,
int  bufferSize 
)
private

Unpack raw data given in production format.

Parameters
bufferraw data buffer
bufferSizebuffer size

Definition at line 537 of file ARICHUnpackerModule.cc.

◆ sectorDeadMap()

TCanvas * sectorDeadMap ( TH1 *  hitMap,
int  sector 
)

Make display of 70 HAPDs' 2D dead/alive map of the sector.

Parameters
1Dhit map of all channels
Sectoridentifier [1:6]
Returns
Display of 70 HAPDs' 2D dead/alive map

Definition at line 178 of file hitMapMaker.cc.

◆ sectorHitMap()

TCanvas * sectorHitMap ( TH1 *  hitMap,
int  sector 
)

Make display of 70 HAPDs' 2D hit map of the sector.

Parameters
1Dhit map of all channels
Sectoridentifier [1:6]
Returns
Display of 70 HAPDs' 2D hit map

Definition at line 146 of file hitMapMaker.cc.

◆ terminate() [1/12]

void terminate ( void  )
overridevirtual

Is called at the end of your Module.

Function is called only once at the end of your job at the end of the corresponding module. This function is for cleaning up, closing files, etc.

Reimplemented from Module.

Definition at line 571 of file arichBtestModule.cc.

◆ terminate() [2/12]

void terminate ( void  )
overridevirtual

Termination action.

Clean-up, close files, summarize statistics, etc.

Reimplemented from Module.

Definition at line 232 of file ARICHDigitizerModule.cc.

◆ terminate() [3/12]

void terminate ( void  )
overridevirtual

Termination action.

Clean-up, close files, summarize statistics, etc.

Reimplemented from HistoModule.

Definition at line 495 of file ARICHDQMModule.cc.

◆ terminate() [4/12]

void terminate ( void  )
overridevirtual

Termination action.

Clean-up, close files, summarize statistics, etc.

Reimplemented from Module.

Definition at line 171 of file ARICHFillHitsModule.cc.

◆ terminate() [5/12]

void terminate ( void  )
overridevirtual

Termination action.

Clean-up, close files, summarize statistics, etc.

Reimplemented from Module.

Definition at line 110 of file ARICHMCParticlesModule.cc.

◆ terminate() [6/12]

void terminate ( void  )
overridevirtual

Termination action.

Clean-up, close files, summarize statistics, etc.

Reimplemented from Module.

Definition at line 350 of file ARICHNtupleModule.cc.

◆ terminate() [7/12]

void terminate ( void  )
overridevirtual

Termination action.

Clean-up, close files, summarize statistics, etc.

Reimplemented from Module.

Definition at line 260 of file ARICHPackerModule.cc.

◆ terminate() [8/12]

void terminate ( void  )
overridevirtual

Termination action.

Clean-up, close files, summarize statistics, etc.

Reimplemented from HistoModule.

Definition at line 162 of file ARICHRateCalModule.cc.

◆ terminate() [9/12]

void terminate ( void  )
overridevirtual

Termination action.

Clean-up, close files, summarize statistics, etc.

Reimplemented from HistoModule.

Definition at line 169 of file ARICHRawUnpackerModule.cc.

◆ terminate() [10/12]

void terminate ( void  )
overridevirtual

Termination action.

Clean-up, close files, summarize statistics, etc.

Reimplemented from Module.

Definition at line 238 of file ARICHReconstructorModule.cc.

◆ terminate() [11/12]

void terminate ( void  )
overridevirtual

Termination action.

Clean-up, close files, summarize statistics, etc.

Reimplemented from Module.

Definition at line 104 of file ARICHRelateModule.cc.

◆ terminate() [12/12]

void terminate ( void  )
overridevirtual

Termination action.

Clean-up, close files, summarize statistics, etc.

Reimplemented from Module.

Definition at line 549 of file ARICHUnpackerModule.cc.