50 -5.191, -4.889, -4.716, -4.538, -4.363, -4.191, -4.013, -3.839, -3.664, -3.489, -3.314, -3.139, -2.964, -2.853,
51 -2.650, -2.500, -2.322, -2.172, -2.043, -1.930, -1.830, -1.740, -1.653, -1.566, -1.479, -1.392, -1.305, -1.218,
52 -1.131, -1.044, -0.957, -0.870, -0.783, -0.696, -0.609, -0.522, -0.435, -0.348, -0.261, -0.174, -0.087, 0.000,
53 0.087, 0.174, 0.261, 0.348, 0.435, 0.522, 0.609, 0.696, 0.783, 0.870, 0.957, 1.044, 1.131, 1.218,
54 1.305, 1.392, 1.479, 1.566, 1.653, 1.740, 1.830, 1.930, 2.043, 2.172, 2.322, 2.500, 2.650, 2.853,
55 2.964, 3.139, 3.314, 3.489, 3.664, 3.839, 4.013, 4.191, 4.363, 4.538, 4.716, 4.889, 5.191};
82 TParticle(pdg, status, mother1, mother2, daughter1, daughter2, px, py, pz, etot, 0, 0, 0, 0)
123 std::set<int> item_set;
125 for (
auto &cellId : sel_cells)
133 if (tower->
fEta > cd.fEtaMin && tower->
fEta < cd.fEtaMax &&
134 tower->
fPhi > cd.fPhiMin && tower->
fPhi < cd.fPhiMax)
149 for(
auto &i : idcs ) {
154 for (
size_t ci = 0; ci < out.size(); ++ci)
156 if (out[ci].fTower == bin && out[ci].fSlice ==
GetSliceIndex())
158 float oldv = out[ci].fFraction;
159 out[ci].fFraction = oldv + frac;
199 for (
int i = 1; i <=
N; ++i)
201 double pt =
r.Uniform(0.5, 10);
202 double eta =
r.Uniform(-2.55, 2.55);
205 double px =
pt * std::cos(phi);
206 double py =
pt * std::sin(phi);
207 double pz =
pt * (1. / (std::tan(2*std::atan(std::exp(-eta)))));
209 auto jet =
new Jet(0, 0, 0, 0, 0, 0, px, py, pz, std::sqrt(px*px + py*py + pz*pz + 80*80));
210 jet->SetEtaSize(
r.Uniform(0.02, 0.2));
211 jet->SetPhiSize(
r.Uniform(0.01, 0.3));
223 for (
int i = 1; i <=
N; ++i)
225 double pt =
r.Uniform(0.5, 10);
226 double eta =
r.Uniform(-2.55, 2.55);
229 double px =
pt * std::cos(phi);
230 double py =
pt * std::sin(phi);
231 double pz =
pt * (1. / (std::tan(2*std::atan(std::exp(-eta)))));
234 auto particle =
new TParticle(0, 0, 0, 0, 0, 0,
235 px, py, pz, std::sqrt(px*px + py*py + pz*pz + 80*80),
238 int pdg = 11 * (
r.Integer(2) > 0 ? 1 : -1);
239 particle->SetPdgCode(pdg);
253 for (
int i = 1; i <=
N; ++i)
255 float pt =
r.Uniform(0.5, 10);
256 float x =
r.Uniform(-200, 200);
257 float y =
r.Uniform(-200, 200);
258 float z =
r.Uniform(-500, 500);
287 for (
int i = 0; i <= jlist->
GetLast(); ++i) {
289 float offX = j->
Eta();
291 for (
int k=0; k<20; ++k) {
324 jet->SetLineColor(jet->GetMainColor());
326 float size = 50.f * dj.
Pt();
327 double theta = dj.
Theta();
329 double phi = dj.
Phi();
332 if (viewType ==
"Projected" )
334 static const float_t offr = 6;
335 float r_ecal = context->
GetMaxR() + offr;
336 float z_ecal = context->
GetMaxZ() + offr;
338 float transAngle = abs(atan(r_ecal/z_ecal));
341 if (theta < transAngle || 3.14-theta < transAngle)
343 z_ecal = context->
GetMaxZ() + offr/transAngle;
344 r = z_ecal/fabs(cos(theta));
349 r = r_ecal/sin(theta);
356 marker->SetScaleCenter(p1.
fX, p1.
fY, p1.
fZ);
357 marker->AddLine(p1, p2);
358 marker->SetLineWidth(4);
360 marker->AddMarker(0, 0.9);
363 marker->SetName(
Form(
"line %s %d",
Collection()->GetCName(), idx));
397 using REveElement::GetSelectionMaster;
414 boxset->
SetName(collection->GetCName());
419 boxset->
Reset(REveBoxSet::kBT_FreeBox,
true, collection->
GetNItems());
422#define RND_BOX(x) (Float_t) r.Uniform(-(x), (x))
472 if (item->GetVisible()) {
593 tableInfo->table(
"TParticle").
594 column(
"pt", 1,
"i.Pt()").
595 column(
"eta", 3,
"i.Eta()").
596 column(
"phi", 3,
"i.Phi()");
598 tableInfo->table(
"Jet").
599 column(
"eta", 1,
"i.Eta()").
600 column(
"phi", 1,
"i.Phi()").
601 column(
"etasize", 2,
"i.GetEtaSize()").
602 column(
"phisize", 2,
"i.GetPhiSize()");
604 tableInfo->table(
"RecHit").
605 column(
"pt", 1,
"i.fPt");
607 tableInfo->table(
"RCaloTower").
608 column(
"eta", 3,
"i.fEta").
609 column(
"phi", 3,
"i.fPhi").
610 column(
"Et", 3,
"i.fEt");
619 if (!strncmp(
c->GetCName(),
"Table", 5))
635 for (
int i = 0; i <=
l->GetLast(); ++i)
680 if (strncmp(scene->GetCName(),
"Tables", 5) == 0)
continue;
684 if (!strncmp(scene->GetCTitle(),
"Projected", 8))
698 tableBuilder->SetHaveAWindow(
true);
699 tableBuilder->SetCollection(collection);
709 if (strncmp(s->GetCTitle(),
"Table", 5) == 0)
711 s->AddElement(tablep);
712 tableBuilder->Build();
715 tableMng->AddDelegate([=]() { tableBuilder->ConfigChanged(); });
722 for (
int t = 0; t <
N; t++) {
723 auto te = tableEntries[t];
744 if (el->GetName() ==
"Tracks")
757 if (proxy->Collection()->GetItemList() == itemList)
760 proxy->ModelChanges(ids);
771 if (proxy->Collection()->GetItemList() == itemList)
773 proxy->FillImpliedSelected(impSelSet, sec_idcs);
811 const std::set<int> &secondary_idcs)
override
817 ExecuteNewElementPicked(selection, colItems, multi,
true, colItems->RefSelectedSet());
830 eveMng = REveManager::Create();
831 auto event =
new Event();
835 auto deviator = std::make_shared<FWSelectionDeviator>();
844 b1->SetMainColor(
kCyan);
845 b1->SetMainTransparency(90);
869 trackCollection->
SetFilterExpr(
"i.Pt() > 4.1 && std::abs(i.Eta()) < 1");
885 auto calo3d =
new REveCalo3D(event->fCaloData);
886 calo3d->SetBarrelRadius(
kR_max);
887 calo3d->SetEndCapPos(
kZ_d);
888 calo3d->SetMaxTowerH(300);
904 eventMng->SetName(
"EventManager");
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
#define ClassDef(name, id)
static unsigned int total
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h prop
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char cname
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
R__EXTERN TRandom * gRandom
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
CaloTowerProxyBuilder(REveCaloDataHist *cd)
REveCaloDataHist * fCaloData
void FillImpliedSelected(REveElement::Set_t &impSet, const std::set< int > &sec_idcs, Product *) override
void BuildProduct(const REveDataCollection *collection, REveElement *product, const REveViewContext *) override
void ModelChanges(const REveDataCollection::Ids_t &ids, Product *product) override
void addCollection(REveDataCollection *collection, REveDataProxyBuilderBase *glBuilder, bool showInTable=false)
CollectionManager(Event *event)
REveScene * m_collections
std::vector< REveScene * > m_scenes
void FillImpliedSelected(REveDataItemList *itemList, REveElement::Set_t &impSelSet, const std::set< int > &sec_idcs)
void ModelChanged(REveDataItemList *itemList, const REveDataCollection::Ids_t &ids)
std::vector< REveDataProxyBuilderBase * > m_builders
REveViewContext * m_viewContext
void SetDataItemsFromEvent(REveDataCollection *collection)
CollectionManager * fCMng
EventManager(Event *e, CollectionManager *m)
void MakeParticles(int N)
std::vector< TList * > fListData
REveCaloDataHist * fCaloData
bool DeviateSelection(REveSelection *selection, REveElement *el, bool multi, bool secondary, const std::set< int > &secondary_idcs) override
void LocalModelChanges(int idx, REveElement *el, const REveViewContext *ctx) override
bool HaveSingleProduct() const override
void BuildItemViewType(const Jet &dj, int idx, REveElement *iItemHolder, const std::string &viewType, const REveViewContext *context) override
void SetEtaSize(float iEtaSize)
Jet(Int_t pdg, Int_t status, Int_t mother1, Int_t mother2, Int_t daughter1, Int_t daughter2, Double_t px, Double_t py, Double_t pz, Double_t etot)
void SetPhiSize(float iPhiSize)
RCaloTower(float eta, float phi, float et)
Cell data inner structure.
void ProcessSelection(REveCaloData::vCellId_t &sel_cells, UInt_t selectionId, Bool_t multi) override
void GetCellsFromSecondaryIndices(const std::set< int > &idcs, REveCaloData::vCellId_t &out) override
REveCaloTowerSliceSelector(int s, REveDataCollection *c, REveCaloDataHist *h)
REveDataCollection * fCollection
REveCaloDataHist * fCaloData
void AddBox(const Float_t *verts)
void Reset(EBoxType_e boxType, Bool_t valIsCol, Int_t chunkSize)
Int_t AddHistogram(TH2F *hist)
Add new slice to calo tower.
void DataChanged() override
Update limits and notify data users.
TH2F * GetHist(Int_t slice) const
Get histogram in given slice.
void GetCellData(const REveCaloData::CellId_t &id, REveCaloData::CellData_t &data) const override
Get cell geometry and value from cell ID.
void SetActiveSlice(int s)
void AddSliceSelector(std::unique_ptr< REveCaloDataSliceSelector > s)
virtual void ProcessSelection(REveCaloData::vCellId_t &sel_cells, UInt_t selectionId, bool multi)=0
virtual void GetCellsFromSecondaryIndices(const std::set< int > &idcs, REveCaloData::vCellId_t &out)=0
void SetSelector(REveCaloDataSelector *iSelector)
REveCaloDataSelector * GetSelector()
SliceInfo_t & RefSliceInfo(Int_t s)
std::vector< CellId_t > vCellId_t
void FillImpliedSelectedSet(Set_t &impSelSet, const std::set< int > &sec_idcs) override
Populate set impSelSet with derived / dependant elements.
REveDataItemList * GetItemList()
void SetFilterExpr(const char *filter)
TClass * GetItemClass() const
void * GetDataPtr(Int_t i) const
void AddItem(void *data_ptr, const std::string &n, const std::string &t)
void SetItemClass(TClass *cls)
void SetMainColor(Color_t) override
Set main color of the element.
const REveDataItem * GetDataItem(Int_t i) const
void AddTooltipExpression(const std::string &title, const std::string &expr, bool init=true)
void SetItemsChangeDelegate(ItemsChangeFunc_t)
void SetFillImpliedSelectedDelegate(FillImpliedSelectedFunc_t)
Color_t GetMainColor() const
Bool_t GetVisible() const
void SetHaveAWindow(bool)
virtual void SetCollection(REveDataCollection *)
virtual void LocalModelChanges(int idx, REveElement *el, const REveViewContext *ctx)
virtual REveElement * CreateProduct(const std::string &viewType, const REveViewContext *)
void FillImpliedSelected(REveElement::Set_t &impSet, const std::set< int > &)
void ModelChanges(const REveDataCollection::Ids_t &)
REveDataCollection * Collection() const
void SetupAddElement(REveElement *el, REveElement *parent, bool set_color=true)
void SetMainColor(Color_t color) override
Override from REveElement, forward to Frame.
void DigitColor(Color_t ci)
Set color for the last digit added.
void SetCurrentDigit(Int_t idx)
Set current digit – the one that will receive calls to DigitValue/Color/Id/UserData() functions.
void RefitPlex()
Instruct underlying memory allocator to regroup itself into a contiguous memory chunk.
DigitBase_t * GetDigit(Int_t n) const
void DigitValue(Int_t value)
Set signal value for the last digit added.
void SetDetIdsAsSecondaryIndices(Bool_t o)
const std::string & GetName() const
void SetPickable(Bool_t p)
virtual void AddElement(REveElement *el)
Add el to the list of children.
virtual Bool_t GetRnrSelf() const
REveElement * FirstChild() const
Returns the first child element or 0 if the list is empty.
void SetSelectionMaster(REveElement *el)
REveElement * fSelectionMaster
std::set< REveElement * > Set_t
ElementId_t GetElementId() const
virtual Color_t GetMainColor() const
void SetName(const std::string &name)
Set name of an element.
REveMagFieldDuo Interface to magnetic field with two different values depending on radius.
REveScene * GetEventScene() const
REveSelection * GetHighlight() const
REveSceneList * GetScenes() const
REveSelection * GetSelection() const
REveElement * FindElementById(ElementId_t id) const
Lookup ElementId in element map and return corresponding REveElement*.
REveScene * GetGlobalScene() const
REveScene * SpawnNewScene(const char *name, const char *title="")
Create a new scene.
REveViewer * SpawnNewViewer(const char *name, const char *title="")
Create a new GL viewer.
REveScene * GetWorld() const
void Show(const RWebDisplayArgs &args="")
Show eve manager in specified browser.
REveProjectionManager Manager class for steering of projections and managing projected objects.
virtual REveElement * ImportElements(REveElement *el, REveElement *ext_list=nullptr)
Recursively import elements and apply projection to the newly imported objects.
void SetImportEmpty(Bool_t ie)
void AddCommand(const std::string &name, const std::string &icon, const REveElement *element, const std::string &action)
SelectionSet_t & RefSelectedSet()
void SetAlwaysSecSelect(Bool_t f)
virtual bool DeviateSelection(REveSelection *s, REveElement *el, bool multi, bool secondary, const std::set< int > &secondary_idcs)=0
REveSelection Container for selected and highlighted elements.
void SetDeviator(std::shared_ptr< Deviator > d)
void ClearSelection()
Clear selection if not empty.
void SetLineColor(Color_t c)
void SetDisplayedCollection(ElementId_t)
REveTrackPropagator Calculates path of a particle taking into account special path-marks and imposed ...
REveTrack Track with given vertex, momentum and optional referece-points (path-marks) along its path.
REveTableViewInfo * GetTableViewInfo() const
void SetTrackPropagator(REveTrackPropagator *p)
void SetTableViewInfo(REveTableViewInfo *ti)
REveTrackPropagator * GetPropagator() const
void SetBarrel(float r, float z)
void SetCameraType(ECameraType t)
virtual void AddScene(REveScene *scene)
Add 'scene' to the list of scenes.
REveElement * GetSelectionMaster() override
Returns the master element - that is:
void ModelChanges(const REveDataCollection::Ids_t &ids, Product *product) override
void buildBoxSet(REveBoxSet *boxset)
void FillImpliedSelected(REveElement::Set_t &impSet, const std::set< int > &sec_idcs, Product *p) override
void BuildProduct(const REveDataCollection *collection, REveElement *product, const REveViewContext *) override
RecHit(float pt, float x, float y, float z)
void SetName(const char *name)
static void AddDirectory(Bool_t add=kTRUE)
Sets the flag controlling the automatic add of histograms in memory.
virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0)
Return Global bin number corresponding to x,y,z.
static Bool_t AddDirectoryStatus()
Static function: cannot be inlined on Windows/NT.
2-D histogram with a float per channel (see TH1 documentation)
void Reset(Option_t *option="") override
Reset this histogram: contents, errors, etc.
Double_t GetBinContent(Int_t binx, Int_t biny) const override
Int_t Fill(Double_t) override
Invalid Fill method.
void Add(TObject *obj) override
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
void BuildItem(const TParticle &p, int idx, REveElement *iItemHolder, const REveViewContext *context) override
Description of the dynamic properties of a particle.
Double_t Theta(const TParticle &p)
This is the base class for the ROOT Random number generators.
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
virtual Int_t GetLast() const
Returns index of last object in collection.
const char * Data() const
ROOT::Experimental::REveProjectionManager * g_projMng
ROOT::Experimental::REveManager * eveMng
void collection_proxies(bool proj=true)
REX::REveManager * eveMng
REX::REveViewer * rhoZView
REX::REveScene * rhoZEventScene
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
constexpr Double_t TwoPi()
const double xbins[xbins_n]
void Setup(const char *name, Float_t threshold, Color_t col, Char_t transp=101)