AnnularDetector.h 2.33 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
/*
 * AnnularDetector.h
 *
 *  Created on: 8.12.2009
 *      Author: Vratislav
 */

#pragma once

#include <TObject.h>
#include <TMath.h>
#include <TRandom3.h>
#include <TVector2.h>

//docasne
#include<iostream>

using 	std::cout;
using 	std::endl;

class AnnularDetector /*: public TObject*/ {

private:

	/////vsechno se bude zadavat ze souboru
	Bool_t		fDSD;			//!
	Int_t		fRingsNumber;	//!
	Int_t		fSecNumber;		//!
	Double_t	fInnerR;		//!	//mm, sensitive region
	Double_t	fOuterR;		//!	//mm, sensitive region
	Double_t	fThickness;		//!	//mcm
	Double_t	fDeadLayerThickness;	//! //mcm,
	Double_t	fZ;				//! //mm
//	Double_t	fPhi[32];		//

	static TRandom3	ranTheta;
	static TRandom3 ranPhi;

public: //docasne verejne
	Int_t		fChSec[32];
	Int_t		fChRing[32];
	Double_t	fESec[32];
	Double_t	fERing[32];
public:
	Int_t		fMultChSec;
	Int_t		fMultChRing;
	Int_t		fMultESec;
	Int_t		fMultERing;



public:
	AnnularDetector();
	virtual ~AnnularDetector();

	void	SetDSD(Bool_t dsd) { fDSD = dsd; }							//prakticky vsechny settery
	void 	SetRingsNumber(Int_t norings) { fRingsNumber = norings; }	//jsou v rootu virtual
	void 	SetSecNumber(Int_t nosec) { fSecNumber = nosec; }
	void	SetInnerR(Double_t r1) { fInnerR = r1; }
	void	SetOuterR(Double_t r2) { fOuterR = r2; }
	void	SetThickness(Double_t x) { fThickness = x; }
	void	SetDeadLayerThickness(Double_t dx) { fDeadLayerThickness = dx; }
	void	SetZ(Double_t z) { fZ = z; }
	void	InitDetector(Bool_t dsd, Int_t nosecs, Int_t norings,
			Double_t innerr, Double_t outerr, Double_t thick,
			Double_t deadthick, Double_t z);	//dsd, nor, nos, ir(mm), or(mm), x(mcm), xdead(mcm), z(mm)
	Int_t	GetSecNumber()	{ return fSecNumber; }
	Int_t	GetRingsNumber() { return fRingsNumber; }
	Double_t	GetThickness() { return fThickness; }
	Double_t	GetDeadLayerThickness() { return fDeadLayerThickness; }
	Double_t	GetZPosition() { return fZ; }

	Int_t 	GetChMultiplicity(Bool_t sec = 1);
	Int_t 	GetEMultiplicity(Bool_t sec = 1);
	Int_t	Reset();	//reset information relating to particular event
	Int_t	FindSec();	//returns first sector where E != 0, returns -1 if E == 0 for all sectors
	Int_t	FindRing(); //returns first ring where E != 0, returns -1 if E == 0 for all rings

	Double_t	GetTheta(Int_t ring);
	Double_t	GetPhi(Int_t sec);
	Double_t	GetX(Int_t ring, Int_t sec);
	Double_t	GetY(Int_t ring, Int_t sec);

	ClassDef(AnnularDetector, 1);
};